Cloning statement
Serge Guelton
May 21, 2012
New type used for cloning
This document defines and describes the data structure used to pass parameters to
the clone_statement function. It consist of three fields given by the user:
- previous_module is the entity of the module from which the cloned
statement comes
- new_module is the entity of the module to which the cloned statement
will be added. It can be the same as previous_module
- labels is the label mapping between old labels and new labels. If the old
statement has two entities with the same label (like the statement and a
loop inside the statement), then the new entity must also have those two
entities with the same label.
- new_module_statement is the root statement of new_module
import entity from "ri.newgen"
import statement from "ri.newgen"
clone_context = previous_module:entity x new_module:entity x
labels:entity* x persistent new_module_statement:statement