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

Method translationExample

examples/java/JavaExample.java:2239–2260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2237 }
2238
2239 public void translationExample() {
2240 Context ctx1 = new Context();
2241 Context ctx2 = new Context();
2242
2243 Sort s1 = ctx1.getIntSort();
2244 Sort s2 = ctx2.getIntSort();
2245 Sort s3 = s1.translate(ctx2);
2246
2247 System.out.println(s1 == s2);
2248 System.out.println(s1.equals(s2));
2249 System.out.println(s2.equals(s3));
2250 System.out.println(s1.equals(s3));
2251
2252 Expr e1 = ctx1.mkIntConst("e1");
2253 Expr e2 = ctx2.mkIntConst("e1");
2254 Expr e3 = e1.translate(ctx2);
2255
2256 System.out.println(e1 == e2);
2257 System.out.println(e1.equals(e2));
2258 System.out.println(e2.equals(e3));
2259 System.out.println(e1.equals(e3));
2260 }
2261
2262 public void stringExample() {
2263 System.out.println("String example");

Callers 1

mainMethod · 0.95

Calls 6

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

Tested by

no test coverage detected