Search in sources :

Example 96 with Variable

use of kodkod.ast.Variable in project org.alloytools.alloy by AlloyTools.

the class MGT066 method meaningPostulateGreaterComparable.

/**
 * Returns meaning_postulate_greater_comparable
 *
 * @return meaning_postulate_greater_comparable
 */
public final Formula meaningPostulateGreaterComparable() {
    final Variable x = Variable.unary("X");
    final Variable y = Variable.unary("Y");
    return x.eq(y).or(y.in(x.join(lt))).or(x.in(y.join(lt))).forAll(x.oneOf(Expression.UNIV).and(y.oneOf(Expression.UNIV)));
}
Also used : Variable(kodkod.ast.Variable)

Example 97 with Variable

use of kodkod.ast.Variable in project org.alloytools.alloy by AlloyTools.

the class SET943 method t95_zfmisc_1.

/**
 * Returns t95_zfmisc_1 axiom.
 *
 * @return t95_zfmisc_1
 */
public final Formula t95_zfmisc_1() {
    final Variable a = Variable.unary("A");
    final Variable b = Variable.unary("B");
    return subset(a, b).implies(subset(union(a), union(b))).forAll(a.oneOf(UNIV).and(b.oneOf(UNIV)));
}
Also used : Variable(kodkod.ast.Variable)

Example 98 with Variable

use of kodkod.ast.Variable in project org.alloytools.alloy by AlloyTools.

the class SET943 method fc3_xboole_0.

/**
 * Returns fc3_xboole_0 axiom.
 *
 * @return fc3_xboole_0
 */
public final Formula fc3_xboole_0() {
    final Variable a = Variable.unary("A");
    final Variable b = Variable.unary("B");
    return empty(a).not().implies(empty(set_union2(b, a)).not()).forAll(a.oneOf(UNIV).and(b.oneOf(UNIV)));
}
Also used : Variable(kodkod.ast.Variable)

Example 99 with Variable

use of kodkod.ast.Variable in project org.alloytools.alloy by AlloyTools.

the class SET943 method d4_tarski.

/**
 * Returns d4_tarski axiom.
 *
 * @return d4_tarski
 */
public final Formula d4_tarski() {
    final Variable a = Variable.unary("A");
    final Variable b = Variable.unary("B");
    return b.eq(union(a)).iff(in.join(b).eq(in.join(in.join(a)))).forAll(a.oneOf(UNIV).and(b.oneOf(UNIV)));
}
Also used : Variable(kodkod.ast.Variable)

Example 100 with Variable

use of kodkod.ast.Variable in project org.alloytools.alloy by AlloyTools.

the class SET943 method d10_xboole_0.

/**
 * Returns d10_xboole_0 axiom.
 *
 * @return d10_xboole_0
 */
public final Formula d10_xboole_0() {
    final Variable a = Variable.unary("A");
    final Variable b = Variable.unary("B");
    return a.eq(b).iff(subset(a, b).and(subset(b, a))).forAll(a.oneOf(UNIV).and(b.oneOf(UNIV)));
}
Also used : Variable(kodkod.ast.Variable)

Aggregations

Variable (kodkod.ast.Variable)221 Formula (kodkod.ast.Formula)151 Expression (kodkod.ast.Expression)80 Decls (kodkod.ast.Decls)24 Solution (kodkod.engine.Solution)24 Relation (kodkod.ast.Relation)23 IntExpression (kodkod.ast.IntExpression)22 Bounds (kodkod.instance.Bounds)21 Universe (kodkod.instance.Universe)21 ArrayList (java.util.ArrayList)19 TupleFactory (kodkod.instance.TupleFactory)19 TupleSet (kodkod.instance.TupleSet)15 Solver (kodkod.engine.Solver)14 Decl (kodkod.ast.Decl)12 QuantifiedFormula (kodkod.ast.QuantifiedFormula)10 Test (org.junit.Test)10 Instance (kodkod.instance.Instance)8 BinaryExpression (kodkod.ast.BinaryExpression)5 SumExpression (kodkod.ast.SumExpression)3 Expr (edu.mit.csail.sdg.ast.Expr)2