Term

From emotive
Jump to navigation Jump to search

OTX terms represent syntactic expressions which can be evaluated in order to yield a value. The resulting value of a term can be a simple value (e.g. an Integer in the OTX Integer case) or a reference to complex data (e.g. a reference to a list in the OTX List case). Terms are required in various places, when a value needs to be computed which is then e.g. assigned to a Variable, used as an input parameter for a ProcedureCall, or used as the condition truth value in a Branch, etc.

OTX Term hierarchy

As shown in picture above, every OTX term is categorized according to its return type. The OTX syntax prescribes a term hierarchy; the leaf term categories (term to the right side of the hierarchy figure) correspond directly to the OTX data types, e.g. every StringTerm will return a String value.

Terms can be nested. This means that a term can contain another term in an arbitrary depth.

Exclamation.png Important: OTX terms never have side-effects – this means that the arguments of a term shall not be changed by term evaluation.
Exclamation.png Important: The abstract OTX Core terms are extensible. This means that OTX extensions may de-rive new terms from any of the abstract term categories defined in the OTX Core