3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-05 17:14:07 +00:00
z3/src/api/java/ArraySort.java
Nikolaj Bjorner c9f540b066 additional array functions exposed over API, ping #1223
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-10-19 11:08:48 -07:00

66 lines
1.3 KiB
Java

/**
Copyright (c) 2012-2014 Microsoft Corporation
Module Name:
ArraySort.java
Abstract:
Author:
@author Christoph Wintersteiger (cwinter) 2012-03-15
Notes:
**/
package com.microsoft.z3;
/**
* Array sorts.
**/
public class ArraySort extends Sort
{
/**
* The domain of the array sort.
* @throws Z3Exception
* @throws Z3Exception on error
* @return a sort
**/
public Sort getDomain()
{
return Sort.create(getContext(),
Native.getArraySortDomain(getContext().nCtx(), getNativeObject()));
}
/**
* The range of the array sort.
* @throws Z3Exception
* @throws Z3Exception on error
* @return a sort
**/
public Sort getRange()
{
return Sort.create(getContext(),
Native.getArraySortRange(getContext().nCtx(), getNativeObject()));
}
ArraySort(Context ctx, long obj)
{
super(ctx, obj);
}
ArraySort(Context ctx, Sort domain, Sort range)
{
super(ctx, Native.mkArraySort(ctx.nCtx(), domain.getNativeObject(),
range.getNativeObject()));
}
ArraySort(Context ctx, Sort[] domains, Sort range)
{
super(ctx, Native.mkArraySortN(ctx.nCtx(), domains.length, AST.arrayToNative(domains),
range.getNativeObject()));
}
};