|
PPL Java Language Interface 2.0
|
The concrete domain classes and methods are selected when PPL is configured. Use the configuration-dependent reference matching the installed JAR and JNI library. The core C++ manual supplies the mathematical operations and native domain preconditions. Dimensions, topology, inclusion and approximation requirements still apply through the Java interface. Native admission failures are reported as Java exceptions; they are distinct from an ordinary false result.
A successful domain constructor creates an independently owned native value. Conversion can approximate its source; it does not necessarily preserve the represented set exactly. Copy construction also creates an independent value when the input is a borrowed disjunct view. Representation-system getters return Java copies, so editing a returned system does not modify the source. Value preservation does not promise preservation of a powerset view: queries and conversions can normalize a sequence, as described in powerset iterators and disjunct views.
Call free() on each owned domain object and iterator while the library and its thread state remain initialized. Repeated release is harmless. Releasing a borrowed disjunct wrapper releases that view without deleting the disjunct or its owner. Operations needing released native storage are rejected. Finalizers provide cleanup but do not replace arranging release before library finalization. See library and worker lifetimes and native objects and borrowed views for the full lifetime rules.
A boolean result follows its operation: predicates test a property, exactness queries report whether exactness was established, and optimization queries report whether a result was obtained. Methods taking Coefficient, Generator, By_Reference or domain output arguments update the supplied objects; allocate appropriate live output objects before calling. Inputs and output wrappers must be non-null unless a method explicitly permits null. Partition methods instead return a Pair holding two newly owned native results; release each result separately using free().
Read optimization values, attainment flags and witnesses only after a true result. On false, the Java output objects are unchanged. Empty sets and unbounded objectives give false; native approximation or overflow handling can also prevent a bound from being obtained. Bounded-difference and octagonal optimization without a witness can return outward approximations when coefficient arithmetic rounds or overflows; integral octagonal closure can also round. The attainment flag concerns the actual extremum, not necessarily its approximate bound. The corresponding native overload defines precision and witness guarantees.
The generated Termination methods use the MS (Mesnard and Serebrenik) or PR (Podelski and Rybalchenko) analysis. A single transition description has 2n dimensions: after-state coordinates occupy 0 through n-1, and before-state coordinates occupy n through 2n-1. In methods ending in _2, the before argument has n dimensions and the after argument has 2n dimensions with the same after-first/before-last ordering. The native method defines admitted approximations of these descriptions.
A true termination test certifies termination of the approximated loop; false is inconclusive. The one-ranking-function methods write a coefficient point to the supplied Generator only on true. Failure to find an affine ranking function does not establish nontermination.
Methods computing all ranking functions write a coefficient-space polyhedron to a supplied live output wrapper: use C_Polyhedron for MS and NNC_Polyhedron for PR. MS quasi-ranking methods write the decreasing and bounded spaces to two distinct live C_Polyhedron wrappers. These output methods require the Polyhedron instantiation; tests and one-witness methods remain available for other selected simple domains. With no selected domain, Termination has no analysis methods.