Add 'cloner'. Example also uses concrete syntax for LHS and RHS. Renders all possible rewrites and morphisms with LHS and RHS.
This commit is contained in:
parent
e875821e70
commit
c351649d23
3 changed files with 129 additions and 93 deletions
8
transformation/cloner.py
Normal file
8
transformation/cloner.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
from uuid import UUID
|
||||
from concrete_syntax.textual_od import parser, renderer
|
||||
|
||||
# Clones an object diagram
|
||||
def clone_od(state, m: UUID, mm: UUID):
|
||||
# cheap-ass implementation: render and parse
|
||||
cs = renderer.render_od(state, m, mm, hide_names=False)
|
||||
return parser.parse_od(state, cs, mm)
|
||||
Loading…
Add table
Add a link
Reference in a new issue