Previous UML Classes Table of Contents UML Packages Next


7.3.18 Expression

Kernel


   An expression is a structured tree of symbols that denotes a (possibly empty) set of values when evaluated in a context.

*Generalizations

   

    ValueSpecification (from Kernel ) on page 140

*Description

   An expression represents a node in an expression tree, which may be non-terminal or terminal. It defines a symbol, and has a possibly empty sequence of operands that are value specifications.

*Attributes

Issue 9191 - change lower multiplicity to 0

   • symbol: String [0..1] The symbol associated with the node in the expression tree.

*Associations

   • operand: ValueSpecification [*] Specifies a sequence of operands. Subsets Element::ownedElement.

*Constraints

   No additional constraints

*Semantics

   An expression represents a node in an expression tree. If there are no operands, it represents a terminal node. If there are operands, it represents an operator applied to those operands. In either case there is a symbol associated with the node. The interpretation of this symbol depends on the context of the expression.

*Notation

   By default an expression with no operands is notated simply by its symbol, with no quotes. An expression with operands is notated by its symbol, followed by round parentheses containing its operands in order. In particular contexts special notations may be permitted, including infix operators.

*Examples

   xorelseplus(x,1)x+1