$parallel (lg.nodes.size() + rg.nodes.size()) > 2000 | |
rule Graph | |
match lg : Left!Graph with rg : Right!Graph { | |
compare : lg.nodes.asSet().matches(rg.nodes.asSet()) | |
} | |
@lazy | |
rule Node | |
match ln : Left!Node with rn : Right!Node { | |
guard : ln.name.equalsIgnoreCase(rn.name) | |
compare : ln.outgoing.size() == rn.outgoing.size() and | |
ln.incoming.size() == rn.outgoing.size() | |
} | |
post { | |
matchTrace.getMatches() | |
.parallelSelect(m | m.`rule`.name == "Node") | |
.parallelForAll(m | m.isMatching()) | |
.println(); | |
} |