Search in sources :

Example 1 with FOL

use of kodkod.engine.hol.Proc.FOL in project org.alloytools.alloy by AlloyTools.

the class HOLTranslator method visit.

@Override
public Proc visit(QuantifiedFormula qf) {
    assertNotSkolemizable(qf);
    Formula qfFlipped = qf.body().quantify(qf.quantifier().opposite, qf.decls(), qf.domain());
    Proc body = toProc(qfFlipped);
    boolean firstOrder = true;
    for (Decl decl : qf.decls()) if (decl.multiplicity() != Multiplicity.ONE) {
        firstOrder = false;
        break;
    }
    if (firstOrder && body instanceof FOL && noNewHOLSkolems(((FOL) body).bounds.skolems(), bounds.skolems()))
        return new Proc.FOL(bounds, qf);
    else
        return new Proc.Some4All(bounds, qf, body);
}
Also used : ConstantFormula(kodkod.ast.ConstantFormula) ComparisonFormula(kodkod.ast.ComparisonFormula) NaryFormula(kodkod.ast.NaryFormula) BinaryFormula(kodkod.ast.BinaryFormula) MultiplicityFormula(kodkod.ast.MultiplicityFormula) QuantifiedFormula(kodkod.ast.QuantifiedFormula) NotFormula(kodkod.ast.NotFormula) Formula(kodkod.ast.Formula) FixFormula(kodkod.ast.FixFormula) IntComparisonFormula(kodkod.ast.IntComparisonFormula) FOL(kodkod.engine.hol.Proc.FOL) Decl(kodkod.ast.Decl) FOL(kodkod.engine.hol.Proc.FOL) Some4All(kodkod.engine.hol.Proc.Some4All)

Aggregations

BinaryFormula (kodkod.ast.BinaryFormula)1 ComparisonFormula (kodkod.ast.ComparisonFormula)1 ConstantFormula (kodkod.ast.ConstantFormula)1 Decl (kodkod.ast.Decl)1 FixFormula (kodkod.ast.FixFormula)1 Formula (kodkod.ast.Formula)1 IntComparisonFormula (kodkod.ast.IntComparisonFormula)1 MultiplicityFormula (kodkod.ast.MultiplicityFormula)1 NaryFormula (kodkod.ast.NaryFormula)1 NotFormula (kodkod.ast.NotFormula)1 QuantifiedFormula (kodkod.ast.QuantifiedFormula)1 FOL (kodkod.engine.hol.Proc.FOL)1 Some4All (kodkod.engine.hol.Proc.Some4All)1