User Tools

Site Tools


groimp-platform:xl-operators

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
groimp-platform:xl-operators [2024/05/02 10:02] TimObgroimp-platform:xl-operators [2025/01/10 15:08] (current) – [Pattern predicates] gaetan
Line 1: Line 1:
-XL-Operators are designed to simplify the usage of XL queries and rewriting rules. Moreover these operators can improve the performance of a query due to there deep integration into the model. +===== Production operators =====
-In the following the operators a separated into Analytical and selection operators to either get a value for analysis or a node/ a collection of nodes for rewriting.+
  
-====== Analytical Operators ======+Production operators are operators that can be used in a production statement.
  
-| Command | description | example | +==== Edge operators ====
-| min((*//query//*)[//value//]) | returns the smallest value | min((*F*)[length]) | +
-| max((*//query//*)[//value//]) | returns the largest value | max((*F*)[length]) | +
-| sum((*//query//*)[//value//]) | calculate the sum of the values | sum((*F*)[length]) | +
-| prod((*//query//*)[//value//]) | unclear | prod((*F*)[length]) | +
-| count((*//query//*) )| returns the number of pattern matching the query | count((*F*) ) | +
-| empty((*//query//*) ) | returns true if no pattern matches the query | empty((*F*) ) | +
-| forall((*//query//*)[//value//]//condition//) | checks if a condition is true for the all results of the query |forall((*f:F*)[length]==1) |   +
-| exist((*//query//*)[//value//]//condition//) | checks if a condition is true for at least one result of the query |exist((*f:F*)[length]==1) |+
  
- +whitespace add node and connect with previous node, if any, by a successor edge 
- +connect node with previous by a successor edge 
-====== Selection Operators ====== +connect node with previous by a reverse successor edge 
- +%%<->%% connect node with previous by successor edges in both directions 
-command description| example+%%---%% connect node with previous by successor edge if there does not yet exist such an edge in either direction 
-first((*//query//*) ) get the first element found with the query | first((*F*) ) +%%+>%%, %%<+%%%%<+>%%, %%-+-%% as before, but branch instead of successor edges 
-last((*//query//*) ) get the last element found with the query | last((*F*) ) +%%/>%%, %%</%%, %%</>%%, %%-/-%% as before, but refinement instead of successor edges 
-|selectWhere((*//query//*),//condition//)Select a node of the query that fits the condition | selectWhere((*f:F*),f[length]==1) +%%-e->%%%%<-e-%%, %%<-e->%%, %%-e-%% with an int-valued expression e as before, but edges of type e instead of successor edges 
-|selectWhereMin((*//query//*),//parameter//)Select node of the query where the parameter is the smallest | selectWhereMin((*f:F*),f[length])  +%%-n->%% with a node-valued expression n create a compound edge with n encoding the edge data 
-|selectWhereMax((*//query//*),//parameter//)Select a node of the query where the parameter is the largest | selectWhereMax((*f:F*),f[length]) +%%<-n-%% with a node-valued expression n as before, but reverse direction 
-|selectRandomly((*//query//*) )select a Random node from the query | selectRandomly((*F*) ) +[, ] define the starts and the end of a branch connected subgraph |
-|selectRandomly((*//query//*),prob) |  | +
- +
- +
-====== Other ====== +
- +
-|command description|example+
-array() | | |  +
-string() | | |+
  
  
groimp-platform/xl-operators.1714636922.txt.gz · Last modified: 2024/05/02 10:02 by TimOb