| summaryrefslogtreecommitdiff |
path: root/instr-scripts
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-07-18 18:06:10 +0200 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-07-18 18:06:10 +0200 |
| commit | 1cac6685e5dc334473c304194d5f816b6ecf3469 (patch) | |
| tree | 337af5ffb3e3ae89494d722e8867ac57588e603c /instr-scripts | |
| parent | 9ab261cc3e22683fcb7ba0ac42b8cd0b916002bd (diff) | |
Adds missing predicate from g4 to instr scripts
Diffstat (limited to 'instr-scripts')
| -rw-r--r-- | instr-scripts/process_internals.py | 36 | ||||
| -rwxr-xr-x | instr-scripts/structural_level.py | 1 |
2 files changed, 36 insertions, 1 deletions
diff --git a/instr-scripts/process_internals.py b/instr-scripts/process_internals.py index a58fc5a..6b63632 100644 --- a/instr-scripts/process_internals.py +++ b/instr-scripts/process_internals.py @@ -33,11 +33,12 @@ def new_element ( return result class Process_Internals: - def __init__ (self, xml, id_manager, wfm_manager, output): + def __init__ (self, xml, id_manager, wfm_manager, process_id, output): self.xml = xml self.id_manager = id_manager self.wfm_manager = wfm_manager self.output = output + self.process_id = process_id def parse (self): start = self.xml.find("./sequential_statement_chain") @@ -97,6 +98,17 @@ class Process_Internals: def handle_if_node (self, xml, prev_nodes, node_depth, extra_attributes): cond_node_id = new_element(self.output, self.id_manager, "node") + ## FIXME: That's a dirty hack. + if (self.process_id != None): + self.output.write( + "(is_start_node " + + cond_node_id + + " " + + self.process_id + + ")\n" + ) + self.process_id = None + for pn in prev_nodes: self.output.write( "(node_connect " @@ -207,6 +219,17 @@ class Process_Internals: ): node_id = new_element(self.output, self.id_manager, "node") + ## FIXME: That's a dirty hack. + if (self.process_id != None): + self.output.write( + "(is_start_node " + + node_id + + " " + + self.process_id + + ")\n" + ) + self.process_id = None + for pn in prev_nodes: self.output.write( "(node_connect " @@ -308,6 +331,17 @@ class Process_Internals: def handle_case_node (self, xml, prev_nodes, node_depth, extra_attributes): cond_node_id = new_element(self.output, self.id_manager, "node") + ## FIXME: That's a dirty hack. + if (self.process_id != None): + self.output.write( + "(is_start_node " + + cond_node_id + + " " + + self.process_id + + ")\n" + ) + self.process_id = None + for pn in prev_nodes: self.output.write( "(node_connect " diff --git a/instr-scripts/structural_level.py b/instr-scripts/structural_level.py index 9c99b3e..a5c9763 100755 --- a/instr-scripts/structural_level.py +++ b/instr-scripts/structural_level.py @@ -521,6 +521,7 @@ def handle_process ( elem, id_manager, wfm_manager, + local_id, pf ) internals.parse() |


