| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-09-27 16:02:38 +0200 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-09-27 16:02:38 +0200 |
| commit | a3b507f3d2ce6041d29e154e11011d1f963e1a19 (patch) | |
| tree | 9571ec3a02e754067516042d4a80e5aa8cc1a42d | |
| parent | 4e38a30f78a9fbe6287b310139ecc10aef6d398f (diff) | |
Limits the creation of atom-relations to "String".
The need for those relations is limited to the access of their atom in
the formula. As, with the exception of String elements, the formula
cannot directly reference an atom, only String atoms require their own
relation. Going even further, only the String element referenced in the
formula need their own relation.
| -rw-r--r-- | instr-to-kodkod/src/VHDLType.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/instr-to-kodkod/src/VHDLType.java b/instr-to-kodkod/src/VHDLType.java index e38af5e..4057803 100644 --- a/instr-to-kodkod/src/VHDLType.java +++ b/instr-to-kodkod/src/VHDLType.java @@ -90,11 +90,17 @@ public class VHDLType members_as_set = members.entrySet(); - for (final Map.Entry<String, Relation> member: members_as_set) + if (name.toLowerCase().equals("string")) { - b.boundExactly(member.getValue(), f.setOf(member.getKey())); + /* Other types do not require direct access to a member. */ + /* TODO: only bound the strings that are actually mentionned in the + * formula. + */ + for (final Map.Entry<String, Relation> member: members_as_set) + { + b.boundExactly(member.getValue(), f.setOf(member.getKey())); + } } - /* * the toArray() is required to avoid the collection being considered as * a single atom. |


