private PExp makeEqWithApply(PExp l, PExp r, ATypeDefinition node){ List<PExp> args = new Vector<>(); args.add(l.clone()); args.add(r.clone()); PExp root = AstFactory.newAVariableExp(node.getName().getEqName(node.getLocation()).clone()); return AstFactory.newAApplyExp(root,args); } }
private PExp makeLessWithApply(PExp l, PExp r, ATypeDefinition node){ List<PExp> args = new Vector<>(); args.add(l.clone()); args.add(r.clone()); PExp root = AstFactory.newAVariableExp(node.getName().getOrdName(node.getLocation()).clone()); return AstFactory.newAApplyExp(root,args); }
public SatisfiabilityObligation(ATypeDefinition node, IPOContextStack ctxt, IPogAssistantFactory af) throws AnalysisException { super(node, POType.TYPE_INV_SAT, ctxt, node.getLocation(), af); AExistsExp exists_exp = new AExistsExp(); exists_exp.setType(new ABooleanBasicType()); ATypeMultipleBind tmb = new ATypeMultipleBind(); List<PPattern> pats = new LinkedList<PPattern>(); pats.add(node.getInvPattern().clone()); tmb.setPlist(pats); tmb.setType(node.getInvType().clone()); List<PMultipleBind> binds = new LinkedList<PMultipleBind>(); binds.add(tmb); exists_exp.setBindList(binds); exists_exp.setPredicate(node.getInvExpression().clone()); stitch = exists_exp; valuetree.setPredicate(ctxt.getPredWithContext(exists_exp)); }
public EquivalenceRelationObligation(ATypeDefinition node, IPOContextStack question, IPogAssistantFactory af) throws AnalysisException { super(node, POType.EQUIV_REL, question, node.getLocation(), af); AVariableExp xExp = getVarExp(getUnique("x")); AVariableExp yExp = getVarExp(getUnique("y")); AVariableExp zExp = getVarExp(getUnique("z")); AForAllExp forallExp = makeRelContext(node,xExp,yExp,zExp); PExp andExp1 = makeAnd(makeReflexive(xExp,node),makeSymmetric(xExp,yExp,node)); PExp andExp2 = makeAnd(andExp1, makeTransitive(xExp,yExp,zExp,node)); forallExp.setPredicate(andExp2); valuetree.setPredicate(forallExp); }
public StrictOrderRelationObligation(ATypeDefinition node, IPOContextStack question, IPogAssistantFactory af) throws AnalysisException { super(node, POType.STRICT_ORDER, question, node.getLocation(), af); AVariableExp xExp = getVarExp(getUnique("x")); AVariableExp yExp = getVarExp(getUnique("y")); AVariableExp zExp = getVarExp(getUnique("z")); AForAllExp forallExp1 = makeRelContext(node,xExp); forallExp1.setPredicate(makeIrreflexive(xExp,node)); AForAllExp forallExp2 = makeRelContext(node, xExp, yExp, zExp); forallExp2.setPredicate(makeTransitive(xExp,yExp,zExp,node)); PExp andExp = makeAnd(forallExp1,forallExp2); valuetree.setPredicate(andExp); }
node.getOrdRelation().setRelDef(getRelDef(node.getOrdRelation(),node,node.getName().getOrdName(node.getLocation().clone()))); node.getInvType().setOrdDef(node.getOrdRelation().getRelDef()); setMinMax(node.getOrdRelation(),node); node.getEqRelation().setRelDef(getRelDef(node.getEqRelation(),node,node.getName().getEqName(node.getLocation().clone()))); node.getInvType().setEqDef(node.getEqRelation().getRelDef());
TypeCheckerErrors.report(3321, "Type component visibility less than type's definition", node.getLocation(), node);
+ "' is infinite", node.getLocation(), node);