| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-07-26 14:32:28 +0200 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-07-26 14:32:28 +0200 |
| commit | 5f06e34bc24876739c1d4af1d45f7cb322a19559 (patch) | |
| tree | 38363a28b472610d5dc8391baeba2d98e731fa2c /instr-to-kodkod/src/VHDLLevel.java | |
| parent | 1eb79a5c6ae03500a2816a34983e5d4cc700de33 (diff) | |
First shot at (logic, not VHDL) functions.
Diffstat (limited to 'instr-to-kodkod/src/VHDLLevel.java')
| -rw-r--r-- | instr-to-kodkod/src/VHDLLevel.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/instr-to-kodkod/src/VHDLLevel.java b/instr-to-kodkod/src/VHDLLevel.java index 738adaf..57bb8c4 100644 --- a/instr-to-kodkod/src/VHDLLevel.java +++ b/instr-to-kodkod/src/VHDLLevel.java @@ -60,7 +60,11 @@ public class VHDLLevel } else if (input[0].equals("add_predicate")) { - success = handle_add_predicate(input, m); + success = handle_add_predicate(input, m, false); + } + else if (input[0].equals("add_function")) + { + success = handle_add_predicate(input, m, true); } else { @@ -128,7 +132,8 @@ public class VHDLLevel private static boolean handle_add_predicate ( final String[] cmd, - final VHDLModel m + final VHDLModel m, + final boolean is_function ) { final String[] signature; @@ -137,7 +142,8 @@ public class VHDLLevel { System.err.println ( - "[E] Badly formed \"add_predicate\" instruction: \"" + "[E] Badly formed \"add_predicate\" or \"add_function\"" + + " instruction: \"" + String.join(" ", cmd) + "\"." ); @@ -152,6 +158,6 @@ public class VHDLLevel signature[i - 2] = cmd[i]; } - return m.add_predicate(cmd[1], signature); + return m.add_predicate(cmd[1], signature, is_function); } } |


