Skip to content

Commit f73c3ce

Browse files
committed
Merge branch 'simulator' into v2.1
2 parents a2cf68e + 228d43e commit f73c3ce

File tree

1 file changed

+3
-2
lines changed
  • org.alloytools.alloy.application/src/main/java/edu/mit/csail/sdg/alloy4viz

1 file changed

+3
-2
lines changed

org.alloytools.alloy.application/src/main/java/edu/mit/csail/sdg/alloy4viz/VizGUI.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,7 @@ private Runner doExportXml() {
14431443
}
14441444

14451445
// [HASLab]
1446+
// reuses the Pardinus instance to formula translation, so needs some tweaks to the Alloy level
14461447
private Runner doExportLTL() {
14471448
if (wrap)
14481449
return wrapMe();
@@ -1455,7 +1456,7 @@ private Runner doExportLTL() {
14551456
rels = rels.and(r.eq(r));
14561457
Formula form = null;
14571458
Map<Object,Expression> reifs = new HashMap<Object,Expression>();
1458-
form = inst.formulate(new HashMap<Object,Expression>(), rels, true, new PardinusBounds(inst.state(0).universe()));
1459+
form = inst.formulate(reifs, rels, true, new PardinusBounds(inst.state(0).universe()), false);
14591460
Expression unvs = Expression.UNIV;
14601461
for (int i = 1; i < inst.prefixLength(); i++)
14611462
unvs = Expression.UNIV.union(unvs.prime());
@@ -1481,7 +1482,7 @@ public Expression visit(Variable v) {
14811482

14821483
};
14831484
form = form.accept(repls);
1484-
OurDialog.showtext("Text Viewer", PrettyPrinter.print(form, 4).replaceFirst("some", "some disj"));
1485+
OurDialog.showtext("Text Viewer", PrettyPrinter.print(form, 4).replaceAll("Int\\[(-?\\d*)\\]", "$1").replaceFirst("some", "some disj"));
14851486
return null;
14861487
}
14871488

0 commit comments

Comments
 (0)