public AssistantManager() { this.nodeAssistant = new NodeAssistantIR(this); this.expAssistant = new ExpAssistantIR(this); this.declAssistant = new DeclAssistantIR(this); this.stmAssistant = new StmAssistantIR(this); this.typeAssistant = new TypeAssistantIR(this); this.locationAssistant = new LocationAssistantIR(this); this.bindAssistant = new BindAssistantIR(this); this.patternAssistant = new PatternAssistantIR(this); }
public STypeIR getFieldType(List<SClassDeclIR> classes, String moduleName, String fieldName) { SClassDeclIR classDecl = assistantManager.getDeclAssistant().findClass(classes, moduleName); return getFieldType(classDecl, fieldName, classes); }
private boolean moduleNeedsHandling(SClassDefinition enclosingClass) { return enclosingClass != null && !assistantManager.getDeclAssistant().isLibrary(enclosingClass); }
public AVarDeclIR consDecl(String varName, STypeIR type, SExpIR exp) { return info.getDeclAssistant().consLocalVarDecl(type, info.getPatternAssistant().consIdPattern(varName), exp); }
public boolean isStringType(STypeIR type) { return info.getAssistantManager().getTypeAssistant().isStringType(type); }
public ILexLocation findLocation(IrNodeInfo info) { INode vdmNode = getVdmNode(info); if (vdmNode == null) { return null; } return findLocation(vdmNode); }
public NameGen(SClassDeclIR classDecl) { this(AssistantBase.getVdmNode(classDecl)); }
public AIntLiteralExpIR getDefaultNatValue() { return consIntLiteral(0L); }
public AStringLiteralExpIR getDefaultStringlValue() { return consStringLiteral("", true); }
public DeclAssistantIR getDeclAssistant() { return assistantManager.getDeclAssistant(); }
public TypeAssistantIR getTypeAssistant() { return assistantManager.getTypeAssistant(); }
public void addDependencies(SClassDeclIR clazz, List<ClonableString> extraDeps, boolean prepend) { NodeAssistantIR nodeAssistant = assistantManager.getNodeAssistant(); clazz.setDependencies(nodeAssistant.buildData(clazz.getDependencies(), extraDeps, prepend)); }
@Override public int compareTo(Violation other) { return locationAssistant.compareLocations(this.location, other.location); } }
public boolean containsType(List<STypeIR> types, STypeIR searchedType) { for (STypeIR currentType : types) { if (typesEqual(currentType, searchedType)) { return true; } } return false; }
public NodeAssistantIR getNodeAssistant() { return assistantManager.getNodeAssistant(); }
public LocationAssistantIR getLocationAssistant() { return assistantManager.getLocationAssistant(); }
public BindAssistantIR getBindAssistant() { return assistantManager.getBindAssistant(); }
public ARealLiteralExpIR getDefaultRealValue() { return consRealLiteral(0.0); }
public boolean isStringType(SExpIR exp) { return info.getAssistantManager().getTypeAssistant().isStringType(exp); }
public AIntLiteralExpIR getDefaultNat1Value() { return consIntLiteral(1L); }