Search in sources :

Example 16 with BitVecExpr

use of com.microsoft.z3.BitVecExpr in project batfish by batfish.

the class BoolExprTransformerTest method testVisitEqExpr.

@Test
public void testVisitEqExpr() {
    IntExpr i1Batfish = newIntAtom();
    IntExpr i2Batfish = newIntAtom();
    BitVecExpr i1Z3 = toBitVecExpr(i1Batfish, _nodContext);
    BitVecExpr i2Z3 = toBitVecExpr(i2Batfish, _nodContext);
    assertThat(toBoolExpr(new EqExpr(i1Batfish, i2Batfish), _input, _nodContext), equalTo(_ctx.mkEq(i1Z3, i2Z3)));
}
Also used : BitVecExprTransformer.toBitVecExpr(org.batfish.z3.expr.visitors.BitVecExprTransformer.toBitVecExpr) BitVecExpr(com.microsoft.z3.BitVecExpr) EqExpr(org.batfish.z3.expr.EqExpr) IntExpr(org.batfish.z3.expr.IntExpr) Test(org.junit.Test)

Aggregations

BitVecExpr (com.microsoft.z3.BitVecExpr)15 BoolExpr (com.microsoft.z3.BoolExpr)11 ArithExpr (com.microsoft.z3.ArithExpr)6 HashMap (java.util.HashMap)6 List (java.util.List)6 GraphEdge (org.batfish.symbolic.GraphEdge)5 Context (com.microsoft.z3.Context)4 Solver (com.microsoft.z3.Solver)4 Map (java.util.Map)4 BatfishException (org.batfish.common.BatfishException)4 Graph (org.batfish.symbolic.Graph)4 Expr (com.microsoft.z3.Expr)3 ImmutableMap (com.google.common.collect.ImmutableMap)2 ArrayList (java.util.ArrayList)2 HashSet (java.util.HashSet)2 Pair (org.batfish.common.Pair)2 Configuration (org.batfish.datamodel.Configuration)2 Ip (org.batfish.datamodel.Ip)2 IpProtocol (org.batfish.datamodel.IpProtocol)2 AsPathListExpr (org.batfish.datamodel.routing_policy.expr.AsPathListExpr)2