|
PPL Java Language Interface
1.1
|
The Parma Polyhedra Library comes equipped with an interface for the Java language. The Java interface provides access to the numerical abstractions (convex polyhedra, BD shapes, octagonal shapes, etc.) implemented by the PPL library. A general introduction to the numerical abstractions, their representation in the PPL and the operations provided by the PPL is given in the main PPL user manual. Here we just describe those aspects that are specific to the Java interface. In the sequel, prefix is the path prefix under which the library has been installed (typically /usr or /usr/local).
Here is a list of notes with general information and advice on the use of the Java interface.
–enable-interfaces). If Java is correctly installed in a standard location, things will be arranged so that the Java interface is built and installed (see configuration option –with-java if you need to specify a non-standard location for the Java system).prefix/lib/ppl. Since this includes shared and dynamically loaded libraries, you must make your dynamic linker/loader aware of this fact. If you use a GNU/Linux system, try the commands man ld.so and man ldconfig for more information.System.load and passing the full path of the dynamic shared object;version() in class parma_polyhedra_library.Parma_Polyhedra_Library;initialize_library(); when all library work is done, finalize the interface by calling finalize_library().–enable-instantiations).k, the identifiers used for the PPL variables must lie between 0 and
and correspond to the indices of the associated Cartesian axes. For example, when using methods that combine PPL polyhedra or add constraints or generators to a representation of a PPL polyhedron, the polyhedra referenced and any constraints or generators in the call should follow all the (space) dimension-compatibility rules stated in Section Representations of Convex Polyhedra of the main PPL user manual.parma_polyhedra_library.Constraint_System) is implemented by extending class java.util.ArrayList (note: java.util.Vector was used up to version 1.0.) As a consequence, it is possible to iterate over the constraints in the system by using corresponding inherited methods. Similarly, it is possible to modify a system of constraints by using methods such as add; be warned, however, that the constraint system obtained from a PPL object is a copy of the (C++) data structure used in the object itself: any modification will not directly affect the original PPL object; clearly, the modified constraint system can be used with appropriate methods to, e.g., build a new PPL object or modify an existing one. The same observations apply to systems of congruences and systems of (grid) generators.