| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-08-30 11:22:16 +0200 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-08-30 11:22:16 +0200 |
| commit | aebd8f1bd52495b0a787e0cccfa4501141eace2b (patch) | |
| tree | f2c0339b6cb0767fd858ea21523fd18f1bfdd075 /instance-calculator/src/VHDLProcess.java | |
| parent | 882d605d684abf7120a1b5b095e7f5425e77dd34 (diff) | |
Outputs are now generated.
Diffstat (limited to 'instance-calculator/src/VHDLProcess.java')
| -rw-r--r-- | instance-calculator/src/VHDLProcess.java | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/instance-calculator/src/VHDLProcess.java b/instance-calculator/src/VHDLProcess.java index d54e0cc..eba5e46 100644 --- a/instance-calculator/src/VHDLProcess.java +++ b/instance-calculator/src/VHDLProcess.java @@ -1,4 +1,5 @@ import java.util.*; +import java.io.BufferedWriter; public class VHDLProcess { @@ -61,6 +62,11 @@ public class VHDLProcess architecture = null; } + public String get_id () + { + return id; + } + public void add_accessed_wfm (final VHDLWaveform wfm) { if (!accessed_wfm.contains(wfm)) @@ -172,5 +178,62 @@ public class VHDLProcess return result; } + + public void write_predicates_to (final OutputFile of) + { + final Set<Map.Entry<VHDLWaveform.Instance, VHDLWaveform>> iwfm_set; + + iwfm_set = iwfm_map.entrySet(); + + try + { + of.write("(is_process_instance "); + of.write(id); + of.write(" "); + of.write(parent.get_id()); + of.write(")"); + of.insert_newline(); + + of.write("(is_visible_in "); + of.write(id); + of.write(" "); + of.write(parent.get_id()); + of.write(" "); + of.write(visibility.get_id()); + of.write(")"); + of.insert_newline(); + + for + ( + final Map.Entry<VHDLWaveform.Instance, VHDLWaveform> iwfm: + iwfm_set + ) + { + of.write("(process_instance_maps "); + of.write(id); + of.write(" "); + of.write(parent.get_id()); + of.write(" "); + of.write(iwfm.getKey().get_id()); + of.write(" "); + of.write(iwfm.getKey().get_parent().get_id()); + of.write(" "); + of.write(iwfm.getValue().get_id()); + of.write(")"); + of.insert_newline(); + } + } + catch (final Exception e) + { + System.err.println + ( + "[F] Could not write to output file:" + ); + + e.printStackTrace(); + + System.exit(-1); + } + } } } |


