mirror of
https://github.com/Z3Prover/z3
synced 2025-04-26 10:35:33 +00:00
Java API: a first version that compiles. This is still untested.
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
parent
fb947f50fb
commit
c6303fc8f5
153 changed files with 10063 additions and 9851 deletions
64
src/api/java/EnumSort.java
Normal file
64
src/api/java/EnumSort.java
Normal file
|
@ -0,0 +1,64 @@
|
|||
/**
|
||||
* This file was automatically generated from EnumSort.cs
|
||||
* w/ further modifications by:
|
||||
* @author Christoph M. Wintersteiger (cwinter)
|
||||
**/
|
||||
|
||||
package com.Microsoft.Z3;
|
||||
|
||||
/**
|
||||
* Enumeration sorts.
|
||||
**/
|
||||
public class EnumSort extends Sort
|
||||
{
|
||||
/**
|
||||
* The function declarations of the constants in the enumeration.
|
||||
**/
|
||||
public FuncDecl[] ConstDecls()
|
||||
{
|
||||
|
||||
return _constdecls;
|
||||
}
|
||||
|
||||
/**
|
||||
* The constants in the enumeration.
|
||||
**/
|
||||
public Expr[] Consts()
|
||||
{
|
||||
|
||||
return _consts;
|
||||
}
|
||||
|
||||
/**
|
||||
* The test predicates for the constants in the enumeration.
|
||||
**/
|
||||
public FuncDecl[] TesterDecls()
|
||||
{
|
||||
|
||||
return _testerdecls;
|
||||
}
|
||||
|
||||
private FuncDecl[] _constdecls = null, _testerdecls = null;
|
||||
private Expr[] _consts = null;
|
||||
|
||||
EnumSort(Context ctx, Symbol name, Symbol[] enumNames) throws Z3Exception
|
||||
{
|
||||
super(ctx);
|
||||
|
||||
int n = enumNames.length;
|
||||
long[] n_constdecls = new long[n];
|
||||
long[] n_testers = new long[n];
|
||||
setNativeObject(Native.mkEnumerationSort(ctx.nCtx(),
|
||||
name.NativeObject(), (int) n, Symbol.ArrayToNative(enumNames),
|
||||
n_constdecls, n_testers));
|
||||
_constdecls = new FuncDecl[n];
|
||||
for (int i = 0; i < n; i++)
|
||||
_constdecls[i] = new FuncDecl(ctx, n_constdecls[i]);
|
||||
_testerdecls = new FuncDecl[n];
|
||||
for (int i = 0; i < n; i++)
|
||||
_testerdecls[i] = new FuncDecl(ctx, n_testers[i]);
|
||||
_consts = new Expr[n];
|
||||
for (int i = 0; i < n; i++)
|
||||
_consts[i] = ctx.MkApp(_constdecls[i], null);
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue