MCPcopy Create free account
hub / github.com/Z3Prover/z3 / translationExample

Method translationExample

examples/java/JavaGenericExample.java:2044–2065  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2042 }
2043
2044 public void translationExample() {
2045 Context ctx1 = new Context();
2046 Context ctx2 = new Context();
2047
2048 Sort s1 = ctx1.getIntSort();
2049 Sort s2 = ctx2.getIntSort();
2050 Sort s3 = s1.translate(ctx2);
2051
2052 System.out.println(s1 == s2);
2053 System.out.println(s1.equals(s2));
2054 System.out.println(s2.equals(s3));
2055 System.out.println(s1.equals(s3));
2056
2057 IntExpr e1 = ctx1.mkIntConst("e1");
2058 IntExpr e2 = ctx2.mkIntConst("e1");
2059 Expr<IntSort> e3 = e1.translate(ctx2);
2060
2061 System.out.println(e1 == e2);
2062 System.out.println(e1.equals(e2));
2063 System.out.println(e2.equals(e3));
2064 System.out.println(e1.equals(e3));
2065 }
2066
2067 public static void main(String[] args)
2068 {

Callers 1

mainMethod · 0.95

Calls 6

getIntSortMethod · 0.95
translateMethod · 0.95
equalsMethod · 0.95
mkIntConstMethod · 0.95
translateMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected