Skip to content
Snippets Groups Projects
Commit 8c37649d authored by Michael Leuschel's avatar Michael Leuschel
Browse files

more uses of the verbose flag

parent 7dd036ec
Branches
Tags
No related merge requests found
Pipeline #142168 passed
......@@ -5,6 +5,7 @@ import de.tla2b.analysis.AbstractASTVisitor;
import de.tla2b.analysis.SpecAnalyser;
import de.tla2b.global.BBuiltInOPs;
import de.tla2b.global.TranslationGlobals;
import de.tla2b.util.DebugUtils;
import tla2sany.semantic.ASTConstants;
import tla2sany.semantic.ModuleNode;
import tla2sany.semantic.OpApplNode;
......@@ -60,7 +61,9 @@ public class UsedDefinitionsFinder extends AbstractASTVisitor implements ASTCons
for (OpDefNode opDef : specAnalyser.getModuleNode().getOpDefs()) {
String defName = opDef.getName().toString();
// GOAL, ANIMATION_FUNCTION, ANIMATION_IMGxx, SET_PREF_xxx, etc.
// DebugUtils.printDebugMsg("Checking definition: " + defName);
if (Utils.isProBSpecialDefinitionName(defName)) {
DebugUtils.printMsg("ProB special definition: " + defName);
usedDefinitions.add(opDef);
}
}
......
......@@ -7,6 +7,11 @@ public class DebugUtils {
debugOn = newDebugOn;
}
public static void printVeryVerboseMsg(String Msg) {
// TODO: turn on using -vv flag
// System.out.println(Msg);
}
public static void printDebugMsg(String Msg) {
if(debugOn) {
System.out.println(Msg);
......
......@@ -14,6 +14,7 @@ import de.tla2b.global.*;
import de.tla2b.translation.BMacroHandler;
import de.tla2b.translation.RecursiveFunctionHandler;
import de.tla2b.types.*;
import de.tla2b.util.DebugUtils;
import tla2sany.semantic.*;
import tla2sany.st.Location;
import tlc2.tool.BuiltInOPs;
......@@ -178,13 +179,17 @@ public class BAstCreator extends BuiltInOPs
OpDefNode def = moduleNode.getOpDefs()[i];
if (specAnalyser.getBDefinitions().contains(def)) {
if (conEval != null && conEval.getConstantOverrideTable().containsValue(def)) {
DebugUtils.printVeryVerboseMsg("Not creating B DEFINITION (in Override Table) " + def.getName() + " " + def);
continue;
}
if (def.getOriginallyDefinedInModuleNode().getName().toString().equals("MC")) {
continue;
}
//debugUtils.printVeryVerboseMsg("Creating B DEFINITION " + def.getName() + " " + def);
bDefs.add(def);
} else {
DebugUtils.printVeryVerboseMsg("Not creating unused B DEFINITION for " + def.getName() + " " + def);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment