3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-23 07:24:02 +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:
Christoph M. Wintersteiger 2012-11-27 16:36:50 +00:00
parent fb947f50fb
commit c6303fc8f5
153 changed files with 10063 additions and 9851 deletions

View file

@ -0,0 +1,58 @@
/**
* This file was automatically generated from TupleSort.cs
* w/ further modifications by:
* @author Christoph M. Wintersteiger (cwinter)
**/
package com.Microsoft.Z3;
/**
* Tuple sorts.
**/
public class TupleSort extends Sort
{
/**
* The constructor function of the tuple.
* @throws Z3Exception
**/
public FuncDecl MkDecl() throws Z3Exception
{
return new FuncDecl(Context(), Native.getTupleSortMkDecl(Context()
.nCtx(), NativeObject()));
}
/**
* The number of fields in the tuple.
**/
public int NumFields()
{
return Native.getTupleSortNumFields(Context().nCtx(), NativeObject());
}
/**
* The field declarations.
* @throws Z3Exception
**/
public FuncDecl[] FieldDecls() throws Z3Exception
{
int n = NumFields();
FuncDecl[] res = new FuncDecl[n];
for (int i = 0; i < n; i++)
res[i] = new FuncDecl(Context(), Native.getTupleSortFieldDecl(
Context().nCtx(), NativeObject(), i));
return res;
}
TupleSort(Context ctx, Symbol name, int numFields, Symbol[] fieldNames,
Sort[] fieldSorts) throws Z3Exception
{
super(ctx);
Native.LongPtr t = new Native.LongPtr();
setNativeObject(Native.mkTupleSort(ctx.nCtx(), name.NativeObject(),
numFields, Symbol.ArrayToNative(fieldNames),
AST.ArrayToNative(fieldSorts), t, new long[numFields]));
}
};