zxcalc / quantomatic

Quantomatic is a tool for doing automated graph rewriting.
http://quantomatic.github.io
154 stars 22 forks source link

simproc API : extend rewrite_targeted #192

Open rossduncan opened 6 years ago

rossduncan commented 6 years ago

improve REWRITE_TARGETTED by replacing the targeting function f : G --> V(g) with a function returning a partial dictionary of targets f : G --> (V(r) --> V(g)) which first tries to match all the keys in the dictionary (vertices in the rule) with their values (vertices in the graph), before attempting to match the rest of the rule.