From a3b507f3d2ce6041d29e154e11011d1f963e1a19 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Wed, 27 Sep 2017 16:02:38 +0200 Subject: 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. --- instr-to-kodkod/src/VHDLType.java | 12 +++++++++--- 1 file 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 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 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. -- cgit v1.2.3-70-g09d2