public class Manager
extends java.lang.Object
Each abstract domain subclasses the Manager class to provide a
Manager factory for the domain.
The Manager is itself a factory for abstract elements in the
corresponding abstract domain: abstract elements can be constructed
and manipulated by passing the Manager instance to the
Abstract0
and Abstract1
classes.
A Manager stores a set of abstract domain configuration parameters to tune the cost/precision of the instance of the abstract domain.
Finally, a Manager stores thread-local information. It is safe to call all Apron methods in concurrent threads as long as all arguments (including this, and including the Manager argument) are distinct in all threads.
A Manager object encapsulates an ap_manager_t
Apron object
allocated in the C heap.
Modifier | Constructor and Description |
---|---|
protected |
Manager()
Managers can only be constructed from an abstract domain
Manager subclass.
|
Modifier and Type | Method and Description |
---|---|
protected void |
finalize()
Deallocates the Apron ap_manager_t object.
|
int |
getAlgorithm(int funid)
Returns the current precision level chosen for the given operation
(
FUNID_COPY , etc.). |
boolean |
getFlagBestWanted(int funid)
Whether the given operation updates the best-precision flag
(
FUNID_COPY , etc.). |
boolean |
getFlagExactWanted(int funid)
Whether the given operation updates the exactness flag
(
FUNID_COPY , etc.).. |
java.lang.String |
getLibrary()
Returns the name of the numerical abstract domain library that
created the manager.
|
int |
getMaxObjectSize(int funid)
Returns the memory size limit chosen for the given operation
(
FUNID_COPY , etc.). |
int |
getPreferedScalarType()
Gets the currently chosen preferred scalar type
(
SCALAR_DOUBLE , etc.). |
int |
getTimeout(int funid)
Returns the current timeout value chosen for the given operation
(
FUNID_COPY , etc.). |
java.lang.String |
getVersion()
Returns the version of the numerical abstract domain library that
created the manager.
|
void |
setAlgorithm(int funid,
int precision)
Sets the current precision level for the given operation.
|
void |
setFlagBestWanted(int funid,
boolean wanted)
Whether the given operation (
FUNID_COPY , etc.) |
void |
setFlagExactWanted(int funid,
boolean wanted)
Whether the given operation (
FUNID_COPY , etc.) |
void |
setMaxObjectSize(int funid,
int size)
Sets a size limit on the memory used by the given operation
(
FUNID_COPY , etc.). |
void |
setPreferedScalarType(int t)
Sets a preferred scalar type (
SCALAR_DOUBLE , etc.). |
void |
setTimeout(int funid,
int time)
Sets a timeout for the given operation (
FUNID_COPY , etc.). |
boolean |
wasBest()
Whether the last operation with
setFlagBestWanted(int, boolean) set returned
a result which is optimal with respect to the abstraction. |
boolean |
wasExact()
Whether the last operation with
setFlagExactWanted(int, boolean) set returned
an exact result. |
public static final int FUNID_COPY
public static final int FUNID_FREE
public static final int FUNID_SIZE
public static final int FUNID_MINIMIZE
public static final int FUNID_CANONICALIZE
public static final int FUNID_HASH
public static final int FUNID_APPROXIMATE
public static final int FUNID_FPRINT
public static final int FUNID_FPRINTDIFF
public static final int FUNID_FDUMP
public static final int FUNID_SERIALIZE_RAW
public static final int FUNID_DESERIALIZE_RAW
public static final int FUNID_BOTTOM
public static final int FUNID_TOP
public static final int FUNID_OF_BOX
public static final int FUNID_DIMENSION
public static final int FUNID_IS_BOTTOM
public static final int FUNID_IS_TOP
public static final int FUNID_IS_LEQ
public static final int FUNID_IS_EQ
public static final int FUNID_IS_DIMENSION_UNCONSTRAINED
public static final int FUNID_SAT_INTERVAL
public static final int FUNID_SAT_LINCONS
public static final int FUNID_SAT_TCONS
public static final int FUNID_BOUND_DIMENSION
public static final int FUNID_BOUND_LINEXPR
public static final int FUNID_BOUND_TEXPR
public static final int FUNID_TO_BOX
public static final int FUNID_TO_LINCONS_ARRAY
public static final int FUNID_TO_TCONS_ARRAY
public static final int FUNID_TO_GENERATOR_ARRAY
public static final int FUNID_MEET
public static final int FUNID_MEET_ARRAY
public static final int FUNID_MEET_LINCONS_ARRAY
public static final int FUNID_MEET_TCONS_ARRAY
public static final int FUNID_JOIN
public static final int FUNID_JOIN_ARRAY
public static final int FUNID_ADD_RAY_ARRAY
public static final int FUNID_ASSIGN_LINEXPR_ARRAY
public static final int FUNID_SUBSTITUTE_LINEXPR_ARRAY
public static final int FUNID_ASSIGN_TEXPR_ARRAY
public static final int FUNID_SUBSTITUTE_TEXPR_ARRAY
public static final int FUNID_ADD_DIMENSIONS
public static final int FUNID_REMOVE_DIMENSIONS
public static final int FUNID_PERMUTE_DIMENSIONS
public static final int FUNID_FORGET_ARRAY
public static final int FUNID_EXPAND
public static final int FUNID_FOLD
public static final int FUNID_WIDENING
public static final int FUNID_CLOSURE
public static final int SCALAR_DOUBLE
public static final int SCALAR_MPQ
public static final int SCALAR_MPFR
protected Manager()
protected void finalize()
finalize
in class java.lang.Object
public java.lang.String getLibrary()
public java.lang.String getVersion()
public int getAlgorithm(int funid)
FUNID_COPY
, etc.).public int getTimeout(int funid)
FUNID_COPY
, etc.).public int getMaxObjectSize(int funid)
FUNID_COPY
, etc.).public boolean getFlagExactWanted(int funid)
FUNID_COPY
, etc.)..public boolean getFlagBestWanted(int funid)
FUNID_COPY
, etc.).public void setAlgorithm(int funid, int precision)
FUNID_COPY
, etc.).
0 is the default. Negative numbers indicate less precision, while positive numbers indicate more precision.
The exact meaning of each value depends on the abstract domain.
public void setTimeout(int funid, int time)
FUNID_COPY
, etc.).
Note: timeouts are currently unimplemented.
public void setMaxObjectSize(int funid, int size)
FUNID_COPY
, etc.).
By default, there is no limit.
The unit is domain-specific but is consistent with the result
of Abstract0.getSize(apron.Manager)
.
0 indicates no limit.
public void setFlagExactWanted(int funid, boolean wanted)
FUNID_COPY
, etc.)
should update the exactness flag.
As computing the exactness information may be costly, it is disabled by default for all operations.
public void setFlagBestWanted(int funid, boolean wanted)
FUNID_COPY
, etc.)
should update the best-precision flag.
As computing the best-precision information may be costly, it is disabled by default for all operations.
public boolean wasExact()
setFlagExactWanted(int, boolean)
set returned
an exact result.public boolean wasBest()
setFlagBestWanted(int, boolean)
set returned
a result which is optimal with respect to the abstraction.public int getPreferedScalarType()
SCALAR_DOUBLE
, etc.).public void setPreferedScalarType(int t)
SCALAR_DOUBLE
, etc.).