How to name the thing that has components? [closed]

What is the best name for the abstract thing which contains components?

Context: I am writing an abstraction in a computer program. My domain consists of abstract entities. I don't know what concrete entities will exist later on. But I know, some entities are components of other entities.

An example concretization of the abstraction would be the entities house, window and door. Here window and door are components of a house. So the house is the ??? of windows and doors?

The word will be used in source code and also on the user interface. In questions or in error messages:

  • Is a house a ??? of a window?
  • What is a house the ??? of?
  • What is the ??? of a window?
  • Error: A door is not a ??? of a window.

Note that the word must work in unknown domains. Instead of house, window and door. It could be body, arm and finger. Or continent, country and city.

The user will be building a tree of entities of his own choice. The software needs to name them as entities, components and ???.

An entity could be a component and a ??? at the same time.

A compound word would be ok, but the shorter, the better.

What I have ruled out:

  • collection - because usualy a collection has items of the same type. and collection is already used in the core of my programming language and this would create a name collision.

What I am considering:

  • container
  • composition

You could try

assembly

Merriam Webster says:

a: the fitting together of manufactured parts into a complete machine, structure, or unit of a machine

b: a collection of parts so assembled


I'd go with parent in this case. The parent has several child components. A "parent-child relationship" is a pretty common phrase in computer science, and it would seem to fit most of your examples:

  • Is a house a parent of a window?
  • What is a house the parent of?
  • What is the parent of a window?
  • Error: A door is not a parent of a window.

I will go out on a limb and say that "vessel" can be used to fit your requirements, or at least people will understand it clearly enough, and saying 'A house is a vessel of a window' sounds cool enough.

https://www.thefreedictionary.com/vessel

vessel

container; water craft; airship:

vessel (ˈvɛsəl)

n 1. any object used as a container, esp for a liquid

Notice the linked dictionary doesn't contain spaceship, but Chekov used it as such anyways.


I'd use the word corpus to describe something made up of smaller components.

A corpus is the body of the whole which is then comprised of smaller units. It's used in literature to describe an entire body of works. It also refers to a collection of pieces of knowledge on a subject.

The term originated from anatomy, meaning the body. Bodies are composed of limbs and organs, and you can argue that these serve the same function as your program components.


Also, given that we're discussing computer programming, there already exists a term for this sort of thing:

Program. For example: Microsoft Word is a series of components and subroutines brought together into one program.

A collection of programs is usually called a suite. For example: Microsoft Office.

You may wish to stick to these existing conventions.


Two terms probably worthy of consideration are "aggregation" and "compound".

References:

From The Free On-line Dictionary of Computing (18 March 2015) [foldoc]:

aggregation

 <programming> A composition technique for building a new
 {object} from one or more existing objects that support some
 or all of the new object's required interfaces.

 (1996-01-07)


Compound \Com"pound\, a. [OE. compouned, p. p. of compounen. See
 {Compound}, v. t.]
 Composed of two or more elements, ingredients, parts;
 produced by the union of several ingredients, parts, or
 things; composite; as, a compound word.
 [1913 Webster]