From 835fed1fd925dd1c95f303f847e23970c1f7f4c4 Mon Sep 17 00:00:00 2001 From: nmacedo Date: Tue, 30 Apr 2019 16:29:13 +0100 Subject: [PATCH] cleaned up logging --- .../alloy4compiler/parser/Action2Alloy.java | 43 +++++++++---------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/electrum/src/main/java/edu/mit/csail/sdg/alloy4compiler/parser/Action2Alloy.java b/electrum/src/main/java/edu/mit/csail/sdg/alloy4compiler/parser/Action2Alloy.java index 414c3136..86aa02ff 100644 --- a/electrum/src/main/java/edu/mit/csail/sdg/alloy4compiler/parser/Action2Alloy.java +++ b/electrum/src/main/java/edu/mit/csail/sdg/alloy4compiler/parser/Action2Alloy.java @@ -27,7 +27,6 @@ import edu.mit.csail.sdg.alloy4compiler.ast.ExprVar; import edu.mit.csail.sdg.alloy4compiler.ast.Sig; import edu.mit.csail.sdg.alloy4compiler.ast.VisitQuery; -import edu.mit.csail.sdg.alloy4compiler.ast.Sig.SubsetSig; import edu.mit.csail.sdg.alloy4compiler.translator.ConvToConjunction; // - create an abstract sig Action @@ -61,10 +60,10 @@ public void expand(final A4Reporter rep, final CompModule root, LinkedHashMap fields = new ArrayList(); fields.add(ev); Sig e_sig = root.addSig("_E", null, null, fields, null, Attr.ONE, Attr.PRIVATE); - System.out.println("Created sig "+e_sig.label+" with "+e_sig.attributes+"."); +// System.out.println("Created sig "+e_sig.label+" with "+e_sig.attributes+"."); final ExprVar e_var = ExprVar.make(null, e_sig.label); Expr mult = e_var.join(ExprVar.make(null, "_event")).one().always(); root.addFact(null, "_e_mult", mult); - System.out.println("Added event multiplicity fact: "+mult+"."); +// System.out.println("Added event multiplicity fact: "+mult+"."); // create the arguments for the fired predicate, action + args @@ -151,9 +150,9 @@ public void expand(final A4Reporter rep, final CompModule root, LinkedHashMap decls = new ArrayList(acts_args.get(act_name)); - System.out.print((decls.size()>0?"With":"Without")+" arguments "); - for (Decl d : decls) System.out.print(d.names+":"+d.expr+" "); +// System.out.print((decls.size()>0?"With":"Without")+" arguments "); +// for (Decl d : decls) System.out.print(d.names+":"+d.expr+" "); Expr v0 = fired_var; for (int i = 0; i < max_args; i ++) { @@ -209,8 +208,8 @@ public void expand(final A4Reporter rep, final CompModule root, LinkedHashMap sig_action = Util.asList(ExprVar.make(null, "_Action")); Sig sig_this = root.addSig(actSigName(n), ExprVar.make(null, "extends"), sig_action, null, null, Attr.ONE, Attr.PRIVATE); - System.out.println("Created sig "+sig_this.label+" with "+sig_this.attributes+"."); +// System.out.println("Created sig "+sig_this.label+" with "+sig_this.attributes+"."); // stores the arguments of this action (needed generating the succeeding constraints depending on total arguments) if (decls == null) decls = new ArrayList(); @@ -285,11 +284,11 @@ public void expandAction(CompModule root, Pos p, Pos isPrivate, String n, List0?"With":"Without")+" arguments "); - for (Decl d : decls) System.out.print(d.names+":"+d.expr+" "); - System.out.println("defined:"); - System.out.println("predicate "+prePredName(n)+" with "+ExprList.make(null, null, ExprList.Op.AND, v1)); - System.out.println("predicate "+postPredName(n)+" with "+ExprList.make(null, null, ExprList.Op.AND, v2)); +// System.out.print((decls.size()>0?"With":"Without")+" arguments "); +// for (Decl d : decls) System.out.print(d.names+":"+d.expr+" "); +// System.out.println("defined:"); +// System.out.println("predicate "+prePredName(n)+" with "+ExprList.make(null, null, ExprList.Op.AND, v1)); +// System.out.println("predicate "+postPredName(n)+" with "+ExprList.make(null, null, ExprList.Op.AND, v2)); // store modified elements, cannot be expanded at this stage as it the modifies from other actions if (mods == null) mods = new ArrayList();