User Tools

Site Tools


groimp-platform:xl-operators

This is an old revision of the document!


Query predicates

These predicates are used in the queries. Note that the description of the predicate is simplified. Please refer to the XL specification to see the complete definition.

All of the examples are part of patterns (on the left hand side in rule query, or in expression query (**) ).

Simple predicate

syntax description example
ID ':.' create a variable ID and assign it the default type of the graph (Node). x:.
ID1 ':' ID2 as before, but the variable ID1 is of type ID2 x:X
ID'('param')' create variables that matches the param given. Arguments can be skipped with either nothing or '.' X(,a,,b,.)
'^' push the expression that follow to the root of the current extent ^X

Path predicate

Control flow predicate

Edge operators

whitespace add node and connect with previous node, if any, by a successor edge
> connect node with previous by a successor edge
< connect node with previous by a reverse successor edge
<-> connect node with previous by successor edges in both directions
--- connect node with previous by a successor edge if there does not yet exist such an edge in either direction
+>, <+, <+>, -+- as before, but branch instead of successor edges
/>, </, </>, -/- as before, but refinement instead of successor edges
-e->, <-e-, <-e->, -e- with an int-valued expression e as before, but edges of type e instead of successor edges
-n-> with a node-valued expression n create a compound edge with n encoding the edge data
<-n- with a node-valued expression n as before, but reverse direction
[, ] define the starts and the end of a branch connected subgraph

Pattern predicates

ID usually represent identifier, but can also be expression. The symbols are put between '. The pattern predicates can only be used on the pattern side of the query.

groimp-platform/xl-operators.1736517154.txt.gz · Last modified: 2025/01/10 14:52 by gaetan