KAST expressions and path conditions can contain iterative sequences. An iterative sequence is a subpath starting with a node type and ending with a qualifier.
Iterative sequences are surrounded by braces and can be placed between qualifiers and node type names:
An iterative sequence can be matched at the corresponding place zero or more times. The above example is equivalent to an infinite number of expressions:
//ExprBinary/Expr1::ExprConst //ExprBinary/Expr1::ExprBinary/Expr2::ExprConst //ExprBinary/Expr1::ExprBinary/Expr2::ExprBinary/Expr2::ExprConst
When you are not interested in the actual type of a node, you may use the '*' symbol instead of a type name. But sometimes it's better to use the 'short anonymous children' notation:
is equivalent to
For example, the following conditions are equivalent:
[isConstant(Expr1::*)], [isConstant(Expr1)], [(Expr1::*).isConstant()] and [Expr1.isConstant()]
Note that '*' cannot be omitted in all cases. You should use the full syntax in iterative sequences and for non-final elements of KAST expressions. Consider the following example.
cannot be replaced with
because square brackets after names are used for specifying sibling indices.