An object is specified in the following way:

super
   Item1
   Item2
   ...
   Itemn

where super is an optional super pattern - if no super is specified, then the object is a subpattern of pattern Object. Pattern Object is the top superpattern in the pattern- and object hierarchy.

The main-part of an object is a list of Items, Item1, Item2, ..., Itemn.

An Item is either a Declaration or a Statement

There must be exactly one item per line, and all the items must be indented to the same level.

Objects may be nested in which case the indentation level determines the nesting levels - see the section on block-structure.

Example

Record
   name: ?  String
   age: ? Integer
   spouse: ? Person
   isMarried -> B: ? Boolean:
      B := spouse <> none

The superpattern of this object is Record. The object has 4 Items: name, age, spouse, and isMarried.

Singular object

A singular object is declared in the following way:

name: = super
   Item1
   Item2
   ...
   Itemn

where name is the name of the object and super... specifies the structure of the object.

A singular object is a constant declaration.

Example

Peter: = Record
   name: ?  String
   age: ? Integer
   spouse: ? Person
   isMarried -> B: ? Boolean
      B := spouse <> none

Peter is a singular object.