--- p9m4-0.5.dfsg.orig/debian/control +++ p9m4-0.5.dfsg/debian/control @@ -0,0 +1,20 @@ +Source: p9m4 +Section: math +Priority: optional +Maintainer: Peter Collingbourne +Uploaders: Python Applications Packaging Team +Build-Depends: cdbs, debhelper (>= 5.0.42), python (>= 2.3.5-11) +Build-Depends-Indep: python-support (>= 0.5.3) +Standards-Version: 3.8.1 +Vcs-Svn: svn://svn.debian.org/python-apps/packages/p9m4/trunk/ +Vcs-Browser: http://svn.debian.org/viewsvn/python-apps/packages/p9m4/trunk/ +DM-Upload-Allowed: yes +Homepage: http://www.cs.unm.edu/~mccune/mace4/ + +Package: prover9-mace4 +Architecture: all +Depends: ${python:Depends}, ${misc:Depends}, python-wxgtk2.8, prover9 (>= 0.0.200712-1) +Description: GUI for Prover9 and Mace4 + This package provides a graphical user interface for easily running + the Prover9 theorem prover and the Mace4 countermodel generator + along with a number of sample input files. --- p9m4-0.5.dfsg.orig/debian/dirs +++ p9m4-0.5.dfsg/debian/dirs @@ -0,0 +1 @@ +usr/share/prover9-mace4/lib --- p9m4-0.5.dfsg.orig/debian/pycompat +++ p9m4-0.5.dfsg/debian/pycompat @@ -0,0 +1 @@ +2 --- p9m4-0.5.dfsg.orig/debian/manpages +++ p9m4-0.5.dfsg/debian/manpages @@ -0,0 +1 @@ +debian/prover9-mace4.1 --- p9m4-0.5.dfsg.orig/debian/install +++ p9m4-0.5.dfsg/debian/install @@ -0,0 +1,10 @@ +Images usr/share/prover9-mace4 +Samples usr/share/prover9-mace4 +utilities.py usr/share/prover9-mace4/lib +wx_utilities.py usr/share/prover9-mace4/lib +files.py usr/share/prover9-mace4/lib +options.py usr/share/prover9-mace4/lib +partition_input.py usr/share/prover9-mace4/lib +my_setup.py usr/share/prover9-mace4/lib +control.py usr/share/prover9-mace4/lib +platforms.py usr/share/prover9-mace4/lib --- p9m4-0.5.dfsg.orig/debian/rules +++ p9m4-0.5.dfsg/debian/rules @@ -0,0 +1,30 @@ +#!/usr/bin/make -f + +DEB_PYTHON_SYSTEM = pysupport + +VERSION = $(shell dpkg-parsechangelog | grep Version | sed "s/Version: //") +ORIG_VERSION = $(shell echo $(VERSION) | sed s/-.*//) +UPSTREAM_VERSION = $(shell echo $(ORIG_VERSION) | sed s/\.dfsg//) +TARBALL_VERSION = v$(shell echo $(UPSTREAM_VERSION) | sed s/\\.//) +TARBALL_NAME = p9m4-$(TARBALL_VERSION) +SRCDIR_NAME = p9m4-$(ORIG_VERSION) + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/python-distutils.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk + +DEB_PYTHON_SETUP_CMD = debian/setup.py + +binary-post-install/prover9-mace4:: + mv debian/prover9-mace4/usr/bin/prover9-mace4.py debian/prover9-mace4/usr/bin/prover9-mace4 + chmod 644 debian/prover9-mace4/usr/share/prover9-mace4/lib/*.py + +get-orig-source: + -uscan --verbose --force-download --no-symlink --upstream-version $(UPSTREAM_VERSION) + cd debian/ && tar xvzf ../../$(TARBALL_NAME).tar.gz + rm -rf debian/$(TARBALL_NAME)/bin debian/$(TARBALL_NAME)/*.pyc + mv debian/$(TARBALL_NAME) debian/$(SRCDIR_NAME) + cd debian && tar cvzf ../../p9m4_$(ORIG_VERSION).orig.tar.gz $(SRCDIR_NAME) + rm -rf debian/$(SRCDIR_NAME) + +.PHONY: get-orig-source --- p9m4-0.5.dfsg.orig/debian/setup.py +++ p9m4-0.5.dfsg/debian/setup.py @@ -0,0 +1,9 @@ +from distutils.core import setup + +setup(name='prover9-mace4', + version='0.5', + description = 'Graphical User Interface (GUI) to prover9 and mace4', + author = 'William McCune', + author_email = 'mccune@cs.unm.edu', + scripts = ['prover9-mace4.py'], + ) --- p9m4-0.5.dfsg.orig/debian/compat +++ p9m4-0.5.dfsg/debian/compat @@ -0,0 +1 @@ +5 --- p9m4-0.5.dfsg.orig/debian/prover9-mace4.1 +++ p9m4-0.5.dfsg/debian/prover9-mace4.1 @@ -0,0 +1,25 @@ +.TH PROVER9-MACE4 1 "January 14, 2008" +.SH NAME +prover9-mace4 \- graphical theorem prover interface for Prover9 and Mace4 +.SH SYNOPSIS +.B prover9-mace4 +.SH DESCRIPTION +This manual page documents briefly the +.B prover9-mace4 +command. +.PP +\fBprover9-mace4\fP is a graphical user interface (GUI) to the +.BR prover9 (1) +theorem prover and the +.BR mace4 (1) +countermodel generator. +.SH USAGE +Usage instructions can be found within the program via the \fBHelp\fP menu. +.SH SEE ALSO +.BR prover9 (1), +.BR mace4 (1). +.SH AUTHOR +\fBprover9-mace4\fP ws written by William McCune +.PP +This manual page was written by Peter Collingbourne , +for the Debian project (but may be used by others). --- p9m4-0.5.dfsg.orig/debian/copyright +++ p9m4-0.5.dfsg/debian/copyright @@ -0,0 +1,33 @@ +This package was debianized by Peter Collingbourne on +Mon, 14 Jan 2008 16:40:29 +0000. + +It was downloaded from + +Upstream Author: + + William McCune + +Copyright: + + Copyright (C) 2006, 2007 William McCune + +License: + + The LADR Deduction Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License, + version 2. + + The LADR Deduction Library 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 the LADR Deduction Library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + +On Debian systems, the complete text of the GNU General +Public License, version 2 can be found in `/usr/share/common-licenses/GPL-2'. + +The Debian packaging is Copyright (C) 2009 Peter Collingbourne +and is licensed under the GPL version 2, see `/usr/share/common-licenses/GPL-2'. --- p9m4-0.5.dfsg.orig/debian/watch +++ p9m4-0.5.dfsg/debian/watch @@ -0,0 +1,2 @@ +version=3 +opts="uversionmangle=s/^0+/0\./,dversionmangle=s/\.dfsg$//,downloadurlmangle=s/v([0-9]+)\.html/p9m4-v$1.tar.gz/,filenamemangle=s/gui\/v([0-9]+)\.html/p9m4-v$1.tar.gz/" http://www.cs.unm.edu/~mccune/mace4/ gui/v([0-9]+)\.html --- p9m4-0.5.dfsg.orig/debian/changelog +++ p9m4-0.5.dfsg/debian/changelog @@ -0,0 +1,43 @@ +p9m4 (0.5.dfsg-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Update to suggest python-wxgtk2.8 rather than python-wxgtk2.6 - should + be a low risk change, as with default alternatives 2.8 will already get + used if installed, and 2.8 has twice as many installs according to popcon. + (Closes: #645569) + + -- Olly Betts Thu, 24 Nov 2011 04:25:46 +0000 + +p9m4 (0.5.dfsg-2) unstable; urgency=low + + [ Sandro Tosi ] + * debian/control + - switch Vcs-Browser field to viewsvn + + [ Marco Rodrigues ] + * debian/control: + + Add ${misc:Depends} to Depends to remove + lintian warning. + + [ Peter Collingbourne ] + * debian/install: removed shell brace expansion + * debian/prover9-mace4.1, debian/control, debian/copyright: changed + maintainer email address + * debian/copyright: updated year, use correct declaration of + copyright, refer to version of GPL + * debian/control: updated Standards-Version + * debian/patches/04-64bit.patch: added; Prover9-Mace4 can now start on + 64-bit platforms (closes: #526685) + * debian/control: added DM-Upload-Allowed: yes + + -- Peter Collingbourne Sun, 03 May 2009 16:00:55 +0100 + +p9m4 (0.5.dfsg-1) unstable; urgency=low + + * Initial release (closes: #460813) + * my_setup.py, partition_input.py: removed Python-2.5isms from code + * debian/setup.py: wrote distutils script + * files.py, prover9-mace4.py: point to correct file locations + + -- Peter Collingbourne Tue, 15 Jan 2008 01:35:54 +0000 + --- p9m4-0.5.dfsg.orig/debian/patches/02-no-2.5isms.patch +++ p9m4-0.5.dfsg/debian/patches/02-no-2.5isms.patch @@ -0,0 +1,44 @@ +diff -Nur p9m4-0.5/my_setup.py p9m4-0.5.new/my_setup.py +--- p9m4-0.5/my_setup.py 2008-01-14 23:30:55.000000000 +0000 ++++ p9m4-0.5.new/my_setup.py 2008-01-14 23:35:45.000000000 +0000 +@@ -158,7 +158,9 @@ + self.ed.SetStyle(start, end, + wx.TextAttr('RED', + wx.Colour(200,200,255))) +- error_dialog('%s\n%s' % (message,error if error else '')) ++ error_dialog('%s\n%s' % (message,error)) ++ else: ++ error_dialog(message) + else: + frame = Text_frame(self, to_top(self).box_font, + 'Error Output', +diff -Nur p9m4-0.5/partition_input.py p9m4-0.5.new/partition_input.py +--- p9m4-0.5/partition_input.py 2008-01-14 23:30:55.000000000 +0000 ++++ p9m4-0.5.new/partition_input.py 2008-01-14 23:35:45.000000000 +0000 +@@ -63,14 +63,23 @@ + m2 = r2.search(str, m1.end()) + while m2 and in_span(m2.start(), comments): + m2 = r2.search(str, m2.end()) +- match_end = m2.end() if m2 else len(str) ++ if m2: ++ match_end = m2.end() ++ else: ++ match_end = len(str) + other += str[other_start:m1.start()] + if remove_patterns: + keep_start = m1.end() +- keep_end = m2.start() if m2 else len(str) ++ if m2: ++ keep_end = m2.start() ++ else: ++ keep_end = len(str) + else: + keep_start = m1.start() +- keep_end = m2.end() if m2 else len(str) ++ if m2: ++ keep_end = m2.end() ++ else: ++ keep_end = len(str) + matched += str[keep_start:keep_end] + next = other_start = match_end + else: --- p9m4-0.5.dfsg.orig/debian/patches/03-use-inst-paths.patch +++ p9m4-0.5.dfsg/debian/patches/03-use-inst-paths.patch @@ -0,0 +1,42 @@ +diff -Nur p9m4-0.5/files.py p9m4-0.5.new/files.py +--- p9m4-0.5/files.py 2008-01-14 23:31:00.000000000 +0000 ++++ p9m4-0.5.new/files.py 2008-01-14 23:39:51.000000000 +0000 +@@ -51,6 +51,9 @@ + return sys.path[0] + # return os.path.dirname(os.path.abspath(sys.argv[0])) + ++def data_dir(): ++ return '/usr/share/prover9-mace4' ++ + def bin(): + if Win32(): + return 'bin-win32' +@@ -63,13 +66,13 @@ + return 'bin' + + def bin_dir(): +- return os.path.join(program_dir(), bin()) ++ return '/usr/bin' + + def image_dir(): +- return os.path.join(program_dir(), 'Images') ++ return os.path.join(data_dir(), 'Images') + + def sample_dir(): +- return os.path.join(program_dir(), 'Samples') ++ return os.path.join(data_dir(), 'Samples') + + def binary_ok(fullpath): + if not fullpath: +diff -Nur p9m4-0.5/prover9-mace4.py p9m4-0.5.new/prover9-mace4.py +--- p9m4-0.5/prover9-mace4.py 2007-12-07 16:27:13.000000000 +0000 ++++ p9m4-0.5.new/prover9-mace4.py 2008-02-10 22:45:45.000000000 +0000 +@@ -27,6 +27,8 @@ + + # local imports + ++sys.path.append('/usr/share/prover9-mace4/lib') ++ + import partition_input + import utilities + from files import * --- p9m4-0.5.dfsg.orig/debian/patches/04-64bit.patch +++ p9m4-0.5.dfsg/debian/patches/04-64bit.patch @@ -0,0 +1,300 @@ +diff -ur p9m4-0.5.dfsg/control.py p9m4-0.5.dfsg.new/control.py +--- p9m4-0.5.dfsg/control.py 2007-12-15 15:26:42.000000000 +0000 ++++ p9m4-0.5.dfsg.new/control.py 2009-05-03 02:35:56.000000000 +0100 +@@ -566,7 +566,7 @@ + self.time_ctrl.SetValue(opt[Default]) + else: + error_dialog('error sharing max_second option (%s)' % program.name) +- self.time_ctrl = wx.SpinCtrl(self, id, min=-1, max=sys.maxint, ++ self.time_ctrl = wx.SpinCtrl(self, id, min=-1, max=utilities.INT_MAX, + size=(75,-1)) + self.time_ctrl.SetValue(60) + +diff -ur p9m4-0.5.dfsg/options.py p9m4-0.5.dfsg.new/options.py +--- p9m4-0.5.dfsg/options.py 2007-12-13 02:26:48.000000000 +0000 ++++ p9m4-0.5.dfsg.new/options.py 2009-05-03 02:39:28.000000000 +0100 +@@ -320,15 +320,15 @@ + options = [ + + [None, None, None, None, Group, 'Basic Options', 'left'], +- [None, None, None, None, Parm, 'domain_size', None, 0, [0,sys.maxint], 'Look for structures of this size only.'], +- [None, None, None, None, Parm, 'start_size', None, 2, [2,sys.maxint], 'Initial (smallest) domain size.'], +- [None, None, None, None, Parm, 'end_size', None, -1, [-1,sys.maxint], 'Final (largest) domain size (-1 means infinity).'], +- # [None, None, None, None, Parm, 'iterate_up_to', None, 10, [-1,sys.maxint], 'Final domain size.'], +- [None, None, None, None, Parm, 'increment', None, 1, [1,sys.maxint], 'Increment for next domain size (when end_size > start_size).'], ++ [None, None, None, None, Parm, 'domain_size', None, 0, [0,utilities.INT_MAX], 'Look for structures of this size only.'], ++ [None, None, None, None, Parm, 'start_size', None, 2, [2,utilities.INT_MAX], 'Initial (smallest) domain size.'], ++ [None, None, None, None, Parm, 'end_size', None, -1, [-1,utilities.INT_MAX], 'Final (largest) domain size (-1 means infinity).'], ++ # [None, None, None, None, Parm, 'iterate_up_to', None, 10, [-1,utilities.INT_MAX], 'Final domain size.'], ++ [None, None, None, None, Parm, 'increment', None, 1, [1,utilities.INT_MAX], 'Increment for next domain size (when end_size > start_size).'], + [None, None, None, None, Stringparm, 'iterate', None, 'all', ['all', 'evens', 'odds', 'primes', 'nonprimes'], 'Domain sizes must satisfy this property.'], +- [None, None, None, None, Parm, 'max_models', None, 1, [-1,sys.maxint], 'Stop search at this number of models (-1 means no limit).'], +- [None, None, None, None, Parm, 'max_seconds', None, 60, [-1,sys.maxint], 'Overall time limit.'], +- [None, None, None, None, Parm, 'max_seconds_per', None, -1, [-1,sys.maxint], 'Time limit for each domain size.'], ++ [None, None, None, None, Parm, 'max_models', None, 1, [-1,utilities.INT_MAX], 'Stop search at this number of models (-1 means no limit).'], ++ [None, None, None, None, Parm, 'max_seconds', None, 60, [-1,utilities.INT_MAX], 'Overall time limit.'], ++ [None, None, None, None, Parm, 'max_seconds_per', None, -1, [-1,utilities.INT_MAX], 'Time limit for each domain size.'], + [None, None, None, None, Flag, 'prolog_style_variables', None, 0, None, 'Variables start with upper case instead of starting with u,v,w,x,y,z.'], + + # [None, None, None, None, Group, 'Output Options', 'left'], +@@ -342,7 +342,7 @@ + # [None, None, None, None, Flag, 'iterate_primes', None, 0, None, 'Search structures of prime size only.'], + # [None, None, None, None, Flag, 'iterate_nonprimes', None, 0, None, 'Search structures of nonprime size only.'], + [None, None, None, None, Flag, 'skolems_last', None, 0, None, 'Decide Skolem symbols last.'], +- [None, None, None, None, Parm, 'max_megs', None, 200, [-1,sys.maxint], 'Memory limit for Mace4 process (approximate).'], ++ [None, None, None, None, Parm, 'max_megs', None, 200, [-1,utilities.INT_MAX], 'Memory limit for Mace4 process (approximate).'], + [None, None, None, None, Flag, 'print_models', None, 1, None, 'Output models that are found.'], + + [None, None, None, None, Group, 'Experimental Options', 'right'], +@@ -436,13 +436,13 @@ + + ('Basic Options', + [ +- [None, None, None, None, Parm, 'max_weight', None, 100, [-sys.maxint,sys.maxint], 'Discard inferred clauses with weight greater than this.'], +- [None, None, None, None, Parm, 'pick_given_ratio', None, -1, [-1,sys.maxint], 'Selection by (Weight : Age) ratio (except for hints).'], ++ [None, None, None, None, Parm, 'max_weight', None, 100, [utilities.INT_MIN,utilities.INT_MAX], 'Discard inferred clauses with weight greater than this.'], ++ [None, None, None, None, Parm, 'pick_given_ratio', None, -1, [-1,utilities.INT_MAX], 'Selection by (Weight : Age) ratio (except for hints).'], + [None, None, None, None, Stringparm, 'order', None, 'lpo', ['lpo', 'rpo', 'kbo'], 'Overall term ordering: Lexicographic Path Ordering (LPO), Recursive Path Ordering (RPO), Knuth-Bendix Ordering (KBO). If the search fails with LPO, try KBO.'], + [None, None, None, None, Stringparm, 'eq_defs', None, 'unfold', ['unfold', 'fold', 'pass'], 'Adjustment of term ordering, based on equational definitions in the input.\nUnfold: eliminate defined operations at the start of the search;\nFold: introduce the defined operation whenever possible;\nPass: let equational definitions be oriented by the term ordering.'], + [None, None, None, None, Flag, 'expand_relational_defs', None, 0, None, 'Use relational definitions in the input to immediately expand occurrences of the defined relations in the input.'], + [None, None, None, None, Flag, 'restrict_denials', None, 0, None, 'This flag restricts the application of inference rules when negative clauses are involved, with the goal of producing more direct (forward) proofs. WARNING: this flag can block proofs.'], +- [None, None, None, None, Parm, 'max_seconds', None, 60, [-1,sys.maxint], 'Stop the search at this number of seconds (CPU, not wall clock).'], ++ [None, None, None, None, Parm, 'max_seconds', None, 60, [-1,utilities.INT_MAX], 'Stop the search at this number of seconds (CPU, not wall clock).'], + [None, None, None, None, Flag, 'prolog_style_variables', None, 0, None, 'Variables start with upper case instead of starting with u,v,w,x,y,z.'], + ]), + +@@ -469,26 +469,26 @@ + [ + + [None, None, None, None, Group, 'Search Limits', 'left'], +- [None, None, None, None, Parm, 'max_given', None, -1, [-1,sys.maxint], 'Stop the search at this number of given clauses.'], +- [None, None, None, None, Parm, 'max_kept', None, -1, [-1,sys.maxint], 'Stop the search at this number of kept clauses.'], +- [None, None, None, None, Parm, 'max_proofs', None, 1, [-1,sys.maxint], 'Stop the search at this number of proofs.'], +- [None, None, None, None, Parm, 'max_megs', None, 200, [-1,sys.maxint], 'Stop the search when the process has used about this amount of memory.'], +- [None, None, None, None, Parm, 'max_seconds', None, 60, [-1,sys.maxint], 'Stop the search at this number of seconds (CPU, not wall clock).'], +- [None, None, None, None, Parm, 'max_minutes', None, -1, [-1,sys.maxint], ''], +- [None, None, None, None, Parm, 'max_hours', None, -1, [-1,sys.maxint], ''], +- [None, None, None, None, Parm, 'max_days', None, -1, [-1,sys.maxint], ''], ++ [None, None, None, None, Parm, 'max_given', None, -1, [-1,utilities.INT_MAX], 'Stop the search at this number of given clauses.'], ++ [None, None, None, None, Parm, 'max_kept', None, -1, [-1,utilities.INT_MAX], 'Stop the search at this number of kept clauses.'], ++ [None, None, None, None, Parm, 'max_proofs', None, 1, [-1,utilities.INT_MAX], 'Stop the search at this number of proofs.'], ++ [None, None, None, None, Parm, 'max_megs', None, 200, [-1,utilities.INT_MAX], 'Stop the search when the process has used about this amount of memory.'], ++ [None, None, None, None, Parm, 'max_seconds', None, 60, [-1,utilities.INT_MAX], 'Stop the search at this number of seconds (CPU, not wall clock).'], ++ [None, None, None, None, Parm, 'max_minutes', None, -1, [-1,utilities.INT_MAX], ''], ++ [None, None, None, None, Parm, 'max_hours', None, -1, [-1,utilities.INT_MAX], ''], ++ [None, None, None, None, Parm, 'max_days', None, -1, [-1,utilities.INT_MAX], ''], + + [None, None, None, None, Group, 'Limits on Kept Clauses', 'right'], +- [None, None, None, None, Parm, 'max_weight', None, 100, [-sys.maxint,sys.maxint], 'Discard inferred clauses with weight greater than this.'], +- [None, None, None, None, Parm, 'max_depth', None, -1, [-1,sys.maxint], 'Discard inferred clauses with depth greater than this.'], +- [None, None, None, None, Parm, 'max_literals', None, -1, [-1,sys.maxint], 'Discard inferred clauses with more literals than this.'], +- [None, None, None, None, Parm, 'max_vars', None, -1, [-1,sys.maxint], 'Discard inferred clauses with more variables than this.'], ++ [None, None, None, None, Parm, 'max_weight', None, 100, [utilities.INT_MIN,utilities.INT_MAX], 'Discard inferred clauses with weight greater than this.'], ++ [None, None, None, None, Parm, 'max_depth', None, -1, [-1,utilities.INT_MAX], 'Discard inferred clauses with depth greater than this.'], ++ [None, None, None, None, Parm, 'max_literals', None, -1, [-1,utilities.INT_MAX], 'Discard inferred clauses with more literals than this.'], ++ [None, None, None, None, Parm, 'max_vars', None, -1, [-1,utilities.INT_MAX], 'Discard inferred clauses with more variables than this.'], + + [None, None, None, None, Group, 'Sos Control', 'right'], +- [None, None, None, None, Parm, 'sos_limit', None, 20000, [-1,sys.maxint], 'Limit on the size of the SOS list (the list of clauses that have been kept, but not yet selected as given clauses). As the SOS fills up, a heuristic is used to discards new clauses that are unlikely to be used due to this limit.'], +-# [None, None, None, None, Parm, 'min_sos_limit', None, 0, [0,sys.maxint], 'Unused'], +-# [None, None, None, None, Parm, 'lrs_interval', None, 50, [1,sys.maxint], 'Limited resource heuristic: '], +-# [None, None, None, None, Parm, 'lrs_ticks', None, -1, [-1,sys.maxint], 'Limited resource heuristic: '], ++ [None, None, None, None, Parm, 'sos_limit', None, 20000, [-1,utilities.INT_MAX], 'Limit on the size of the SOS list (the list of clauses that have been kept, but not yet selected as given clauses). As the SOS fills up, a heuristic is used to discards new clauses that are unlikely to be used due to this limit.'], ++# [None, None, None, None, Parm, 'min_sos_limit', None, 0, [0,utilities.INT_MAX], 'Unused'], ++# [None, None, None, None, Parm, 'lrs_interval', None, 50, [1,utilities.INT_MAX], 'Limited resource heuristic: '], ++# [None, None, None, None, Parm, 'lrs_ticks', None, -1, [-1,utilities.INT_MAX], 'Limited resource heuristic: '], + ]), + + ('Search Prep', +@@ -498,7 +498,7 @@ + [None, None, None, None, Flag, 'process_initial_sos', None, 1, None, 'Treat input clauses as if they were inferred; exceptions are the application of max_weight, max_level, max_vars, and max_literals.'], + [None, None, None, None, Flag, 'sort_initial_sos', None, 0, None, 'Sort the initial assumptions. The order is largely arbitrary.'], + [None, None, None, None, Flag, 'predicate_elim', None, 1, None, 'Try to eliminate predicate (relation) symbols before the search starts.'], +- [None, None, None, None, Parm, 'fold_denial_max', None, 0, [-1,sys.maxint], ''], ++ [None, None, None, None, Parm, 'fold_denial_max', None, 0, [-1,utilities.INT_MAX], ''], + ]), + + ('Goals/Denials', +@@ -511,15 +511,15 @@ + [ + + [None, None, None, None, Group, 'Selection Ratio', 'left'], +- [None, None, None, None, Parm, 'hints_part', None, sys.maxint, [0,sys.maxint], 'Component for clauses that match hint.'], +- [None, None, None, None, Parm, 'age_part', None, 1, [0,sys.maxint], 'Component for the oldest clauses.'], +- [None, None, None, None, Parm, 'weight_part', None, 0, [0,sys.maxint], 'Component for the lightest clauses.'], +- [None, None, None, None, Parm, 'false_part', None, 4, [0,sys.maxint], 'Component for the lightest false (w.r.t. an interpretation) clauses.'], +- [None, None, None, None, Parm, 'true_part', None, 4, [0,sys.maxint], 'Component for the lightest true (w.r.t. an interpretation) clauses.'], +- [None, None, None, None, Parm, 'random_part', None, 0, [0,sys.maxint], 'Component for random clauses.'], ++ [None, None, None, None, Parm, 'hints_part', None, utilities.INT_MAX, [0,utilities.INT_MAX], 'Component for clauses that match hint.'], ++ [None, None, None, None, Parm, 'age_part', None, 1, [0,utilities.INT_MAX], 'Component for the oldest clauses.'], ++ [None, None, None, None, Parm, 'weight_part', None, 0, [0,utilities.INT_MAX], 'Component for the lightest clauses.'], ++ [None, None, None, None, Parm, 'false_part', None, 4, [0,utilities.INT_MAX], 'Component for the lightest false (w.r.t. an interpretation) clauses.'], ++ [None, None, None, None, Parm, 'true_part', None, 4, [0,utilities.INT_MAX], 'Component for the lightest true (w.r.t. an interpretation) clauses.'], ++ [None, None, None, None, Parm, 'random_part', None, 0, [0,utilities.INT_MAX], 'Component for random clauses.'], + + [None, None, None, None, Group, 'Meta Options', 'right'], +- [None, None, None, None, Parm, 'pick_given_ratio', None, -1, [-1,sys.maxint], 'Selection by (Weight : Age) ratio (except for hints).'], ++ [None, None, None, None, Parm, 'pick_given_ratio', None, -1, [-1,utilities.INT_MAX], 'Selection by (Weight : Age) ratio (except for hints).'], + [None, None, None, None, Flag, 'breadth_first', None, 0, None, 'Selection by age only (except for hints).'], + [None, None, None, None, Flag, 'lightest_first', None, 0, None, 'Selection by weight only (except for hints).'], + [None, None, None, None, Flag, 'random_given', None, 0, None, 'Random selection (except for hints).'], +@@ -527,7 +527,7 @@ + + [None, None, None, None, Group, 'Semantic Guidance', 'left'], + [None, None, None, None, Stringparm, 'multiple_interps', None, 'false_in_all', ['false_in_all', 'false_in_some'], 'Semantics with multiple interpretaions: determines how clauses are marked as "false".'], +- [None, None, None, None, Parm, 'eval_limit', None, 1024, [-1,sys.maxint], 'Limit on the number of ground instances for evaluation in an explicit interpretation (for semantic guidance).'], ++ [None, None, None, None, Parm, 'eval_limit', None, 1024, [-1,utilities.INT_MAX], 'Limit on the number of ground instances for evaluation in an explicit interpretation (for semantic guidance).'], + + [None, None, None, None, Group, 'Others', 'right'], + [None, None, None, None, Flag, 'input_sos_first', None, 1, None, 'Before starting with selection ratio, select input clauses.'], +@@ -549,7 +549,7 @@ + [None, None, None, None, Flag, 'paramodulation', None, 0, None, 'The inference rule for equality.'], + + [None, None, None, None, Group, 'Other Rules', 'left'], +- [None, None, None, None, Parm, 'new_constants', None, 0, [-1,sys.maxint], 'If > 0, introduce new constants when equations such as x*x\'=y*y\' are derived. The value of this parameter is a limit on the number of times the rule will be applied.'], ++ [None, None, None, None, Parm, 'new_constants', None, 0, [-1,utilities.INT_MAX], 'If > 0, introduce new constants when equations such as x*x\'=y*y\' are derived. The value of this parameter is a limit on the number of times the rule will be applied.'], + [None, None, None, None, Flag, 'factor', None, 0, None, ''], + + [None, None, None, None, Group, 'General Restrictions', 'right'], +@@ -559,7 +559,7 @@ + [None, None, None, None, Flag, 'ordered_res', None, 1, None, 'Resolved literals in one or more parents must be maximal in the clause. (Does not apply to UR resolution.)'], + [None, None, None, None, Flag, 'check_res_instances', None, 0, None, 'The maximality checks are done after the application of the unifier for the inference.'], + [None, None, None, None, Flag, 'initial_nuclei', None, 0, None, 'For hyperresolution and UR resolution the nucleus for the inference must be an initial clause (this restriction can block all proofs).'], +- [None, None, None, None, Parm, 'ur_nucleus_limit', None, -1, [-1,sys.maxint], 'The nucleus for each UR-resolution inference can have at most this many literals.'], ++ [None, None, None, None, Parm, 'ur_nucleus_limit', None, -1, [-1,utilities.INT_MAX], 'The nucleus for each UR-resolution inference can have at most this many literals.'], + + [None, None, None, None, Group, 'Paramodulation Restrictions', 'right'], + [None, None, None, None, Flag, 'ordered_para', None, 1, None, 'For paramodulation inferences, one or both parents must be maximal in the clause.'], +@@ -567,20 +567,20 @@ + [None, None, None, None, Flag, 'para_from_vars', None, 1, None, 'Paramodulation is allowed from variables (not allowing can block all proofs)..'], + [None, None, None, None, Flag, 'para_units_only', None, 0, None, 'Paramodulation is applied to unit clauses only (this restriction can block all proofs).'], + # [None, None, None, None, Flag, 'basic_paramodulation', None, 0, None, ''], +- [None, None, None, None, Parm, 'para_lit_limit', None, -1, [-1,sys.maxint], 'Paramodulation is not applied to clauses with more than this number of literals (using this restriction can block all proofs).'], ++ [None, None, None, None, Parm, 'para_lit_limit', None, -1, [-1,utilities.INT_MAX], 'Paramodulation is not applied to clauses with more than this number of literals (using this restriction can block all proofs).'], + ]), + + ('Rewriting', + [ + + [None, None, None, None, Group, 'Term Rewriting Limits', 'left'], +- [None, None, None, None, Parm, 'demod_step_limit', None, 1000, [-1,sys.maxint], 'When rewriting derived clauses, apply at most this many rewrite steps. Under most settings, rewriting is guaranteed to terminate, but it can be intractable.'], +- [None, None, None, None, Parm, 'demod_size_limit', None, 1000, [-1,sys.maxint], 'When rewriting derived clauses, stop if the term being rewritten has more than this many symbols.'], ++ [None, None, None, None, Parm, 'demod_step_limit', None, 1000, [-1,utilities.INT_MAX], 'When rewriting derived clauses, apply at most this many rewrite steps. Under most settings, rewriting is guaranteed to terminate, but it can be intractable.'], ++ [None, None, None, None, Parm, 'demod_size_limit', None, 1000, [-1,utilities.INT_MAX], 'When rewriting derived clauses, stop if the term being rewritten has more than this many symbols.'], + + [None, None, None, None, Group, 'Lex-Dependent Rewriting', 'right'], + [None, None, None, None, Flag, 'lex_dep_demod', None, 1, None, 'Apply non-orientable equations as rewrite rules if the instance used for the rewrite is orientable.'], + [None, None, None, None, Flag, 'lex_dep_demod_sane', None, 1, None, 'This is a restriction on lex_dep_demod. A non-orientable equation can be used for rewriting only if the two sides have the same number of symbols.'], +- [None, None, None, None, Parm, 'lex_dep_demod_lim', None, 11, [-1,sys.maxint], 'This is a restriction on lex_dep_demod. A non-orientable equation can be used for rewriting only if it has fewer than this number of symbols.'], ++ [None, None, None, None, Parm, 'lex_dep_demod_lim', None, 11, [-1,utilities.INT_MAX], 'This is a restriction on lex_dep_demod. A non-orientable equation can be used for rewriting only if it has fewer than this number of symbols.'], + [None, None, None, None, Flag, 'lex_order_vars', None, 0, None, 'Incorporate (uninstantiated) variables into the term ordering, treating them as constants. For example, x*y < y*x. This cuts down the search, but it can block all proofs.'], + + [None, None, None, None, Group, 'Others', 'left'], +@@ -593,28 +593,28 @@ + [ + + [None, None, None, None, Group, 'Symbol Weights', 'left'], +- [None, None, None, None, Parm, 'variable_weight', None, 1, [-sys.maxint,sys.maxint], 'Weight of variables .'], +- [None, None, None, None, Parm, 'constant_weight', None, 1, [-sys.maxint,sys.maxint], 'Default weight of constants.'], +- [None, None, None, None, Parm, 'not_weight', None, 0, [-sys.maxint,sys.maxint], 'Weight of the negation symbol.'], +- [None, None, None, None, Parm, 'or_weight', None, 0, [-sys.maxint,sys.maxint], 'Weight of the disjunction symbol.'], +- [None, None, None, None, Parm, 'sk_constant_weight', None, 1, [-sys.maxint,sys.maxint], 'Weight of Skolem constants. This option can be useful, because Skolem constants cannot appear in weighting rules.'], +- [None, None, None, None, Parm, 'prop_atom_weight', None, 1, [-sys.maxint,sys.maxint], 'Weight of propositional atoms.'], ++ [None, None, None, None, Parm, 'variable_weight', None, 1, [utilities.INT_MIN,utilities.INT_MAX], 'Weight of variables .'], ++ [None, None, None, None, Parm, 'constant_weight', None, 1, [utilities.INT_MIN,utilities.INT_MAX], 'Default weight of constants.'], ++ [None, None, None, None, Parm, 'not_weight', None, 0, [utilities.INT_MIN,utilities.INT_MAX], 'Weight of the negation symbol.'], ++ [None, None, None, None, Parm, 'or_weight', None, 0, [utilities.INT_MIN,utilities.INT_MAX], 'Weight of the disjunction symbol.'], ++ [None, None, None, None, Parm, 'sk_constant_weight', None, 1, [utilities.INT_MIN,utilities.INT_MAX], 'Weight of Skolem constants. This option can be useful, because Skolem constants cannot appear in weighting rules.'], ++ [None, None, None, None, Parm, 'prop_atom_weight', None, 1, [utilities.INT_MIN,utilities.INT_MAX], 'Weight of propositional atoms.'], + + [None, None, None, None, Group, 'Penalties', 'right'], +- [None, None, None, None, Parm, 'skolem_penalty', None, 1, [0,sys.maxint], 'If a term contains a (non-constant) Skolem function, its weight is multiplied by this value.'], +- [None, None, None, None, Parm, 'nest_penalty', None, 0, [0,sys.maxint], 'For each nest of two identical function symbols, e.g., f(f(x,y),z), this value is added tot he weight of the term.'], +- [None, None, None, None, Parm, 'depth_penalty', None, 0, [-sys.maxint,sys.maxint], 'After the weight of clause C is calculated, its weight is increased by depth(C) * this_value.'], +- [None, None, None, None, Parm, 'var_penalty', None, 0, [-sys.maxint,sys.maxint], 'After the weight of clause C is calculated, its weight is increased by number_of_vars(C) * this_value.'], ++ [None, None, None, None, Parm, 'skolem_penalty', None, 1, [0,utilities.INT_MAX], 'If a term contains a (non-constant) Skolem function, its weight is multiplied by this value.'], ++ [None, None, None, None, Parm, 'nest_penalty', None, 0, [0,utilities.INT_MAX], 'For each nest of two identical function symbols, e.g., f(f(x,y),z), this value is added tot he weight of the term.'], ++ [None, None, None, None, Parm, 'depth_penalty', None, 0, [utilities.INT_MIN,utilities.INT_MAX], 'After the weight of clause C is calculated, its weight is increased by depth(C) * this_value.'], ++ [None, None, None, None, Parm, 'var_penalty', None, 0, [utilities.INT_MIN,utilities.INT_MAX], 'After the weight of clause C is calculated, its weight is increased by number_of_vars(C) * this_value.'], + + [None, None, None, None, Group, 'Others', 'right'], +- [None, None, None, None, Parm, 'default_weight', None, sys.maxint, [-sys.maxint,sys.maxint], ''], ++ [None, None, None, None, Parm, 'default_weight', None, utilities.INT_MAX, [utilities.INT_MIN,utilities.INT_MAX], ''], + ]), + + ('Process Inferred', + [ + [None, None, None, None, Flag, 'safe_unit_conflict', None, 0, None, 'In some cases, a proof may be missed because a newly-derived clause is deleted by a limit such as max_weight. This flag eliminates some of those cases.'], + [None, None, None, None, Flag, 'back_subsume', None, 1, None, 'When a newly-derived clause C is kept, discard all old clauses that are subsumed by C.'], +- [None, None, None, None, Parm, 'backsub_check', None, 500, [-1,sys.maxint], 'At this number of given clauses, disable back subsumption if less than 5% of kept clauses have been back subsumed.'], ++ [None, None, None, None, Parm, 'backsub_check', None, 500, [-1,utilities.INT_MAX], 'At this number of given clauses, disable back subsumption if less than 5% of kept clauses have been back subsumed.'], + ]), + + ('Input/Output', +@@ -631,8 +631,8 @@ + # [None, None, None, None, Flag, 'default_output', None, 1, None, ''], + [None, None, None, None, Flag, 'print_clause_properties', None, 0, None, 'When a clause is printed, show some if its syntactic properties (mostly for debugging).'], + [None, None, None, None, Stringparm, 'stats', None, 'lots', ['none', 'some', 'lots', 'all'], 'How many statistics should be printed at the end of the search and in "reports".'], +- [None, None, None, None, Parm, 'report', None, -1, [-1,sys.maxint], 'Output a statistics report every n seconds.'], +-# [None, None, None, None, Parm, 'report_stderr', None, -1, [-1,sys.maxint], ''], ++ [None, None, None, None, Parm, 'report', None, -1, [-1,utilities.INT_MAX], 'Output a statistics report every n seconds.'], ++# [None, None, None, None, Parm, 'report_stderr', None, -1, [-1,utilities.INT_MAX], ''], + [None, None, None, None, Flag, 'prolog_style_variables', None, 0, None, 'Variables start with upper case instead of starting with u,v,w,x,y,z.'], + ]), + +@@ -646,7 +646,7 @@ + + ('Other Options', + [ +- [None, None, None, None, Parm, 'random_seed', None, 0, [-1,sys.maxint], 'Seed for random number generation.'], ++ [None, None, None, None, Parm, 'random_seed', None, 0, [-1,utilities.INT_MAX], 'Seed for random number generation.'], + ]), + ] + +@@ -683,7 +683,7 @@ + (('breadth_first', True), ('false_part', 0)), + (('breadth_first', True), ('true_part', 0)), + (('breadth_first', True), ('random_part', 0)), +-# (('default_parts', True), ('hints_part', sys.maxint)), ++# (('default_parts', True), ('hints_part', utilities.INT_MAX)), + # (('default_parts', True), ('age_part', 1)), + # (('default_parts', True), ('weight_part', 0)), + # (('default_parts', True), ('false_part', 4)), +@@ -709,7 +709,7 @@ + (('auto_setup', False), ('eq_defs', 'pass')), + (('auto_limits', True), ('max_weight', 100)), + (('auto_limits', True), ('sos_limit', 20000)), +- (('auto_limits', False), ('max_weight', sys.maxint)), ++ (('auto_limits', False), ('max_weight', utilities.INT_MAX)), + (('auto_limits', False), ('sos_limit', -1)), + (('auto', True), ('auto_inference', True)), + (('auto', True), ('auto_setup', True)), +@@ -743,7 +743,7 @@ + (('raw', True), ('ordered_res', False)), + (('raw', True), ('ordered_para', False)), + (('raw', True), ('literal_selection', 'none')), +- (('raw', True), ('backsub_check', sys.maxint)), ++ (('raw', True), ('backsub_check', utilities.INT_MAX)), + (('raw', True), ('lightest_first', True)), + (('raw', True), ('cac_redundancy', False)), + +diff -ur p9m4-0.5.dfsg/utilities.py p9m4-0.5.dfsg.new/utilities.py +--- p9m4-0.5.dfsg/utilities.py 2007-11-16 22:31:26.000000000 +0000 ++++ p9m4-0.5.dfsg.new/utilities.py 2009-05-03 02:31:48.000000000 +0100 +@@ -17,7 +17,7 @@ + # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + # + +-import re ++import re, struct + + def grep(pattern, lines): + result = [] +@@ -86,5 +86,7 @@ + str = r.sub('', str) + return str + ++INT_MIN = -256**struct.calcsize("i")/2 ++INT_MAX = 256**struct.calcsize("i")/2 - 1 + +