public DeclAssistantIR getDeclAssistant() { return assistantManager.getDeclAssistant(); }
public ExpAssistantIR getExpAssistant() { return assistantManager.getExpAssistant(); }
public TypeAssistantIR getTypeAssistant() { return assistantManager.getTypeAssistant(); }
throws org.overture.codegen.ir.analysis.AnalysisException SClassDeclIR classDecl = assistantManager.getDeclAssistant().findClass(info.getClasses(), fieldModule); List<AMethodDeclIR> methods = assistantManager.getDeclAssistant().getAllMethods(classDecl, info.getClasses()); if (assistantManager.getTypeAssistant().checkArgTypes(info, args, params))
public static void printUnsupportedIrNodes( Set<VdmNodeInfo> unsupportedNodes) { AssistantManager assistantManager = new AssistantManager(); LocationAssistantIR locationAssistant = assistantManager.getLocationAssistant(); List<VdmNodeInfo> nodesSorted = locationAssistant.getVdmNodeInfoLocationSorted(unsupportedNodes); for (VdmNodeInfo vdmNodeInfo : nodesSorted) { MsgPrinter.getPrinter().print(vdmNodeInfo.getNode().toString() + " (" + vdmNodeInfo.getNode().getClass().getSimpleName() + ")"); ILexLocation location = locationAssistant.findLocation(vdmNodeInfo.getNode()); MsgPrinter.getPrinter().print(location != null ? " at [line, pos] = [" + location.getStartLine() + ", " + location.getStartPos() + "] in " + location.getFile().getName() : ""); String reason = vdmNodeInfo.getReason(); if (reason != null) { MsgPrinter.getPrinter().print(". Reason: " + reason); } MsgPrinter.getPrinter().println(""); } }
public NodeAssistantIR getNodeAssistant() { return assistantManager.getNodeAssistant(); }
public LocationAssistantIR getLocationAssistant() { return assistantManager.getLocationAssistant(); }
public BindAssistantIR getBindAssistant() { return assistantManager.getBindAssistant(); }
public StmAssistantIR getStmAssistant() { return assistantManager.getStmAssistant(); }
public PatternAssistantIR getPatternAssistant() { return assistantManager.getPatternAssistant(); }
public IRInfo() { super(); this.visitorManager = new VisitorManager(); this.assistantManager = new AssistantManager(); this.tcFactory = new TypeCheckerAssistantFactory(); this.quoteVaues = new LinkedList<String>(); this.unsupportedNodes = new HashSet<VdmNodeInfo>(); this.transformationWarnings = new HashSet<IrNodeInfo>(); this.tempVarNameGen = new TempVarNameGen(); this.settings = new IRSettings(); this.idStateDesignatorDefs = new HashMap<AIdentifierStateDesignator, PDefinition>(); this.classes = new LinkedList<SClassDeclIR>(); this.modules = new LinkedList<AModuleDeclIR>(); this.slStateReads = new LinkedList<>(); this.instantiatedClasses = new HashSet<>(); }
String recordName = recordType.getName().getName(); SClassDeclIR classDecl = transAssistant.getInfo().getAssistantManager().getDeclAssistant().findClass(transAssistant.getInfo().getClasses(), definingClassName); ARecordDeclIR record = transAssistant.getInfo().getAssistantManager().getDeclAssistant().findRecord(classDecl, recordName); List<STypeIR> fieldTypes = transAssistant.getInfo().getAssistantManager().getTypeAssistant().getFieldTypes(record);
public static void printUnsupportedNodes(Set<IrNodeInfo> unsupportedNodes) AssistantManager assistantManager = new AssistantManager(); LocationAssistantIR locationAssistant = assistantManager.getLocationAssistant();
public void addDependencies(SClassDeclIR clazz, List<ClonableString> extraDeps, boolean prepend) { NodeAssistantIR nodeAssistant = assistantManager.getNodeAssistant(); clazz.setDependencies(nodeAssistant.buildData(clazz.getDependencies(), extraDeps, prepend)); }
private void registerViolation(String name, ILexLocation location) { Violation violation = new Violation(name, location, assistantManager.getLocationAssistant()); addViolation(violation); } }
public boolean isMapType(SExpIR exp) { return info.getAssistantManager().getTypeAssistant().isMapType(exp); }
private boolean moduleNeedsHandling(SClassDefinition enclosingClass) { return enclosingClass != null && !assistantManager.getDeclAssistant().isLibrary(enclosingClass); }
public void setDefaultValue(AVarDeclIR localDecl, STypeIR typeCg) { ExpAssistantIR expAssistant = assistantManager.getExpAssistant(); if (typeCg instanceof AStringTypeIR) { localDecl.setExp(expAssistant.getDefaultStringlValue()); } else if (typeCg instanceof ACharBasicTypeIR) { localDecl.setExp(expAssistant.getDefaultCharlValue()); } else if (typeCg instanceof AIntNumericBasicTypeIR) { localDecl.setExp(expAssistant.getDefaultIntValue()); } else if (typeCg instanceof ANat1NumericBasicTypeIR) { localDecl.setExp(expAssistant.getDefaultNat1Value()); } else if (typeCg instanceof ANatNumericBasicTypeIR) { localDecl.setExp(expAssistant.getDefaultNatValue()); } else if (typeCg instanceof ARealNumericBasicTypeIR) { localDecl.setExp(expAssistant.getDefaultRealValue()); } else if (typeCg instanceof ABoolBasicTypeIR) { localDecl.setExp(expAssistant.getDefaultBoolValue()); } else { localDecl.setExp(assistantManager.getExpAssistant().consUndefinedExp()); } }
public boolean isSeqType(SExpIR exp) { return info.getAssistantManager().getTypeAssistant().isSeqType(exp); }
public STypeIR getFieldType(List<SClassDeclIR> classes, String moduleName, String fieldName) { SClassDeclIR classDecl = assistantManager.getDeclAssistant().findClass(classes, moduleName); return getFieldType(classDecl, fieldName, classes); }