Skip to content

Core Group

Robert de Forest edited this page Jan 28, 2019 · 1 revision

A Group is an entity which is composed of parts which are also Entities. The group's contents are associated with it via Relations describing the nature of their membership in the Group. The Group's class defines its behavior as an Entity.

"Put key in lock"

key isa KeyEntity
lock isa PadlockComposite
Padlock isa Composite
Padlock hasa Keyhole
Padlock hasa Mechanism (open or closed)
lock.dimension.padlock.keyhole.contains === key
me.context.recent("key") === lock's key+keyhole

isa: gives object chance to handle messages to subject
hasa: adds object to Composite subject

Responsibilities

Formation

Create a sock pile

  • Starting entities: outerSubject = a room, outerObject = a sock
  • Starting relation: outerRelation = contains(room, sock)
  • Create a new Group with class SockPile
  • Create a new relation contains(room, sockpile)

Association

Move sock to pile

  • Create relation: includes(pile, sock)
  • Destroy relation: contains(room, sock)

Note that this is not the same as "moving" the sock. The sock's relationship to the room is different from its relationship to the group. The room's relationship to the pile is the same as the sock's was, but keeping the operations separate simplifies the design.

Dissociation

Reverse of association

Dissolution

Reverse of formation

Decoration (proxy for members)

  • The piles appearance in the room depends on its contents
  • Actors trying to interact with "a sock" will do so through the group

Group types

  • Scalar - logical grouping by traits

    • concrete: size, age
    • abstract: preference
  • Associative (piles)

  • Location

    • in, on, under, against
    • temporal
  • Comparative (possibly not necessary?)

Group vs Relation

A Group is an entity representing a collection of constituent entities. A group's contents share the group's relationships in a group-defined way. When a type of flower is added to the "blue" group, it comes up in a search for blue things. It's a kind of sideways inheritance. It also places the flower in the "color space" in the sense that "blueness" is not binary but rather a continuum. As such, "something blue" can match members of many sub-groups of the BlueStuff group as well as the groups which are proximate to BlueStuff.

A Relation groups two participants within a third context.

Clone this wiki locally