Other extensionsKAST 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: //ExprBinary/Expr1::{ExprBinary/Expr2::}ExprConst 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: <Child name> is equivalent to <Child name>::* 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. This expression: //ExprBinary/Expr2::*[isConstant()] cannot be replaced with //ExprBinary/Expr2[isConstant()] because square brackets after names are used for specifying sibling indices. |