[PPL-devel] [GIT] ppl/ppl(master): Java interface for wrap asign added.

Patricia Hill p.m.hill at leeds.ac.uk
Tue Mar 16 13:47:36 CET 2010


Module: ppl/ppl
Branch: master
Commit: 80c44d73a29d1585fdffc3f62451877d7e564dc0
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=80c44d73a29d1585fdffc3f62451877d7e564dc0

Author: Patricia Hill <p.m.hill at leeds.ac.uk>
Date:   Tue Mar 16 12:46:29 2010 +0000

Java interface for wrap asign added.

---

 .../Bounded_Integer_Type_Overflow.java             |   39 ++++++++++++++++++
 .../Bounded_Integer_Type_Representation.java       |   40 ++++++++++++++++++
 .../Bounded_Integer_Type_Width.java                |   43 ++++++++++++++++++++
 .../Java/parma_polyhedra_library/Makefile.am       |    9 ++++
 ...l_interface_generator_java_classes_java_code.m4 |   14 ++++++
 ...nterface_generator_java_procedure_generators.m4 |    3 +-
 6 files changed, 147 insertions(+), 1 deletions(-)

diff --git a/interfaces/Java/parma_polyhedra_library/Bounded_Integer_Type_Overflow.java b/interfaces/Java/parma_polyhedra_library/Bounded_Integer_Type_Overflow.java
new file mode 100644
index 0000000..23d3c8f
--- /dev/null
+++ b/interfaces/Java/parma_polyhedra_library/Bounded_Integer_Type_Overflow.java
@@ -0,0 +1,39 @@
+/* Bounded_Integer_Type_Overflow enum declaration.
+   Copyright (C) 2001-2010 Roberto Bagnara <bagnara at cs.unipr.it>
+
+This file is part of the Parma Polyhedra Library (PPL).
+
+The PPL is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+The PPL is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software Foundation,
+Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
+
+For the most up-to-date information see the Parma Polyhedra Library
+site: http://www.cs.unipr.it/ppl/ . */
+
+package parma_polyhedra_library;
+
+//! Overflow behavior of bounded integer types.
+/*! \ingroup PPL_Java_interface */
+public enum Bounded_Integer_Type_Overflow {
+    //! On overflow, wrapping takes place.
+    OVERFLOW_WRAPS,
+    //! On overflow, the result is undefined.
+    OVERFLOW_UNDEFINED,
+    //! Overflow is impossible.
+    OVERFLOW_IMPOSSIBLE;
+
+    private static native void initIDs();
+    static {
+        initIDs();
+    }
+}
diff --git a/interfaces/Java/parma_polyhedra_library/Bounded_Integer_Type_Representation.java b/interfaces/Java/parma_polyhedra_library/Bounded_Integer_Type_Representation.java
new file mode 100644
index 0000000..3b033ad
--- /dev/null
+++ b/interfaces/Java/parma_polyhedra_library/Bounded_Integer_Type_Representation.java
@@ -0,0 +1,40 @@
+/* Bounded_Integer_Type_Representation enum declaration.
+   Copyright (C) 2001-2010 Roberto Bagnara <bagnara at cs.unipr.it>
+
+This file is part of the Parma Polyhedra Library (PPL).
+
+The PPL is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+The PPL is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software Foundation,
+Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
+
+For the most up-to-date information see the Parma Polyhedra Library
+site: http://www.cs.unipr.it/ppl/ . */
+
+package parma_polyhedra_library;
+
+//! Representation of bounded integer types.
+/*! \ingroup PPL_Java_interface */
+public enum Bounded_Integer_Type_Representation {
+    //! Unsigned binary.
+    UNSIGNED,
+    /*! \brief
+      Signed binary where negative values are represented by the two's
+      complement of the absolute value.
+    */
+    SIGNED_2_COMPLEMENT;
+
+    private static native void initIDs();
+    static {
+        initIDs();
+    }
+}
diff --git a/interfaces/Java/parma_polyhedra_library/Bounded_Integer_Type_Width.java b/interfaces/Java/parma_polyhedra_library/Bounded_Integer_Type_Width.java
new file mode 100644
index 0000000..cc189c8
--- /dev/null
+++ b/interfaces/Java/parma_polyhedra_library/Bounded_Integer_Type_Width.java
@@ -0,0 +1,43 @@
+/* Bounded_Integer_Type_Width enum declaration.
+   Copyright (C) 2001-2010 Roberto Bagnara <bagnara at cs.unipr.it>
+
+This file is part of the Parma Polyhedra Library (PPL).
+
+The PPL is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+The PPL is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software Foundation,
+Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
+
+For the most up-to-date information see the Parma Polyhedra Library
+site: http://www.cs.unipr.it/ppl/ . */
+
+package parma_polyhedra_library;
+
+//! Widths of bounded integer types.
+/*! \ingroup PPL_Java_interface */
+public enum Bounded_Integer_Type_Width {
+    //! Minimization is requested.
+    PPL_BITS_8,
+    //! \hideinitializer 16 bits.
+    PPL_BITS_16,
+    //! \hideinitializer 32 bits.
+    PPL_BITS_32,
+    //! \hideinitializer 64 bits.
+    PPL_BITS_64,
+    //! \hideinitializer 128 bits.
+    PPL_BITS_128;
+
+    private static native void initIDs();
+    static {
+        initIDs();
+    }
+}
diff --git a/interfaces/Java/parma_polyhedra_library/Makefile.am b/interfaces/Java/parma_polyhedra_library/Makefile.am
index 8b647b7..8e54256 100644
--- a/interfaces/Java/parma_polyhedra_library/Makefile.am
+++ b/interfaces/Java/parma_polyhedra_library/Makefile.am
@@ -33,6 +33,9 @@ ppl_interface_generator_java_classes_java.m4 \
 ppl_interface_generator_java_classes_java_code.m4
 
 fixed_java_cxx_headers = \
+parma_polyhedra_library.Bounded_Integer_Type_Overflow \
+parma_polyhedra_library.Bounded_Integer_Type_Representation \
+parma_polyhedra_library.Bounded_Integer_Type_Width \
 parma_polyhedra_library.By_Reference \
 parma_polyhedra_library.Coefficient \
 parma_polyhedra_library.Complexity_Class \
@@ -68,6 +71,9 @@ parma_polyhedra_library.Variable \
 parma_polyhedra_library.Variables_Set
 
 fixed_java_cxx_headers_sources = \
+parma_polyhedra_library_Bounded_Integer_Type_Overflow.h \
+parma_polyhedra_library_Bounded_Integer_Type_Representation.h \
+parma_polyhedra_library_Bounded_Integer_Type_Width.h \
 parma_polyhedra_library_By_Reference.h \
 parma_polyhedra_library_Coefficient.h \
 parma_polyhedra_library_Complexity_Class.h \
@@ -104,6 +110,9 @@ parma_polyhedra_library_Variables_Set.h
 
 # NOTE: do _NOT_ add Fake_Class_for_Doxygen.java to this list.
 fixed_java_sources = \
+$(srcdir)/Bounded_Integer_Type_Overflow.java \
+$(srcdir)/Bounded_Integer_Type_Representation.java \
+$(srcdir)/Bounded_Integer_Type_Width.java \
 $(srcdir)/By_Reference.java \
 $(srcdir)/Coefficient.java \
 $(srcdir)/Complexity_Class.java \
diff --git a/interfaces/Java/parma_polyhedra_library/ppl_interface_generator_java_classes_java_code.m4 b/interfaces/Java/parma_polyhedra_library/ppl_interface_generator_java_classes_java_code.m4
index e4456c0..b22bead 100644
--- a/interfaces/Java/parma_polyhedra_library/ppl_interface_generator_java_classes_java_code.m4
+++ b/interfaces/Java/parma_polyhedra_library/ppl_interface_generator_java_classes_java_code.m4
@@ -409,6 +409,20 @@ ___BEGIN_OF_FILE___ @CLASS at .java << ___END_OF_FILE___
 
 ')
 
+m4_define(`ppl_ at CLASS@_wrap_assign_code',
+`dnl
+___END_OF_FILE___
+___BEGIN_OF_FILE___ @CLASS at .java << ___END_OF_FILE___
+    public native void wrap_assign(Variables_Set vars,
+				Bounded_Integer_Type_Width w,
+				Bounded_Integer_Type_Representation r,
+                                Bounded_Integer_Type_Overflow o,
+                                By_Reference<Constraint_System> pcs,
+                                By_Reference<Integer> complexity_threshold,
+                                By_Reference<Boolean> wrap_individually);
+
+')
+
 m4_define(`ppl_ at CLASS@_ at WIDEN@_widening_assign_code',
 `dnl
 ___END_OF_FILE___
diff --git a/interfaces/Java/ppl_interface_generator_java_procedure_generators.m4 b/interfaces/Java/ppl_interface_generator_java_procedure_generators.m4
index ebe79c5..5033b8f 100644
--- a/interfaces/Java/ppl_interface_generator_java_procedure_generators.m4
+++ b/interfaces/Java/ppl_interface_generator_java_procedure_generators.m4
@@ -42,5 +42,6 @@ m4_define(`m4_procedure_list',
 `m4_echo_unquoted(`m4_common_procedure_list',
 ppl_free_ at CLASS@/1 +all,
 ppl_ at CLASS@_hashcode/2 +all -box,
-ppl_ at CLASS@_string/1 +all)dnl
+ppl_ at CLASS@_string/1 +all,
+ppl_ at CLASS@_wrap_assign/8 +simple)dnl
 ')




More information about the PPL-devel mailing list