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); }
@Override public SExpIR caseAIotaExp(AIotaExp node, IRInfo question) throws AnalysisException { PBind bind = node.getBind(); SBindIR bindCg = bind.apply(question.getBindVisitor(), question); PType type = node.getType(); PExp predicate = node.getPredicate(); SMultipleBindIR multipleBind = question.getBindAssistant().convertToMultipleBind(bindCg); STypeIR typeCg = type.apply(question.getTypeVisitor(), question); SExpIR predicateCg = predicate.apply(question.getExpVisitor(), question); AIotaExpIR exists1Exp = new AIotaExpIR(); exists1Exp.getBindList().add(multipleBind); exists1Exp.setType(typeCg); exists1Exp.setPredicate(predicateCg); return exists1Exp; }
@Override public SExpIR caseAExists1Exp(AExists1Exp node, IRInfo question) throws AnalysisException { PBind bind = node.getBind(); SBindIR bindCg = bind.apply(question.getBindVisitor(), question); PType type = node.getType(); PExp predicate = node.getPredicate(); SMultipleBindIR multipleBind = question.getBindAssistant().convertToMultipleBind(bindCg); STypeIR typeCg = type.apply(question.getTypeVisitor(), question); SExpIR predicateCg = predicate.apply(question.getExpVisitor(), question); AExists1QuantifierExpIR exists1Exp = new AExists1QuantifierExpIR(); exists1Exp.getBindList().add(multipleBind); exists1Exp.setType(typeCg); exists1Exp.setPredicate(predicateCg); return exists1Exp; }