File: README.java

package info (click to toggle)
ppl 1%3A1.2-8.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 44,328 kB
  • sloc: cpp: 212,085; sh: 12,176; makefile: 7,192; perl: 6,333; java: 2,220; ansic: 1,842; ml: 1,132; sed: 80
file content (58 lines) | stat: -rw-r--r-- 2,330 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Copyright (C) 2001-2010 Roberto Bagnara <bagnara@cs.unipr.it>
# Copyright (C) 2010-2016 BUGSENG srl (http://bugseng.com)
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE.

The Java interface of the Parma Polyhedra Library has been tested
with both Sun's JDK 6 (http://java.sun.com/javase/downloads/)
and the open-source OpenJDK 6 (http://openjdk.java.net/).

The Java interface provides the `parma_polyhedra_library' package:
after installing the Parma Polyhedra Library in <PPL prefix>,
the ppl_java.jar JAR file and the JNI shared object will be installed
in directory <PPL prefix>/<libdir>/ppl.

The Java compilation command for `My_Test.java' should then be
something like:

$ javac -classpath .:<PPL prefix>/<libdir>/ppl/ppl_java.jar My_Test.java

This will produce class file My_Test.class, which can then be executed
by issuing a command like:

$ java -classpath .:<PPL prefix>/<libdir>/ppl/ppl_java.jar My_Test

Note that the source code in My_Test.java should take care of:

a) Load the PPL interface library, by calling `System.load' and
   passing the full path of the dynamic shared object. For instance,
   on a Linux machine and assuming <PPL prefix>=/usr/local/, the call
   will be something like:

     System.load("/usr/local/lib/ppl/libppl_java.so");

b) Make sure that only the intended version(s) of the library has been
   loaded, e.g., by calling static method

     Parma_Polyhedra_Library.version();

c) Starting from PPL version 0.11, before calling any other method from
   other PPL package classes, initialize the Java interface by calling
   the static method

     Parma_Polyhedra_Library.initialize_library();

   When done using the library, finalize it by calling the static method

     Parma_Polyhedra_Library.finalize_library();

   After finalization no other method of the library may be used (except
   for those in class Parma_Polyhedra_Library), unless the library
   is re-initialized by calling initialize_library().