mirror of
https://github.com/AdaCore/z3.git
synced 2026-02-12 12:40:40 -08:00
Added finite domain expressions and numerals to the .NET, Java, and Python APIs.
Relates to #318
This commit is contained in:
@@ -2163,13 +2163,14 @@ class JavaExample
|
||||
|
||||
FiniteDomainSort s = ctx.mkFiniteDomainSort("S", 10);
|
||||
FiniteDomainSort t = ctx.mkFiniteDomainSort("T", 10);
|
||||
Expr s1 = ctx.mkNumeral(1, s);
|
||||
Expr t1 = ctx.mkNumeral(1, t);
|
||||
FiniteDomainNum s1 = (FiniteDomainNum)ctx.mkNumeral(1, s);
|
||||
FiniteDomainNum t1 = (FiniteDomainNum)ctx.mkNumeral(1, t);
|
||||
System.out.println(s);
|
||||
System.out.println(t);
|
||||
System.out.println(s1);
|
||||
System.out.println(ctx.mkNumeral(2, s));
|
||||
System.out.println(s1);
|
||||
System.out.println(t1);
|
||||
System.out.println(s1.getInt());
|
||||
System.out.println(t1.getInt());
|
||||
// But you cannot mix numerals of different sorts
|
||||
// even if the size of their domains are the same:
|
||||
// System.out.println(ctx.mkEq(s1, t1));
|
||||
|
||||
Reference in New Issue
Block a user