beginner's question: don't you have any examples?

Hello,
I am using PPL's Java interface for static program analysis. The library is known to be "very user friendly". However, I cannot find a working example (say, a hello world) for PPL. No examples are provided in the user's manual. Could you show me some examples? Thanks.
Zell.

On 07/20/12 19:02, Z wrote:
Hello,
I am using PPL's Java interface for static program analysis. The library is known to be "very user friendly". However, I cannot find a working example (say, a hello world) for PPL. No examples are provided in the user's manual. Could you show me some examples? Thanks.
Zell.
Hi Zell,
did you look in the
interfaces/Java/tests
directory? Kind regards,
Roberto

Hello,
Thanks. I did not know that. Sorry.
I find that your Test_executor.java does not contain a 'main' program. So I am wondering what would be the right way to launch your test suites?
Thanks again!
Zell.
Hi Zell,
did you look in the
interfaces/Java/tests
directory? Kind regards,
Roberto
-- Prof. Roberto Bagnara Applied Formal Methods Laboratory Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~**bagnara/ http://www.cs.unipr.it/%7Ebagnara/ mailto:bagnara@cs.unipr.it

Sorry. I had not study carefullly other .java files before asking my question. I find Parma_Polyhedra_Library_test.java has the "main', so I will try to understand the interface from there. Thanks again.
Zell.
On Sat, Jul 21, 2012 at 7:59 PM, Z zell08v@orange.fr wrote:
Hello,
Thanks. I did not know that. Sorry.
I find that your Test_executor.java does not contain a 'main' program. So I am wondering what would be the right way to launch your test suites?
Thanks again!
Zell.
Hi Zell,
did you look in the
interfaces/Java/tests
directory? Kind regards,
Roberto
-- Prof. Roberto Bagnara Applied Formal Methods Laboratory Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~**bagnara/ http://www.cs.unipr.it/%7Ebagnara/ mailto:bagnara@cs.unipr.it

Hello,
It took me some time to figure out the structure of the testsuite in the interface/tests of Java Interface. So I suggest add a 'main' method to the current Test_Executor.java, something like the following one:
Zell.
**************** // file /ppl/src/test/Test_Executor.java
import parma_polyhedra_library.Parma_Polyhedra_Library; ... public static void main(String[] args) {
try { System.load("/usr/local/lib/ppl/libppl_java.jnilib"); } catch (UnsatisfiedLinkError e) { System.out.println("Unable to load the library"); System.out.println(e.getMessage()); System.exit(-1); } Parma_Polyhedra_Library.initialize_library();
boolean test_result_ok = Test_Executor.executeTests(NNC_Polyhedron_test1.class) && Test_Executor.executeTests(C_Polyhedron_test1.class) && Test_Executor.executeTests(MIP_Problem_test1.class) &&
Test_Executor.executeTests(Parma_Polyhedra_Library_test1.class) &&
Test_Executor.executeTests(Parma_Polyhedra_Library_test1.class); Parma_Polyhedra_Library.finalize_library(); if (!test_result_ok) System.exit(1); System.exit(0); }
On Sun, Jul 22, 2012 at 10:11 AM, Z zell08v@orange.fr wrote:
Sorry. I had not study carefullly other .java files before asking my question. I find Parma_Polyhedra_Library_test.java has the "main', so I will try to understand the interface from there. Thanks again.
Zell.
On Sat, Jul 21, 2012 at 7:59 PM, Z zell08v@orange.fr wrote:
Hello,
Thanks. I did not know that. Sorry.
I find that your Test_executor.java does not contain a 'main' program. So I am wondering what would be the right way to launch your test suites?
Thanks again!
Zell.
Hi Zell,
did you look in the
interfaces/Java/tests
directory? Kind regards,
Roberto
-- Prof. Roberto Bagnara Applied Formal Methods Laboratory Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~**bagnara/ http://www.cs.unipr.it/%7Ebagnara/ mailto:bagnara@cs.unipr.it
participants (3)
-
Roberto Bagnara
-
Z
-
Zell