Next: Semantics
Up: Forms for defining model
Previous: Forms for defining model
In order to allow for more concise and readable definitions, the
defEntity and defModelFragment forms provide some syntactic
sugar.
- :self
-
The symbol :self may be used to refer to the current instance of
a model fragment. Note that it may not be used in the
:conditions clause of a model-fragment definition with no
superclasses, as this would place it outside of the scope within which
the instance exists.
- name
-
The user provided symbol for the name of a model fragment or
entity may be used instead of :self, and is completely
equivalent.
- quantity
-
The symbol for any quantity may be used to refer to the appropriate
quantity within the :consequences clause. This is completely
equivalent to the more verbose form
(quantity :self)
which may also be used.
- attribute
-
The symbol for any attribute may be used to refer to the appropriate
attribute within the :consequences clause. This is completely
equivalent to the more verbose form
(attribute :self)
which may also be used.
- :substitutions
-
The :substitutions field defines a set of purely syntactic
substitutions that are applied prior to the replacements described
above. Each element in the field is a list containing a
symbol and an arbitrary form. The form is substituted
for the symbol wherever it appears within the original definition
(excluding the substitutions field). The substitutions are not
inherited, and are not available outside of the definition in any way.
- participant
-
In a model fragment definition, the user provided symbol for each
participant may be used to refer to that participant. Outside
of the :conditions clause, the more verbose form
(participant :self)
may also be used (there are no participants in entity definitions).
Tom Mostek
Wed Jan 21 13:00:43 CST 1998