p9m4-0.5.dfsg/0000755000175000017500000000000010762064437011534 5ustar bzedbzedp9m4-0.5.dfsg/partition_input.py0000644000175000017500000001112410717415076015334 0ustar bzedbzed# Copyright (C) 2007 William McCune # # This file is part of the LADR Deduction Library. # # The LADR Deduction Library 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 2 of the # License, or (at your option) any later version. # # 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. # #!/usr/bin/python import re, sys import utilities def in_span(i, spans): for (start,end) in spans: if i >= start and i < end: return True return False def norm(s): x = s.strip() # remove leading and trailing whitespace if x == '': return x else: return '\n' + x + '\n' def split1(str, pat): r = re.compile(pat) comments = utilities.comment_spans(str) # starts and ends of comments matched = other = '' # matched and not_matched parts other_start = 0 m = r.search(str, 0) while m: if not in_span(m.start(), comments): other += str[other_start:m.start()] matched += str[m.start():m.end()] other_start = m.end() m = r.search(str, m.end()) other += str[other_start:] return (matched, other) def split2(str, start_pat, end_pat, remove_patterns=False): r1 = re.compile(start_pat) r2 = re.compile(end_pat) comments = utilities.comment_spans(str) # starts and ends of comments matched = other = '' other_start = 0 m1 = r1.search(str, 0) while m1: if not in_span(m1.start(), comments): 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) other += str[other_start:m1.start()] if remove_patterns: keep_start = m1.end() keep_end = m2.start() if m2 else len(str) else: keep_start = m1.start() keep_end = m2.end() if m2 else len(str) matched += str[keep_start:keep_end] next = other_start = match_end else: next = m1.end() m1 = r1.search(str, next) other += str[other_start:] return (matched, other) def partition(input): work = input # if(Prover9). ... end_if. start_pat = 'if\s*\(\s*Prover9\s*\)\s*\.' end_pat = 'end_if\s*\.' (p9, work) = split2(work, start_pat, end_pat, remove_patterns = True) # if(Prover9). ... end_if. start_pat = 'if\s*\(\s*Mace4\s*\)\s*\.' end_pat = 'end_if\s*\.' (m4, work) = split2(work, start_pat, end_pat, remove_patterns = True) # assumptions|sos start_pat = 'formulas\s*\(\s*(assumptions|sos)\s*\)\s*\.' end_pat = 'end_of_list\s*\.' (assumps, work) = split2(work, start_pat, end_pat, remove_patterns = True) # goals start_pat = 'formulas\s*\(\s*goals\s*\)\s*\.' end_pat = 'end_of_list\s*\.' (goals, work) = split2(work, start_pat, end_pat, remove_patterns = True) # flags, parm, stringparms pat = '((set|clear)\s*\(\s*[a-z0-9_]+\s*\)\s*\.|assign\s*\(\s*[a-z0-9_]+\s*,\s*[a-z0-9_-]+\s*\)\s*\.)' (opt, work) = split1(work, pat) # op, redeclare pat = '(op\s*\([^,()]+,[^,()]+,[^,()]+\)\s*\.|redeclare\s*\([^,()]+,[^,()]+\)\s*\.)' (language, work) = split1(work, pat) # Clean up and return work = work.strip() + '\n' return (p9, m4, assumps, goals, opt, language, work) # end def partition(input): def extract_options(input): work = input # flags, parm, stringparms pat = '((set|clear)\s*\(\s*[a-z0-9_]+\s*\)\s*\.|assign\s*\(\s*[a-z0-9_-]+\s*,\s*[a-z0-9_]+\s*\)\s*\.)' (opt, work) = split1(work, pat) work = work.strip() + '\n' return (opt, work) # end def extract_options(input): if __name__ == '__main__': input = sys.stdin.read() (p9,m4,a,g,opt,other) = partition(input) print '% p9:\n' + p9 print '% m4:\n' + m4 print '% assumptions:\n' + a print '% goals:\n' + g print '% options:\n' + opt print '% other:\n' + other p9m4-0.5.dfsg/Win32-v05.iss0000744000175000017500000001013010726430727013561 0ustar bzedbzed; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "Prover9-Mace4" #define MyAppVerName "Prover9-Mace4 v0.5" #define MyAppPublisher "WWM" #define MyAppURL "http://www.prover9.org" #define MyAppExeName "prover9-mace4.exe" [Setup] AppName={#MyAppName} AppVerName={#MyAppVerName} AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} DefaultDirName={pf}\{#MyAppName} DefaultGroupName={#MyAppName} OutputBaseFilename=prover9-mace4-v05-setup.exe Compression=lzma SolidCompression=yes [Languages] Name: english; MessagesFile: compiler:Default.isl [Tasks] Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked [Files] Source: C:\Documents and Settings\Bill\Desktop\v5\dist\prover9-mace4.exe; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\Images\*; DestDir: {app}\Images; Flags: ignoreversion recursesubdirs createallsubdirs Source: C:\Documents and Settings\Bill\Desktop\v5\dist\Samples\*; DestDir: {app}\Samples; Flags: ignoreversion recursesubdirs createallsubdirs Source: C:\Documents and Settings\Bill\Desktop\v5\dist\bin-win32\*; DestDir: {app}\bin-win32; Flags: ignoreversion recursesubdirs createallsubdirs Source: C:\Documents and Settings\Bill\Desktop\v5\dist\_controls_.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\_core_.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\_gdi_.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\_misc_.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\_windows_.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\bz2.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\gdiplus.dll; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\library.zip; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\MSVCR71.dll; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\python25.dll; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\pywintypes25.dll; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\select.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\unicodedata.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\w9xpopen.exe; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\win32api.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\win32process.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\wxbase28h_net_vc.dll; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\wxbase28h_vc.dll; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\wxmsw28h_adv_vc.dll; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\wxmsw28h_core_vc.dll; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v5\dist\wxmsw28h_html_vc.dll; DestDir: {app}; Flags: ignoreversion ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] Name: {group}\{#MyAppName}; Filename: {app}\{#MyAppExeName} Name: {group}\{cm:ProgramOnTheWeb,{#MyAppName}}; Filename: {#MyAppURL} Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe} Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon [Run] Filename: {app}\{#MyAppExeName}; Description: {cm:LaunchProgram,{#MyAppName}}; Flags: nowait postinstall skipifsilent p9m4-0.5.dfsg/Win32-v04.iss0000744000175000017500000001012410702720547013557 0ustar bzedbzed; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "Prover9-Mace4" #define MyAppVerName "Prover9-Mace4 0.4" #define MyAppPublisher "WWM" #define MyAppURL "http://www.prover9.org" #define MyAppExeName "prover9-mace4.exe" [Setup] AppName={#MyAppName} AppVerName={#MyAppVerName} AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} DefaultDirName={pf}\{#MyAppName} DefaultGroupName={#MyAppName} OutputBaseFilename=Prover9-Mace4-setup-v0.4 Compression=lzma SolidCompression=yes [Languages] Name: english; MessagesFile: compiler:Default.isl [Tasks] Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked [Files] Source: C:\Documents and Settings\Bill\Desktop\v4\dist\prover9-mace4.exe; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\bin-win32\*; DestDir: {app}\bin-win32; Flags: ignoreversion recursesubdirs createallsubdirs Source: C:\Documents and Settings\Bill\Desktop\v4\dist\Images\*; DestDir: {app}\Images; Flags: ignoreversion recursesubdirs createallsubdirs Source: C:\Documents and Settings\Bill\Desktop\v4\dist\Samples\*; DestDir: {app}\Samples; Flags: ignoreversion recursesubdirs createallsubdirs Source: C:\Documents and Settings\Bill\Desktop\v4\dist\_controls_.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\_core_.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\_gdi_.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\_misc_.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\_windows_.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\bz2.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\gdiplus.dll; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\library.zip; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\MSVCR71.dll; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\python25.dll; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\pywintypes25.dll; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\select.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\unicodedata.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\w9xpopen.exe; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\win32api.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\win32process.pyd; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\wxbase28h_net_vc.dll; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\wxbase28h_vc.dll; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\wxmsw28h_adv_vc.dll; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\wxmsw28h_core_vc.dll; DestDir: {app}; Flags: ignoreversion Source: C:\Documents and Settings\Bill\Desktop\v4\dist\wxmsw28h_html_vc.dll; DestDir: {app}; Flags: ignoreversion ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] Name: {group}\{#MyAppName}; Filename: {app}\{#MyAppExeName} Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe} Name: {group}\{cm:ProgramOnTheWeb,{#MyAppName}}; Filename: {#MyAppURL} Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon [Run] Filename: {app}\{#MyAppExeName}; Description: {cm:LaunchProgram,{#MyAppName}}; Flags: nowait postinstall skipifsilent p9m4-0.5.dfsg/bin-mac-ppc/0000755000175000017500000000000010730323277013615 5ustar bzedbzedp9m4-0.5.dfsg/TAGS0000644000175000017500000001254210705750651012216 0ustar bzedbzed control.py,1399 class Prover9:15,244 def search_command(43,1030 def success_command(50,1219 def exists_solution(57,1412 def option_triples_to_success_args(60,1510 def exit_message(70,1861 def logo_bitmap(76,2034 def get_info_from_stderr(84,2340 class Mace4:107,3207 def search_command(134,4018 def success_command(141,4211 def option_triples_to_success_args(148,4406 def exists_solution(157,4726 def exit_message(160,4824 def logo_bitmap(166,4997 def get_info_from_stderr(173,5275 class Run_program:189,5836 def __init__(190,5855 def run(202,6245 def pause(271,9143 def resume(276,9300 def get_stderr_info(281,9458 def kill(288,9727 def done_with_job(296,10061 class Program_panel(305,10270 def __init__(307,10302 def on_info(432,15317 def update_info(443,15807 def info_reset(454,16135 def on_time_ctrl(461,16311 def start(467,16534 def pause_resume(486,17327 def on_kill(501,17872 def job_state(505,18003 def job_finished(511,18122 def on_reset(554,20006 def show_save(570,20528 def ss_input(592,21261 def ss_output(599,21536 def ss_solution(606,21815 def onInvoke(617,22328 def invoke_later(620,22379 class Control_panel(625,22544 def __init__(626,22575 def show_input(657,23745 def syntax_check(667,24081 files.py,151 def path_info(9,81 def program_dir(23,526 def bin(35,975 def bin_dir(43,1102 def image_dir(46,1164 def sample_dir(49,1231 def binary_ok(52,1300 Mac-setup.py,0 my_setup.py,919 class Input_panel(17,227 def __init__(19,257 def start_auto_highlight(72,2523 def stop_auto_highlight(81,2892 def on_hilite(90,3155 def well_formed_check(97,3341 def clear(135,4831 def highlight(138,4882 def on_text(162,5827 def on_char(166,5957 def check_highlight(171,6145 class P9_options_panel(181,6419 def __init__(182,6453 def switch_options(241,8914 def handle_rb1(253,9377 def handle_rb2(264,9736 def on_reset(268,9832 class Language_panel(273,9927 def __init__(274,9959 def on_prolog(329,12076 def get_language_input(335,12295 class Setup_tabs(340,12409 def __init__(341,12440 def update_font(410,15043 def reset(420,15305 def assemble_input(427,15462 def store_new_input(462,17209 def on_changed(507,19115 def start_auto_highlight(513,19287 def stop_auto_highlight(517,19399 options.py,1015 def id_to_option(39,658 def name_to_option(45,821 def nondefault_options(51,992 def separate_option_triples_by_case(62,1401 def option_triples_contains_name(73,1738 def option_triples_to_string(79,1879 def print_sharing(93,2302 def update_label(98,2472 def update_option(110,2815 def update_shared(119,3057 def update_dependent(124,3196 def link_options(139,3706 def link_options_by_names(147,3954 class Options_panel(158,4352 def __init__(159,4383 def on_change(255,8197 def on_reset(266,8560 class M4_options:276,8853 def __init__(318,12563 def nondefaults(341,13417 def name_to_opt(351,13840 def share_external_option(354,13924 def reset(363,14315 class P9_options:368,14403 def __init__(615,36973 def optionset_names(653,38499 def nondefaults(659,38647 def name_to_opt(672,39246 def share_external_option(679,39440 def reset(688,39831 def set_options(694,39960 def opt_intersect(737,41413 def set_options_either(743,41556 partition_input.py,126 def in_span(7,53 def norm(13,183 def split1(20,331 def split2(35,838 def partition(63,1882 def extract_options(108,3175 platforms.py,49 def Win32(7,104 def Mac(10,154 def GTK(13,202 prover9-mace4.py,652 class Main_frame(270,9300 def __init__(274,9375 def sample_menu(367,13092 def load_sample(397,14337 def on_close(408,14661 def clear_setup(416,15044 def on_open(419,15104 def write_input(436,15844 def on_save(447,16208 def on_saveas(453,16389 def get_help(468,17007 def get_about(475,17251 def tooltip_toggle(478,17350 def highlight_toggle(482,17479 def auto_highlight(489,17702 def select_font(492,17792 def setup_toggle(504,18183 def run_toggle(527,19262 class Splash_screen(546,20034 def __init__(547,20072 class My_app(556,20368 def OnInit(557,20390 setup.py,0 utilities.py,132 def grep(3,11 def grep_last(10,164 def pattern_spans(17,318 def comment_spans(26,525 def member(48,1142 def intersect(56,1280 Win32-setup.py,0 wx_utilities.py,806 class State:9,79 def to_top(19,238 def absolute_position(24,318 def size_that_fits(32,505 def pos_for_center(38,788 def center_of_screen(46,1096 def error_dialog(51,1297 def info_dialog(56,1432 def open_dir_style(61,1572 def saveas_dir_style(74,1977 def max_width(90,2563 class Text_frame(97,2734 def __init__(98,2762 def append(133,4048 def saveas(137,4169 def on_close(160,5092 def hilite_error(163,5143 class Mini_info(183,5934 def __init__(184,5965 def on_close(225,7453 def update(229,7544 class Invoke_event(239,7773 def __init__(246,7955 def invoke(253,8173 class Busy_bar(258,8282 def __init__(260,8309 def update_bar(271,8634 def start(282,8950 def pause(288,9148 def resume(292,9233 def stop(295,9285 p9m4-0.5.dfsg/bin-mac-intel/0000755000175000017500000000000010726340344014145 5ustar bzedbzedp9m4-0.5.dfsg/control.py0000744000175000017500000011755210730771062013574 0ustar bzedbzed# Copyright (C) 2007 William McCune # # This file is part of the LADR Deduction Library. # # The LADR Deduction Library 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 2 of the # License, or (at your option) any later version. # # 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. # # system imports import os, wx, re, copy import time, thread, tempfile, subprocess, signal # local imports import utilities from files import * from platforms import * from wx_utilities import * from my_setup import * from options import * def run_and_wait(command, input = '', fin = None): if not fin: fin = tempfile.TemporaryFile('w+b') # stdin fin.write(input) fin.seek(0) fout = tempfile.TemporaryFile('w+b') # stdout ferr = tempfile.TemporaryFile('w+b') # stderr if Win32(): # creationflag says not to pop a DOS box process = subprocess.Popen(command,stdin=fin,stdout=fout,stderr=ferr, creationflags=win32process.CREATE_NO_WINDOW) else: process = subprocess.Popen(command,stdin=fin,stdout=fout,stderr=ferr) exit_code = process.wait() fout.seek(0) output = fout.read() ferr.seek(0) error = ferr.read() fin.close() fout.close() ferr.close() return (exit_code, output, error) def isofilter_command(program_name): fullpath = os.path.join(bin_dir(), program_name) if not binary_ok(fullpath): return None else: return [fullpath] def ops_in_interp(s): i = s.find('interpretation(') ops = [] if i >= 0: j = s.find(').', i+1) interp = s[i:j+2] r = re.compile('(?:function|relation)\(([^,(]*)') m = r.search(interp) while m: op = m.group(1) if op != '=': ops.append(op) m = r.search(interp, m.end()) return ops class Prover9: name = 'Prover9' solution_name = 'Proof' box_name = 'Proof Search' solution_ext = 'proof' some_message = 'Some, but not all, of the requested proofs were found.' logo_path = os.path.join(image_dir(), 'prover9-5a-128t.gif') # Compile regular expression for extracting stats from stderr. r_info = re.compile('Given=(\d+)\. Generated=(\d+)\. Kept=(\d+)\. ' 'proofs=(\d+)\.User_CPU=(\d*\.\d*),') exits = {} exits[0] = 'Proof' exits[1] = 'Fatal Error' exits[2] = 'Exhausted' exits[3] = 'Memory Limit' exits[4] = 'Time Limit' exits[5] = 'Given Limit' exits[6] = 'Kept Limit' exits[7] = 'Action Exit' exits[101] = 'Interrupted' exits[102] = 'Crashed' exits[-9] = 'Killed' # Linux, Mac exits[-1] = 'Killed' # Win32 def search_command(self): fullpath = os.path.join(bin_dir(), 'prover9') if not binary_ok(fullpath): return None else: return [fullpath] def success_command(self): fullpath = os.path.join(bin_dir(), 'prooftrans') if not binary_ok(fullpath): return None else: return [fullpath] def exists_solution(self, exit_code, output): return output.find('== PROOF ==') >= 0 def count_solutions(self, solutions): return solutions.count('== PROOF ==') def exit_message(self, code): if code in self.exits.keys(): return self.exits[code] else: return 'unknown exit code: %d' % code def logo_bitmap(self): if not os.access(self.logo_path, os.R_OK): error_dialog('The logo file %s cannot be found.' % self.logo_path) return None else: return wx.Image(self.logo_path, wx.BITMAP_TYPE_GIF).ConvertToBitmap() def get_info_from_stderr(self, lines): stats = utilities.grep_last('Given', lines) time = utilities.grep_last('User_CPU', lines) if stats and time: line = stats.strip() + time.strip() m = self.r_info.match(line) if m: return [('CPU Seconds', m.groups()[4]), ('Given', m.groups()[0]), ('Generated', m.groups()[1]), ('Kept', m.groups()[2]), ('Proofs', m.groups()[3])] else: error_dialog('get_stderr_info, failed to match') return [('CPU Seconds', '?'), ('Given', '?'), ('Generated', '?'), ('Kept', '?'), ('Proofs', '?')] def reformatter(self, parent, proofs, saved_solution): n = self.count_solutions(proofs) return Reformat_proof(parent, proofs, n, saved_solution) # end class Prover9 class Mace4: name = 'Mace4' solution_name = 'Model' box_name = 'Model/Counterexample Search' solution_ext = 'model' some_message = '' logo_path = os.path.join(image_dir(), 'mace4-90t.gif') # Compile regular expression for extracting stats from stderr. # Domain_size=8. Models=0. User_CPU=8.00. r_info = re.compile('Domain_size=(\d+)\. Models=(\d+)\. User_CPU=(\d*\.\d*)\.') exits = {} exits[0] = 'Model(s)' exits[1] = 'Fatal Error' exits[2] = 'Exhausted (no)' exits[3] = 'Exhausted (yes)' exits[4] = 'Time Limit (yes)' exits[5] = 'Time Limit (no)' exits[6] = 'Mem Limit (yes)' exits[7] = 'Mem Limit (no)' exits[101] = 'Interrupted' exits[102] = 'Crashed' exits[-9] = 'Killed' # Linux, Mac exits[-1] = 'Killed' # Win32 def search_command(self): fullpath = os.path.join(bin_dir(), 'mace4') if not binary_ok(fullpath): return None else: return [fullpath, '-c'] def success_command(self): fullpath = os.path.join(bin_dir(), 'interpformat') if not binary_ok(fullpath): return None else: return [fullpath] def exists_solution(self, exit_code, output): return output.find('== MODEL ==') >= 0 def count_solutions(self, solutions): return solutions.count('interpretation') def exit_message(self, code): if code in self.exits.keys(): return self.exits[code] else: return 'unknown exit code: %d' % code def logo_bitmap(self): if not os.access(self.logo_path, os.R_OK): error_dialog('The logo file %s cannot be found.' % self.logo_path) return None else: return wx.Image(self.logo_path, wx.BITMAP_TYPE_GIF).ConvertToBitmap() def get_info_from_stderr(self, lines): line = utilities.grep_last('Domain_size=', lines) if line: m = self.r_info.match(line) if m: return [('CPU Seconds', m.groups()[2]), ('Domain Size', m.groups()[0]), ('Models' , m.groups()[1])] else: error_dialog('get_stderr_info, failed to match') return [('CPU Seconds', '?'), ('Domain Size', '?'), ('Models' , '?')] def reformatter(self, parent, models, saved_solution): n = self.count_solutions(models) return Reformat_model(parent, models, n, saved_solution) # end class Mace4 class Reformat_proof: def __init__(self, parent, proofs, num_proofs, saved_flag): self.parent = parent self.proofs = proofs self.num_proofs = num_proofs self.saved_flag = saved_flag self.choices = ['standard', 'parents_only', 'xml', 'ivy', 'hints'] self.choice = self.choices[0] self.dlg = dlg = wx.Dialog(parent, -1, title="Reformat Proof(s)", pos=pos_for_center((0,0))) rb = wx.RadioBox(dlg, -1, 'Format', choices=self.choices, majorDimension=1, style=wx.RA_SPECIFY_COLS) dlg.Bind(wx.EVT_RADIOBOX, self.on_rb, rb) options_box = wx.StaticBox(dlg, -1, 'Options') box_sizer = wx.StaticBoxSizer(options_box, wx.VERTICAL) self.expand_cb = wx.CheckBox(dlg, -1, 'Expand Proof') self.renumber_cb = wx.CheckBox(dlg, -1, 'Renumber Proof') self.striplabels_cb = wx.CheckBox(dlg, -1, 'Remove Labels') self.hl_cb = wx.CheckBox(dlg, -1, 'Hints Label') self.hl_ctrl = wx.TextCtrl(dlg, -1, '', size=(100, -1)) box_sizer.Add(self.expand_cb) box_sizer.Add(self.renumber_cb) box_sizer.Add(self.striplabels_cb) subsizer = wx.BoxSizer(wx.HORIZONTAL) subsizer.Add(self.hl_cb, 0, wx.CENTER, 0) subsizer.Add(self.hl_ctrl, 0, wx.CENTER, 0) box_sizer.Add(subsizer) cancel_btn = wx.Button(dlg, -1, 'Cancel') dlg.Bind(wx.EVT_BUTTON, self.on_cancel, cancel_btn) ok_btn = wx.Button(dlg, -1, 'OK') dlg.Bind(wx.EVT_BUTTON, self.on_ok, ok_btn) sizer1 = wx.BoxSizer(wx.HORIZONTAL) sizer1.Add(rb, 0, wx.ALL|wx.CENTER, 10) sizer1.Add(box_sizer, 0, wx.ALL|wx.CENTER, 10) sizer2 = wx.BoxSizer(wx.HORIZONTAL) sizer2.Add(cancel_btn, 0, wx.ALL, 10) sizer2.Add(ok_btn, 0, wx.ALL, 10) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(sizer1, 0, wx.CENTER, 10) sizer.Add(sizer2, 0, wx.CENTER, 10) dlg.SetSizer(sizer) sizer.Fit(dlg) self.grayout_options() if Win32(): rc = dlg.Show() # if modal, I can't get the new fame to the top! else: rc = dlg.ShowModal() def grayout_options(self): if self.choice in ['standard', 'parents_only', 'xml']: self.expand_cb.Enable(True) self.renumber_cb.Enable(True) self.striplabels_cb.Enable(True) self.hl_cb.Enable(False) self.hl_ctrl.Enable(False) elif self.choice == 'ivy': self.expand_cb.Enable(False) self.renumber_cb.Enable(True) self.striplabels_cb.Enable(False) self.hl_cb.Enable(False) self.hl_ctrl.Enable(False) elif self.choice == 'hints': self.expand_cb.Enable(True) self.renumber_cb.Enable(False) self.striplabels_cb.Enable(True) self.hl_cb.Enable(True) self.hl_ctrl.Enable(True) else: error_dialog('grayout_options: unknown proof format') def command(self): command = [os.path.join(bin_dir(), 'prooftrans'), self.choice] if self.expand_cb.IsEnabled() and self.expand_cb.IsChecked(): command.append('expand') if self.renumber_cb.IsEnabled() and self.renumber_cb.IsChecked(): command.append('renumber') if self.striplabels_cb.IsEnabled() and self.striplabels_cb.IsChecked(): command.append('striplabels') if self.hl_cb.IsEnabled() and self.hl_cb.IsChecked(): command.append('-label') lab = self.hl_ctrl.GetValue().strip() if lab != '': command.append(lab) return command def on_rb(self, evt): self.choice = self.choices[evt.GetInt()] self.grayout_options() def on_ok(self, evt): command = self.command() (exit_code, output, err) = run_and_wait(command, input=self.proofs) self.dlg.Destroy() if exit_code != 0: error_dialog("Error reformatting proofs") else: args = ' '.join(command[1:]) n = self.num_proofs if self.num_proofs == 1: title = 'Reformatted Proof (%s)' % (args) else: title = 'Reformatted Proofs (%s, %d proofs)' % (args, n) frame = Text_frame(self.parent, to_top(self.parent).box_font, title, output, extension = 'proof', saveas=True, saved_flag = self.saved_flag, off_center=20) frame.Show(True) frame.Raise() def on_cancel(self, evt): self.dlg.Destroy() # class Reformat_proof class Reformat_model: def __init__(self, parent, models, num_models, saved_flag): self.parent = parent self.models = models self.saved_flag = saved_flag self.num_models = num_models self.choices = ['standard', 'standard2', 'portable', 'tabular', 'raw', 'cooked', 'tex', 'xml'] menu = wx.Menu() self.map = {} for item in self.choices: id = wx.NewId() self.map[id] = item menu.Append(id, item) self.parent.Bind(wx.EVT_MENU, self.on_select, id=id) self.parent.PopupMenu(menu) menu.Destroy() def on_select(self, evt): item = self.map[evt.GetId()] command = [os.path.join(bin_dir(), 'interpformat'), item] (exit_code, output, err) = run_and_wait(command, input=self.models) if exit_code != 0: error_dialog("Error reformatting models") else: args = ' '.join(command[1:]) n = self.num_models if self.num_models == 1: title = 'Reformatted Model (%s)' % (args) else: title = 'Reformatted Models (%s, %d models)' % (args, n) frame = Text_frame(self.parent, to_top(self.parent).box_font, title, output, extension = 'model', saveas=True, saved_flag = self.saved_flag, off_center=40) frame.Show(True) # class Reformat_model class Run_program: def __init__(self, parent, program, input): self.parent = parent self.program = program self.input = input self.output = None self.solution = None self.exit_code = None self.state = State.ready # ready, running, suspended, done, error # The following are lists so they can be altered as side effects. self.saved_input = [False] self.saved_output = [False] self.saved_solution = [False] thread.start_new_thread(self.run, ()) def run(self): # # DO NOT DO ANY GUI STUFF IN HERE, BECAUSE THIS # RUNS IN A SEPARATE THREAD!!! # search_command = self.program.search_command() success_command = self.program.success_command() if not search_command or not success_command: self.state = State.error self.fin = self.fout = self.ferr = None else: # use files to avoid buffering problems (maybe improve later) self.fin = tempfile.TemporaryFile('w+b') # stdin self.fout = tempfile.TemporaryFile('w+b') # stdout self.ferr = tempfile.TemporaryFile('w+b') # stderr self.fin.write(self.input) self.fin.seek(0) if Win32(): # creationflag says not to pop a DOS box self.process = subprocess.Popen( search_command, stdin=self.fin, stdout=self.fout, stderr=self.ferr, creationflags=win32process.CREATE_NO_WINDOW) else: self.process = subprocess.Popen( search_command, stdin=self.fin, stdout=self.fout, stderr=self.ferr) self.state = State.running self.exit_code = self.process.wait() # Wait for process to finish! self.state = State.done self.fout.seek(0) # rewind stdout self.output = self.fout.read() if (self.exit_code == 0 or self.program.exists_solution(self.exit_code, self.output)): # Extract the solution from stdout self.fout.seek(0) (rc,output,err) = run_and_wait(success_command, fin=self.fout) if rc == 0: self.solution = output # at least one solution elif rc == 2: self.solution = None # no solution (clear(print_proofs)?) else: self.solution = ('There was an error extracting the %s.' % self.program.solution_name) # Keep files open until self is deleted. self.parent.invoke_later(self.parent.job_finished) def pause(self): if self.state == State.running: os.kill(self.process.pid, signal.SIGSTOP) self.state = State.suspended def resume(self): if self.state == State.suspended: os.kill(self.process.pid, signal.SIGCONT) self.state = State.running def get_stderr_info(self): if self.state in [State.running, State.suspended, State.done]: self.ferr.seek(0) # rewind lines = self.ferr.readlines() info = self.program.get_info_from_stderr(lines) return info def kill(self): if self.state == State.running or self.state == State.suspended: # Cleanup will occur when the 'run' thread terminates. if Win32(): win32api.TerminateProcess(int(self.process._handle), -1) else: os.kill(self.process.pid, signal.SIGKILL) def done_with_job(self): if self.fin: # if one exists, all exist self.fin.close() self.fout.close() self.ferr.close() del self # end class Run_program() class Program_panel(wx.Panel): def __init__(self, parent, program, options): self.program = program self.job = None self.info_panel = None self.timer = None # for monitoring (Info button) wx.Panel.__init__(self, parent) self.Connect(-1, -1, Invoke_event.my_EVT_INVOKE, self.on_invoke) # Surrounding box box_program = wx.StaticBox(self, -1, program.box_name) box_sizer = wx.StaticBoxSizer(box_program, wx.VERTICAL) # Time limit (widget shared with options panel elsewhere) id = wx.NewId() label_id = wx.NewId() opt = copy.deepcopy(options.name_to_opt('max_seconds')) if opt: opt[Id] = id opt[Label_id] = label_id opt[Share] = [opt] (min, max) = opt[Range] options.share_external_option(opt) self.time_ctrl = wx.SpinCtrl(self, id, min=min, max=max, size=(75,-1)) 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, size=(75,-1)) self.time_ctrl.SetValue(60) self.time_ctrl_opt = opt label = wx.StaticText(self, label_id, 'Time Limit: ') self.time_ctrl.SetToolTipString('A value of -1 means there is no limit.') self.Bind(wx.EVT_SPINCTRL, self.on_time_ctrl, self.time_ctrl) time_sizer = wx.BoxSizer(wx.HORIZONTAL) time_sizer.Add(label, 0, wx.ALL|wx.ALIGN_CENTER, 1) time_sizer.Add(self.time_ctrl, 0, wx.ALL, 1) time_sizer.Add(wx.StaticText(self, -1, 'seconds.'), 0, wx.ALL|wx.ALIGN_CENTER, 1) # Start, Pause, Kill self.start_btn = wx.Button(self, -1, 'Start') self.start_btn.SetToolTipString( 'Start %s with the current input.' % program.name) self.Bind(wx.EVT_BUTTON, self.on_start, self.start_btn) self.pause_btn = wx.Button(self, -1, 'Pause') self.pause_btn.SetToolTipString('Pause or Resume %s.' % program.name) self.pause_btn.Enable(False) self.Bind(wx.EVT_BUTTON, self.on_pause_resume, self.pause_btn) if Win32(): self.pause_btn.Show(False) self.kill_btn = wx.Button(self, -1, 'Kill') self.kill_btn.SetToolTipString('Kill %s process.' % program.name) self.kill_btn.Enable(False) self.Bind(wx.EVT_BUTTON, self.on_kill, self.kill_btn) run_sizer = wx.BoxSizer(wx.HORIZONTAL) run_sizer.Add(self.start_btn, 0, wx.ALL, 1) run_sizer.Add(self.pause_btn, 0, wx.ALL, 1) run_sizer.Add(self.kill_btn, 0, wx.ALL, 1) # Busy bar self.bar = Busy_bar(self, width=200, height=16, delay=100) # State line width = max_width(program.exits.values(), self) self.state_text = wx.StaticText(self, -1, 'Ready', size=(width, -1)) state_sizer = wx.BoxSizer(wx.HORIZONTAL) text = wx.StaticText(self, -1, 'State: ') state_sizer.Add(text, 0, wx.ALL|wx.ALIGN_CENTER, 1) state_sizer.Add(self.state_text, 1, wx.ALL|wx.ALIGN_CENTER, 1) # Info, Show/Save self.info_btn = wx.Button(self, -1, 'Info') self.info_btn.SetToolTipString( 'Show some statistics on the %s search.' % program.name) self.Bind(wx.EVT_BUTTON, self.on_info, self.info_btn) self.info_btn.Enable(False) self.show_save_btn = wx.Button(self, -1, 'Show/Save') if not Mac(): self.show_save_btn.SetToolTipString( 'The choices refer to the most recent %s search.' % program.name) self.Bind(wx.EVT_BUTTON, self.on_show_save, self.show_save_btn) self.show_save_btn.Enable(False) show_sizer = wx.BoxSizer(wx.HORIZONTAL) show_sizer.Add(self.info_btn, 0, wx.ALL, 1) show_sizer.Add(self.show_save_btn, 0, wx.ALL, 1) # Overall Layout logo_bitmap = program.logo_bitmap() if logo_bitmap: logo = wx.StaticBitmap(self, -1, logo_bitmap) box_sizer.Add(logo, 0, wx.ALL|wx.ALIGN_CENTER,3) box_sizer.Add(time_sizer, 0, wx.ALL, 3) box_sizer.Add(run_sizer, 0, wx.ALL|wx.ALIGN_CENTER,3) box_sizer.Add(self.bar, 0, wx.ALL|wx.ALIGN_CENTER,3) box_sizer.Add(state_sizer, 0, wx.ALL|wx.GROW, 3) box_sizer.Add(show_sizer, 0, wx.ALL|wx.ALIGN_CENTER, 3) self.SetSizer(box_sizer) # Methods def on_info(self, evt): if self.job: info = self.job.get_stderr_info() self.info_panel = Mini_info(self, 'Info on %s Search' % self.program.name, info) self.info_btn.Enable(False) if self.job.state != State.done: self.timer = wx.Timer(self, -1) wx.EVT_TIMER(self, self.timer.GetId(), self.update_info) self.timer.Start(2000) # milliseconds def update_info(self, evt): if self.job: info = self.job.get_stderr_info() self.info_panel.update(info) if self.job.state == State.done: self.timer.Stop() self.timer = None else: self.timer.Stop() self.timer = None def info_reset(self): if self.timer: self.timer.Stop() self.timer = None self.info_btn.Enable(True) self.info_panel = None def on_time_ctrl(self, evt): if self.time_ctrl_opt: self.time_ctrl_opt[Value] = self.time_ctrl.GetValue() update_label(self.time_ctrl_opt) update_shared(self.time_ctrl_opt) def on_start(self, evt): if self.job: if self.job.solution and not self.job.saved_solution[0]: message = ( 'There is an unsaved %s. Delete the %s and continue?' % (self.program.solution_name,self.program.solution_name)) dlg = wx.MessageDialog(self, message, '', wx.OK | wx.CANCEL| wx.ICON_QUESTION) rc = dlg.ShowModal() dlg.Destroy() if rc == wx.ID_CANCEL: return self.job.done_with_job() self.job = None self.info_btn.Enable(False) if self.info_panel: self.info_panel.Close() self.start_btn.Enable(False) self.time_ctrl.Enable(False) self.pause_btn.Enable(True) self.kill_btn.Enable(True) self.info_btn.Enable(True) self.show_save_btn.Enable(False) self.bar.start() self.state_text.SetLabel('Running') input = to_top(self).setup.assemble_input() input = 'assign(report_stderr, 2).\n' + input self.job = Run_program(self, self.program, input) def on_pause_resume(self, evt): # assume job is running or suspended if self.job.state == State.running: self.job.pause() self.bar.pause() self.pause_btn.SetLabel('Resume') self.state_text.SetLabel('Paused') elif self.job.state == State.suspended: self.job.resume() self.bar.resume() self.pause_btn.SetLabel('Pause') self.state_text.SetLabel('Running') else: error_dialog('pause_resume: unknown job state') def on_kill(self, evt): # assume job is running or suspended self.job.kill() # calls job_finished indirectly def job_state(self): if self.job: return self.job.state else: return None def job_finished(self): self.bar.stop() self.pause_btn.Enable(False) self.pause_btn.SetLabel('Pause') self.kill_btn.Enable(False) self.show_save_btn.Enable(True) self.start_btn.Enable(True) self.time_ctrl.Enable(True) if self.job.state == State.error: self.state_text.SetLabel('Program_Not_Found') error_dialog('%s binaries not found, looking in\n%s' % (self.program.name, bin_dir())) else: message = self.program.exit_message(self.job.exit_code) self.state_text.SetLabel(message) if self.job.exit_code == 1: # fatal error frame = Text_frame( self, to_top(self).box_font, self.program.name + ' Fatal Error', self.job.output, saveas=False) frame.hilite_error() frame.Show(True) error_dialog('A Fatal Error occurred. The %s output ' 'is shown.' % self.program.name) elif self.job.solution: self.ss_solution(None) if self.job.exit_code != 0: info_dialog('%s Exit: %s. \n%s' % (self.program.name, message, self.program.some_message)) elif self.program.exits[self.job.exit_code] != 'Killed': info_dialog('%s Exit: %s' % (self.program.name, message)) def on_show_save(self, evt): menu = wx.Menu() id = wx.NewId() menu.Append(id, self.program.name + ' Input (from most recent search)') self.Bind(wx.EVT_MENU, self.ss_input, id=id) id = wx.NewId() menu.Append(id, self.program.name + ' Output') self.Bind(wx.EVT_MENU, self.ss_output, id=id) if self.job.state == State.error: menu.Enable(id, False) id = wx.NewId() menu.Append(id, self.program.name + ' ' + self.program.solution_name) self.Bind(wx.EVT_MENU, self.ss_solution, id=id) if self.job.exit_code != 0 and not self.job.solution: menu.Enable(id, False) self.PopupMenu(menu) menu.Destroy() def ss_input(self, evt): frame = Text_frame(self, to_top(self).box_font, self.program.name + ' Input', self.job.input, extension='in', saveas=True, saved_flag=self.job.saved_input) frame.Show(True) def ss_output(self, evt): frame = Text_frame(self, to_top(self).box_font, self.program.name + ' Output', self.job.output, extension='out', saveas=True, saved_flag=self.job.saved_output) frame.Show(True) def ss_solution(self, evt): extra_ops=[('Reformat ...', self.on_reformat)] solutions = self.program.count_solutions(self.job.solution) if (self.program.name == 'Mace4' and solutions > 1): extra_ops.append(('Isofilter...', self.on_isofilter)) if solutions == 1: title = '%s %s' % (self.program.name,self.program.solution_name) else: title = '%s %s (%d %ss)' % (self.program.name, self.program.solution_name, solutions, self.program.solution_name) frame = Text_frame( self, to_top(self).box_font, title, self.job.solution, extension=self.program.solution_ext, saveas=True, saved_flag=self.job.saved_solution, extra_operations=extra_ops) frame.Show(True) def on_reformat(self, evt): parent = evt.GetEventObject().GetParent() solution = parent.text self.program.reformatter(parent, solution, self.job.saved_solution) def on_isofilter(self, evt): parent = evt.GetEventObject().GetParent() solution = parent.text frame = Isofilter_frame(self, solution, self.job.saved_solution) # The following two methods allow GUI events in the main thread # to be initiated by other threads. See class Invoke_event and # the Connect statement in the constructor of this class. def on_invoke(self, evt): evt.invoke() def invoke_later(self, func, *args, **kwargs): self.GetEventHandler().AddPendingEvent(Invoke_event(func,args,kwargs)) # END class Program_panel(Panel) class Control_panel(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent, style=wx.FULL_REPAINT_ON_RESIZE) # Show Input Button self.show_input_btn = wx.Button(self, -1, 'Show Current Input') self.show_input_btn.SetToolTipString( 'Show the data in the setup panel as a text file.\n' 'This is what will be given to Prover9 and/or Mace4.\n' 'This need not be saved before running Prover9 or Mace4.') self.Bind(wx.EVT_BUTTON, self.show_input, self.show_input_btn) # Program Panels self.prover9 = Program_panel(self, Prover9(), to_top(self).setup.p9_options.panels) self.mace4 = Program_panel(self, Mace4(), to_top(self).setup.m4_options) # Overall Layout sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.show_input_btn, 0, wx.ALL|wx.ALIGN_CENTER, 5) sizer.Add((1,10), 1) sizer.Add(self.prover9, 0, wx.GROW, 5) sizer.Add((1,10), 1) sizer.Add(self.mace4, 0, wx.GROW, 5) sizer.Add((1,10), 1) self.SetSizer(sizer) sizer.Fit(self) def show_input(self, evt): top = to_top(self) input = top.setup.assemble_input() frame = Text_frame(self, top.box_font, 'Current Input', input, extension='in', saveas=False) frame.Show(True) # END class Control_panel(Panel) class Isofilter_frame(wx.Frame): def __init__(self, parent, models, saved_solution): self.parent = parent self.models = models self.state = State.ready # We'll use ready and running wx.Frame.__init__(self, parent, title='Isofilter', pos=pos_for_center((0,0))) self.Connect(-1, -1, Invoke_event.my_EVT_INVOKE, self.on_invoke) ops_string = ' '.join(ops_in_interp(models)) check_lab = wx.StaticText(self, -1, 'Check:') self.check_id = wx.NewId() self.check_ctrl = wx.TextCtrl(self, self.check_id, value=ops_string, size=(200,-1)) out_lab = wx.StaticText(self, -1, 'Output:') self.out_id = wx.NewId() self.out_ctrl = wx.TextCtrl(self, self.out_id, value=ops_string, size=(200,-1)) self.ignore_id = wx.NewId() self.ignore_cb = wx.CheckBox(self, self.ignore_id, 'Ignore Constants') self.wrap_id = wx.NewId() self.wrap_cb = wx.CheckBox(self, self.wrap_id, 'Enclose in List') alg_lab = wx.StaticText(self, -1, 'Algorithm:') self.alg_id = wx.NewId() self.alg_ch = wx.Choice(self, self.alg_id, choices=['Occurrence Profiles', 'Canonical Forms']) self.alg_ch.SetSelection(0) self.start_btn = wx.Button(self, -1, 'Start') self.Bind(wx.EVT_BUTTON, self.on_start, self.start_btn) cancel_btn = wx.Button(self, -1, 'Cancel') self.Bind(wx.EVT_BUTTON, self.on_cancel, cancel_btn) self.bar = Busy_bar(self, width=200, height=16, delay=100) gsizer = wx.GridBagSizer(5,5) gsizer.Add(alg_lab, (0,0)) gsizer.Add(self.alg_ch, (0,1)) gsizer.Add(check_lab, (1,0)) gsizer.Add(self.check_ctrl, (1,1)) gsizer.Add(out_lab, (2,0)) gsizer.Add(self.out_ctrl, (2,1)) bsizer = wx.BoxSizer(wx.HORIZONTAL) bsizer.Add(self.start_btn) bsizer.Add(cancel_btn) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add((1,5)) sizer.Add(gsizer, 0, wx.ALL|wx.ALIGN_CENTER, 5) sizer.Add(self.ignore_cb, 0, wx.ALL, 5) sizer.Add(self.wrap_cb, 0, wx.ALL, 5) sizer.Add(bsizer, 0, wx.ALL|wx.ALIGN_CENTER, 5) sizer.Add(self.bar, 0, wx.ALL|wx.ALIGN_CENTER, 5) self.SetSizer(sizer) sizer.Fit(self) self.Show(True) # The following two methods allow GUI events in the main thread # to be initiated by other threads. See class Invoke_event and # the Connect statement in the constructor of this class. def on_invoke(self, evt): evt.invoke() def invoke_later(self, func, *args, **kwargs): self.GetEventHandler().AddPendingEvent(Invoke_event(func,args,kwargs)) def on_start(self, evt): if self.alg_ch.GetStringSelection() == 'Occurrence Profiles': command = isofilter_command('isofilter') # returns list else: command = isofilter_command('isofilter2') # returns list if command == None: error_dialog('Isofilter binary not found.') self.Close() else: if self.wrap_cb.IsChecked(): command.append('wrap') if self.ignore_cb.IsChecked(): command.append('ignore_consants') check = self.check_ctrl.GetValue() if check.strip() != '': command.append('check') command.append(check) out = self.out_ctrl.GetValue() if out.strip() != '': command.append('output') command.append(out) self.command = command self.start_btn.Disable() self.bar.start() thread.start_new_thread(self.run, ()) def run(self): # # DO NOT DO ANY GUI STUFF IN HERE, BECAUSE THIS # RUNS IN A SEPARATE THREAD!!! # self.fin = tempfile.TemporaryFile('w+b') # stdin self.fout = tempfile.TemporaryFile('w+b') # stdout self.ferr = tempfile.TemporaryFile('w+b') # stderr self.fin.write(self.models) self.fin.seek(0) if Win32(): # creationflag says not to pop a DOS box self.process = subprocess.Popen( self.command, stdin=self.fin, stdout=self.fout, stderr=self.ferr, creationflags=win32process.CREATE_NO_WINDOW) else: self.process = subprocess.Popen( self.command, stdin=self.fin, stdout=self.fout, stderr=self.ferr) self.state = State.running self.exit_code = self.process.wait() # Wait for process to finish! self.fout.seek(0) # rewind stdout self.filtered_models = self.fout.read() self.invoke_later(self.job_finished) def job_finished(self): self.bar.stop() if self.exit_code == 1: self.ferr.seek(0) # rewind stderr err = self.ferr.read() error_dialog('Isofilter error:\n\n' + err) elif self.exit_code == 0: n = self.filtered_models.rfind(': input=') if n == -1: error_dialog('Isofilter error') else: x = re.split('=|,', self.filtered_models[n:]) input = int(x[1]) kept = int(x[3]) extra_ops=[('Reformat ...', self.parent.on_reformat)] args = ' '.join(self.command[1:]) frame = Text_frame( self.parent, to_top(self).box_font, 'Isofilter Result (%s, %d models)' % (args, kept), self.filtered_models, extension='model', saveas=True, off_center=20, saved_flag=self.parent.job.saved_solution, extra_operations=extra_ops) frame.Show(True) info_dialog(('Isofilter received %d models, eliminated %d, ' 'giving %d nonisomorphic model(s).') % (input, input-kept, kept)) self.fin.close() self.fout.close() self.ferr.close() self.Close() def on_cancel(self, evt): if self.state == State.running: # Cleanup will occur when the 'run' thread terminates. if Win32(): win32api.TerminateProcess(int(self.process._handle), -1) else: os.kill(self.process.pid, signal.SIGKILL) else: self.Close() # END class Isofilter_frame(wx.Frame) def syntax_check(input): prover9_command = Prover9().search_command() if not prover9_command: error_dialog("syntax check binary (prover9) not found") else: # use files to avoid buffering problems (maybe improve later) input2 = 'assign(max_given,0).\n ' + input (exit_code,output,err) = run_and_wait(prover9_command, input=input2) exit_str = Prover9().exit_message(exit_code) if exit_str in ['Killed', 'Crashed', 'Interruppted']: return (exit_str, output, None) elif exit_code != 1: # Fatal error return ('Okay', None, None) else: if re.search('%%ERROR', output): r = re.compile('(?<=%%ERROR: ).*') m = r.search(output) message = output[m.start():m.end()-1] + '.' r = re.compile('(?<=%%START ERROR%%).*(?=%%END ERROR%%)', re.DOTALL) # allow to cross lines m = r.search(output) if m: error = output[m.start():m.end()].strip() else: error = None return ('Input_Error', message, error) else: return ('Other_Error', output, None) # END def syntax_check p9m4-0.5.dfsg/Win32.README0000644000175000017500000000247610702473232013315 0ustar bzedbzedpy2exe (Win32) Use a setup file like this (say Win32-setup.py): ###### from distutils.core import setup import py2exe setup(windows=[{'script' : 'prover9-mace4.py', 'icon_resources' : [(1, 'p9-48.ico')]}], data_files=[ #('Images', ['Images/prover9-5a-128t.gif']) ]) ####### (One can specify the data_files, but it seems kind of complicated, and I don't see a big advantage.) Run python Win32-setup.py py2exe Copy Images, Samples, bin-win32 to dist copy gdiplus.dll to dist: copy c:\Python25\lib\site-packages\wx-2.8-msw-ansi\wx\gdiplus.dll dist If nothing substantial has changed, run the old Win32.iss file to bild the installation package. Otherwise, Run Inno Setup "New" starts Wizard: 1. App name (exe) 2. Add folders Images, Samples, bin-win32 3. Add files (all but 3 folder above and main .exe) 4. Select option for uninstall icon in main menu. 5. Name the setup file (like prover9-mace4-setup.exe) Now, the subriectories (Images, etc.) probably aren't right. Make them like this: Source: C:\Documents and Settings\Bill\Desktop\v4\dist\Samples\*; DestDir: {app}\Samples; Flags: ignoreversion recursesubdirs createallsubdirs Compile setup (meat grinder)p9m4-0.5.dfsg/sed.gnu-blurb0000644000175000017500000000161610717415025014123 0ustar bzedbzed1i\ # Copyright (C) 2007 William McCune\ #\ # This file is part of the LADR Deduction Library.\ #\ # The LADR Deduction Library 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 2 of the\ # License, or (at your option) any later version.\ #\ # 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.\ #\ p9m4-0.5.dfsg/setup.py0000644000175000017500000000260710717415076013252 0ustar bzedbzed# Copyright (C) 2007 William McCune # # This file is part of the LADR Deduction Library. # # The LADR Deduction Library 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 2 of the # License, or (at your option) any later version. # # 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. # """ This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup APP = ['prover9-mace4.py'] DATA_FILES = ['platforms.py', 'utilities.py', 'wx_utilities.py', 'files.py', 'options.py', 'partition_input.py', 'my_setup.py', 'control.py', 'Images', 'Samples', 'bin-mac'] OPTIONS = {'argv_emulation': True, 'iconfile': '/Users/mccune/gui/v4/p9.icns'} setup( app=APP, data_files=DATA_FILES, options={'py2app': OPTIONS}, setup_requires=['py2app'], ) p9m4-0.5.dfsg/p9.icns0000644000175000017500000002321610702226272012735 0ustar bzedbzedicns&ICN#icl8++VVV+VV+VV+++VVVVVVVVV+il327hAd?؉uc=+8Á  'mL4 0 0 4* <b;Pdրt d!݀@63 }Uׂj -:͂Zyx"G~=>+*EEH;I8 ˄s}   ho}gt k Gw H!z7 K؈W 6 J ? ҈? S }'| * І6uІHȇ7hAd?؉uc=+8Á  'mL4 0 0 4* <b;Pdրt d!݀@63 }Uׂj -:͂Zyx"G~=>+*EEH;I8 ˄s}   ho}gt k Gw H!z7 K؈W 6 J ? ҈? S }'| * І6uІHȇ7hAd?؉uc=+8Á  'mL4 0 0 4* <b;Pdրt d!݀@63 }Uׂj -:͂Zyx"G~=>+*EEH;I8 ˄s}   ho}gt k Gw H!z7 K؈W 6 J ? ҈? S }'| * І6uІHȇich#Hich8 *++*V++*+V*+V+U**+**+UVU+U+VU++*+*VV+VUVUVih32 dSԗkM==}Q+ ύz}0l-[ìa U+BLψi R;) #kJ (\y^'ނCFkk$0B܄C@[hOׄ9$ dk.[ǀT΅yf4 @׆u:O,Ɂ w_],#Kdoc4> Qll\6!tW  ̈́m 5 բc5-i߅ G 'G{ l  6 ߊP 2 | |  '  [ N9   <  ^ fL   2  = |n Ҏh ߒ | I; * N " o4 $'ݎdSԗkM==}Q+ ύz}0l-[ìa U+BLψi R;) #kJ (\y^'ނCFkk$0B܄C@[hOׄ9$ dk.[ǀT΅yf4 @׆u:O,Ɂ w_],#Kdoc4> Qll\6!tW  ̈́m 5 բc5-i߅ G 'G{ l  6 ߊP 2 | |  '  [ N9   <  ^ fL   2  = |n Ҏh ߒ | I; * N " o4 $'ݎdSԗkM==}Q+ ύz}0l-[ìa U+BLψi R;) #kJ (\y^'ނCFkk$0B܄C@[hOׄ9$ dk.[ǀT΅yf4 @׆u:O,Ɂ w_],#Kdoc4> Qll\6!tW  ̈́m 5 բc5-i߅ G 'G{ l  6 ߊP 2 | |  '  [ N9   <  ^ fL   2  = |n Ҏh ߒ | I; * N " o4 $'ݎics#Hics8VVV+V+V++is32E7JŃ \)pF0DZBGbW 6v Sample Inputs'. This will give an idea of the formula syntax. (2) Experiment by modifying the sample inputs, both formulas and options. Note: (a) each formula ends with a period, (b) variables start with (lower case) u--z, (c) when in doubt, include parentheses. (3) Start from scratch, enter some assumptions and goals, and try to prove or disprove some things. Although there are many options, much can be accomplished with just Assumptions and Goals. 2. The Main Window The main window is divided into the Setup panel on the left, and the Run panel on the right. 2.1. The Setup Panel The Setup panel is for specifying the input to Prover9 and/or Mace4. The 'Language Options' and 'Formulas' tabs are used for both Prover9 and Mace4. The 'Additional Input' tab is for some esoteric kinds of input, and it can be ignored by most users. 2.1.1. Formulas A few basic points about formulas (see the HTML manual for details). + Do not include the Prover9/Mace4 constructs 'formulas(assumptions)' or 'end_of_list'. + Each formula ends with a period. + Variables start with (lower case) u--z. + The basic logic connectives are: - | & -> <-> all exists. + Universal quantifiers at the outermost level can be omitted. + When in doubt, include parentheses. The programs usually output formulas with the minimum number of parentheses, so you can look in the output to see how you could have written the formulas. Goals Prover9 always proves by contradiction, and Mace4 looks for counterexamples by searching for a model of the negation of the conjecture. Each program puts the negation of the goals together with the assumptions and then searches. If there are no goals, Prover9 simply looks for a contradiction among the assumptions, and Mace4 looks for a model of the assumptions. It's also acceptable to have no assumptions, with the entire statement of the conjecture as a goal. Multiple Goals If there are multiple goals, Prover9 assumes you want a separate proof of each goal, and it will try to prove all of them. Mace4 searches for counterexamples to the goals. If there are multiple goals, Mace4 looks for structures that falsify all of the goals. From the HTML manual: 'If there is more than one formula in the goals list, each must be a positive universal conjunctive formula; that is, a formula constructed from atomic formulas, universal quantification, and conjunction only.' From a logical point of view, multiple goals are a disjunction. Consider two goals 'P. Q.'. If Prover9 proves either of them, it outputs a proof. Mace4 looks for a counterexample by searching for a model of the negation of the disjunction; that is, a model in which both are false. If there is any doubt about the meaning of multiple goals, the user can combine them into a single goal with the conjunction or disjunction operations. 2.1.2. Options Panels The options panels contain most of the options accepted by the programs Prover9 and Mace4, with the same names. The GUI's default values are the same as the programs' default values. When an option has a non-default value, its name is shown in red. There can be more than one widget (button or entry box) associated with an option. For example, each of the Prover9 'Basic Options' also appears somewhere in 'All Options'. When one occurrence is changed, all other occurrences are updated. Many of the integer-valued options specify limits and have a range [-1, ..., some-big-number]. In these cases, -1 means 'no limit'. Prover9 and Mace4 have a notion of 'dependent option': changing some of the options causes others to be changed automatically. For example, when Prover9 receives 'set(breadth_first).', it automatically changes the parameters 'age_part', 'weight_part', 'true_part', and 'false_part'. The GUI is aware of the dependent options. Options with dependencies are shown in blue, and when such an option is changed, the dependent options are changed automatically. Because the GUI handles dependent options, it tells Prover9 and Mace4 to ignore option dependencies. 2.1.2. Additional Input Panels These can be used for Prover9 input that cannot yet be specified with the widgets, including: + weighting rules, + KBO weights, + function_order and relation_order, + actions, + interpretations for semantic guidance, and + lists of hints (you must include 'formulas(hints).' and 'end_of_list.'). 2.2. The Run Panel The 'Show Current Input' button at the top of the Run panel displays the data in the Setup panel as a text file. This is the input that will be given to Prover9 or Mace4 when one of the 'Start' buttons is pressed. If you want to try for both a proof and a counterexample, the two programs can be run concurrently (and they should take advantage of a multiple-core processor if you have one). The 'Info' button shows a few statistics about the search. It can be pressed during a search or after a search has finished. When the program stops, the 'Show-Save' button will be enabled. he 'Show-Save' button gives you (1) the input that was given to the program (not the 'Current Input', which might have changed since the program was started), (2) the program's full output, and (3) if successful, proof(s) or counterexample(s). These data will be available until the another search is started. 2.3. The Menu Bar 2.3.1. The File Menu 'Clear Entire Setup Menu' resets everything to the initial state: language options, formulas, options, and additional input. The 'Open' and 'Save' selections work as in many other applications. These apply to Prover9/Mace4 input files. (The text that is 'Save'd is the same as the text displayed by the 'Show Current Input' button in the Run panel.) The 'Append To Input' selection is similar to the 'Open' selection, except that existing state (formulas, options) is not cleared first. 'Open Input File ...' should work not only on previously 'Save'd files, but also on most other Prover9 or Mace4 input files. Comments in 'Open'ed files are not handled well: most comments that are not inside of formula lists appear in 'Additional Input'. 3. Proofs and Models/Counterexamples When a proof or model/counterexample is found, it is shown in a separate window. Several additional operations can be applied to the proofs or models/counterexamples. 3.1. Proofs Proofs found by Prover9 are usually hard to understand and longer then necessary. (We are conducting research on several methods to humanize and simplify proofs.) For now, there is a button "Reformat...", in the Proof window, which allows the user to transform the proof in several simple ways. See the HTML manual, page "Prooftrans". 3.2. Models/Counterexamples Models/Counterexamples found by Mace4 are given as function and relation tables. The underlying set for domain_size=n is always {0,...,n-1}. There is a button "Reformat...", in the Model/Counterexample window, which allows the user to transform the model in several simple ways. See the HTML manual, page "Interpformat". 3.2.1. Isofilter. If the user asks for more than one model (option max_models), Mace4 will keep searching until it finds that number of models or until it reaches some other limit. When Mace4 finds multiple models, many are likely to be isomorphic to others. A separate program 'Isofilter' can be used to remove isomorphic models. Isofilter has several options. One can specify the operations that are checked for isomorphism, and one can specify the operations that are output. (For example, if one of the operations is a Skolem function from an existentially quantified variable, one might wish to omit it for checking and for output.) One can select the the algorithm Isofilter will use: "Occurrence Profiles" (the default) or "Canonical Forms". They should produce the same results, but the relative performance depends on the application. """ Feedback = ('\nFeedback to mccune@cs.unm.edu. We are ' 'especially interested in making this system ' 'accessible and friendly to new users.\n') Things_to_do = """ To Do: + If both Prover9 and Mace4 are running, and one succeeds, the user should be reminded that the other job should probably be killed. + Before quit, remind user to save unsaved input. + Output directly to TextCtrl, so user can see givens? + Comments in 'Opened' files are not handled well. + Remember preferences for future sessions. + Help Problems: + Mac: On a G3 iBook (10.3.9), text boxes with a lot of text (>32K?) don't show scrollbars. (All of the text really is there, so it can be 'Save'd.) No problem on Intel Mac (10.4.?). + Mac: On the Show/Save button, the tooltip hides the selections! + Win32: If the Prover9 or Mace4 process is run at normal priority, the GUI response is poor, so Prover9 and Mace4 are run at lower priority (Win32 only). + Automatic syntax highlighting causes annoying flashes every few seconds on Win32. Double-buffering might help. + The 'Well Formed?' button sometimes highlights the wrong substring. (A string can be ill-formed in one context and well-formed in another, and the highlighter shows only the first occurrence). """ class Main_frame(wx.Frame): """ This is the primary Frame. """ def __init__(self, parent, title, size, pos): wx.Frame.__init__(self, parent, -1, title, size=size, pos=pos) self.saved_client_size = None self.saved_client_pos = None self.current_path = None self.probs = {} # for sample problems # self.SetBackgroundColour(wx.NamedColor('GREY50')) self.box_font = wx.Font(12, wx.FONTFAMILY_MODERN, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL) # Create the menubar menu_bar = wx.MenuBar() # File menu self.fmenu = wx.Menu() submenu = self.sample_menu(sample_dir()) self.fmenu.AppendMenu(-1, 'Sample Inputs', submenu) self.fmenu.AppendSeparator() id = wx.NewId() self.fmenu.Append(id, 'Clear Entire Setup Panel') self.Bind(wx.EVT_MENU, self.clear_setup, id=id) self.fmenu.Append(wx.ID_OPEN, '&Open Input File...\tCtrl+O') id = wx.NewId() self.fmenu.Append(id, 'Append To Input...') self.Bind(wx.EVT_MENU, self.on_append, id=id) self.fmenu.AppendSeparator() self.fmenu.Append(wx.ID_SAVE, '&Save Input\tCtrl+S') self.fmenu.Enable(wx.ID_SAVE, False) self.fmenu.Append(wx.ID_SAVEAS, 'Save Input As...') self.fmenu.AppendSeparator() self.fmenu.Append(wx.ID_EXIT, '&Quit\tCtrl+Q') self.Bind(wx.EVT_MENU, self.on_open, id=wx.ID_OPEN) self.Bind(wx.EVT_MENU, self.on_save, id=wx.ID_SAVE) self.Bind(wx.EVT_MENU, self.on_saveas, id=wx.ID_SAVEAS) self.Bind(wx.EVT_MENU, self.on_close, id=wx.ID_EXIT) self.Bind(wx.EVT_CLOSE, self.on_close) menu_bar.Append(self.fmenu, '&File') # Preferences menu self.pref_menu = wx.Menu() id = wx.NewId() self.pref_menu.Append(id, 'Font for Text Boxes...') self.Bind(wx.EVT_MENU, self.select_font, id=id) self.pref_menu.AppendSeparator() self.highlight_id = wx.NewId() self.pref_menu.Append(self.highlight_id, 'Automatic Highlighting for Text Boxes', '', wx.ITEM_CHECK) if not Win32(): self.pref_menu.Check(self.highlight_id, True) self.Bind(wx.EVT_MENU, self.highlight_toggle, id=self.highlight_id) self.tooltip_id = wx.NewId() self.pref_menu.Append(self.tooltip_id, 'Show Tool Tips', '', wx.ITEM_CHECK) self.pref_menu.Check(self.tooltip_id, True) self.Bind(wx.EVT_MENU, self.tooltip_toggle, id=self.tooltip_id) menu_bar.Append(self.pref_menu, '&Preferences') # View menu self.view_menu = wx.Menu() self.view_id = wx.NewId() self.view_menu.Append(self.view_id, 'Hide Setup Panel') self.Bind(wx.EVT_MENU, self.setup_toggle, id=self.view_id) self.run_id = wx.NewId() self.view_menu.Append(self.run_id,'Hide Run Panel') self.Bind(wx.EVT_MENU, self.run_toggle, id=self.run_id) menu_bar.Append(self.view_menu, '&View') # Help menu menu = wx.Menu() menu.Append(wx.ID_HELP_CONTENTS, 'Help \tF1') menu.AppendSeparator() menu.Append(wx.ID_ABOUT, 'About') self.Bind(wx.EVT_MENU, self.get_help, id=wx.ID_HELP_CONTENTS) self.Bind(wx.EVT_MENU, self.get_about, id=wx.ID_ABOUT) menu_bar.Append(menu, '&Help') # set MenuBar and StatusBar self.SetMenuBar(menu_bar) # self.CreateStatusBar() self.setup = Setup_tabs(self) self.control = Control_panel(self) sizer = wx.BoxSizer(wx.HORIZONTAL) sizer.Add(self.setup, 1, wx.ALL|wx.GROW, 1) sizer.Add(self.control, 0, wx.ALL|wx.GROW, 3) self.SetSizer(sizer) # sizer.Fit(self) # overrides size in frame init above def sample_menu(self, dir_path): " Recursive: leaves are *.in files." if not os.access(dir_path, os.R_OK): error_dialog('The samples directory %s seems to be missing' % dir_path) else: menu = wx.Menu() entries = os.listdir(dir_path) entries.sort() # sorts in-place have_file = have_dir = False for x in entries: if os.path.isfile(os.path.join(dir_path, x)): have_file = True for x in entries: path = os.path.join(dir_path, x) if os.path.isdir(path): submenu = self.sample_menu(path) menu.AppendMenu(-1, x, submenu) have_dir = True if have_file and have_dir: menu.AppendSeparator() for x in entries: path = os.path.join(dir_path, x) if os.path.isfile(path) and re.search('\.in$', path): id = wx.NewId() self.probs[id] = path menu.Append(id, x) self.Bind(wx.EVT_MENU, self.load_sample, id=id) return menu def load_sample(self, evt): path = self.probs[evt.GetId()] try: f = open(path) input = f.read() self.setup.store_new_input(input, None) except IOError, e: error_dialog('Error opening file %s for reading.' % path) self.SetTitle('Prover9/Mace4') def on_close(self, evt): if self.control.prover9.job_state() in [State.running,State.suspended]: error_dialog('You must "Kill" the Prover9 job before quitting.') elif self.control.mace4.job_state() in [State.running,State.suspended]: error_dialog('You must "Kill" the Mace4 job before quitting.') else: self.Destroy() def clear_setup(self, evt): self.setup.reset() def on_open(self, evt): (dir,style) = open_dir_style(self.current_path) # depends on platform dlg = wx.FileDialog(self, message='Select a file', defaultDir=dir, style=style) if dlg.ShowModal() == wx.ID_OK: path = dlg.GetPath() # full path try: f = open(path) input = f.read() self.setup.store_new_input(input, Program_version) self.current_path = path self.fmenu.Enable(wx.ID_SAVE, True) self.SetTitle(os.path.basename(path) + ' - Prover9/Mace4') except IOError, e: error_dialog('Error opening file %s for reading.' % path) dlg.Destroy() def on_append(self, evt): (dir,style) = open_dir_style(self.current_path) # depends on platform dlg = wx.FileDialog(self, message='Select a file', defaultDir=dir, style=style) if dlg.ShowModal() == wx.ID_OK: path = dlg.GetPath() # full path try: f = open(path) input = f.read() self.setup.append_input(input) # self.current_path = path # self.fmenu.Enable(wx.ID_SAVE, True) # self.SetTitle(os.path.basename(path) + ' - Prover9/Mace4') except IOError, e: error_dialog('Error opening file %s for reading.' % path) dlg.Destroy() def write_input(self, path): try: input = self.setup.assemble_input() f = open(path, 'w') f.write('%% Saved by %s.\n\n' % Banner) f.write(input) return True except IOError, e: error_dialog('Error opening file %s for writing.' % path) return False def on_save(self, evt): if not self.current_path: error_dialog('filename for save not known') else: self.write_input(self.current_path) def on_saveas(self, evt): (dir,style) = saveas_dir_style(self.current_path) # depends on platform dlg = wx.FileDialog(self, message='Save file as ...', defaultDir=dir, style=style) # ??? dlg.SetFilterIndex(2) if dlg.ShowModal() == wx.ID_OK: path = dlg.GetPath() # full path ok = self.write_input(path) if ok: self.current_path = path self.fmenu.Enable(wx.ID_SAVE, True) self.SetTitle(os.path.basename(path) + ' - Prover9/Mace4') dlg.Destroy() def get_help(self, evt): text = '\n' + Banner + '\n' + Help frame = Text_frame(self, to_top(self).box_font, 'Help', text, saveas=False) frame.Show(True) def get_about(self, evt): info_dialog('\n' + Banner + '\n' + Feedback + Things_to_do) def tooltip_toggle(self, evt): enable = self.pref_menu.IsChecked(self.tooltip_id) wx.ToolTip.Enable(enable) def highlight_toggle(self, evt): enable = self.pref_menu.IsChecked(self.highlight_id) if enable: self.setup.start_auto_highlight() else: self.setup.stop_auto_highlight() def auto_highlight(self): return self.pref_menu.IsChecked(self.highlight_id) def select_font(self, evt): data = wx.FontData() data.EnableEffects(True) data.SetInitialFont(self.box_font) dlg = wx.FontDialog(self, data) if dlg.ShowModal() == wx.ID_OK: data = dlg.GetFontData() font = data.GetChosenFont() self.box_font = font self.setup.update_font(font) dlg.Destroy() def setup_toggle(self, evt): show = (self.view_menu.GetLabel(self.view_id) == 'Show Setup Panel') if show: self.setup.Show(True) self.SetPosition(self.saved_client_pos) self.SetClientSize(self.saved_client_size) self.Layout() # rearrange children self.view_menu.Enable(self.run_id, True) self.view_menu.SetLabel(self.view_id, 'Hide Setup Panel') else: # Size and position the frame (self) so that the run # panel stays stays the same. self.saved_client_pos = (x1,y1) = self.GetPosition() self.saved_client_size = (w1,h1) = self.GetClientSize() self.setup.Show(False) self.Fit() # shrink window to fit run panel (w2,_) = self.GetClientSize() self.SetPosition(((x1+w1)-w2, y1)) self.SetClientSize((w2, h1)) self.view_menu.Enable(self.run_id, False) self.view_menu.SetLabel(self.view_id, 'Show Setup Panel') self.Show(True) def run_toggle(self, evt): show = (self.view_menu.GetLabel(self.run_id) == 'Show Run Panel') if show: (w,h) = self.GetClientSize() self.control.Show(True) self.SetClientSize((w,h)) self.Layout() # rearrange children self.view_menu.Enable(self.view_id, True) self.view_menu.SetLabel(self.run_id, 'Hide Run Panel') else: # erase run panel, expand setup panel to fill space self.control.Show(False) self.setup.SetClientSize(self.GetClientSize()) self.view_menu.Enable(self.view_id, False) self.view_menu.SetLabel(self.run_id, 'Show Run Panel') self.Show(True) # END class Main_frame(Frame) class Splash_screen(wx.SplashScreen): def __init__(self, path): bmp = wx.Image(path, wx.BITMAP_TYPE_GIF).ConvertToBitmap() wx.SplashScreen.__init__( self, bmp, wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_NO_TIMEOUT, 5000, None, -1) # END class Splash_screen(wx.SplashScreen): class My_app(wx.App): def OnInit(self): size = size_that_fits((1000,700)) # reduce if screen too small pos = pos_for_center(size) # position to center frame frame = Main_frame(None, 'Prover9/Mace4', size, pos) self.SetTopWindow(frame) if True: path = os.path.join(image_dir(),'prover9-splash.gif') if not os.access(path, os.R_OK): error_dialog('splash image %s not found' % path) else: splash = Splash_screen(path) splash.Show(True) time.sleep(1) splash.Destroy() frame.Show(True) # info_dialog(path_info()) return True # end class My_app(wx.App): # Initialization that does not need wx os.chdir(os.path.expanduser('~')) # set current directory to user's home app = My_app(redirect=False) app.MainLoop() p9m4-0.5.dfsg/Samples/0000755000175000017500000000000010726265122013132 5ustar bzedbzedp9m4-0.5.dfsg/Samples/Kauer.in0000644000175000017500000000254510726265122014537 0ustar bzedbzedformulas(assumptions). % This is a problem about an ordering relation. % Mace4 should produce a model immediately. % Note that the symbol "<" has no built-in meaning to Mace4 (or to Prover9). all x exists y (x < y). all x all y (x < y -> -(y < x)). all x all y (x < y -> (exists z (x < z & z < y))). % Here is the source of this problem. % From: Stefan Kauer % Date: Fri, 08 Jan 1999 15:27:29 +0100 % To: mccune@mcs.anl.gov % % Dear Prof. McCune, % % I found the following problem: the following 3 axioms for a relation < % are given: % 1. all x exists y: x < y % 2. all x y: x < y => not y < x % 3. all x y: x < y => exists z: x < z and z < y % % One has to find a finite model. It is surprising and not obvious, that a % finite model exists, and it is not at all to find easily (at least for % me, may be for you). Since I sometimes work with OTTER, I remembered % MACE and tried to formulate and solve this problem with MACE, but % unfortunately was able to do it. % Is it possible to formulate and solve this problem with MACE and how? % % This problem was posed as an exercise in a very small german % mathematical magazin by Dr. Waldmann, a former colleague of mine, who % works now at another university. We both agree that the smallest model % has seven elements. % % Sincerely yours % % Stefan Kauer end_of_list. p9m4-0.5.dfsg/Samples/Equality/0000755000175000017500000000000010702040163014715 5ustar bzedbzedp9m4-0.5.dfsg/Samples/Equality/Prover9/0000755000175000017500000000000010730312443016267 5ustar bzedbzedp9m4-0.5.dfsg/Samples/Equality/Prover9/Cancellative-semigroup-EA.in0000644000175000017500000000242210700572050023503 0ustar bzedbzed % The following op commands allow us to use an additional infix % operation (@) and omit some parentheses (for *). % % * is the semigroup operation; @ is the commutator. % x*y*z is right associated; x*y@z is (x*y)@z op(450, infix, "@"). op(400, infix_right, "*"). redeclare(implication, IMPLIES). assign(new_constants, 1). assign(max_weight, 25). formulas(assumptions). x * y = x * z IMPLIES y = z # label(left_cancellation). y * x = z * x IMPLIES y = z # label(right_cancellation). (x * y) * z = x * (y * z) # label(semigroup). y * x * (x @ y) = x * y # label(CS_admits_commutator). end_of_list. formulas(assumptions). % (x @ y) @ z = u @ (v @ w) # label("(A) commutator is associative"). % (x @ y) * z = z * (x @ y) # label("(N) nilpotent class 2"). % (x @ z) * (y @ z) = (x * y) @ z # label("(D) distributivity"). x * y * z * y * x = y * x * z * x * y # label("(E) CS essence of N"). end_of_list. formulas(goals). (x @ y) @ z = u @ (v @ w) # label("(A) commutator is associative"). % (x @ y) * z = z * (x @ y) # label("(N) nilpotent class 2"). % (x @ z) * (y @ z) = (x * y) @ z # label("(D) distributivity"). % x * y * z * y * x = y * x * z * x * y # label("(E) CS essence of N"). end_of_list. p9m4-0.5.dfsg/Samples/Equality/Prover9/OML-sax.in0000644000175000017500000000274210730312443020044 0ustar bzedbzed assign(max_weight, 50). function_order([v, c, ^, f]). % rewrite to join/complement formulas(assumptions). % The following equation is a single axiom for orthomodular % lattices (OML) in terms of the Sheffer stroke. % All 14 goals should be proved in about 10 seconds on a % fast (2007) workstation. f(f(f(f(y,x),f(x,z)),u),f(x,f(f(z,f(f(x,x),z)),z))) = x # label(OML_Sh). % Define the ordinary operations; the "function_order" command % above will orient these so the the defined operations will be % introduced whenever possible, giving a search that is mostly % in terms of the defined operations. x v y = f(f(x,x),f(y,y)) # label(Def_join). x ^ y = f(f(x,y),f(x,y)) # label(Def_meet). x' = f(x,x) # label(Def_complement). end_of_list. formulas(goals). x v (x ^ y) = x # answer(B1). x v (x' ^ (x v y)) = x v y # answer(OM). x v (y v z) = y v (x v z) # answer(AJ). x ^ y = (x' v y')' # answer(DM). f(x,y) = x' v y' # answer(DEF_SS). x v x = x # answer(idempotence_join). x ^ x = x # answer(idempotence_meet). x'' = x # answer(cc). y v x = x v y # answer(commutativity_join). y v x = x v y # answer(commutativity_meet). x v x' = y v y' # answer(1). x ^ x' = y ^ y' # answer(0). (x v y) v z = x v (y v z) # answer(assoc_join). (x ^ y) ^ z = x ^ (y ^ z) # answer(assoc_meet). end_of_list. p9m4-0.5.dfsg/Samples/Equality/Prover9/OML-sax.in~0000644000175000017500000000274410676020376020256 0ustar bzedbzed assign(max_weight, 50). function_order([v, c, ^, f]). % rewrite to join/complement formulas(assumptions). % The following equation is a single axiom for orthomodular % lattices (OML) in terms of the Sheffer stroke. % All 14 goals should be proved in about 10 seconds on a % fast (2007) workstation. f(f(f(f(y,x),f(x,z)),u),f(x,f(f(z,f(f(x,x),z)),z))) = x # label(OML_Sh). % Define the ordinary operations; the "function_order" command % above will orient these so the the defined operations will be % introduced whenever possible, giving a search that is mostly % in terms of the defined operations. x v y = f(f(x,x),f(y,y)) # label(Def_join). x ^ y = f(f(x,y),f(x,y)) # label(Def_meet). c(x) = f(x,x) # label(Def_complement). end_of_list. formulas(goals). x v (x ^ y) = x # answer(B1). x v (c(x) ^ (x v y)) = x v y # answer(OM). x v (y v z) = y v (x v z) # answer(AJ). x ^ y = c(c(x) v c(y)) # answer(DM). f(x,y) = c(x) v c(y) # answer(DEF_SS). x v x = x # answer(idempotence_join). x ^ x = x # answer(idempotence_meet). c(c(x)) = x # answer(cc). y v x = x v y # answer(commutativity_join). y v x = x v y # answer(commutativity_meet). x v c(x) = y v c(y) # answer(1). x ^ c(x) = y ^ c(y) # answer(0). (x v y) v z = x v (y v z) # answer(assoc_join). (x ^ y) ^ z = x ^ (y ^ z) # answer(assoc_meet). end_of_list. p9m4-0.5.dfsg/Samples/Equality/Prover9/LT-McKenzie-4basis.in0000644000175000017500000000072010676020376022035 0ustar bzedbzedformulas(assumptions). % McKenzie's absorption 4-basis (self-dual, independent) for % Lattice Theory (LT). % Prover9 should produce a proof in a few seconds. x v (y ^ (x ^ z)) = x # label(McKenzie_1). x ^ (y v (x v z)) = x # label(McKenzie_2). ((y ^ x) v (x ^ z)) v x = x # label(McKenzie_3). ((y v x) ^ (x v z)) ^ x = x # label(McKenzie_4). end_of_list. formulas(goals). (x ^ y) ^ z = x ^ (y ^ z) # label(assoc_meet). end_of_list. p9m4-0.5.dfsg/Samples/Equality/Prover9/RBA-2.in0000644000175000017500000000063210676020376017375 0ustar bzedbzed formulas(assumptions). % This lemma says that if there exists an idempotent % elememt, then a Robbins algebra is Boolean. % Prover9 should produce a proof immediately. x + y = y + x. (x + y) + z = x + (y + z). ((x + y)' + (x + y')')' = x # label(Robbins). exists c (c + c = c) # label(idempotent). end_of_list. formulas(goals). (x + y')' + (x' + y')' = y # answer(Huntington). end_of_list. p9m4-0.5.dfsg/Samples/Equality/Prover9/CL-BW.in0000644000175000017500000000151510676020376017437 0ustar bzedbzed assign(order, kbo). % The default (lpo) al works, but it takes longer. formulas(assumptions). % Prover9 should produce a proof in a few seconds. % combinators B and W a(a(a(B,x),y),z) = a(x,a(y,z)) # label(B). a(a(W,x),y) = a(a(x,y),y) # label(W). end_of_list. formulas(goals). % existence of a fixed point combinator exists Q all x (a(Q,x) = a(x,a(Q,x))) # label(fixed_point_combinator). end_of_list. % Here is a different way of specifying the goal, which tells us % what the fixed point combinator is. We use an answer attribute. % Unfortunately, answer attributes are not allowed on non-clausal % (e.g., goal) formulas, so we deny the goal and state it as an assumption. % Note that this introduces the Skolem function f. % % formulas(assumptions). % a(x,f(x)) != a(f(x),a(x,f(x))) # answer(x). % end_of_list. p9m4-0.5.dfsg/Samples/Equality/Prover9/CL-SK-W.in0000644000175000017500000000070310676020376017646 0ustar bzedbzed formulas(assumptions). % Combinatory Logic % Construct combinator W (Wxy = xyy) in terms of S and K. % Prover9 should produce a proof immediately. a(a(a(S,x),y),z) = a(a(x,z),a(y,z)) # label(S). a(a(K,x),y) = x # label(K). end_of_list. formulas(goals). % Don't set(restrict_denials), because the easy proofs % paramodulate into the denial. exists W all x all y a(a(W,x),y) = a(a(x,y),y) # label(W). end_of_list. p9m4-0.5.dfsg/Samples/Equality/Prover9/BA-distributivity.in0000644000175000017500000000070010676020376022204 0ustar bzedbzedassign(new_constants, 1). assign(max_weight,25). formulas(sos). % Distributivity from a nonstandard Boolean algebra (BA) basis. % Prover9 should produce a proof in a few seconds. % Nonstandard Boolean algebra basis. x v (y v z) = y v (x v z). x ^ y = (x' v y')'. x v x' = y v y'. (x v y') ^ (x v y) = x. end_of_list. set(restrict_denials). formulas(goals). x ^ (y v z) = (x ^ y) v (x ^ z) # label(Distributivity). end_of_list. p9m4-0.5.dfsg/Samples/Equality/Mace4/0000755000175000017500000000000010730311154015650 5ustar bzedbzedp9m4-0.5.dfsg/Samples/Equality/Mace4/Ring-19.in0000644000175000017500000000213510730311154017327 0ustar bzedbzedassign(iterate, primes). % The following fixes [+,-,*] as the ring of integers (mod domain_size). set(integer_ring). formulas(assumptions). % Assume that f and g have a ring structure [+,-,*] (see Mace4 options). g(x) = M * x. f(x,y) = (H * x) + (K * y). % Denial of associativity. f(f(a,b),c) != f(a,f(b,c)). % a, b, and c are constants end_of_list. formulas(assumptions). % Each of these equations was a candidate for being a single axiom % for group theory. % % We can show that each has a nonassociative model (and therefore % is not a single axiom) by using ring structures. % % The sizes required for these examples range from 11 to 41. % f(f(g(f(y,g(z))),x),f(f(g(f(z,x)),z),y)) = z. % candidate 1 % f(f(x,f(g(x),z)),f(g(f(f(y,x),g(x))),y)) = z. % candidate 64 % f(f(f(x,x),g(x)),g(f(g(f(y,z)),f(y,x)))) = z. % candidate 30 g(f(g(f(y,f(x,z))),f(y,f(f(x,x),g(x))))) = z. % candidate 107 % g(f(g(f(x,f(y,z))),f(f(f(g(x),x),x),y))) = z. % candidate 60 % f(f(y,g(f(z,y))),f(f(z,g(f(x,g(z)))),x)) = z. % candidate 68 % f(f(x,y),f(y,g(f(f(g(f(g(x),z)),y),y)))) = z. % candidate 11 end_of_list. p9m4-0.5.dfsg/Samples/Equality/Mace4/Noncommutative-ring-unit.in0000644000175000017500000000073310676020376023141 0ustar bzedbzedformulas(assumptions). % Noncommutative ring with unit. % Mace4 should produce a counterexample immediately. % <+,-,0> is an Abelian group: 0 + x = x. -x + x = 0. (x+y)+z = x+(y+z). x+y = y+x. % Product is associative: (x*y)*z = x*(y*z). % Left and right distributivity: x*(y+z) = (x*y)+(x*z). (y+z)*x = (y*x)+(z*x). % Let the ring have a unit. 1 * x = x. x * 1 = x. end_of_list. formulas(goals). x * y = y * x # answer(commtativity_of_product). end_of_list. p9m4-0.5.dfsg/Samples/Equality/Mace4/Ring-19.in~0000644000175000017500000000213110707177613017537 0ustar bzedbzedset(iterate_primes). % The following fixes [+,-,*] as the ring of integers (mod domain_size). set(integer_ring). formulas(assumptions). % Assume that f and g have a ring structure [+,-,*] (see Mace4 options). g(x) = M * x. f(x,y) = (H * x) + (K * y). % Denial of associativity. f(f(a,b),c) != f(a,f(b,c)). % a, b, and c are constants end_of_list. formulas(assumptions). % Each of these equations was a candidate for being a single axiom % for group theory. % % We can show that each has a nonassociative model (and therefore % is not a single axiom) by using ring structures. % % The sizes required for these examples range from 11 to 41. % f(f(g(f(y,g(z))),x),f(f(g(f(z,x)),z),y)) = z. % candidate 1 % f(f(x,f(g(x),z)),f(g(f(f(y,x),g(x))),y)) = z. % candidate 64 % f(f(f(x,x),g(x)),g(f(g(f(y,z)),f(y,x)))) = z. % candidate 30 g(f(g(f(y,f(x,z))),f(y,f(f(x,x),g(x))))) = z. % candidate 107 % g(f(g(f(x,f(y,z))),f(f(f(g(x),x),x),y))) = z. % candidate 60 % f(f(y,g(f(z,y))),f(f(z,g(f(x,g(z)))),x)) = z. % candidate 68 % f(f(x,y),f(y,g(f(f(g(f(g(x),z)),y),y)))) = z. % candidate 11 end_of_list. p9m4-0.5.dfsg/Samples/Equality/Mace4/Nonmodular-OML.in0000644000175000017500000000104310676020376020755 0ustar bzedbzedformulas(assumptions). % Find an orthomodular lattice (OML) that is not modular. % Mace4 should produce a counterexample immediately. % Lattice Axioms x ^ y = y ^ x. (x ^ y) ^ z = x ^ (y ^ z). x v y = y v x. (x v y) v z = x v (y v z). x v (x ^ y) = x. x ^ (x v y) = x. % The following gives us ortholattices. x' ^ x = 0. x' v x = 1. x'' = x. x ^ y = (x' v y')'. % Make it an orthomodular lattice x v (x' ^ (x v y)) = x v y. % (OML) end_of_list. formulas(goals). x v (y ^ (x v z)) = (x v y) ^ (x v z) # label(Modularity). end_of_list. p9m4-0.5.dfsg/Samples/Equality/Mace4/Megill-68.in0000644000175000017500000000132210707177626017664 0ustar bzedbzed formulas(assumptions). % A problem from Norm Megill, on weak orthomodular lattices (WOM). % Mace4 should produce a counterexample in a few seconds. % Lattice Axioms x ^ y = y ^ x. (x ^ y) ^ z = x ^ (y ^ z). x v y = y v x. (x v y) v z = x v (y v z). x v (x ^ y) = x. x ^ (x v y) = x. % The following gives us ortholattices. x' ^ x = 0. x' v x = 1. x'' = x. x ^ y = (x' v y')'. % Ortholattice lemmas. % 1 v x = 1. % 1 ^ x = x. % 0 ^ x = 0. % 0 v x = x. % Weak orthomodular law (*1 of mail 68). (x' ^ (x v y)) v (y' v (x ^ y)) = 1 # label(mail_68_1). end_of_list. formulas(goals). % Equation in question (*3 of mail 68). x ^ (y v (x ^ (x' v (x ^ y)))) = x ^ (x' v (x ^ y)) # label(mail_68_3). end_of_list. p9m4-0.5.dfsg/Samples/Equality/Mace4/CL-QL.in0000644000175000017500000000101110676020376017015 0ustar bzedbzed formulas(assumptions). % A Problem in combinatory logic. % % Given combinators L and Q, % % Lxy = x(yy) % Qxyz = y(xz) % % show that there does not necessarily exist a fixed % point combinator F, where Fx=x(Fx). % Mace4 should produce a counterexample immediately. a(a(L,x),y) = a(x,a(y,y)) # label(L). a(a(a(Q,x),y),z) = a(y,a(x,z)) # label(Q). end_of_list. formulas(goals). % existence of a fixed point combinator exists Q all x (a(Q,x) = a(x,a(Q,x))) # label(fixed_point_combinator). end_of_list. p9m4-0.5.dfsg/Samples/Equality/Mace4/Noncommutative-group.in0000644000175000017500000000077610676020376022370 0ustar bzedbzedformulas(assumptions). % Find a smallest noncommutative group (by finding the % conterexample to the statement that all groups are commutative). % Mace4 should produce a counterexample immediately. % Group Theory (x * y) * z = x * (y * z) # label(associativity). % There is a left identity element, and every element has a left inverse. exists e ((all x (e * x = x)) & (all x exists y (y * x = e))). end_of_list. formulas(goals). x * y = y * x # label(commutativity). end_of_list. p9m4-0.5.dfsg/Samples/Equality/Mace4/BA-Sheffer-counterexample.in0000644000175000017500000000217010707177632023112 0ustar bzedbzedassign(domain_size, 8). formulas(assumptions). % At one time the equation below was a candidate single % axiom for Boolean algebra in terms of the Sheffer stroke. % This file shows that it is not, by giving a noncommutative % model. It's interesting that order 8 succeeds immediately, % but order 6 takes a long time to fail. In other words, % iterate_up_to would be a bad choice for this problem. % % See www.cs.unm.edu/~mccune/papers/basax for more information. f(f(f(y,f(z,x)),y),f(x,f(z,y))) = x. % 8-model % Here are 6 other non-single-axioms (size of counterexample is shown). % f(f(y,f(f(x,z),y)),f(x,f(z,y))) = x. % 15 5-model % f(f(f(y,f(x,z)),y),f(x,f(z,y))) = x. % 16 5-model % f(f(f(y,f(x,y)),y),f(x,f(y,z))) = x. % 5 6-model (b) % f(f(y,f(y,f(x,y))),f(x,f(y,z))) = x. % 9 6-model (a) % f(f(f(y,f(x,x)),y),f(x,f(y,z))) = x. % 23 6-model (b) % f(f(y,f(y,f(x,x))),f(x,f(y,z))) = x. % 25 6-model (a) % Here is a candidate that turns out to be a single axiom. % f(f(y,f(f(x,y),y)),f(x,f(z,y))) = x. % 1 single axiom end_of_list. formulas(goals). f(x,y) = f(y,x) # label(commutativity). end_of_list. p9m4-0.5.dfsg/Samples/Equality/Mace4/TBA-independence-2.in0000644000175000017500000000070310676020376021400 0ustar bzedbzed formulas(assumptions). % Ternary Boolean Algebra. Independence of axiom 2. % Mace4 should produce a counterexample immediately. f(f(v,w,x),y,f(v,w,z)) = f(v,w,f(x,y,z)) # label(TBA_1). % f(y,x,x) = x # label(TBA_2). % We're showing independence of this axiom. f(x,x,y) = x # label(TBA_3). f(g(y),y,x) = x # label(TBA_4). f(x,y,g(y)) = x # label(TBA_5). end_of_list. formulas(goals). f(y,x,x) = x # label(TBA_2). end_of_list. p9m4-0.5.dfsg/Samples/Equality/Mace4/QG-4.in0000644000175000017500000000071510726265564016675 0ustar bzedbzedassign(domain_size, 4). assign(max_models, -1). % This means that there is no limit formulas(assumptions). % Mace4 produces 152 quasigroups of order 4. If we % print the models and run them through isofilter, % we get 35 nonisomorphic quasigroups of order 4. % % For order 5, 10944 are generated, and isofilter % reduces that to 1411. % Equational quasigroup axioms x * (x \ y) = y. x \ (x * y) = y. (x / y) * y = x. (x * y) / y = x. end_of_list. p9m4-0.5.dfsg/Samples/Equality/Mace4/Noncommutative-group-48.in0000644000175000017500000000054410676020376022612 0ustar bzedbzedassign(domain_size, 48). clear(negprop). % This reduces the time from 3 seconds to 1. formulas(assumptions). % Noncommutative group of size 48. (See additional options.) % Mace4 should produce a counterexample in a few seconds. e * x = x. x' * x = e. (x * y) * z = x * (y * z). A * B != B * A. % There are two noncommuting elements. end_of_list. p9m4-0.5.dfsg/Samples/LT-McKenzie-4basis.in0000644000175000017500000000072010702042252016655 0ustar bzedbzedformulas(assumptions). % McKenzie's absorption 4-basis (self-dual, independent) for % Lattice Theory (LT). % Prover9 should produce a proof in a few seconds. x v (y ^ (x ^ z)) = x # label(McKenzie_1). x ^ (y v (x v z)) = x # label(McKenzie_2). ((y ^ x) v (x ^ z)) v x = x # label(McKenzie_3). ((y v x) ^ (x v z)) ^ x = x # label(McKenzie_4). end_of_list. formulas(goals). (x ^ y) ^ z = x ^ (y ^ z) # label(assoc_meet). end_of_list. p9m4-0.5.dfsg/Samples/GT_Sax.in0000644000175000017500000000051510702041256014602 0ustar bzedbzedformulas(assumptions). % This is a candidate single axiom for Group Theory. % The problem is open, so both Prover9 and Mace4 should % run for a long time on it. f(x,g(f(x,f(f(y,f(g(f(x,y)),g(z))),x)))) = z # label(cand_33). end_of_list. formulas(goals). f(f(x,y),z) = f(x,f(y,z)) # label(associativity). end_of_list. p9m4-0.5.dfsg/Samples/Non-Equality/0000755000175000017500000000000010702037753015460 5ustar bzedbzedp9m4-0.5.dfsg/Samples/Non-Equality/Prover9/0000755000175000017500000000000010702054230017013 5ustar bzedbzedp9m4-0.5.dfsg/Samples/Non-Equality/Prover9/temp00000644000175000017500000003740710702054230017776 0ustar bzedbzed============================== Prover9 =============================== Prover9 (32) version Aug-2007, Aug 2007. Process 497 was started by mccune on cleo, Sat Oct 6 22:55:04 2007 The command was "prover9". ============================== end of head =========================== ============================== INPUT ================================= formulas(assumptions). Wolf(x) -> animal(x). Fox(x) -> animal(x). Bird(x) -> animal(x). Caterpillar(x) -> animal(x). Snail(x) -> animal(x). Grain(x) -> plant(x). (exists x Wolf(x)). (exists x Fox(x)). (exists x Bird(x)). (exists x Caterpillar(x)). (exists x Snail(x)). (exists x Grain(x)). (all x (animal(x) -> (all y (plant(y) -> eats(x,y))) | (all z (animal(z) & Smaller(z,x) & (exists u (plant(u) & eats(z,u))) -> eats(x,z))))). Caterpillar(x) & Bird(y) -> Smaller(x,y). Snail(x) & Bird(y) -> Smaller(x,y). Bird(x) & Fox(y) -> Smaller(x,y). Fox(x) & Wolf(y) -> Smaller(x,y). Bird(x) & Caterpillar(y) -> eats(x,y). Caterpillar(x) -> (exists y (plant(y) & eats(x,y))). Snail(x) -> (exists y (plant(y) & eats(x,y))). Wolf(x) & Fox(y) -> -eats(x,y). Wolf(x) & Grain(y) -> -eats(x,y). Bird(x) & Snail(y) -> -eats(x,y). end_of_list. formulas(goals). (exists x exists y (animal(x) & animal(y) & eats(x,y) & (all z (Grain(z) -> eats(y,z))))). end_of_list. clear(print_proofs). ============================== end of input ========================== ============================== PROCESS NON-CLAUSAL FORMULAS ========== % Formulas that are not ordinary clauses: 1 Wolf(x) -> animal(x) # label(non_clause). [assumption]. 2 Fox(x) -> animal(x) # label(non_clause). [assumption]. 3 Bird(x) -> animal(x) # label(non_clause). [assumption]. 4 Caterpillar(x) -> animal(x) # label(non_clause). [assumption]. 5 Snail(x) -> animal(x) # label(non_clause). [assumption]. 6 Grain(x) -> plant(x) # label(non_clause). [assumption]. 7 (exists x Wolf(x)) # label(non_clause). [assumption]. 8 (exists x Fox(x)) # label(non_clause). [assumption]. 9 (exists x Bird(x)) # label(non_clause). [assumption]. 10 (exists x Caterpillar(x)) # label(non_clause). [assumption]. 11 (exists x Snail(x)) # label(non_clause). [assumption]. 12 (exists x Grain(x)) # label(non_clause). [assumption]. 13 (all x (animal(x) -> (all y (plant(y) -> eats(x,y))) | (all z (animal(z) & Smaller(z,x) & (exists u (plant(u) & eats(z,u))) -> eats(x,z))))) # label(non_clause). [assumption]. 14 Caterpillar(x) & Bird(y) -> Smaller(x,y) # label(non_clause). [assumption]. 15 Snail(x) & Bird(y) -> Smaller(x,y) # label(non_clause). [assumption]. 16 Bird(x) & Fox(y) -> Smaller(x,y) # label(non_clause). [assumption]. 17 Fox(x) & Wolf(y) -> Smaller(x,y) # label(non_clause). [assumption]. 18 Bird(x) & Caterpillar(y) -> eats(x,y) # label(non_clause). [assumption]. 19 Caterpillar(x) -> (exists y (plant(y) & eats(x,y))) # label(non_clause). [assumption]. 20 Snail(x) -> (exists y (plant(y) & eats(x,y))) # label(non_clause). [assumption]. 21 Wolf(x) & Fox(y) -> -eats(x,y) # label(non_clause). [assumption]. 22 Wolf(x) & Grain(y) -> -eats(x,y) # label(non_clause). [assumption]. 23 Bird(x) & Snail(y) -> -eats(x,y) # label(non_clause). [assumption]. 24 (exists x exists y (animal(x) & animal(y) & eats(x,y) & (all z (Grain(z) -> eats(y,z))))) # label(non_clause) # label(goal). [goal]. ============================== end of process non-clausal formulas === ============================== PROCESS INITIAL CLAUSES =============== % Clauses before input processing: formulas(usable). end_of_list. formulas(sos). -Wolf(x) | animal(x). [clausify(1)]. -Fox(x) | animal(x). [clausify(2)]. -Bird(x) | animal(x). [clausify(3)]. -Caterpillar(x) | animal(x). [clausify(4)]. -Snail(x) | animal(x). [clausify(5)]. -Grain(x) | plant(x). [clausify(6)]. Wolf(c1). [clausify(7)]. Fox(c2). [clausify(8)]. Bird(c3). [clausify(9)]. Caterpillar(c4). [clausify(10)]. Snail(c5). [clausify(11)]. Grain(c6). [clausify(12)]. -animal(x) | -plant(y) | eats(x,y) | -animal(z) | -Smaller(z,x) | -plant(u) | -eats(z,u) | eats(x,z). [clausify(13)]. -Caterpillar(x) | -Bird(y) | Smaller(x,y). [clausify(14)]. -Snail(x) | -Bird(y) | Smaller(x,y). [clausify(15)]. -Bird(x) | -Fox(y) | Smaller(x,y). [clausify(16)]. -Fox(x) | -Wolf(y) | Smaller(x,y). [clausify(17)]. -Bird(x) | -Caterpillar(y) | eats(x,y). [clausify(18)]. -Caterpillar(x) | plant(f1(x)). [clausify(19)]. -Caterpillar(x) | eats(x,f1(x)). [clausify(19)]. -Snail(x) | plant(f2(x)). [clausify(20)]. -Snail(x) | eats(x,f2(x)). [clausify(20)]. -Wolf(x) | -Fox(y) | -eats(x,y). [clausify(21)]. -Wolf(x) | -Grain(y) | -eats(x,y). [clausify(22)]. -Bird(x) | -Snail(y) | -eats(x,y). [clausify(23)]. -animal(x) | -animal(y) | -eats(x,y) | Grain(f3(x,y)). [deny(24)]. -animal(x) | -animal(y) | -eats(x,y) | -eats(y,f3(x,y)). [deny(24)]. end_of_list. formulas(demodulators). end_of_list. ============================== PREDICATE ELIMINATION ================= Eliminating Wolf/1 25 Wolf(c1). [clausify(7)]. 26 -Wolf(x) | animal(x). [clausify(1)]. Derived: animal(c1). [resolve(25,a,26,a)]. 27 -Fox(x) | -Wolf(y) | Smaller(x,y). [clausify(17)]. Derived: -Fox(x) | Smaller(x,c1). [resolve(27,b,25,a)]. 28 -Wolf(x) | -Fox(y) | -eats(x,y). [clausify(21)]. Derived: -Fox(x) | -eats(c1,x). [resolve(28,a,25,a)]. 29 -Wolf(x) | -Grain(y) | -eats(x,y). [clausify(22)]. Derived: -Grain(x) | -eats(c1,x). [resolve(29,a,25,a)]. Eliminating Fox/1 30 Fox(c2). [clausify(8)]. 31 -Fox(x) | animal(x). [clausify(2)]. Derived: animal(c2). [resolve(30,a,31,a)]. 32 -Bird(x) | -Fox(y) | Smaller(x,y). [clausify(16)]. Derived: -Bird(x) | Smaller(x,c2). [resolve(32,b,30,a)]. 33 -Fox(x) | Smaller(x,c1). [resolve(27,b,25,a)]. Derived: Smaller(c2,c1). [resolve(33,a,30,a)]. 34 -Fox(x) | -eats(c1,x). [resolve(28,a,25,a)]. Derived: -eats(c1,c2). [resolve(34,a,30,a)]. Eliminating Bird/1 35 Bird(c3). [clausify(9)]. 36 -Bird(x) | animal(x). [clausify(3)]. Derived: animal(c3). [resolve(35,a,36,a)]. 37 -Caterpillar(x) | -Bird(y) | Smaller(x,y). [clausify(14)]. Derived: -Caterpillar(x) | Smaller(x,c3). [resolve(37,b,35,a)]. 38 -Snail(x) | -Bird(y) | Smaller(x,y). [clausify(15)]. Derived: -Snail(x) | Smaller(x,c3). [resolve(38,b,35,a)]. 39 -Bird(x) | -Caterpillar(y) | eats(x,y). [clausify(18)]. Derived: -Caterpillar(x) | eats(c3,x). [resolve(39,a,35,a)]. 40 -Bird(x) | -Snail(y) | -eats(x,y). [clausify(23)]. Derived: -Snail(x) | -eats(c3,x). [resolve(40,a,35,a)]. 41 -Bird(x) | Smaller(x,c2). [resolve(32,b,30,a)]. Derived: Smaller(c3,c2). [resolve(41,a,35,a)]. Eliminating Caterpillar/1 42 Caterpillar(c4). [clausify(10)]. 43 -Caterpillar(x) | animal(x). [clausify(4)]. Derived: animal(c4). [resolve(42,a,43,a)]. 44 -Caterpillar(x) | plant(f1(x)). [clausify(19)]. Derived: plant(f1(c4)). [resolve(44,a,42,a)]. 45 -Caterpillar(x) | eats(x,f1(x)). [clausify(19)]. Derived: eats(c4,f1(c4)). [resolve(45,a,42,a)]. 46 -Caterpillar(x) | Smaller(x,c3). [resolve(37,b,35,a)]. Derived: Smaller(c4,c3). [resolve(46,a,42,a)]. 47 -Caterpillar(x) | eats(c3,x). [resolve(39,a,35,a)]. Derived: eats(c3,c4). [resolve(47,a,42,a)]. Eliminating Snail/1 48 Snail(c5). [clausify(11)]. 49 -Snail(x) | animal(x). [clausify(5)]. Derived: animal(c5). [resolve(48,a,49,a)]. 50 -Snail(x) | plant(f2(x)). [clausify(20)]. Derived: plant(f2(c5)). [resolve(50,a,48,a)]. 51 -Snail(x) | eats(x,f2(x)). [clausify(20)]. Derived: eats(c5,f2(c5)). [resolve(51,a,48,a)]. 52 -Snail(x) | Smaller(x,c3). [resolve(38,b,35,a)]. Derived: Smaller(c5,c3). [resolve(52,a,48,a)]. 53 -Snail(x) | -eats(c3,x). [resolve(40,a,35,a)]. Derived: -eats(c3,c5). [resolve(53,a,48,a)]. Eliminating Grain/1 54 Grain(c6). [clausify(12)]. 55 -Grain(x) | plant(x). [clausify(6)]. Derived: plant(c6). [resolve(54,a,55,a)]. 56 -animal(x) | -animal(y) | -eats(x,y) | Grain(f3(x,y)). [deny(24)]. Derived: -animal(x) | -animal(y) | -eats(x,y) | plant(f3(x,y)). [resolve(56,d,55,a)]. 57 -Grain(x) | -eats(c1,x). [resolve(29,a,25,a)]. Derived: -eats(c1,c6). [resolve(57,a,54,a)]. Derived: -eats(c1,f3(x,y)) | -animal(x) | -animal(y) | -eats(x,y). [resolve(57,a,56,d)]. Eliminating Smaller/2 58 Smaller(c2,c1). [resolve(33,a,30,a)]. 59 -animal(x) | -plant(y) | eats(x,y) | -animal(z) | -Smaller(z,x) | -plant(u) | -eats(z,u) | eats(x,z). [clausify(13)]. Derived: -animal(c1) | -plant(x) | eats(c1,x) | -animal(c2) | -plant(y) | -eats(c2,y) | eats(c1,c2). [resolve(58,a,59,e)]. 60 Smaller(c3,c2). [resolve(41,a,35,a)]. Derived: -animal(c2) | -plant(x) | eats(c2,x) | -animal(c3) | -plant(y) | -eats(c3,y) | eats(c2,c3). [resolve(60,a,59,e)]. 61 Smaller(c4,c3). [resolve(46,a,42,a)]. 62 Smaller(c5,c3). [resolve(52,a,48,a)]. Derived: -animal(c3) | -plant(x) | eats(c3,x) | -animal(c5) | -plant(y) | -eats(c5,y) | eats(c3,c5). [resolve(62,a,59,e)]. ============================== end predicate elimination ============= Auto_denials: (non-Horn, no changes). Term ordering decisions: Predicate symbol precedence: predicate_order([ animal, plant, eats ]). Function symbol precedence: function_order([ c1, c2, c3, c4, c5, c6, f3, f1, f2 ]). After inverse_order: (no changes). Unfolding symbols: (none). Auto_inference settings: % set(binary_resolution). % (non-Horn) % set(positive_inference). % (non-Horn) % set(positive_inference) -> assign(literal_selection, maximal_negative). % set(neg_ur_resolution). % (non-Horn, less than 100 clauses) Auto_process settings: % set(factor). % (non-Horn) % set(back_unit_deletion). % (non-Horn) % set(back_unit_deletion) -> set(unit_deletion). ============================== end of process initial clauses ======== ============================== CLAUSES FOR SEARCH ==================== % Clauses after input processing: formulas(usable). end_of_list. formulas(sos). 63 -animal(x) | -animal(y) | -eats(x,y) | -eats(y,f3(x,y)). [deny(24)]. 64 animal(c1). [resolve(25,a,26,a)]. 65 animal(c2). [resolve(30,a,31,a)]. 66 -eats(c1,c2). [resolve(34,a,30,a)]. 67 animal(c3). [resolve(35,a,36,a)]. 68 animal(c4). [resolve(42,a,43,a)]. 69 plant(f1(c4)). [resolve(44,a,42,a)]. 70 eats(c4,f1(c4)). [resolve(45,a,42,a)]. 71 eats(c3,c4). [resolve(47,a,42,a)]. 72 animal(c5). [resolve(48,a,49,a)]. 73 plant(f2(c5)). [resolve(50,a,48,a)]. 74 eats(c5,f2(c5)). [resolve(51,a,48,a)]. 75 -eats(c3,c5). [resolve(53,a,48,a)]. 76 plant(c6). [resolve(54,a,55,a)]. 77 -animal(x) | -animal(y) | -eats(x,y) | plant(f3(x,y)). [resolve(56,d,55,a)]. 78 -eats(c1,c6). [resolve(57,a,54,a)]. 79 -eats(c1,f3(x,y)) | -animal(x) | -animal(y) | -eats(x,y). [resolve(57,a,56,d)]. 81 -plant(x) | eats(c1,x) | -plant(y) | -eats(c2,y). [copy(80),unit_del(a,64),unit_del(d,65),unit_del(g,66)]. 83 -plant(x) | eats(c2,x) | -plant(y) | -eats(c3,y) | eats(c2,c3). [copy(82),unit_del(a,65),unit_del(d,67)]. 85 -plant(x) | eats(c3,x) | -plant(y) | -eats(c5,y). [copy(84),unit_del(a,67),unit_del(d,72),unit_del(g,75)]. 86 -animal(x) | -eats(x,x) | -eats(x,f3(x,x)). [factor(63,a,b)]. 87 -animal(x) | -eats(x,x) | plant(f3(x,x)). [factor(77,a,b)]. 88 -eats(c1,f3(x,x)) | -animal(x) | -eats(x,x). [factor(79,b,c)]. 89 -plant(x) | eats(c1,x) | -eats(c2,x). [factor(81,a,c)]. 90 -plant(x) | eats(c2,x) | -eats(c3,x) | eats(c2,c3). [factor(83,a,c)]. 91 -plant(c3) | eats(c2,c3) | -plant(x) | -eats(c3,x). [factor(83,b,e)]. 92 -plant(x) | eats(c3,x) | -eats(c5,x). [factor(85,a,c)]. 93 -plant(c3) | eats(c2,c3) | -eats(c3,c3). [factor(90,b,d)]. end_of_list. formulas(demodulators). end_of_list. ============================== end of clauses for search ============= ============================== SEARCH ================================ % Starting search at 0.01 seconds. given #1 (I,wt=12): 63 -animal(x) | -animal(y) | -eats(x,y) | -eats(y,f3(x,y)). [deny(24)]. given #2 (I,wt=2): 64 animal(c1). [resolve(25,a,26,a)]. given #3 (I,wt=2): 65 animal(c2). [resolve(30,a,31,a)]. given #4 (I,wt=3): 66 -eats(c1,c2). [resolve(34,a,30,a)]. given #5 (I,wt=2): 67 animal(c3). [resolve(35,a,36,a)]. given #6 (I,wt=2): 68 animal(c4). [resolve(42,a,43,a)]. given #7 (I,wt=3): 69 plant(f1(c4)). [resolve(44,a,42,a)]. given #8 (I,wt=4): 70 eats(c4,f1(c4)). [resolve(45,a,42,a)]. given #9 (I,wt=3): 71 eats(c3,c4). [resolve(47,a,42,a)]. given #10 (I,wt=2): 72 animal(c5). [resolve(48,a,49,a)]. given #11 (I,wt=3): 73 plant(f2(c5)). [resolve(50,a,48,a)]. given #12 (I,wt=4): 74 eats(c5,f2(c5)). [resolve(51,a,48,a)]. given #13 (I,wt=3): 75 -eats(c3,c5). [resolve(53,a,48,a)]. given #14 (I,wt=2): 76 plant(c6). [resolve(54,a,55,a)]. given #15 (I,wt=11): 77 -animal(x) | -animal(y) | -eats(x,y) | plant(f3(x,y)). [resolve(56,d,55,a)]. given #16 (I,wt=3): 78 -eats(c1,c6). [resolve(57,a,54,a)]. given #17 (I,wt=12): 79 -eats(c1,f3(x,y)) | -animal(x) | -animal(y) | -eats(x,y). [resolve(57,a,56,d)]. given #18 (I,wt=10): 81 -plant(x) | eats(c1,x) | -plant(y) | -eats(c2,y). [copy(80),unit_del(a,64),unit_del(d,65),unit_del(g,66)]. given #19 (I,wt=13): 83 -plant(x) | eats(c2,x) | -plant(y) | -eats(c3,y) | eats(c2,c3). [copy(82),unit_del(a,65),unit_del(d,67)]. given #20 (I,wt=10): 85 -plant(x) | eats(c3,x) | -plant(y) | -eats(c5,y). [copy(84),unit_del(a,67),unit_del(d,72),unit_del(g,75)]. given #21 (I,wt=10): 86 -animal(x) | -eats(x,x) | -eats(x,f3(x,x)). [factor(63,a,b)]. given #22 (I,wt=9): 87 -animal(x) | -eats(x,x) | plant(f3(x,x)). [factor(77,a,b)]. given #23 (I,wt=10): 88 -eats(c1,f3(x,x)) | -animal(x) | -eats(x,x). [factor(79,b,c)]. given #24 (I,wt=8): 89 -plant(x) | eats(c1,x) | -eats(c2,x). [factor(81,a,c)]. given #25 (I,wt=11): 90 -plant(x) | eats(c2,x) | -eats(c3,x) | eats(c2,c3). [factor(83,a,c)]. given #26 (I,wt=10): 91 -plant(c3) | eats(c2,c3) | -plant(x) | -eats(c3,x). [factor(83,b,e)]. given #27 (I,wt=8): 93 -plant(c3) | eats(c2,c3) | -eats(c3,c3). [factor(90,b,d)]. given #28 (A,wt=10): 94 -animal(f1(c4)) | -eats(f1(c4),f3(c4,f1(c4))). [resolve(70,a,63,c),unit_del(a,68)]. given #29 (F,wt=2): 110 -plant(c5). [ur(85,b,75,a,c,73,a,d,74,a)]. given #30 (F,wt=3): 103 -eats(c2,c6). [ur(81,a,76,a,b,78,a,c,76,a)]. given #31 (F,wt=4): 104 -eats(c2,f2(c5)). [ur(81,a,76,a,b,78,a,c,73,a)]. given #32 (F,wt=4): 105 -eats(c2,f1(c4)). [ur(81,a,76,a,b,78,a,c,69,a)]. given #33 (T,wt=4): 98 plant(f3(c3,c4)). [resolve(77,c,71,a),unit_del(a,67),unit_del(b,68)]. given #34 (T,wt=5): 109 -plant(x) | eats(c3,x). [resolve(85,d,74,a),unit_del(c,73)]. given #35 (T,wt=3): 113 eats(c3,c6). [resolve(109,a,76,a)]. given #36 (T,wt=3): 117 eats(c2,c3). [resolve(113,a,90,c),unit_del(a,76),unit_del(b,103)]. given #37 (A,wt=5): 95 -eats(c4,f3(c3,c4)). [resolve(71,a,63,c),unit_del(a,67),unit_del(b,68)]. given #38 (F,wt=2): 126 -plant(c3). [ur(81,a,76,a,b,78,a,d,117,a)]. given #39 (F,wt=5): 101 -eats(c1,f3(c3,c4)). [resolve(79,d,71,a),unit_del(b,67),unit_del(c,68)]. given #40 (F,wt=5): 111 -eats(c2,f3(c3,c4)). [ur(81,a,76,a,b,78,a,c,98,a)]. given #41 (F,wt=5): 123 -eats(c1,f3(c2,c3)). [resolve(117,a,79,d),unit_del(b,65),unit_del(c,67)]. given #42 (T,wt=4): 114 eats(c3,f2(c5)). [resolve(109,a,73,a)]. given #43 (T,wt=4): 115 eats(c3,f1(c4)). [resolve(109,a,69,a)]. given #44 (T,wt=4): 124 plant(f3(c2,c3)). [resolve(117,a,77,c),unit_del(a,65),unit_del(b,67)]. -------- Proof 1 at (0.02 + 0.00 seconds) ============================== STATISTICS ============================ Given=44. Generated=85. Kept=67. proofs=1. Usable=39. Sos=16. Demods=0. Limbo=0, Disabled=70. Hints=0. Weight_deleted=0. Literals_deleted=0. Forward_subsumed=17. Back_subsumed=12. Sos_limit_deleted=0. Sos_displaced=0. Sos_removed=0. New_demodulators=0 (0 lex), Back_demodulated=0. Back_unit_deleted=0. Demod_attempts=0. Demod_rewrites=0. Res_instance_prunes=0. Para_instance_prunes=0. Basic_paramod_prunes=0. Nonunit_fsub_feature_tests=9. Nonunit_bsub_feature_tests=66. Megabytes=0.09. User_CPU=0.02, System_CPU=0.00, Wall_clock=0. ============================== end of statistics ===================== ============================== end of search ========================= THEOREM PROVED Exiting with 1 proof. Process 497 exit (max_proofs) Sat Oct 6 22:55:04 2007 p9m4-0.5.dfsg/Samples/Non-Equality/Prover9/EC-XCB-reflexivity.in0000644000175000017500000000063310676020376022634 0ustar bzedbzed set(breadth_first). assign(max_weight, 48). formulas(assumptions). % The problem is to prove reflexivity from the % equivalential calculus (EC) single axiom XCB. % Prover9 should produce a proof in a few seconds. -P(e(x,y)) | -P(x) | P(y) # label(condensed_detachment). P(e(x,e(e(e(x,y),e(z,y)),z))) # label(XCB). end_of_list. formulas(goals). P(e(x,x)) # label(Reflexivity). end_of_list. p9m4-0.5.dfsg/Samples/Non-Equality/Prover9/temp10000644000175000017500000005065710702054220020000 0ustar bzedbzed============================== Prover9 =============================== Prover9 (32) version Aug-2007, Aug 2007. Process 493 was started by mccune on cleo, Sat Oct 6 22:54:56 2007 The command was "prover9". ============================== end of head =========================== ============================== INPUT ================================= formulas(assumptions). Wolf(x) -> animal(x). Fox(x) -> animal(x). Bird(x) -> animal(x). Caterpillar(x) -> animal(x). Snail(x) -> animal(x). Grain(x) -> plant(x). (exists x Wolf(x)). (exists x Fox(x)). (exists x Bird(x)). (exists x Caterpillar(x)). (exists x Snail(x)). (exists x Grain(x)). (all x (animal(x) -> (all y (plant(y) -> eats(x,y))) | (all z (animal(z) & Smaller(z,x) & (exists u (plant(u) & eats(z,u))) -> eats(x,z))))). Caterpillar(x) & Bird(y) -> Smaller(x,y). Snail(x) & Bird(y) -> Smaller(x,y). Bird(x) & Fox(y) -> Smaller(x,y). Fox(x) & Wolf(y) -> Smaller(x,y). Bird(x) & Caterpillar(y) -> eats(x,y). Caterpillar(x) -> (exists y (plant(y) & eats(x,y))). Snail(x) -> (exists y (plant(y) & eats(x,y))). Wolf(x) & Fox(y) -> -eats(x,y). Wolf(x) & Grain(y) -> -eats(x,y). Bird(x) & Snail(y) -> -eats(x,y). end_of_list. formulas(goals). (exists x exists y (animal(x) & animal(y) & eats(x,y) & (all z (Grain(z) -> eats(y,z))))). end_of_list. ============================== end of input ========================== ============================== PROCESS NON-CLAUSAL FORMULAS ========== % Formulas that are not ordinary clauses: 1 Wolf(x) -> animal(x) # label(non_clause). [assumption]. 2 Fox(x) -> animal(x) # label(non_clause). [assumption]. 3 Bird(x) -> animal(x) # label(non_clause). [assumption]. 4 Caterpillar(x) -> animal(x) # label(non_clause). [assumption]. 5 Snail(x) -> animal(x) # label(non_clause). [assumption]. 6 Grain(x) -> plant(x) # label(non_clause). [assumption]. 7 (exists x Wolf(x)) # label(non_clause). [assumption]. 8 (exists x Fox(x)) # label(non_clause). [assumption]. 9 (exists x Bird(x)) # label(non_clause). [assumption]. 10 (exists x Caterpillar(x)) # label(non_clause). [assumption]. 11 (exists x Snail(x)) # label(non_clause). [assumption]. 12 (exists x Grain(x)) # label(non_clause). [assumption]. 13 (all x (animal(x) -> (all y (plant(y) -> eats(x,y))) | (all z (animal(z) & Smaller(z,x) & (exists u (plant(u) & eats(z,u))) -> eats(x,z))))) # label(non_clause). [assumption]. 14 Caterpillar(x) & Bird(y) -> Smaller(x,y) # label(non_clause). [assumption]. 15 Snail(x) & Bird(y) -> Smaller(x,y) # label(non_clause). [assumption]. 16 Bird(x) & Fox(y) -> Smaller(x,y) # label(non_clause). [assumption]. 17 Fox(x) & Wolf(y) -> Smaller(x,y) # label(non_clause). [assumption]. 18 Bird(x) & Caterpillar(y) -> eats(x,y) # label(non_clause). [assumption]. 19 Caterpillar(x) -> (exists y (plant(y) & eats(x,y))) # label(non_clause). [assumption]. 20 Snail(x) -> (exists y (plant(y) & eats(x,y))) # label(non_clause). [assumption]. 21 Wolf(x) & Fox(y) -> -eats(x,y) # label(non_clause). [assumption]. 22 Wolf(x) & Grain(y) -> -eats(x,y) # label(non_clause). [assumption]. 23 Bird(x) & Snail(y) -> -eats(x,y) # label(non_clause). [assumption]. 24 (exists x exists y (animal(x) & animal(y) & eats(x,y) & (all z (Grain(z) -> eats(y,z))))) # label(non_clause) # label(goal). [goal]. ============================== end of process non-clausal formulas === ============================== PROCESS INITIAL CLAUSES =============== % Clauses before input processing: formulas(usable). end_of_list. formulas(sos). -Wolf(x) | animal(x). [clausify(1)]. -Fox(x) | animal(x). [clausify(2)]. -Bird(x) | animal(x). [clausify(3)]. -Caterpillar(x) | animal(x). [clausify(4)]. -Snail(x) | animal(x). [clausify(5)]. -Grain(x) | plant(x). [clausify(6)]. Wolf(c1). [clausify(7)]. Fox(c2). [clausify(8)]. Bird(c3). [clausify(9)]. Caterpillar(c4). [clausify(10)]. Snail(c5). [clausify(11)]. Grain(c6). [clausify(12)]. -animal(x) | -plant(y) | eats(x,y) | -animal(z) | -Smaller(z,x) | -plant(u) | -eats(z,u) | eats(x,z). [clausify(13)]. -Caterpillar(x) | -Bird(y) | Smaller(x,y). [clausify(14)]. -Snail(x) | -Bird(y) | Smaller(x,y). [clausify(15)]. -Bird(x) | -Fox(y) | Smaller(x,y). [clausify(16)]. -Fox(x) | -Wolf(y) | Smaller(x,y). [clausify(17)]. -Bird(x) | -Caterpillar(y) | eats(x,y). [clausify(18)]. -Caterpillar(x) | plant(f1(x)). [clausify(19)]. -Caterpillar(x) | eats(x,f1(x)). [clausify(19)]. -Snail(x) | plant(f2(x)). [clausify(20)]. -Snail(x) | eats(x,f2(x)). [clausify(20)]. -Wolf(x) | -Fox(y) | -eats(x,y). [clausify(21)]. -Wolf(x) | -Grain(y) | -eats(x,y). [clausify(22)]. -Bird(x) | -Snail(y) | -eats(x,y). [clausify(23)]. -animal(x) | -animal(y) | -eats(x,y) | Grain(f3(x,y)). [deny(24)]. -animal(x) | -animal(y) | -eats(x,y) | -eats(y,f3(x,y)). [deny(24)]. end_of_list. formulas(demodulators). end_of_list. ============================== PREDICATE ELIMINATION ================= Eliminating Wolf/1 25 Wolf(c1). [clausify(7)]. 26 -Wolf(x) | animal(x). [clausify(1)]. Derived: animal(c1). [resolve(25,a,26,a)]. 27 -Fox(x) | -Wolf(y) | Smaller(x,y). [clausify(17)]. Derived: -Fox(x) | Smaller(x,c1). [resolve(27,b,25,a)]. 28 -Wolf(x) | -Fox(y) | -eats(x,y). [clausify(21)]. Derived: -Fox(x) | -eats(c1,x). [resolve(28,a,25,a)]. 29 -Wolf(x) | -Grain(y) | -eats(x,y). [clausify(22)]. Derived: -Grain(x) | -eats(c1,x). [resolve(29,a,25,a)]. Eliminating Fox/1 30 Fox(c2). [clausify(8)]. 31 -Fox(x) | animal(x). [clausify(2)]. Derived: animal(c2). [resolve(30,a,31,a)]. 32 -Bird(x) | -Fox(y) | Smaller(x,y). [clausify(16)]. Derived: -Bird(x) | Smaller(x,c2). [resolve(32,b,30,a)]. 33 -Fox(x) | Smaller(x,c1). [resolve(27,b,25,a)]. Derived: Smaller(c2,c1). [resolve(33,a,30,a)]. 34 -Fox(x) | -eats(c1,x). [resolve(28,a,25,a)]. Derived: -eats(c1,c2). [resolve(34,a,30,a)]. Eliminating Bird/1 35 Bird(c3). [clausify(9)]. 36 -Bird(x) | animal(x). [clausify(3)]. Derived: animal(c3). [resolve(35,a,36,a)]. 37 -Caterpillar(x) | -Bird(y) | Smaller(x,y). [clausify(14)]. Derived: -Caterpillar(x) | Smaller(x,c3). [resolve(37,b,35,a)]. 38 -Snail(x) | -Bird(y) | Smaller(x,y). [clausify(15)]. Derived: -Snail(x) | Smaller(x,c3). [resolve(38,b,35,a)]. 39 -Bird(x) | -Caterpillar(y) | eats(x,y). [clausify(18)]. Derived: -Caterpillar(x) | eats(c3,x). [resolve(39,a,35,a)]. 40 -Bird(x) | -Snail(y) | -eats(x,y). [clausify(23)]. Derived: -Snail(x) | -eats(c3,x). [resolve(40,a,35,a)]. 41 -Bird(x) | Smaller(x,c2). [resolve(32,b,30,a)]. Derived: Smaller(c3,c2). [resolve(41,a,35,a)]. Eliminating Caterpillar/1 42 Caterpillar(c4). [clausify(10)]. 43 -Caterpillar(x) | animal(x). [clausify(4)]. Derived: animal(c4). [resolve(42,a,43,a)]. 44 -Caterpillar(x) | plant(f1(x)). [clausify(19)]. Derived: plant(f1(c4)). [resolve(44,a,42,a)]. 45 -Caterpillar(x) | eats(x,f1(x)). [clausify(19)]. Derived: eats(c4,f1(c4)). [resolve(45,a,42,a)]. 46 -Caterpillar(x) | Smaller(x,c3). [resolve(37,b,35,a)]. Derived: Smaller(c4,c3). [resolve(46,a,42,a)]. 47 -Caterpillar(x) | eats(c3,x). [resolve(39,a,35,a)]. Derived: eats(c3,c4). [resolve(47,a,42,a)]. Eliminating Snail/1 48 Snail(c5). [clausify(11)]. 49 -Snail(x) | animal(x). [clausify(5)]. Derived: animal(c5). [resolve(48,a,49,a)]. 50 -Snail(x) | plant(f2(x)). [clausify(20)]. Derived: plant(f2(c5)). [resolve(50,a,48,a)]. 51 -Snail(x) | eats(x,f2(x)). [clausify(20)]. Derived: eats(c5,f2(c5)). [resolve(51,a,48,a)]. 52 -Snail(x) | Smaller(x,c3). [resolve(38,b,35,a)]. Derived: Smaller(c5,c3). [resolve(52,a,48,a)]. 53 -Snail(x) | -eats(c3,x). [resolve(40,a,35,a)]. Derived: -eats(c3,c5). [resolve(53,a,48,a)]. Eliminating Grain/1 54 Grain(c6). [clausify(12)]. 55 -Grain(x) | plant(x). [clausify(6)]. Derived: plant(c6). [resolve(54,a,55,a)]. 56 -animal(x) | -animal(y) | -eats(x,y) | Grain(f3(x,y)). [deny(24)]. Derived: -animal(x) | -animal(y) | -eats(x,y) | plant(f3(x,y)). [resolve(56,d,55,a)]. 57 -Grain(x) | -eats(c1,x). [resolve(29,a,25,a)]. Derived: -eats(c1,c6). [resolve(57,a,54,a)]. Derived: -eats(c1,f3(x,y)) | -animal(x) | -animal(y) | -eats(x,y). [resolve(57,a,56,d)]. Eliminating Smaller/2 58 Smaller(c2,c1). [resolve(33,a,30,a)]. 59 -animal(x) | -plant(y) | eats(x,y) | -animal(z) | -Smaller(z,x) | -plant(u) | -eats(z,u) | eats(x,z). [clausify(13)]. Derived: -animal(c1) | -plant(x) | eats(c1,x) | -animal(c2) | -plant(y) | -eats(c2,y) | eats(c1,c2). [resolve(58,a,59,e)]. 60 Smaller(c3,c2). [resolve(41,a,35,a)]. Derived: -animal(c2) | -plant(x) | eats(c2,x) | -animal(c3) | -plant(y) | -eats(c3,y) | eats(c2,c3). [resolve(60,a,59,e)]. 61 Smaller(c4,c3). [resolve(46,a,42,a)]. 62 Smaller(c5,c3). [resolve(52,a,48,a)]. Derived: -animal(c3) | -plant(x) | eats(c3,x) | -animal(c5) | -plant(y) | -eats(c5,y) | eats(c3,c5). [resolve(62,a,59,e)]. ============================== end predicate elimination ============= Auto_denials: (non-Horn, no changes). Term ordering decisions: Predicate symbol precedence: predicate_order([ animal, plant, eats ]). Function symbol precedence: function_order([ c1, c2, c3, c4, c5, c6, f3, f1, f2 ]). After inverse_order: (no changes). Unfolding symbols: (none). Auto_inference settings: % set(binary_resolution). % (non-Horn) % set(positive_inference). % (non-Horn) % set(positive_inference) -> assign(literal_selection, maximal_negative). % set(neg_ur_resolution). % (non-Horn, less than 100 clauses) Auto_process settings: % set(factor). % (non-Horn) % set(back_unit_deletion). % (non-Horn) % set(back_unit_deletion) -> set(unit_deletion). ============================== end of process initial clauses ======== ============================== CLAUSES FOR SEARCH ==================== % Clauses after input processing: formulas(usable). end_of_list. formulas(sos). 63 -animal(x) | -animal(y) | -eats(x,y) | -eats(y,f3(x,y)). [deny(24)]. 64 animal(c1). [resolve(25,a,26,a)]. 65 animal(c2). [resolve(30,a,31,a)]. 66 -eats(c1,c2). [resolve(34,a,30,a)]. 67 animal(c3). [resolve(35,a,36,a)]. 68 animal(c4). [resolve(42,a,43,a)]. 69 plant(f1(c4)). [resolve(44,a,42,a)]. 70 eats(c4,f1(c4)). [resolve(45,a,42,a)]. 71 eats(c3,c4). [resolve(47,a,42,a)]. 72 animal(c5). [resolve(48,a,49,a)]. 73 plant(f2(c5)). [resolve(50,a,48,a)]. 74 eats(c5,f2(c5)). [resolve(51,a,48,a)]. 75 -eats(c3,c5). [resolve(53,a,48,a)]. 76 plant(c6). [resolve(54,a,55,a)]. 77 -animal(x) | -animal(y) | -eats(x,y) | plant(f3(x,y)). [resolve(56,d,55,a)]. 78 -eats(c1,c6). [resolve(57,a,54,a)]. 79 -eats(c1,f3(x,y)) | -animal(x) | -animal(y) | -eats(x,y). [resolve(57,a,56,d)]. 81 -plant(x) | eats(c1,x) | -plant(y) | -eats(c2,y). [copy(80),unit_del(a,64),unit_del(d,65),unit_del(g,66)]. 83 -plant(x) | eats(c2,x) | -plant(y) | -eats(c3,y) | eats(c2,c3). [copy(82),unit_del(a,65),unit_del(d,67)]. 85 -plant(x) | eats(c3,x) | -plant(y) | -eats(c5,y). [copy(84),unit_del(a,67),unit_del(d,72),unit_del(g,75)]. 86 -animal(x) | -eats(x,x) | -eats(x,f3(x,x)). [factor(63,a,b)]. 87 -animal(x) | -eats(x,x) | plant(f3(x,x)). [factor(77,a,b)]. 88 -eats(c1,f3(x,x)) | -animal(x) | -eats(x,x). [factor(79,b,c)]. 89 -plant(x) | eats(c1,x) | -eats(c2,x). [factor(81,a,c)]. 90 -plant(x) | eats(c2,x) | -eats(c3,x) | eats(c2,c3). [factor(83,a,c)]. 91 -plant(c3) | eats(c2,c3) | -plant(x) | -eats(c3,x). [factor(83,b,e)]. 92 -plant(x) | eats(c3,x) | -eats(c5,x). [factor(85,a,c)]. 93 -plant(c3) | eats(c2,c3) | -eats(c3,c3). [factor(90,b,d)]. end_of_list. formulas(demodulators). end_of_list. ============================== end of clauses for search ============= ============================== SEARCH ================================ % Starting search at 0.01 seconds. given #1 (I,wt=12): 63 -animal(x) | -animal(y) | -eats(x,y) | -eats(y,f3(x,y)). [deny(24)]. given #2 (I,wt=2): 64 animal(c1). [resolve(25,a,26,a)]. given #3 (I,wt=2): 65 animal(c2). [resolve(30,a,31,a)]. given #4 (I,wt=3): 66 -eats(c1,c2). [resolve(34,a,30,a)]. given #5 (I,wt=2): 67 animal(c3). [resolve(35,a,36,a)]. given #6 (I,wt=2): 68 animal(c4). [resolve(42,a,43,a)]. given #7 (I,wt=3): 69 plant(f1(c4)). [resolve(44,a,42,a)]. given #8 (I,wt=4): 70 eats(c4,f1(c4)). [resolve(45,a,42,a)]. given #9 (I,wt=3): 71 eats(c3,c4). [resolve(47,a,42,a)]. given #10 (I,wt=2): 72 animal(c5). [resolve(48,a,49,a)]. given #11 (I,wt=3): 73 plant(f2(c5)). [resolve(50,a,48,a)]. given #12 (I,wt=4): 74 eats(c5,f2(c5)). [resolve(51,a,48,a)]. given #13 (I,wt=3): 75 -eats(c3,c5). [resolve(53,a,48,a)]. given #14 (I,wt=2): 76 plant(c6). [resolve(54,a,55,a)]. given #15 (I,wt=11): 77 -animal(x) | -animal(y) | -eats(x,y) | plant(f3(x,y)). [resolve(56,d,55,a)]. given #16 (I,wt=3): 78 -eats(c1,c6). [resolve(57,a,54,a)]. given #17 (I,wt=12): 79 -eats(c1,f3(x,y)) | -animal(x) | -animal(y) | -eats(x,y). [resolve(57,a,56,d)]. given #18 (I,wt=10): 81 -plant(x) | eats(c1,x) | -plant(y) | -eats(c2,y). [copy(80),unit_del(a,64),unit_del(d,65),unit_del(g,66)]. given #19 (I,wt=13): 83 -plant(x) | eats(c2,x) | -plant(y) | -eats(c3,y) | eats(c2,c3). [copy(82),unit_del(a,65),unit_del(d,67)]. given #20 (I,wt=10): 85 -plant(x) | eats(c3,x) | -plant(y) | -eats(c5,y). [copy(84),unit_del(a,67),unit_del(d,72),unit_del(g,75)]. given #21 (I,wt=10): 86 -animal(x) | -eats(x,x) | -eats(x,f3(x,x)). [factor(63,a,b)]. given #22 (I,wt=9): 87 -animal(x) | -eats(x,x) | plant(f3(x,x)). [factor(77,a,b)]. given #23 (I,wt=10): 88 -eats(c1,f3(x,x)) | -animal(x) | -eats(x,x). [factor(79,b,c)]. given #24 (I,wt=8): 89 -plant(x) | eats(c1,x) | -eats(c2,x). [factor(81,a,c)]. given #25 (I,wt=11): 90 -plant(x) | eats(c2,x) | -eats(c3,x) | eats(c2,c3). [factor(83,a,c)]. given #26 (I,wt=10): 91 -plant(c3) | eats(c2,c3) | -plant(x) | -eats(c3,x). [factor(83,b,e)]. given #27 (I,wt=8): 93 -plant(c3) | eats(c2,c3) | -eats(c3,c3). [factor(90,b,d)]. given #28 (A,wt=10): 94 -animal(f1(c4)) | -eats(f1(c4),f3(c4,f1(c4))). [resolve(70,a,63,c),unit_del(a,68)]. given #29 (F,wt=2): 110 -plant(c5). [ur(85,b,75,a,c,73,a,d,74,a)]. given #30 (F,wt=3): 103 -eats(c2,c6). [ur(81,a,76,a,b,78,a,c,76,a)]. given #31 (F,wt=4): 104 -eats(c2,f2(c5)). [ur(81,a,76,a,b,78,a,c,73,a)]. given #32 (F,wt=4): 105 -eats(c2,f1(c4)). [ur(81,a,76,a,b,78,a,c,69,a)]. given #33 (T,wt=4): 98 plant(f3(c3,c4)). [resolve(77,c,71,a),unit_del(a,67),unit_del(b,68)]. given #34 (T,wt=5): 109 -plant(x) | eats(c3,x). [resolve(85,d,74,a),unit_del(c,73)]. given #35 (T,wt=3): 113 eats(c3,c6). [resolve(109,a,76,a)]. given #36 (T,wt=3): 117 eats(c2,c3). [resolve(113,a,90,c),unit_del(a,76),unit_del(b,103)]. given #37 (A,wt=5): 95 -eats(c4,f3(c3,c4)). [resolve(71,a,63,c),unit_del(a,67),unit_del(b,68)]. given #38 (F,wt=2): 126 -plant(c3). [ur(81,a,76,a,b,78,a,d,117,a)]. given #39 (F,wt=5): 101 -eats(c1,f3(c3,c4)). [resolve(79,d,71,a),unit_del(b,67),unit_del(c,68)]. given #40 (F,wt=5): 111 -eats(c2,f3(c3,c4)). [ur(81,a,76,a,b,78,a,c,98,a)]. given #41 (F,wt=5): 123 -eats(c1,f3(c2,c3)). [resolve(117,a,79,d),unit_del(b,65),unit_del(c,67)]. given #42 (T,wt=4): 114 eats(c3,f2(c5)). [resolve(109,a,73,a)]. given #43 (T,wt=4): 115 eats(c3,f1(c4)). [resolve(109,a,69,a)]. given #44 (T,wt=4): 124 plant(f3(c2,c3)). [resolve(117,a,77,c),unit_del(a,65),unit_del(b,67)]. ============================== PROOF ================================= % Proof 1 at 0.02 (+ 0.00) seconds. % Length of proof is 74. % Level of proof is 10. % Maximum clause weight is 13. % Given clauses 44. 1 Wolf(x) -> animal(x) # label(non_clause). [assumption]. 2 Fox(x) -> animal(x) # label(non_clause). [assumption]. 3 Bird(x) -> animal(x) # label(non_clause). [assumption]. 5 Snail(x) -> animal(x) # label(non_clause). [assumption]. 6 Grain(x) -> plant(x) # label(non_clause). [assumption]. 7 (exists x Wolf(x)) # label(non_clause). [assumption]. 8 (exists x Fox(x)) # label(non_clause). [assumption]. 9 (exists x Bird(x)) # label(non_clause). [assumption]. 11 (exists x Snail(x)) # label(non_clause). [assumption]. 12 (exists x Grain(x)) # label(non_clause). [assumption]. 13 (all x (animal(x) -> (all y (plant(y) -> eats(x,y))) | (all z (animal(z) & Smaller(z,x) & (exists u (plant(u) & eats(z,u))) -> eats(x,z))))) # label(non_clause). [assumption]. 15 Snail(x) & Bird(y) -> Smaller(x,y) # label(non_clause). [assumption]. 16 Bird(x) & Fox(y) -> Smaller(x,y) # label(non_clause). [assumption]. 17 Fox(x) & Wolf(y) -> Smaller(x,y) # label(non_clause). [assumption]. 20 Snail(x) -> (exists y (plant(y) & eats(x,y))) # label(non_clause). [assumption]. 21 Wolf(x) & Fox(y) -> -eats(x,y) # label(non_clause). [assumption]. 22 Wolf(x) & Grain(y) -> -eats(x,y) # label(non_clause). [assumption]. 23 Bird(x) & Snail(y) -> -eats(x,y) # label(non_clause). [assumption]. 24 (exists x exists y (animal(x) & animal(y) & eats(x,y) & (all z (Grain(z) -> eats(y,z))))) # label(non_clause) # label(goal). [goal]. 25 Wolf(c1). [clausify(7)]. 26 -Wolf(x) | animal(x). [clausify(1)]. 27 -Fox(x) | -Wolf(y) | Smaller(x,y). [clausify(17)]. 28 -Wolf(x) | -Fox(y) | -eats(x,y). [clausify(21)]. 29 -Wolf(x) | -Grain(y) | -eats(x,y). [clausify(22)]. 30 Fox(c2). [clausify(8)]. 31 -Fox(x) | animal(x). [clausify(2)]. 32 -Bird(x) | -Fox(y) | Smaller(x,y). [clausify(16)]. 33 -Fox(x) | Smaller(x,c1). [resolve(27,b,25,a)]. 34 -Fox(x) | -eats(c1,x). [resolve(28,a,25,a)]. 35 Bird(c3). [clausify(9)]. 36 -Bird(x) | animal(x). [clausify(3)]. 38 -Snail(x) | -Bird(y) | Smaller(x,y). [clausify(15)]. 40 -Bird(x) | -Snail(y) | -eats(x,y). [clausify(23)]. 41 -Bird(x) | Smaller(x,c2). [resolve(32,b,30,a)]. 48 Snail(c5). [clausify(11)]. 49 -Snail(x) | animal(x). [clausify(5)]. 50 -Snail(x) | plant(f2(x)). [clausify(20)]. 51 -Snail(x) | eats(x,f2(x)). [clausify(20)]. 52 -Snail(x) | Smaller(x,c3). [resolve(38,b,35,a)]. 53 -Snail(x) | -eats(c3,x). [resolve(40,a,35,a)]. 54 Grain(c6). [clausify(12)]. 55 -Grain(x) | plant(x). [clausify(6)]. 56 -animal(x) | -animal(y) | -eats(x,y) | Grain(f3(x,y)). [deny(24)]. 57 -Grain(x) | -eats(c1,x). [resolve(29,a,25,a)]. 58 Smaller(c2,c1). [resolve(33,a,30,a)]. 59 -animal(x) | -plant(y) | eats(x,y) | -animal(z) | -Smaller(z,x) | -plant(u) | -eats(z,u) | eats(x,z). [clausify(13)]. 60 Smaller(c3,c2). [resolve(41,a,35,a)]. 62 Smaller(c5,c3). [resolve(52,a,48,a)]. 63 -animal(x) | -animal(y) | -eats(x,y) | -eats(y,f3(x,y)). [deny(24)]. 64 animal(c1). [resolve(25,a,26,a)]. 65 animal(c2). [resolve(30,a,31,a)]. 66 -eats(c1,c2). [resolve(34,a,30,a)]. 67 animal(c3). [resolve(35,a,36,a)]. 72 animal(c5). [resolve(48,a,49,a)]. 73 plant(f2(c5)). [resolve(50,a,48,a)]. 74 eats(c5,f2(c5)). [resolve(51,a,48,a)]. 75 -eats(c3,c5). [resolve(53,a,48,a)]. 76 plant(c6). [resolve(54,a,55,a)]. 77 -animal(x) | -animal(y) | -eats(x,y) | plant(f3(x,y)). [resolve(56,d,55,a)]. 78 -eats(c1,c6). [resolve(57,a,54,a)]. 80 -animal(c1) | -plant(x) | eats(c1,x) | -animal(c2) | -plant(y) | -eats(c2,y) | eats(c1,c2). [resolve(58,a,59,e)]. 81 -plant(x) | eats(c1,x) | -plant(y) | -eats(c2,y). [copy(80),unit_del(a,64),unit_del(d,65),unit_del(g,66)]. 82 -animal(c2) | -plant(x) | eats(c2,x) | -animal(c3) | -plant(y) | -eats(c3,y) | eats(c2,c3). [resolve(60,a,59,e)]. 83 -plant(x) | eats(c2,x) | -plant(y) | -eats(c3,y) | eats(c2,c3). [copy(82),unit_del(a,65),unit_del(d,67)]. 84 -animal(c3) | -plant(x) | eats(c3,x) | -animal(c5) | -plant(y) | -eats(c5,y) | eats(c3,c5). [resolve(62,a,59,e)]. 85 -plant(x) | eats(c3,x) | -plant(y) | -eats(c5,y). [copy(84),unit_del(a,67),unit_del(d,72),unit_del(g,75)]. 90 -plant(x) | eats(c2,x) | -eats(c3,x) | eats(c2,c3). [factor(83,a,c)]. 103 -eats(c2,c6). [ur(81,a,76,a,b,78,a,c,76,a)]. 109 -plant(x) | eats(c3,x). [resolve(85,d,74,a),unit_del(c,73)]. 113 eats(c3,c6). [resolve(109,a,76,a)]. 117 eats(c2,c3). [resolve(113,a,90,c),unit_del(a,76),unit_del(b,103)]. 124 plant(f3(c2,c3)). [resolve(117,a,77,c),unit_del(a,65),unit_del(b,67)]. 125 -eats(c3,f3(c2,c3)). [resolve(117,a,63,c),unit_del(a,65),unit_del(b,67)]. 133 $F. [resolve(124,a,109,a),unit_del(a,125)]. ============================== end of proof ========================== ============================== STATISTICS ============================ Given=44. Generated=85. Kept=67. proofs=1. Usable=39. Sos=16. Demods=0. Limbo=0, Disabled=70. Hints=0. Weight_deleted=0. Literals_deleted=0. Forward_subsumed=17. Back_subsumed=12. Sos_limit_deleted=0. Sos_displaced=0. Sos_removed=0. New_demodulators=0 (0 lex), Back_demodulated=0. Back_unit_deleted=0. Demod_attempts=0. Demod_rewrites=0. Res_instance_prunes=0. Para_instance_prunes=0. Basic_paramod_prunes=0. Nonunit_fsub_feature_tests=9. Nonunit_bsub_feature_tests=66. Megabytes=0.09. User_CPU=0.02, System_CPU=0.00, Wall_clock=0. ============================== end of statistics ===================== ============================== end of search ========================= THEOREM PROVED Exiting with 1 proof. Process 493 exit (max_proofs) Sat Oct 6 22:54:56 2007 p9m4-0.5.dfsg/Samples/Non-Equality/Prover9/Steam.in0000644000175000017500000000421610676020376020435 0ustar bzedbzedformulas(assumptions). % Prover9 should produce a proof immediately. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Schubert's Steamroller % % Wolves, foxes, birds, caterpillars, and snails are animals, % and there are some of each of them. % % Also there are some grains, and grains are plants. % % Every animal either likes to eat all plants or all animals much % smaller than itself that like to eat some plants. % % Caterpillars and snails are much smaller than birds, which are much % smaller than foxes, which are in turn much smaller than wolves. % % Wolves do not like to eat foxes or grains, while birds like to eat % caterpillars but not snails. % % Caterpillars and snails like to eat some plants. % % Prove there is an animal that likes to eat a grain-eating animal. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Wolf(x) -> animal(x). Fox(x) -> animal(x). Bird(x) -> animal(x). Caterpillar(x) -> animal(x). Snail(x) -> animal(x). Grain(x) -> plant(x). exists x Wolf(x). exists x Fox(x). exists x Bird(x). exists x Caterpillar(x). exists x Snail(x). exists x Grain(x). % All animals either eat all plants or eat all smaller animals % that eat some plants. all x (animal(x) -> (all y (plant(y)->eats(x,y))) | (all z ( animal(z) & Smaller(z,x) & (exists u (plant(u) & eats(z,u))) -> eats(x,z)))). Caterpillar(x) & Bird(y) -> Smaller(x,y). Snail(x) & Bird(y) -> Smaller(x,y). Bird(x) & Fox(y) -> Smaller(x,y). Fox(x) & Wolf(y) -> Smaller(x,y). Bird(x) & Caterpillar(y) -> eats(x,y). Caterpillar(x) -> (exists y (plant(y) & eats(x,y))). Snail(x) -> (exists y (plant(y) & eats(x,y))). Wolf(x) & Fox(y) -> -eats(x,y). Wolf(x) & Grain(y) -> -eats(x,y). Bird(x) & Snail(y) -> -eats(x,y). end_of_list. formulas(goals). % There is an animal that eats {an animal that eats all grains}. exists x exists y ( animal(x) & animal(y) & eats(x,y) & (all z (Grain(z) -> eats(y,z)))). end_of_list. p9m4-0.5.dfsg/Samples/Non-Equality/Prover9/Subset_transitive.in0000644000175000017500000000055210676020376023100 0ustar bzedbzed formulas(assumptions). % Prover9 should produce a proof immediately. all x all y (subset(x,y) <-> (all z (member(z,x) -> member(z,y)))) # label(definition_subset). end_of_list. formulas(goals). all x all y all z (subset(x,y) & subset(y,z) -> subset(x,z)) # label(subset_is_transitive). end_of_list. p9m4-0.5.dfsg/Samples/Non-Equality/Prover9/temp0000644000175000017500000000002510702053320017677 0ustar bzedbzedclear(print_proofs). p9m4-0.5.dfsg/Samples/Non-Equality/Prover9/Lifschitz.in0000644000175000017500000000037310676020376021323 0ustar bzedbzed formulas(goals). % A problem from Vladimir Lifschitz. exists x exists x1 all y exists z exists z1 ( ( -p(y,y) | p(x,x) | -s(z,x) ) & ( s(x,y) | -s(y,z) | q(z1,z1) ) & ( q(x1,y) | -q(y,z1) | s(x1,x1) ) ) . end_of_list. p9m4-0.5.dfsg/Samples/Non-Equality/Prover9/HWV006-1.in0000644000175000017500000000533510676020376020417 0ustar bzedbzedset(prolog_style_variables). formulas(assumptions). % This problem, from the TPTP, has something to do with hardware verification. % Prover9 should produce a proof immediately. -p9(X1,c16) | p1(f12(c5,f19(X1)),f11(c13,f17(X1))). -p2(f12(c5,X1),c4) | -p9(X1,c15) | p2(f11(c5,X1),c5) | -p6(X1,c7). p1(f12(c22,X1),f12(c5,f18(X1))) | -p9(X1,c16). p9(f25(X1),c16) | -p9(X1,c23). -p3(c4,c5). -p9(X1,c16) | p1(f12(c5,f18(X1)),f11(c5,f19(X1))). p1(f12(c21,X1),f12(c5,f17(X1))) | -p9(X1,c16). -p9(X1,c23) | p1(f11(c5,X1),f11(c5,f25(X1))). -p6(X2,c7) | -p2(f11(X1,X2),c5) | -p9(X2,c14) | p2(f12(c5,X2),c5). -p2(f12(c5,X1),c4) | -p9(X1,c14) | p2(f11(c5,X1),c4) | -p6(X1,c7). p2(f11(c13,X1),c4) | -p2(f12(c5,X1),c4) | p2(f11(c5,X1),c4) | -p6(X1,c7) | -p9(X1,c10). p1(f12(c21,X1),f12(c21,f25(X1))) | -p9(X1,c23). p6(X2,c7) | -p9(X2,X1) | p6(X2,c8). -p1(X1,X2) | p2(X2,X3) | -p2(X1,X3). -p6(X1,c8) | -p6(X1,c7). p2(X2,X3) | -p1(X2,X1) | -p2(X1,X3). -p9(X1,c16) | p9(f19(X1),c15). p2(f11(c5,X1),c5) | -p2(f12(c5,X1),c5) | -p6(X1,c7) | p2(f11(c13,X1),c5) | -p9(X1,c14). p2(f12(c5,X1),c5) | -p9(X1,c10) | -p6(X1,c7) | -p2(f11(c5,X1),c5) | -p2(f11(c13,X1),c5). p1(f11(c5,X1),f11(c5,f20(X1))) | -p9(X1,c16). p9(f24(X1),c16) | -p9(X1,c23). -p9(X1,c16) | p1(f12(c5,f20(X1)),f11(c5,f17(X1))). p1(f12(c21,f24(X1)),f11(c13,f25(X1))) | -p9(X1,c23). p1(f11(c13,X1),f11(c5,f24(X1))) | -p9(X1,c23). p1(f12(c22,f24(X1)),f11(c13,f20(X1))) | -p9(X1,c23). -p9(X1,c10) | -p2(f12(c5,X1),c5) | -p6(X1,c7) | p2(f11(c5,X1),c5). p1(f12(c22,X1),f12(c5,f20(X1))) | -p9(X1,c23). -p3(c5,c4). -p6(X1,c7) | -p9(X1,c10) | -p2(f12(c5,X1),c5) | p2(f11(c13,X1),c5). -p2(f12(c5,X1),c4) | p2(f11(c13,X1),c4) | -p6(X1,c7) | -p9(X1,c14). p2(f11(c5,X1),c4) | -p2(f12(c5,X1),c5) | -p6(X1,c7) | -p9(X1,c15). -p9(X1,c16) | p1(f11(c13,X1),f11(c13,f20(X1))). -p2(f11(c13,X1),c4) | -p9(X1,c14) | p2(f12(c5,X1),c4) | -p2(f11(c5,X1),c4) | -p6(X1,c7). p1(f11(c5,X1),f11(c5,f18(X1))) | -p9(X1,c16). p9(f17(X1),c10) | -p9(X1,c16). p1(f11(c22,X1),f11(c13,f24(X1))) | -p9(X1,c23). -p9(X1,c16) | p1(f11(c13,X1),f11(c13,f18(X1))). p3(X2,X3) | -p2(X1,X3) | -p2(X1,X2). -p9(X1,c23) | p9(f20(X1),c14). p2(f12(c5,X2),c4) | -p9(X2,c10) | -p2(f11(X1,X2),c4) | -p6(X2,c7). -p9(X1,c23) | p1(f12(c22,f25(X1)),f11(c5,f20(X1))). p2(f12(c5,X1),c5) | -p6(X1,c7) | -p9(X1,c15) | -p2(f11(c5,X1),c4). p9(f20(X1),c14) | -p9(X1,c16). -p2(f11(c5,X1),c5) | p2(f12(c5,X1),c4) | -p9(X1,c15) | -p6(X1,c7). p9(f18(X1),c10) | -p9(X1,c16). -p6(f19(f24(c26)),c8). -p6(f17(f24(c26)),c8). -p6(f18(f25(c26)),c8). -p6(f18(f24(c26)),c8). -p6(f17(f25(c26)),c8) | -p6(f20(c26),c8). p2(f12(c21,c26),c5). p2(f11(c13,c26),c4). p2(f11(c22,c26),c5). p2(f11(c5,c26),c5). -p6(f20(f24(c26)),c8). p9(c26,c23). -p6(f19(f25(c26)),c8) | -p6(f20(c26),c8). p2(f12(c22,c26),c4). end_of_list. p9m4-0.5.dfsg/Samples/Non-Equality/Mace4/0000755000175000017500000000000010707407544016415 5ustar bzedbzedp9m4-0.5.dfsg/Samples/Non-Equality/Mace4/Toughnut.in0000644000175000017500000000701110707177537020567 0ustar bzedbzed assign(domain_size, 8). formulas(assumptions). % This should exhaust the search space for size 8, without finding % a model, showing that the board cannod be covered. % Here is an example that works much better (5 times better) with % the old version of MACE (MACE 2.0). The reason is that it is % entirely relational. We have to pay the overhead related to % rewriting (data structures, etc), but no term rewriting occurs. % (Boolean rewriting occurs, but that is precisely what MACE 2.0 % does so well.) % % This is the mutilated checkerboard problem from John McCarthy's % 1964 Stanford AI memo "A Tough Nut for Proof Procedures". % % Of all the proofs I know about, this one comes closest to answersing % the exact challenge put forth in the memo; that is, showing % automatically that a set of first-order statements representing the % 8x8 problem is unsatisfiable. % % (Of course, the real AI interest is in discovering the coloring % argument, so most people focus on the 2n x 2n problem.) % % Running MACE with -n8 does not directly show that the % set is unsatisfiable; it just shows there are no models of size 8; % but that's all we're really interested in. In other words, it % would be fair to include % x = 0 | x = 1 | x = 2 | x = 3 | x = 4 | x = 5 | x = 6 | x = 7 % in McCarthy's set; then the MACE result would clearly be correct. % % If the board is % % (7,0) ... (7,7) % . . % . . % . . % (0,0) ... (0,7) % % G1(x,y) means that (x,y) and the space above are covered by a domino. % G2(x,y) means that (x,y) and the space to the right are covered by a domino. % G3(x,y) means that (x,y) and the space below are covered by a domino. % G4(x,y) means that (x,y) and the space to the left are covered by a domino. % G5(x,y) means that (x,y) is not allowed to be covered. % % S(x,y) is the successor relation for 0 ... 7. % L(x,y) is the less-than relation for 0 ... 7. % % The numbers in comments are McCarthy's axiom numbers. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % The formulas: % % List the squares that are not allowed to be covered. % This is unsatisfiable (it should give no models). all x all y (G5(x,y) <-> (x=0 & y=0) | (x=7 & y=7)). % 11, 12 % Some test cases that are satisfiable: % % all x all y (G5(x,y) <-> (x=1 & y=1) | (x=1 & y=2) | % (x=2 & y=2) | (x=3 & y=2) ). % % all x all y (G5(x,y) <-> (x=0 & y=1) | (x=7 & y=7)). % % all x all y -G5(x,y). % complete board -- 12988816 models end_of_list. formulas(assumptions). % Dominoes don't stick out past the edges of the board. -G3(0,y). % 15 -G4(x,0). -G1(7,y). -G2(x,7). S(0,1). S(1,2). S(2,3). S(3,4). S(4,5). S(5,6). S(6,7). % 1 % To change the board size, update the preceding few clauses. % The rest of the clauses don't depend on the size of the board. -S(x,y) | L(x,y). % 2 -L(x,y) | -L(y,z) | L(x,z). % 3a -L(x,y) | -L(y,z) | -S(x,z). % 3b -L(x,y) | x != y. % 4 % = is built in, se we don't include McCarthy's axiom 5. % Every square must satisfy a Gi. G1(x,y) | G2(x,y) | G3(x,y) | G4(x,y) | G5(x,y). % 6 % Every square satisfies at most one Gi. -G1(x,y) | -G2(x,y). % 7 -G1(x,y) | -G3(x,y). -G1(x,y) | -G4(x,y). -G1(x,y) | -G5(x,y). -G2(x,y) | -G3(x,y). % 8 -G2(x,y) | -G4(x,y). -G2(x,y) | -G5(x,y). -G3(x,y) | -G4(x,y). % 9 -G3(x,y) | -G5(x,y). -G4(x,y) | -G5(x,y). % 10 % Relationships between Gis. -S(x1,x2) | -G1(x1,y) | G3(x2,y). % 13 -S(x1,x2) | G1(x1,y) | -G3(x2,y). -S(y1,y2) | -G2(x,y1) | G4(x,y2). % 14 -S(y1,y2) | G2(x,y1) | -G4(x,y2). end_of_list. p9m4-0.5.dfsg/Samples/Non-Equality/Mace4/Toughnut.in~0000644000175000017500000000704310702316606020755 0ustar bzedbzed assign(domain_size, 8). assign(iterate_up_to, 8). formulas(assumptions). % This should exhaust the search space for size 8, without finding % a model, showing that the board cannod be covered. % Here is an example that works much better (5 times better) with % the old version of MACE (MACE 2.0). The reason is that it is % entirely relational. We have to pay the overhead related to % rewriting (data structures, etc), but no term rewriting occurs. % (Boolean rewriting occurs, but that is precisely what MACE 2.0 % does so well.) % % This is the mutilated checkerboard problem from John McCarthy's % 1964 Stanford AI memo "A Tough Nut for Proof Procedures". % % Of all the proofs I know about, this one comes closest to answersing % the exact challenge put forth in the memo; that is, showing % automatically that a set of first-order statements representing the % 8x8 problem is unsatisfiable. % % (Of course, the real AI interest is in discovering the coloring % argument, so most people focus on the 2n x 2n problem.) % % Running MACE with -n8 does not directly show that the % set is unsatisfiable; it just shows there are no models of size 8; % but that's all we're really interested in. In other words, it % would be fair to include % x = 0 | x = 1 | x = 2 | x = 3 | x = 4 | x = 5 | x = 6 | x = 7 % in McCarthy's set; then the MACE result would clearly be correct. % % If the board is % % (7,0) ... (7,7) % . . % . . % . . % (0,0) ... (0,7) % % G1(x,y) means that (x,y) and the space above are covered by a domino. % G2(x,y) means that (x,y) and the space to the right are covered by a domino. % G3(x,y) means that (x,y) and the space below are covered by a domino. % G4(x,y) means that (x,y) and the space to the left are covered by a domino. % G5(x,y) means that (x,y) is not allowed to be covered. % % S(x,y) is the successor relation for 0 ... 7. % L(x,y) is the less-than relation for 0 ... 7. % % The numbers in comments are McCarthy's axiom numbers. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % The formulas: % % List the squares that are not allowed to be covered. % This is unsatisfiable (it should give no models). all x all y (G5(x,y) <-> (x=0 & y=0) | (x=7 & y=7)). % 11, 12 % Some test cases that are satisfiable: % % all x all y (G5(x,y) <-> (x=1 & y=1) | (x=1 & y=2) | % (x=2 & y=2) | (x=3 & y=2) ). % % all x all y (G5(x,y) <-> (x=0 & y=1) | (x=7 & y=7)). % % all x all y -G5(x,y). % complete board -- 12988816 models end_of_list. formulas(assumptions). % Dominoes don't stick out past the edges of the board. -G3(0,y). % 15 -G4(x,0). -G1(7,y). -G2(x,7). S(0,1). S(1,2). S(2,3). S(3,4). S(4,5). S(5,6). S(6,7). % 1 % To change the board size, update the preceding few clauses. % The rest of the clauses don't depend on the size of the board. -S(x,y) | L(x,y). % 2 -L(x,y) | -L(y,z) | L(x,z). % 3a -L(x,y) | -L(y,z) | -S(x,z). % 3b -L(x,y) | x != y. % 4 % = is built in, se we don't include McCarthy's axiom 5. % Every square must satisfy a Gi. G1(x,y) | G2(x,y) | G3(x,y) | G4(x,y) | G5(x,y). % 6 % Every square satisfies at most one Gi. -G1(x,y) | -G2(x,y). % 7 -G1(x,y) | -G3(x,y). -G1(x,y) | -G4(x,y). -G1(x,y) | -G5(x,y). -G2(x,y) | -G3(x,y). % 8 -G2(x,y) | -G4(x,y). -G2(x,y) | -G5(x,y). -G3(x,y) | -G4(x,y). % 9 -G3(x,y) | -G5(x,y). -G4(x,y) | -G5(x,y). % 10 % Relationships between Gis. -S(x1,x2) | -G1(x1,y) | G3(x2,y). % 13 -S(x1,x2) | G1(x1,y) | -G3(x2,y). -S(y1,y2) | -G2(x,y1) | G4(x,y2). % 14 -S(y1,y2) | G2(x,y1) | -G4(x,y2). end_of_list. p9m4-0.5.dfsg/Samples/Non-Equality/Mace4/Kauer.in0000644000175000017500000000254510676233540020020 0ustar bzedbzedformulas(assumptions). % This is a problem about an ordering relation. % Mace4 should produce a model immediately. % Note that the symbol "<" has no built-in meaning to Mace4 (or to Prover9). all x exists y (x < y). all x all y (x < y -> -(y < x)). all x all y (x < y -> (exists z (x < z & z < y))). % Here is the source of this problem. % From: Stefan Kauer % Date: Fri, 08 Jan 1999 15:27:29 +0100 % To: mccune@mcs.anl.gov % % Dear Prof. McCune, % % I found the following problem: the following 3 axioms for a relation < % are given: % 1. all x exists y: x < y % 2. all x y: x < y => not y < x % 3. all x y: x < y => exists z: x < z and z < y % % One has to find a finite model. It is surprising and not obvious, that a % finite model exists, and it is not at all to find easily (at least for % me, may be for you). Since I sometimes work with OTTER, I remembered % MACE and tried to formulate and solve this problem with MACE, but % unfortunately was able to do it. % Is it possible to formulate and solve this problem with MACE and how? % % This problem was posed as an exercise in a very small german % mathematical magazin by Dr. Waldmann, a former colleague of mine, who % works now at another university. We both agree that the smallest model % has seven elements. % % Sincerely yours % % Stefan Kauer end_of_list. p9m4-0.5.dfsg/Samples/Non-Equality/Mace4/EC-counterexample.in~0000644000175000017500000000064210676020376022464 0ustar bzedbzed formulas(assumptions). % The candidate below is a theorem of the equivalential calculus. % We can show that it is not a single axiom, because e(x,x) does not % follow. % Mace4 should produce a counterexample immediately. -P(e(x,y)) | -P(x) | P(y) # label(Condensed_detachment). P(e(e(x,y),e(e(y,z),e(z,x)))) # label(candidate). end_of_list. formulas(goals). P(e(x,x)) | label(Reflexivity). end_of_list. p9m4-0.5.dfsg/Samples/Non-Equality/Mace4/Steam-bug.in0000644000175000017500000000472010676020376020573 0ustar bzedbzedformulas(assumptions). % Schubert's Steamroller with a bug. % % An assumption has been removed, allowing a counterexample % to be found immediately. % % Note that there is a counterexample of size 3, which reminds % us that we haven't stated that the animals are distinct, that % plants and animals are disjoint, etc. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Schubert's Steamroller % % Wolves, foxes, birds, caterpillars, and snails are animals, % and there are some of each of them. % % Also there are some grains, and grains are plants. % % Every animal either likes to eat all plants or all animals much % smaller than itself that like to eat some plants. % % Caterpillars and snails are much smaller than birds, which are much % smaller than foxes, which are in turn much smaller than wolves. % % Wolves do not like to eat foxes or grains, while birds like to eat % caterpillars but not snails. % % Caterpillars and snails like to eat some plants. % % Prove there is an animal that likes to eat a grain-eating animal. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Wolf(x) -> animal(x). Fox(x) -> animal(x). Bird(x) -> animal(x). Caterpillar(x) -> animal(x). Snail(x) -> animal(x). Grain(x) -> plant(x). exists x Wolf(x). exists x Fox(x). exists x Bird(x). exists x Caterpillar(x). exists x Snail(x). exists x Grain(x). % All animals either eat all plants or eat all smaller animals % that eat some plants. all x (animal(x) -> (all y (plant(y)->eats(x,y))) | (all z ( animal(z) & Smaller(z,x) & (exists u (plant(u) & eats(z,u))) -> eats(x,z)))). Caterpillar(x) & Bird(y) -> Smaller(x,y). Snail(x) & Bird(y) -> Smaller(x,y). Bird(x) & Fox(y) -> Smaller(x,y). Fox(x) & Wolf(y) -> Smaller(x,y). Bird(x) & Caterpillar(y) -> eats(x,y). Caterpillar(x) -> (exists y (plant(y) & eats(x,y))). % Remove the following assumption, so we can fine a counterexample. % Snail(x) -> (exists y (plant(y) & eats(x,y))). Wolf(x) & Fox(y) -> -eats(x,y). Wolf(x) & Grain(y) -> -eats(x,y). Bird(x) & Snail(y) -> -eats(x,y). end_of_list. formulas(goals). % There is an animal that eats {an animal that eats all grains}. exists x exists y ( animal(x) & animal(y) & eats(x,y) & (all z (Grain(z) -> eats(y,z)))). end_of_list. p9m4-0.5.dfsg/Samples/Non-Equality/Mace4/EC-counterexample.in0000644000175000017500000000064210707407544022267 0ustar bzedbzed formulas(assumptions). % The candidate below is a theorem of the equivalential calculus. % We can show that it is not a single axiom, because e(x,x) does not % follow. % Mace4 should produce a counterexample immediately. -P(e(x,y)) | -P(x) | P(y) # label(Condensed_detachment). P(e(e(x,y),e(e(y,z),e(z,x)))) # label(candidate). end_of_list. formulas(goals). P(e(x,x)) # label(Reflexivity). end_of_list. p9m4-0.5.dfsg/Samples/Kauer.in~0000644000175000017500000000257610723030541014731 0ustar bzedbzedassign(max_models, 10). formulas(assumptions). % This is a problem about an ordering relation. % Mace4 should produce a model immediately. % Note that the symbol "<" has no built-in meaning to Mace4 (or to Prover9). all x exists y (x < y). all x all y (x < y -> -(y < x)). all x all y (x < y -> (exists z (x < z & z < y))). % Here is the source of this problem. % From: Stefan Kauer % Date: Fri, 08 Jan 1999 15:27:29 +0100 % To: mccune@mcs.anl.gov % % Dear Prof. McCune, % % I found the following problem: the following 3 axioms for a relation < % are given: % 1. all x exists y: x < y % 2. all x y: x < y => not y < x % 3. all x y: x < y => exists z: x < z and z < y % % One has to find a finite model. It is surprising and not obvious, that a % finite model exists, and it is not at all to find easily (at least for % me, may be for you). Since I sometimes work with OTTER, I remembered % MACE and tried to formulate and solve this problem with MACE, but % unfortunately was able to do it. % Is it possible to formulate and solve this problem with MACE and how? % % This problem was posed as an exercise in a very small german % mathematical magazin by Dr. Waldmann, a former colleague of mine, who % works now at another university. We both agree that the smallest model % has seven elements. % % Sincerely yours % % Stefan Kauer end_of_list. p9m4-0.5.dfsg/err0000644000175000017500000014021610702250452012237 0ustar bzedbzedrunning py2app creating /Users/mccune/gui/v4/build creating /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat creating /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone creating /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app creating /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/collect creating /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp creating /Users/mccune/gui/v4/dist creating build/bdist.macosx-10.3-fat/python2.5-standalone/app/lib-dynload creating build/bdist.macosx-10.3-fat/python2.5-standalone/app/Frameworks *** filtering dependencies *** 265 total 29 filtered 4 orphaned 236 remaining *** create binaries *** creating python loader for extension '_AE' creating python loader for extension '_Evt' creating python loader for extension '_File' creating python loader for extension '_Folder' creating python loader for extension '_bisect' creating python loader for extension '_codecs_cn' creating python loader for extension '_codecs_hk' creating python loader for extension '_codecs_iso2022' creating python loader for extension '_codecs_jp' creating python loader for extension '_codecs_kr' creating python loader for extension '_codecs_tw' creating python loader for extension '_heapq' creating python loader for extension '_locale' creating python loader for extension '_multibytecodec' creating python loader for extension '_random' creating python loader for extension '_struct' creating python loader for extension '_weakref' creating python loader for extension 'array' creating python loader for extension 'binascii' creating python loader for extension 'bz2' creating python loader for extension 'cStringIO' creating python loader for extension 'collections' creating python loader for extension 'datetime' creating python loader for extension 'fcntl' creating python loader for extension 'itertools' creating python loader for extension 'math' creating python loader for extension 'operator' creating python loader for extension 'select' creating python loader for extension 'strop' creating python loader for extension 'time' creating python loader for extension 'unicodedata' creating python loader for extension 'zlib' creating /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/wx creating python loader for extension 'wx._controls_' creating python loader for extension 'wx._core_' creating python loader for extension 'wx._gdi_' creating python loader for extension 'wx._misc_' creating python loader for extension 'wx._windows_' *** byte compile python files *** byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/StringIO.py to StringIO.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/UserDict.py to UserDict.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/__future__.py to __future__.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/_strptime.py to _strptime.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/_threading_local.py to _threading_local.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/base64.py to base64.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/bdb.py to bdb.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/bisect.py to bisect.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/calendar.py to calendar.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/cmd.py to cmd.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/codecs.py to codecs.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/copy.py to copy.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/copy_reg.py to copy_reg.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/difflib.py to difflib.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/dis.py to dis.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/doctest.py to doctest.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/dummy_thread.py to dummy_thread.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/__init__.py to encodings/__init__.pyc creating /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/collect/encodings byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/aliases.py to encodings/aliases.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/ascii.py to encodings/ascii.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/base64_codec.py to encodings/base64_codec.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/big5.py to encodings/big5.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/big5hkscs.py to encodings/big5hkscs.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/bz2_codec.py to encodings/bz2_codec.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/charmap.py to encodings/charmap.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp037.py to encodings/cp037.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp1006.py to encodings/cp1006.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp1026.py to encodings/cp1026.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp1140.py to encodings/cp1140.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp1250.py to encodings/cp1250.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp1251.py to encodings/cp1251.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp1252.py to encodings/cp1252.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp1253.py to encodings/cp1253.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp1254.py to encodings/cp1254.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp1255.py to encodings/cp1255.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp1256.py to encodings/cp1256.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp1257.py to encodings/cp1257.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp1258.py to encodings/cp1258.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp424.py to encodings/cp424.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp437.py to encodings/cp437.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp500.py to encodings/cp500.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp737.py to encodings/cp737.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp775.py to encodings/cp775.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp850.py to encodings/cp850.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp852.py to encodings/cp852.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp855.py to encodings/cp855.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp856.py to encodings/cp856.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp857.py to encodings/cp857.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp860.py to encodings/cp860.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp861.py to encodings/cp861.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp862.py to encodings/cp862.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp863.py to encodings/cp863.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp864.py to encodings/cp864.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp865.py to encodings/cp865.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp866.py to encodings/cp866.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp869.py to encodings/cp869.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp874.py to encodings/cp874.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp875.py to encodings/cp875.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp932.py to encodings/cp932.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp949.py to encodings/cp949.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/cp950.py to encodings/cp950.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/euc_jis_2004.py to encodings/euc_jis_2004.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/euc_jisx0213.py to encodings/euc_jisx0213.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/euc_jp.py to encodings/euc_jp.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/euc_kr.py to encodings/euc_kr.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/gb18030.py to encodings/gb18030.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/gb2312.py to encodings/gb2312.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/gbk.py to encodings/gbk.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/hex_codec.py to encodings/hex_codec.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/hp_roman8.py to encodings/hp_roman8.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/hz.py to encodings/hz.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/idna.py to encodings/idna.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso2022_jp.py to encodings/iso2022_jp.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso2022_jp_1.py to encodings/iso2022_jp_1.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso2022_jp_2.py to encodings/iso2022_jp_2.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso2022_jp_2004.py to encodings/iso2022_jp_2004.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso2022_jp_3.py to encodings/iso2022_jp_3.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso2022_jp_ext.py to encodings/iso2022_jp_ext.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso2022_kr.py to encodings/iso2022_kr.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso8859_1.py to encodings/iso8859_1.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso8859_10.py to encodings/iso8859_10.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso8859_11.py to encodings/iso8859_11.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso8859_13.py to encodings/iso8859_13.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso8859_14.py to encodings/iso8859_14.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso8859_15.py to encodings/iso8859_15.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso8859_16.py to encodings/iso8859_16.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso8859_2.py to encodings/iso8859_2.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso8859_3.py to encodings/iso8859_3.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso8859_4.py to encodings/iso8859_4.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso8859_5.py to encodings/iso8859_5.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso8859_6.py to encodings/iso8859_6.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso8859_7.py to encodings/iso8859_7.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso8859_8.py to encodings/iso8859_8.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/iso8859_9.py to encodings/iso8859_9.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/johab.py to encodings/johab.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/koi8_r.py to encodings/koi8_r.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/koi8_u.py to encodings/koi8_u.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/latin_1.py to encodings/latin_1.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/mac_arabic.py to encodings/mac_arabic.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/mac_centeuro.py to encodings/mac_centeuro.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/mac_croatian.py to encodings/mac_croatian.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/mac_cyrillic.py to encodings/mac_cyrillic.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/mac_farsi.py to encodings/mac_farsi.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/mac_greek.py to encodings/mac_greek.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/mac_iceland.py to encodings/mac_iceland.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/mac_latin2.py to encodings/mac_latin2.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/mac_roman.py to encodings/mac_roman.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/mac_romanian.py to encodings/mac_romanian.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/mac_turkish.py to encodings/mac_turkish.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/mbcs.py to encodings/mbcs.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/palmos.py to encodings/palmos.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/ptcp154.py to encodings/ptcp154.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/punycode.py to encodings/punycode.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/quopri_codec.py to encodings/quopri_codec.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/raw_unicode_escape.py to encodings/raw_unicode_escape.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/rot_13.py to encodings/rot_13.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/shift_jis.py to encodings/shift_jis.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/shift_jis_2004.py to encodings/shift_jis_2004.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/shift_jisx0213.py to encodings/shift_jisx0213.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/string_escape.py to encodings/string_escape.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/tis_620.py to encodings/tis_620.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/undefined.py to encodings/undefined.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/unicode_escape.py to encodings/unicode_escape.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/unicode_internal.py to encodings/unicode_internal.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/utf_16.py to encodings/utf_16.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/utf_16_be.py to encodings/utf_16_be.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/utf_16_le.py to encodings/utf_16_le.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/utf_7.py to encodings/utf_7.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/utf_8.py to encodings/utf_8.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/utf_8_sig.py to encodings/utf_8_sig.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/uu_codec.py to encodings/uu_codec.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/encodings/zlib_codec.py to encodings/zlib_codec.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/getopt.py to getopt.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/gettext.py to gettext.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/heapq.py to heapq.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/inspect.py to inspect.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/linecache.py to linecache.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/locale.py to locale.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/macpath.py to macpath.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/new.py to new.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/opcode.py to opcode.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/optparse.py to optparse.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/os.py to os.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pdb.py to pdb.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pickle.py to pickle.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/Carbon/AE.py to Carbon/AE.pyc creating /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/collect/Carbon byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/Carbon/AppleEvents.py to Carbon/AppleEvents.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/Carbon/Events.py to Carbon/Events.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/Carbon/Evt.py to Carbon/Evt.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/Carbon/File.py to Carbon/File.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/Carbon/Folder.py to Carbon/Folder.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/Carbon/Folders.py to Carbon/Folders.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/Carbon/__init__.py to Carbon/__init__.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/popen2.py to popen2.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py to posixpath.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pprint.py to pprint.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/quopri.py to quopri.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/random.py to random.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/re.py to re.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/repr.py to repr.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/bootstrap/argv_emulation.py to argv_emulation.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/bootstrap/boot_app.py to boot_app.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/bootstrap/chdir_resource.py to chdir_resource.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/bootstrap/disable_linecache.py to disable_linecache.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/__init__.py to wx/__init__.pyc creating /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/collect/wx byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/__version__.py to wx/__version__.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/_controls.py to wx/_controls.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/_core.py to wx/_core.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/_gdi.py to wx/_gdi.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/_misc.py to wx/_misc.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/_windows.py to wx/_windows.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/sre.py to sre.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/sre_compile.py to sre_compile.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/sre_constants.py to sre_constants.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/sre_parse.py to sre_parse.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/stat.py to stat.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/string.py to string.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/stringprep.py to stringprep.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/struct.py to struct.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/subprocess.py to subprocess.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/tempfile.py to tempfile.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/textwrap.py to textwrap.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/threading.py to threading.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/token.py to token.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/tokenize.py to tokenize.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/traceback.py to traceback.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/types.py to types.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/unittest.py to unittest.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/warnings.py to warnings.pyc byte-compiling /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/weakref.py to weakref.pyc byte-compiling /Users/mccune/gui/v4/control.py to control.pyc byte-compiling /Users/mccune/gui/v4/files.py to files.pyc byte-compiling /Users/mccune/gui/v4/my_setup.py to my_setup.pyc byte-compiling /Users/mccune/gui/v4/options.py to options.pyc byte-compiling /Users/mccune/gui/v4/partition_input.py to partition_input.pyc byte-compiling /Users/mccune/gui/v4/platforms.py to platforms.pyc byte-compiling /Users/mccune/gui/v4/prover9-mace4.py to prover9-mace4.pyc byte-compiling /Users/mccune/gui/v4/utilities.py to utilities.pyc byte-compiling /Users/mccune/gui/v4/wx_utilities.py to wx_utilities.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/_AE.py to _AE.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/_Evt.py to _Evt.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/_File.py to _File.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/_Folder.py to _Folder.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/_bisect.py to _bisect.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/_codecs_cn.py to _codecs_cn.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/_codecs_hk.py to _codecs_hk.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/_codecs_iso2022.py to _codecs_iso2022.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/_codecs_jp.py to _codecs_jp.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/_codecs_kr.py to _codecs_kr.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/_codecs_tw.py to _codecs_tw.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/_heapq.py to _heapq.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/_locale.py to _locale.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/_multibytecodec.py to _multibytecodec.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/_random.py to _random.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/_struct.py to _struct.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/_weakref.py to _weakref.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/array.py to array.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/binascii.py to binascii.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/bz2.py to bz2.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/cStringIO.py to cStringIO.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/collections.py to collections.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/datetime.py to datetime.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/fcntl.py to fcntl.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/itertools.py to itertools.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/math.py to math.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/operator.py to operator.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/select.py to select.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/strop.py to strop.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/time.py to time.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/unicodedata.py to unicodedata.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/zlib.py to zlib.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/wx/_controls_.py to wx/_controls_.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/wx/_core_.py to wx/_core_.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/wx/_gdi_.py to wx/_gdi_.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/wx/_misc_.py to wx/_misc_.pyc byte-compiling /Users/mccune/gui/v4/build/bdist.macosx-10.3-fat/python2.5-standalone/app/temp/wx/_windows_.py to wx/_windows_.pyc *** creating application bundle: prover9-mace4 *** copying platforms.py -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources copying utilities.py -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources copying wx_utilities.py -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources copying files.py -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources copying options.py -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources copying partition_input.py -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources copying my_setup.py -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources copying control.py -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Images copying Images/mace4-90t.gif -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Images copying Images/p9.ico -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Images copying Images/prover9-5a-128t.gif -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Images copying Images/prover9-splash.gif -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Images creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Mace4 copying Samples/Equality/Mace4/BA-Sheffer-counterexample.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Mace4 copying Samples/Equality/Mace4/CL-QL.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Mace4 copying Samples/Equality/Mace4/Megill-68.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Mace4 copying Samples/Equality/Mace4/Noncommutative-group-48.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Mace4 copying Samples/Equality/Mace4/Noncommutative-group.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Mace4 copying Samples/Equality/Mace4/Noncommutative-ring-unit.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Mace4 copying Samples/Equality/Mace4/Nonmodular-OML.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Mace4 copying Samples/Equality/Mace4/QG-5.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Mace4 copying Samples/Equality/Mace4/Ring-19.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Mace4 copying Samples/Equality/Mace4/Ring-19.in~ -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Mace4 copying Samples/Equality/Mace4/TBA-independence-2.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Mace4 creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Prover9 copying Samples/Equality/Prover9/BA-distributivity.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Prover9 copying Samples/Equality/Prover9/Cancellative-semigroup-EA.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Prover9 copying Samples/Equality/Prover9/CL-BW.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Prover9 copying Samples/Equality/Prover9/CL-SK-W.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Prover9 copying Samples/Equality/Prover9/LT-McKenzie-4basis.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Prover9 copying Samples/Equality/Prover9/OML-sax.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Prover9 copying Samples/Equality/Prover9/RBA-2.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Equality/Prover9 copying Samples/GT_Sax.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples copying Samples/GT_Sax.in~ -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples copying Samples/LT-McKenzie-4basis.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Non-Equality creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Non-Equality/Mace4 copying Samples/Non-Equality/Mace4/EC-counterexample.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Non-Equality/Mace4 copying Samples/Non-Equality/Mace4/Kauer.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Non-Equality/Mace4 copying Samples/Non-Equality/Mace4/Steam-bug.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Non-Equality/Mace4 copying Samples/Non-Equality/Mace4/Toughnut.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Non-Equality/Mace4 creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Non-Equality/Prover9 copying Samples/Non-Equality/Prover9/EC-XCB-reflexivity.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Non-Equality/Prover9 copying Samples/Non-Equality/Prover9/HWV006-1.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Non-Equality/Prover9 copying Samples/Non-Equality/Prover9/Lifschitz.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Non-Equality/Prover9 copying Samples/Non-Equality/Prover9/Steam.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Non-Equality/Prover9 copying Samples/Non-Equality/Prover9/Subset_transitive.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Non-Equality/Prover9 copying Samples/Non-Equality/Prover9/temp -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Non-Equality/Prover9 copying Samples/Non-Equality/Prover9/temp0 -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Non-Equality/Prover9 copying Samples/Non-Equality/Prover9/temp1 -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples/Non-Equality/Prover9 copying Samples/Steam.in -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/Samples creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/bin-mac copying bin-mac/interpformat -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/bin-mac copying bin-mac/mace4 -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/bin-mac copying bin-mac/prooftrans -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/bin-mac copying bin-mac/prover9 -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/bin-mac copying /Users/mccune/gui/v4/p9.icns -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources copying prover9-mace4.py -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5 creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/config copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/Makefile -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/config copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/Setup -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/config copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/Setup.local -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/config copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/Setup.config -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/config copying build/bdist.macosx-10.3-fat/python2.5-standalone/app/site-packages.zip -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5 creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Frameworks copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_AE.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_Evt.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_File.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_Folder.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_bisect.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_codecs_cn.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_codecs_hk.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_codecs_iso2022.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_codecs_jp.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_codecs_kr.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_codecs_tw.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_heapq.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_locale.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_multibytecodec.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_random.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_struct.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_weakref.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/array.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/binascii.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/bz2.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/cStringIO.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/collections.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/datetime.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/fcntl.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/itertools.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/math.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/operator.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/select.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/strop.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/time.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/unicodedata.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/zlib.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload/wx copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/_controls_.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload/wx copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/_core_.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload/wx copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/_gdi_.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload/wx copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/_misc_.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload/wx copying /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/_windows_.so -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Resources/lib/python2.5/lib-dynload/wx copying /Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/MacOS/python creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Frameworks/Python.framework creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Frameworks/Python.framework/Versions creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Frameworks/Python.framework/Versions/2.5 creating /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Frameworks/Python.framework/Versions/2.5/Resources copying /Library/Frameworks/Python.framework/Versions/2.5/Python -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Frameworks/Python.framework/Versions/2.5 copying /Library/Frameworks/Python.framework/Versions/2.5/Resources/Info.plist -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Frameworks/Python.framework/Versions/2.5/Resources copying /Library/Frameworks/Python.framework/Versions/2.5/Resources/version.plist -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Frameworks/Python.framework/Versions/2.5/Resources copying /usr/local/lib/wxPython-ansi-2.8.4.2/lib/libwx_macd-2.8.0.dylib -> /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/Frameworks stripping time.so stripping unicodedata.so stripping itertools.so stripping _misc_.so stripping _codecs_cn.so stripping _multibytecodec.so stripping operator.so stripping prooftrans stripping _codecs_iso2022.so stripping interpformat stripping python stripping prover9-mace4 stripping _codecs_kr.so stripping libwx_macd-2.8.0.dylib stripping math.so stripping prover9 stripping _AE.so stripping _Folder.so stripping mace4 stripping _struct.so stripping _codecs_hk.so stripping _codecs_jp.so stripping _weakref.so stripping _heapq.so stripping cStringIO.so stripping _core_.so stripping collections.so stripping _random.so stripping select.so stripping _locale.so stripping zlib.so stripping _bisect.so stripping Python stripping _windows_.so stripping _File.so stripping _controls_.so stripping datetime.so stripping _Evt.so stripping fcntl.so stripping strop.so stripping _codecs_tw.so stripping bz2.so stripping array.so stripping binascii.so stripping _gdi_.so /usr/bin/strip: for architecture i386 object: /Users/mccune/gui/v4/dist/prover9-mace4.app/Contents/MacOS/python malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD command 11 can't byte swap it) stripping saved 29603072 bytes (23284700 / 52887772) p9m4-0.5.dfsg/my_setup.py0000744000175000017500000005366010726352262013762 0ustar bzedbzed# Copyright (C) 2007 William McCune # # This file is part of the LADR Deduction Library. # # The LADR Deduction Library 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 2 of the # License, or (at your option) any later version. # # 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. # # system imports import os, sys import re import wx # local imports import partition_input import utilities from files import * from control import * from platforms import * from wx_utilities import * from options import * # When saving an input file, a few comments are added; when # opening a saved input file, those comments are removed. Comment_banner = '% Saved by.*\n' Comment_opt_dep = '% GUI handles dependencies' Comment_lang = '% Language Options' Comment_p9_opt = '% Options for Prover9' Comment_m4_opt = '% Options for Mace4' Comment_p9_add = '% Additional input for Prover9' Comment_m4_add = '% Additional input for Mace4' All_added_comments = [Comment_banner, Comment_opt_dep, Comment_lang, Comment_p9_opt, Comment_m4_opt, Comment_p9_add, Comment_p9_add] class Input_panel(wx.Panel): def __init__(self, parent, title, auto_highlight): self.title = title self.have_new_text = False wx.Panel.__init__(self, parent) title_display = title + ':' width = max_width([title_display], self) + 10 # +10 prevents wrap text = wx.StaticText(self, -1, title + ':', size=(width,-1)) wff_btn = wx.Button(self, -1, 'Well Formed?') wff_btn.SetToolTipString( 'Check syntax of %s. If there are multiple ' 'errors, only the first will be shown.' % title) self.Bind(wx.EVT_BUTTON, self.well_formed_check, wff_btn) self.hilite_btn = wx.Button(self, -1, 'Highlight') self.hilite_btn.SetToolTipString( 'Color comments and attributes in this box now. ' 'This button is a hack because on some platforms, ' 'the automatic highlighting causes an annoying ' 'flash every few seconds.') self.Bind(wx.EVT_BUTTON, self.on_hilite, self.hilite_btn) clear_btn = wx.Button(self, -1, 'Clear') clear_btn.SetToolTipString('Clear ' + title) self.Bind(wx.EVT_BUTTON, self.clear, clear_btn) sub_sizer = wx.BoxSizer(wx.HORIZONTAL) sub_sizer.Add(text, 1, wx.ALIGN_BOTTOM, 0) sub_sizer.Add(self.hilite_btn, 0, wx.ALL, 3) sub_sizer.Add(wff_btn, 0, wx.ALL, 3) sub_sizer.Add(clear_btn, 0, wx.ALL, 3) self.ed = wx.TextCtrl(self, # Win32 neews TE_RICH2 for color style=wx.TE_MULTILINE|wx.HSCROLL|wx.TE_RICH2) if Win32(): self.ed.Bind(wx.EVT_CHAR, self.on_char, self.ed) # bad on Mac() else: self.ed.Bind(wx.EVT_TEXT, self.on_text, self.ed) # bad on Win32() self.ed.SetFont(to_top(self).box_font) self.ed.SetDefaultStyle(wx.TextAttr('BLACK','WHITE', to_top(self).box_font)) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(sub_sizer, 0, wx.ALL|wx.GROW, 3) sizer.Add(self.ed, 1, wx.ALL|wx.GROW, 3) self.SetSizer(sizer) self.timer = None if auto_highlight: self.start_auto_highlight() else: self.hilite_btn.Show(True) self.Layout() def start_auto_highlight(self): if self.timer: error_dialog('start_auto_highlight: timer alreay exists') else: self.timer = wx.Timer(self, -1) wx.EVT_TIMER(self, self.timer.GetId(), self.check_highlight) self.timer.Start(2000) # check every 2 seconds self.hilite_btn.Show(False) def stop_auto_highlight(self): if self.timer: self.timer.Stop() self.timer = None self.hilite_btn.Show(True) self.Layout() else: error_dialog('stop_auto_highlight: timer not found') def on_hilite(self, evt): self.highlight() if Mac(): # There should be a better way to do this. self.Show(False) self.Show(True) def well_formed_check(self, evt): if self.title == 'Assumptions': head = '\nformulas(assumptions).\n' tail = '\nend_of_list.\n' elif self.title == 'Goals': head = '\nformulas(goals).\n' tail = '\nend_of_list.\n' else: head = tail = '' text = self.ed.GetValue() if self.title == 'Language Options': lang_opt = '' # this may be temporary, until language panel is done else: lang_opt = to_top(self).setup.language.get_language_input() input = ('%s%s%s%s' % (lang_opt, head, text, tail)) (exit, message, error) = syntax_check(input) if exit == 'Okay': info_dialog('This part of the input looks good!') elif exit == 'Input_Error': if error: start = text.find(error) if (start >= 0): end = start + len(error) self.ed.SetStyle(start, end, wx.TextAttr('RED', wx.Colour(200,200,255))) error_dialog('%s\n%s' % (message,error if error else '')) else: frame = Text_frame(self, to_top(self).box_font, 'Error Output', message, saveas=False) frame.Show(True) error_dialog('Unknown error; see the \'Error Output\' window.') def clear(self, evt): self.ed.Clear() def highlight(self): str = self.ed.GetValue() # reset to all black text self.ed.SetStyle(0, self.ed.GetLastPosition(), wx.TextAttr('BLACK', 'WHITE', to_top(self).box_font)) # attributes: spans = utilities.pattern_spans('#[^.\n]*[.\n]', str) for (start,end) in spans: self.ed.SetStyle(start, end, wx.TextAttr(wx.Colour(0,0,200))) font = self.ed.GetFont() font.SetStyle(wx.FONTSTYLE_ITALIC) # comments (line and block) spans = utilities.comment_spans(str) for (start,end) in spans: self.ed.SetStyle(start, end, wx.TextAttr(wx.Colour(0,160,0), font=font)) # following needed on mac to undo italics (???) self.ed.SetDefaultStyle(wx.TextAttr('BLACK','WHITE', to_top(self).box_font)) def on_text(self, evt): # This gets called whenever the text is changed (EVT_TEXT) self.have_new_text = True def on_char(self, evt): # This gets called whenever a character is inserted (EVT_CHAR) self.have_new_text = True evt.Skip() # allows normal processing of char def check_highlight(self, evt): # This gets called periodically. if self.have_new_text: self.have_new_text = False self.timer.Stop() self.highlight() self.timer.Start(2000) # END class Input_panel(Panel) class P9_options_panel(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent) panel1 = wx.Panel(self) panel1.SetBackgroundColour('white') self.panel2 = wx.Panel(self) self.type = ['Basic Options', 'All Options'] logo_bitmap = Prover9().logo_bitmap() if logo_bitmap: heading = wx.StaticBitmap(panel1, -1, logo_bitmap) else: heading = wx.StaticText(panel1, -1, 'Prover9') self.rb1 = wx.RadioBox(panel1, -1, '', choices=self.type, majorDimension=1, style=wx.RA_SPECIFY_COLS) self.rb1.SetToolTip(wx.ToolTip( 'Show only basic options, or enable access to all options. ' 'Note that "Basic Options" is a subset of "All Options", and ' 'different groups in "All Options" may share options. ' 'Changing one of the widgets for a shared option will ' 'cause other widgets for that option to be updated in kind.')) self.panels = P9_options(self.panel2) # dictionary indexed by sets self.sets = self.panels.optionset_names() # 'Basic Options' is first self.rb2 = wx.RadioBox(panel1, -1, 'Option Groups', choices=self.sets[1:], # all but first majorDimension = 1, style=wx.RA_SPECIFY_COLS) self.rb2.SetToolTip(wx.ToolTip('These are all of the Prover9 ' 'options, separated into groups.')) self.rb2.Enable(False) self.Bind(wx.EVT_RADIOBOX, self.handle_rb1, self.rb1) self.Bind(wx.EVT_RADIOBOX, self.handle_rb2, self.rb2) self.reset = wx.Button(panel1, -1, 'Reset All to Defaults') self.Bind(wx.EVT_BUTTON, self.on_reset, self.reset) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add((1,10), 0) # sizer.Add(heading, 0, wx.LEFT|wx.RIGHT|wx.GROW|wx.ALIGN_CENTER, 10) sizer.Add(heading, 0, wx.ALL|wx.ALIGN_CENTER, 0) sizer.Add((1,5), 0) sizer.Add(self.rb1, 0, wx.LEFT|wx.RIGHT|wx.GROW, 10) sizer.Add((1,10), 0) sizer.Add(self.rb2, 0, wx.LEFT|wx.RIGHT|wx.GROW, 10) sizer.Add((1,10), 0) sizer.Add(self.reset, 0, wx.LEFT|wx.RIGHT|wx.GROW, 10) panel1.SetSizer(sizer) sizer = wx.BoxSizer(wx.HORIZONTAL) sizer.Add(panel1, 0, wx.ALL|wx.GROW, 3) sizer.Add(self.panel2, 1, wx.ALL|wx.GROW, 3) self.SetSizer(sizer) self.current_option_set = None self.switch_options(0) def switch_options(self, item): if self.current_option_set: self.current_option_set.Show(False) self.current_option_set = self.panels.panels[self.sets[item]] self.current_option_set.Show(True) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add((0,0), 1) sizer.Add(self.current_option_set, 0, wx.ALIGN_CENTER, 10) sizer.Add((0,0), 3) self.panel2.SetSizer(sizer) self.panel2.Layout() def handle_rb1(self, evt): item = evt.GetInt() if self.type[item] == 'Basic Options': self.switch_options(0) self.rb2.Enable(False) else: item = self.rb2.GetSelection() self.switch_options(item+1) self.rb2.Enable(True) self.Layout() # rearrange children def handle_rb2(self, evt): item = evt.GetInt() self.switch_options(item+1) def on_reset(self, evt): self.panels.reset() # END class P9_options_panel(Panel) class Language_panel(wx.Panel): def __init__(self, parent, options): wx.Panel.__init__(self, parent) # Directions temp_help = ( 'Some day, this panel will have widgets for specifying all of ' 'the language options. Until then, if you know the ' 'Prover9/Mace4 commands for doing so, you can give them ' 'in the following text box. The commands include ' '"op", for specifying infix/prefix/postfix and precedence, ' 'and "redeclare", for changing the the symbols with built-in ' 'semantics. For example,\n\n' ' op(450, infix, "@").\n' ' redeclare(implication, IMPLIES).') # directions = wx.StaticText(self, -1, temp_help) directions = wx.TextCtrl(self, -1, temp_help, style=wx.TE_MULTILINE) # Prolog-Style Variables (Shared with other options widgets) id = wx.NewId() label_id = wx.NewId() opt = copy.deepcopy(options.name_to_opt('prolog_style_variables')) if opt: opt[Id] = id opt[Label_id] = id # we're not using a separate label here opt[Share] = [opt] # note circular structure options.share_external_option(opt) self.prolog_cb = wx.CheckBox(self, id, 'Prolog-Style Variables') self.prolog_cb.SetValue(opt[Default]) tip = opt[Tip] else: error_dialog('error sharing prolog_style_variables option') self.prolog_cb = wx.CheckBox(self, id, 'Prolog-Style Variables') self.prolog_cb.SetValue(False) tip = '' self.prolog_cb_opt = opt self.Bind(wx.EVT_CHECKBOX, self.on_prolog, self.prolog_cb) self.prolog_cb.SetToolTipString(tip) # Text Box self.input = Input_panel(self, 'Language Options', to_top(self).auto_highlight()) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.prolog_cb, 0, wx.ALL|wx.GROW, 10) sizer.Add(directions, 0, wx.ALL|wx.GROW, 10) sizer.Add(self.input, 1, wx.ALL|wx.GROW, 1) self.SetSizer(sizer) def on_prolog(self, evt): if self.prolog_cb_opt: self.prolog_cb_opt[Value] = self.prolog_cb.GetValue() update_label(self.prolog_cb_opt) update_shared(self.prolog_cb_opt) def get_language_input(self): return self.input.ed.GetValue() # end class Language_panel(wx.Panel): class Setup_tabs(wx.Notebook): def __init__(self, parent): wx.Notebook.__init__(self, parent, style=wx.NO_BORDER|wx.FULL_REPAINT_ON_RESIZE|wx.NB_NOPAGETHEME) # self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.on_changed) # Formulas Tab self.formulas = wx.SplitterWindow(self, -1) self.assumps = Input_panel(self.formulas, 'Assumptions', to_top(self).auto_highlight()) self.goals = Input_panel(self.formulas, 'Goals', to_top(self).auto_highlight()) self.formulas.SplitHorizontally(self.assumps, self.goals) self.formulas.SetSashGravity(0.75) self.formulas.SetMinimumPaneSize(150) if Mac() or Win32(): self.formulas.SetSashPosition(450) # Prover9 Options Tab self.p9_options = P9_options_panel(self) # Mace4 Options Tab self.m4_options = M4_options(self, Mace4().logo_bitmap()) # self.m4_options.output_transformed() # self.p9_options.panels.output_transformed() link_options_by_names(self.p9_options.panels, self.m4_options, ['prolog_style_variables']) # Additional Input Tab self.add = wx.SplitterWindow(self, -1) self.add_p9 = Input_panel(self.add, 'Additional Input for Prover9', to_top(self).auto_highlight()) self.add_m4 = Input_panel(self.add, 'Additional Input for Mace4', to_top(self).auto_highlight()) self.add.SplitHorizontally(self.add_p9, self.add_m4) self.add.SetSashGravity(0.75) self.add.SetMinimumPaneSize(150) if Mac() or Win32(): self.formulas.SetSashPosition(450) # Language Tab (construction assumes options tabs exist) self.language = Language_panel(self, self.m4_options) # Add tabs to Notebook self.AddPage(self.language, 'Language Options') self.AddPage(self.formulas, 'Formulas') self.AddPage(self.p9_options, 'Prover9 Options') self.AddPage(self.m4_options.panel, 'Mace4 Options') self.AddPage(self.add, 'Additional Input') self.SetSelection(1) # Start with second page (Formulas) showing # Following is used when we have to update all boxes. self.text_boxes = [self.assumps, self.goals, self.add_p9, self.add_m4, self.language.input] def update_font(self, font): for box in self.text_boxes: box.ed.SetFont(font) box.highlight() if Mac(): # There should be a better way to do this. self.Show(False) self.Show(True) def reset(self): for box in self.text_boxes: box.ed.Clear() self.p9_options.panels.reset() self.m4_options.reset() def assemble_input(self): language = self.language.get_language_input().strip() + '\n' assumps = self.assumps.ed.GetValue().strip() + '\n' goals = self.goals.ed.GetValue().strip() + '\n' p9_add = self.add_p9.ed.GetValue().strip() + '\n' m4_add = self.add_m4.ed.GetValue().strip() + '\n' p9_triples = self.p9_options.panels.nondefaults() m4_triples = self.m4_options.nondefaults() p9_opt = option_triples_to_string(p9_triples) m4_opt = option_triples_to_string(m4_triples) input = 'set(ignore_option_dependencies). %s\n\n' % Comment_opt_dep if language.strip() != '': input += '%s\n\n%s\n' % (Comment_lang,language) if p9_opt.strip() != '': input += 'if(Prover9). %s\n%send_if.\n\n' % (Comment_p9_opt,p9_opt) if m4_opt.strip() != '': input += 'if(Mace4). %s\n%send_if.\n\n' % (Comment_m4_opt,m4_opt) if p9_add.strip() != '': input += 'if(Prover9). %s\n%send_if.\n\n' % (Comment_p9_add,p9_add) if m4_add.strip() != '': input += 'if(Mace4). %s\n%send_if.\n\n' % (Comment_m4_add,m4_add) input += '\nformulas(assumptions).\n\n%s\nend_of_list.\n\n' % assumps input += '\nformulas(goals).\n\n%s\nend_of_list.\n\n' % goals input = re.sub('\n\s*\n', '\n\n', input) # collapse blank lines return input def store_input(self, input): input = utilities.remove_reg_exprs(All_added_comments, input) (p9,m4,assumps,goals,opt,lang,other) = partition_input.partition(input) # Take the part from the if(Prover9), and split those (also Mace4) (p9_opt, p9_other) = partition_input.extract_options(p9) (m4_opt, m4_other) = partition_input.extract_options(m4) # If there is an option set(ignore_option_dependencies), remove it # and tell set_options() to ignore dependencies while putting the # options into the GUI. r = re.compile('set\s*\(\s*ignore_option_dependencies\s*\)\s*\.') if r.match(opt): opt = r.sub('', opt) handle_dep = False else: handle_dep = True p9_opt_x = set_options(p9_opt, self.p9_options.panels, handle_dep = handle_dep) if p9_opt_x != '': info_dialog('The following options from the if(Prover9) section' ' of the input were not recognized. They have been' ' added to the "Additional Input for Prover9" box.\n\n' + p9_opt_x) m4_opt_x = set_options(m4_opt, self.m4_options, handle_dep=handle_dep) if m4_opt_x != '': info_dialog('The following options from the if(Mace4) section' ' of the input were not recognized. They have been' ' added to the "Additional Input for Mace4" box.\n\n' + m4_opt_x) opt_x = set_options_either(opt, self.p9_options.panels, self.m4_options, handle_dep = handle_dep) if opt_x != '': info_dialog('The following options from the ' ' input file were not recognized. They have been' ' added to the "Additional Input for Prover9" box.\n\n' + opt_x) self.language.input.ed.AppendText(lang.replace('.', '.\n')) self.assumps.ed.AppendText(assumps) self.goals.ed.AppendText(goals) self.add_p9.ed.AppendText(p9_opt_x + p9_other + opt_x + other) self.add_m4.ed.AppendText(m4_opt_x + m4_other) for box in self.text_boxes: box.highlight() box.ed.ShowPosition(0) self.SetSelection(1) # Start with second page (Formulas) showing def store_new_input(self, input, version): self.reset() # clears everything in setup tabs if version: if input.find('Saved by Prover9-Mace4') < 0: info_dialog('The file being opened was not created by' ' Prover9-Mace4. Therefore, it might not run' ' exactly the same here as with the command-line' ' versions of Prover9 or Mace4, because' ' Prover9-Mace4 can rearrange the input, and' ' dependent options are handled differently.') elif input.find('Saved by Prover9-Mace4 Version %s' % version) < 0: info_dialog('The file being opened was created with a' ' different version of Prover9-Mace4. This is' ' usually okay, but it might cause problems if' ' the underlying programs Prover9 or Mace4' ' have changed.') self.store_input(input) def append_input(self, input): self.store_input(input) def on_changed(self, evt): sel = evt.GetSelection() if sel == 0: # Tried to redraw so that all text will appear. Failed. pass def start_auto_highlight(self): for box in self.text_boxes: box.start_auto_highlight() def stop_auto_highlight(self): for box in self.text_boxes: box.stop_auto_highlight() # END class Setup_tabs(Notebook) p9m4-0.5.dfsg/Mac.build0000755000175000017500000000011010702516270013237 0ustar bzedbzed#!/bin/csh python Mac-setup.py py2app > & err echo 'See the file err' p9m4-0.5.dfsg/platforms.py0000644000175000017500000000270310726331343014110 0ustar bzedbzed# Copyright (C) 2007 William McCune # # This file is part of the LADR Deduction Library. # # The LADR Deduction Library 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 2 of the # License, or (at your option) any later version. # # 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. # # system imports import wx, subprocess # Platforms. We'll assume GTK, and test for Win32 and Mac when necessary def Win32(): return wx.Platform=='__WXMSW__' def Mac(): return wx.Platform=='__WXMAC__' def GTK(): return wx.Platform=='__WXGTK__' def Mac_ppc(): if not Mac(): return False else: try: arch = subprocess.Popen(['arch'], stdout=subprocess.PIPE).communicate()[0] except: arch = '??' return arch.strip() == 'ppc' if Win32(): import win32api, win32process p9m4-0.5.dfsg/Images/0000755000175000017500000000000010672360147012736 5ustar bzedbzedp9m4-0.5.dfsg/Images/prover9-5a-128t.gif0000644000175000017500000000217310670412634016032 0ustar bzedbzedGIF89a,(((888HHHWWWkkkxxx!Created with The GIMP! ,,#dihlp,tmxoH) ?Fjh6¢tzJM婀u`mNfA8\Ùboq2 WNBN% N"s+tMn"N{f#X)^$w&N"i$t&%M X$$gƕ_|& NZ$ԃM &xUQ%&at(wBX@NCAĹ^ )\hCDt#IL(`PHtNr&{M9`PC\p \D29SFM|0T*DQYN0( ?K7P)2}bȳBv㉐x hM& HC``Ѵ"y$Tfqc žހ:[.&\Lȅ.pɉ,&G$n\NPFxZ*V͗&\r"r1$  eIL_'BcdB 0YRFYlpؖt%DBJ<$Փl0 tdM @HW@tR| >0^"stHRM`(@*t f%NSFccx4P y1 l& =(g(="$5@:dt+$* 5BO> iwW@ {Q6/8l 2!j'E#x pX<®ENω Ga+$ . D~;Bz5mpNԙi9 LYcT4p& „Ӫ!9(XIcIkBJgC1ܙ䱇 5'b`5dtui uA#*A4$'# 0c  P$( h7%n8*!;p9m4-0.5.dfsg/Images/p9.ico0000644000175000017500000001635610671410517013771 0ustar bzedbzed006 h(0` SSS... \\\ NNN)))|||@@@WWWnnn222III $$$www;;;RRRiii---[[[666MMMddd((({{{mmm ___###:::QQQhhh,,,CCC555LLLccc'''zzz>>>UUUlll000GGG ^^^"""uuu999PPP+++BBB444KKKyyy===TTTkkkFFF ]]]!!!tttOOOfff***}}}oooJJJaaa<<< gP,h%IJDB"B,/y19G\KxI(uKs]kuU^!K,]V,u;d0~\MIK^c dk 5\Kwe\"pX{u\bu6Lk3;uDIg1\_s^F\*0B11}qK7\ksE1fa4.-t EgtZAkk\\UlH1a11Be\1FW\On>fBj"Tqq 7Bk=\kWSku'BN`Z6\z#kB`RBQGk BBLB 3BkC&\%Fu|>`k k3VLLok{2b8B[,dIk%r9B9 :p( @SSSjjjEEE sss777|||@@@WWWIII www;;;---666ddd???mmmHHH :::hhhZZZLLLccc'''zzz>>>UUU000GGG """uuuPPPggg+++~~~444KKKbbbyyy===kkk !!!ttt888***}}}AAAooo333JJJxxx<<<oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooKdoooooooooo'oooooooooooooooooocooooooooo9*ooooooooooooooooKs ooooooooo,2oooooooooooooooo(Pooooooooooooooooooooooo~JooooooooooG-Foooooooooooooo F@Gooooooooooo1oooooooooooooo:1oooooooooooooooooooooooom]ooHyVoooooI-6ooooo,oooooboo;UXooooozy;oooo6]/ooooukoooyvoooo[yooooy"oooCey/oooo2#^oooKyoooo)oo= oooootys[ooo-!ooooqy^o$Z([oooooo0ZoonooooW=4#k4ooooooooYPU5uMnooooxyhsvoooooooooo{-pooooo2y1ooooooooooooCcFyOoooooooB7oooooooooooooooo|8/Qooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo( :::GGG888))) EEE666ppp aaa444###000!!!yyyjjjYYYJJJWWWHHH*** FFF777bbbBBB333@@@zzz\\\MMMiiiZZZ<<<vvvHHHHHHHHHHHHHHHHHHHH HHHH(HHHHHHHH HHHH HHHHHHH"HHHHA?$HHHHHH>ZHHHHHHV@HHHHHH HHHHHH1 HHHHL'HHHHHHY?QHHHHK/.HH DPHHHH6C , UHHJ%9-H SNBHR'&HH\RH.:)HH!HH[ZHR*7  (f\ɲ<)jdRP˟@ :$9SB{p!PBIAJW@S>ES(SÊ GRӬv1 놣c}S0m"͹+;jp[ǐW.7V:N#S`9ŚI̺#+*I%s ٮsٗF ;;NN/  Ë>\t8Ͻ(>=4og? [N9߀rW_󩡖7Ga1hTo(UAOPRn$!Y[x|xkD 쩨#B,&\!fpߎL򳟒A!rF&,Hmix+Z)_#êJhV!q1,a~p(^`xT7?w 9m j!|:%Nl{"x= !YaeAD^0 v[̜EH+bЄ' @61o3c\(D}n2!ȼ; $+/dV iQzE.,),>.(dѰC" $)$xQe*%GDRzZCs4.$HcML,L9p#yi* RnO*zj1QQL""`Ił-3Pn<:Ntye6o90*lgL9B*O)4Xǜ;Ά&EMhKLGAU[DUM6T CتRdl Q) 4[bO uw-)mf-PV {aZ*$WDԱA%u *Sn4|h]3SR'뀍ʭ=*R>8֯qEPYJQW`u2fZFH1A[ӪhvRbZZS3OF3FI}H@P=#_瑲2nBj;1 Ѱw ,N[mKh)cNj՝U!0% w)VBs@A8CL:o!&a_=)SHѽn9| e| Iv47耥Ȁ]vqk. 4<2a14}&I9`+e:}W$S`^!l}")L>Ƹ{fÐ`Hb12Ia<C?8z%CG+J͛(hG",XЕ@{Aæw8( /hg7TSsm>0[d3bWɵ5&ǺG|׵3}a4Acm&^gĜ44xyΠ|21[i.D$z bl}3Fڙ]Qz9(筓IRPnwY8#C?!nHzO|Jz<r^2 WcfYȇ,|nx@Z.@ymHVu?3E5Ո 9]6h<<IE&)PDw$Ƌ bD0zL0ƍwD2' Jh3b (ÓDK:cġU<yfjaTsd/d Gy bx fNd$Au_ H&CD!pW)%ᥑi+AvXxHIfT8L)<2V^u^q}: iFj*T䗀+T2!:acdzqcũ`Oj"% Jk/#isyy 84,ڢJj 3ŽI[tv: yGZ/(+,z7,r4cUc-rKuꠋ; m:CQ {gqVi@L7 $Hk6 #S;^Yg F+Ӫy1ĠxFa%DZl>aYHs()zaf먢K%aEm۳f^ R8%vScB+༗cjw -| &C\N4ª{M˗!_O ^uګ=\pVcR[ i^0;)\8$l zbmCX-|k=g, f$[yv{, /Z8Q1Nt 6r+ƪ\B؜y8,"0ԻxDቅ2vǻe-3ܙޜ3Ȋ>=gJz8ܯ3pʏ0;̖,ͣ%dc<[X,O~p{*=p l.֜t7續+ 0dΓxF-z0,Kؤ1uY$d{M I疀joizڄ43zV>tz˴\i>p\\[v «:V1J+'mL=|FᆳuYg`& c~|I3IӉ~ nJYPq$&8>T|;JvVFO^a  Z uSEovD'L cJ{UƨN>`G f[AmU=\_ pIh_ 'VѠB;z?ErV4x 6`t6y LUOex&Pjz k=d? Wu%5_`^/P_預 GԥPׁijcљw^]ݽqT[y7~yV|/]P)0lt}|ltz,¸Xw;o.ZiVwe,(%GP:/G& ʰz]u1VSudц u|" m@!hC[ZF38B~ZhL[qIPv,eg*Y V}U89%6HIqKdhBSQ} &}lbfXӑXX(a($T^AP bkhӤVGXb?E5gF@Fʀ @@^*r) p:p̙XD"Y@2'j)z~,*ڐQ+d{5[6hl]k0iFAfS:QeŻ rXvSAE3 o3,2\\v0"Kq5 $#X!{AuYg劜:`ԑ9 HIl ܛ^etM Hɷ@/zٝnG-7 E˰xBlN,߶Q/2 a#ٜ Py~*)Da͋s:f8J"?9 2R@HKOm\1uV.tّjqp(GcSxM$)xVJ/YdZVU\P9t;+n^׾j*Mln:+Zue3za,hGKҚ=jW֚`lg+Y-]mI-pKF0Mr12Ѝ+ZM-vjH xŭyև|Kͯ~LN;'L [ΰ7{ q;p9m4-0.5.dfsg/Mac.setup0000755000175000017500000000037210730321426013310 0ustar bzedbzed#!/bin/csh py2applet --make-setup prover9-mace4.py \ platforms.py utilities.py wx_utilities.py files.py \ options.py partition_input.py my_setup.py control.py \ p9.icns Images Samples bin-mac-ppc bin-mac-intel mv setup.py Mac-setup.py p9m4-0.5.dfsg/options.py.save0000644000175000017500000011503110702552225014526 0ustar bzedbzed# system imports import os, sys import re import wx # local imports import utilities from wx_utilities import * # Indexes into options (for 'flag' and 'parm', unless noted otherwise) Id = 0 Label_id = 1 Share = 2 Type = 3 # for all records Name = 4 # for all records Value = 5 Default = 6 Range = 7 # ignored for 'flag Tip = 8 Column = 5 # only for 'group' # Option records: # # [widget_id, label_id, 'flag', name, value, default, tooltip, share] # [widget_id, label_id, 'parm', name, value, default, tooltip, share, min, max] # [widget_id, label_id, 'stringparm', name, value, default, tooltip, share [r1,...,rn]] # [None, None, 'group', group_name, column] def id_to_option(id, options): for opt in options: if opt[Type] in ['flag', 'parm', 'stringparm'] and opt[Id] == id: return opt return None def name_to_option(name, options): for opt in options: if opt[Type] in ['flag', 'parm', 'stringparm'] and opt[Name] == name: return opt return None def nondefault_options(options, work): """We pass in a partially constructed string so that we can prevent duplicates.""" for opt in options: if (opt[Type] in ['flag', 'parm', 'stringparm'] and opt[Value] != opt[Default]): triple = (opt[Type], opt[Name], opt[Value]) if not utilities.member(triple, work): work.append(triple) return work def separate_option_triples_by_case(triples): # upper = lower = [] # WRONG!! MAKES THEM THE SAME LIST!! upper = [] lower = [] for (type,name,value) in triples: if name[0].isupper(): upper.append((type,name,value)) else: lower.append((type,name,value)) return (lower, upper) def option_triples_contains_name(triples, name): for (_,n,_) in triples: if name == n: return True return False def option_triples_to_string(triples): s = '' for (type,name,value) in triples: if type == 'flag': if value: s += ' set(%s).\n' % name else: s += ' clear(%s).\n' % name elif type == 'parm': s += ' assign(%s, %d).\n' % (name,value) elif type == 'stringparm': s += ' assign(%s, %s).\n' % (name,value) return s def print_sharing(opt): print ' option: %d %s %s' % (opt[Id], opt[Name], str(opt[Value])) for o in opt[Share]: print ' %d %s' % (o[Id], o[Name]) def update_label(opt): label = wx.FindWindowById(opt[Label_id]) if opt[Value] == opt[Default]: label.SetForegroundColour('BLACK') label.Refresh() else: label.SetForegroundColour('RED') label.Refresh() def update_option(opt, value): opt[Value] = value update_label(opt) x = wx.FindWindowById(opt[Id]) if opt[Type] in ['flag', 'parm']: x.SetValue(value) elif opt[Type] == 'stringparm': x.SetStringSelection(value) def update_shared(opt): for shared_opt in opt[Share]: if shared_opt != opt: update_option(shared_opt, opt[Value]) def link_options(opt1, opt2): if opt1 in opt2[Share] or opt2 in opt1[Share]: error_dialog('link_options, already linked?') else: shared = opt1[Share] + opt2[Share] for opt in shared: opt[Share] = shared def link_options_by_names(options1, options2, names): for name in names: opt1 = options1.name_to_opt(name) opt2 = options2.name_to_opt(name) if opt1 and opt2: link_options(opt1, opt2) # print 'Link:'; print_sharing(opt1) # print ' '; print_sharing(opt2) else: error_dialog('link_options_by_names: not found') class Options_panel(wx.Panel): def __init__(self, parent, title, logo_bitmap, options): self.options = options wx.Panel.__init__(self, parent) if logo_bitmap: heading = wx.StaticBitmap(self, -1, logo_bitmap) else: heading = wx.StaticText(self, -1, title) # title.replace(' ', '_')) font = wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT) font.SetPointSize(font.GetPointSize()+2) font.SetWeight(wx.FONTWEIGHT_BOLD) heading.SetFont(font) reset_btn = wx.Button(self, -1, 'Reset These to Defaults') self.Bind(wx.EVT_BUTTON, self.on_reset, reset_btn) groups = [] for opt in self.options: if opt[Type] in ['flag', 'parm', 'stringparm']: if groups == []: # in case the options are not divided into groups box = wx.StaticBox(self, -1, '') g_sizer = wx.GridBagSizer(5, 5) groups.append((box, g_sizer, 'left')) row = 0 id = wx.NewId() label_id = wx.NewId() opt[Id] = id opt[Label_id] = label_id opt[Value] = opt[Default] opt[Share] = [opt] # note: this creates a cyclic structure label = wx.StaticText(self, label_id, opt[Name] + ':') if opt[Type] == 'flag': x = wx.CheckBox(self, id, '') self.Bind(wx.EVT_CHECKBOX, self.on_change, x) x.SetValue(opt[Default]) tip = opt[Tip] elif opt[Type] == 'parm': (min, max) = opt[Range] x = wx.SpinCtrl(self,id,min=min,max=max,size=(75,-1)) self.Bind(wx.EVT_SPINCTRL, self.on_change, x) x.SetValue(opt[Default]) tip = ('%s Range is [%d ... %d].' % (opt[Tip], min, max)) else: # stringparmparm x = wx.Choice(self, id, choices=opt[Range]) self.Bind(wx.EVT_CHOICE, self.on_change, x) x.SetStringSelection(opt[Default]) tip = opt[Tip] label.SetToolTipString(tip) x.SetToolTipString(tip) g_sizer.Add(label, (row,0), (1,1), wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL) g_sizer.Add(x, (row,1), (1,1), wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL) row += 1 elif opt[Type] == 'group': box = wx.StaticBox(self, -1, opt[Name]) g_sizer = wx.GridBagSizer(5, 5) groups.append((box, g_sizer, opt[Column])) row = 0 else: # dividers? space? pass sizer = wx.BoxSizer(wx.VERTICAL) opt_sizer = wx.BoxSizer(wx.HORIZONTAL) left_sizer = wx.BoxSizer(wx.VERTICAL) right_sizer = wx.BoxSizer(wx.VERTICAL) right_column_populated = False for (box, g_sizer, column) in groups: box_sizer = wx.StaticBoxSizer(box, wx.VERTICAL) box_sizer.Add(g_sizer, 0, wx.ALL|wx.ALIGN_CENTER, 5) if column == 'left': left_sizer.Add(box_sizer, 0, wx.ALL|wx.GROW, 5) else: right_sizer.Add(box_sizer, 0, wx.ALL|wx.GROW, 5) right_column_populated = True opt_sizer.Add(left_sizer, 0, wx.ALL, 0) if right_column_populated: opt_sizer.Add(right_sizer, 0, wx.ALL, 0) sizer.Add(heading, 0, wx.ALIGN_CENTER, 5) sizer.Add(opt_sizer, 0, wx.ALIGN_CENTER, 5) sizer.Add(reset_btn, 0, wx.ALIGN_CENTER, 5) self.SetSizer(sizer) def on_change(self, evt): opt = id_to_option(evt.GetId(), self.options) x = evt.GetEventObject() if opt[Type] in ['flag', 'parm']: opt[Value] = x.GetValue() elif opt[Type] == 'stringparm': opt[Value] = x.GetStringSelection() update_label(opt) update_shared(opt) def on_reset(self, evt): for opt in self.options: if (opt[Type] in ['flag', 'parm', 'stringparm'] and opt[Value] != opt[Default]): update_option(opt, opt[Default]) update_shared(opt) # END class Options_panel(Panel) class M4_options: options = [ [None, None, None, 'group', 'Basic Options', 'left'], [None, None, None, 'parm', 'domain_size', None, 2, [2,sys.maxint], 'Initial domain size.'], [None, None, None, 'parm', 'iterate_up_to', None, 10, [-1,sys.maxint], 'Final domain size.'], [None, None, None, 'parm', 'increment', None, 1, [1,sys.maxint], 'Increment for next domain size (when final > initial).'], [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, 'parm', 'max_seconds', None, 60, [-1,sys.maxint], 'Overall time limit.'], [None, None, None, 'parm', 'max_seconds_per', None, -1, [-1,sys.maxint], 'Time limit for each domain size.'], [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, 'group', 'Output Options', 'left'], # [None, None, None, 'flag', 'print_models', None, 1, None, 'Print models in standard form (for input to other LADR programs).'], # [None, None, None, 'flag', 'print_models_tabular', None, 0, None, 'Print models in a tabular form.'], # [None, None, None, 'flag', 'verbose', None, 0, None, 'Show more in the output file.'], # [None, None, None, 'flag', 'trace', None, 0, None, 'USE THIS ONLY ON VERY SMALL SEARCHES!!'], [None, None, None, 'group', 'Other Options', 'left'], [None, None, None, 'flag', 'integer_ring', None, 0, None, 'Impose a ring structure (see sample input Ring-19.in).'], [None, None, None, 'flag', 'iterate_primes', None, 0, None, 'Search structures of prime size only.'], [None, None, None, 'flag', 'skolems_last', None, 0, None, 'Decide Skolem symbols last.'], [None, None, None, 'parm', 'max_megs', None, 200, [-1,sys.maxint], 'Memory limit for Mace4 process (approximate).'], [None, None, None, 'flag', 'print_models', None, 1, None, 'Output models that are found.'], [None, None, None, 'stringparm', 'Model_Format', None, 'standard2', ['standard', 'standard2', 'portable', 'tabular', 'xml', 'raw', 'cooked', 'tex'], 'Format for models/counterexamples. This option is different from the others in that it is used by the postprocessor "interpformat" rather than by Mace4. This option is not given to Mace4 and is therefore not saved by "File->Save".'], [None, None, None, 'group', 'Experimental Options', 'right'], [None, None, None, 'flag', 'lnh', None, 1, None, 'Least Number Optimization.'], [None, None, None, 'flag', 'negprop', None, 1, None, 'Apply negative propagation.'], [None, None, None, 'flag', 'neg_assign', None, 1, None, 'Negative propagation is triggered by assignments.'], [None, None, None, 'flag', 'neg_assign_near', None, 1, None, 'Negative propagation is triggered by near-assignments.'], [None, None, None, 'flag', 'neg_elim', None, 1, None, 'Negative propagation is triggered by eliminations.'], [None, None, None, 'flag', 'neg_elim_near', None, 1, None, 'Negative propagation is triggered by near-eliminations.'], [None, None, None, 'parm', 'selection_order', None, 2, [0,2], '0: all, 1: concentric, 2: concentric-band.'], [None, None, None, 'parm', 'selection_measure', None, 4, [0,4], '0: first, 1: most occurrences, 2: most propagations, 3: most contradictions, 4: fewest values.'], ] def __init__(self, parent, logo_bitmap): self.panel = wx.Panel(parent) self.options_panel = Options_panel(self.panel, 'Mace4 Options', logo_bitmap, self.options) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add((0,0), 1) sizer.Add(self.options_panel, 0, wx.ALIGN_CENTER, 0) sizer.Add((0,0), 3) self.panel.SetSizer(sizer) def nondefaults(self): triples = nondefault_options(self.options, []) # always include max_seconds, because GUI default != program default. for name in ['max_seconds']: if not option_triples_contains_name(triples, name): opt = self.name_to_opt(name) if opt: triples.append((opt[Type],opt[Name],opt[Value])) return triples def name_to_opt(self, name): return name_to_option(name, self.options) def share_external_option(self, external_opt): local_opt = self.name_to_opt(external_opt[Name]) if not local_opt: error_dialog('share_external_option(M4), not found') else: link_options(local_opt, external_opt) # print 'External(M4):'; print_sharing(local_opt) # print ' '; print_sharing(external_opt) def reset(self): self.options_panel.on_reset(None) def output_transformed(self): sys.stdout.write(' options = ') output_trans(self.options) sys.stdout.write('\n\n') def output_trans(options): print ' [' for opt in options: if opt[Type] == "group": print "\n [None, None, None, '%s', '%s', '%s']," % (opt[Type], opt[Name], opt[Column]) elif opt[Type] == "flag": print " [None, None, None, '%s', '%s', None, %d, None, '%s']," % (opt[Type], opt[Name], opt[Default], opt[Tip]) elif opt[Type] == "parm": print " [None, None, None, '%s', '%s', None, %d, [%d,%d], '%s']," % (opt[Type], opt[Name], opt[Default], opt[Min], opt[Max], opt[Tip]) elif opt[Type] == "stringparm": print " [None, None, None, '%s', '%s', None, '%s', %s, '%s']," % (opt[Type], opt[Name], opt[Default], opt[Range], opt[Tip]) sys.stdout.write(" ]") # end class M4_options class P9_options: option_sets = [ ('Basic Options', [ [None, None, None, 'parm', 'max_weight', None, 100, [-sys.maxint,sys.maxint], 'Discard inferred clauses with weight greater than this.'], [None, None, None, 'parm', 'pick_given_ratio', None, 0, [0,sys.maxint], 'Selection by (Weight : Age) ratio (except for hints).'], [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, '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, '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, 'flag', 'restrict_denials', None, 0, None, 'This flag applies only to Horn sets. It restricts the application of inference rules when negative clauses are involved, with the goal of producing more direct (forward) proofs.'], [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, '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, 'stringparm', 'Proof_Format', None, 'standard', ['standard', 'parents_only', 'xml', 'hints', 'ivy'], 'Format for proofs. This option is different from the others in that it is used by the postprocessor "prooftrans" rather than by Prover9. This option is not given to Prover9 and is therefore not saved by "File->Save".'], ]), ('Meta Options', [ [None, None, None, 'flag', 'auto', None, 1, None, 'Automatic Mode. This flag simply sets or clears the following 4 flags.'], [None, None, None, 'flag', 'auto_limits', None, 1, None, 'Search limits.'], [None, None, None, 'flag', 'auto_denials', None, 1, None, 'Automatic handling of denials (negative clauses in Horn sets).'], [None, None, None, 'flag', 'auto_inference', None, 1, None, 'Automatic selection of inference rules, based on the input.'], [None, None, None, 'flag', 'auto_process', None, 1, None, 'Processing of inferred clauses.'], [None, None, None, 'flag', 'auto2', None, 0, None, 'Experimental automatic mode.'], ]), ('Term Ordering', [ [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, '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, 'flag', 'inverse_order', None, 1, None, 'Adjustment of term ordering, based on occurrences of inverse axioms in the input.'], ]), ('Limits', [ [None, None, None, 'group', 'Search Limits', 'left'], [None, None, None, 'parm', 'max_given', None, -1, [-1,sys.maxint], 'Stop the search at this number of given clauses.'], [None, None, None, 'parm', 'max_kept', None, -1, [-1,sys.maxint], 'Stop the search at this number of kept clauses.'], [None, None, None, 'parm', 'max_proofs', None, 1, [-1,sys.maxint], 'Stop the search at this number of proofs.'], [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, 'parm', 'max_seconds', None, 60, [-1,sys.maxint], 'Stop the search at this number of seconds (CPU, not wall clock).'], [None, None, None, 'parm', 'max_minutes', None, -1, [-1,sys.maxint], ''], [None, None, None, 'parm', 'max_hours', None, -1, [-1,sys.maxint], ''], [None, None, None, 'parm', 'max_days', None, -1, [-1,sys.maxint], ''], [None, None, None, 'group', 'Limits on Kept Clauses', 'right'], [None, None, None, 'parm', 'max_weight', None, 100, [-sys.maxint,sys.maxint], 'Discard inferred clauses with weight greater than this.'], [None, None, None, 'parm', 'max_depth', None, -1, [-1,sys.maxint], 'Discard inferred clauses with depth greater than this.'], [None, None, None, 'parm', 'max_literals', None, -1, [-1,sys.maxint], 'Discard inferred clauses with more literals than this.'], [None, None, None, 'parm', 'max_vars', None, -1, [-1,sys.maxint], 'Discard inferred clauses with more variables than this.'], [None, None, None, 'group', 'Sos Control', 'right'], [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, 'parm', 'min_sos_limit', None, 0, [0,sys.maxint], 'Unused'], # [None, None, None, 'parm', 'lrs_interval', None, 50, [1,sys.maxint], 'Limited resource heuristic: '], # [None, None, None, 'parm', 'lrs_ticks', None, -1, [-1,sys.maxint], 'Limited resource heuristic: '], ]), ('Search Prep', [ [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, 'flag', 'dont_flip_input', None, 0, None, 'Do not flip input equalities, even if they violate the term ordering. Using this flag can cause nontermination of rewriting. It is usually better to adjust the term ordering instead.'], [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, 'flag', 'sort_initial_sos', None, 0, None, 'Sort the initial assumptions. The order is largely arbitrary.'], [None, None, None, 'flag', 'predicate_elim', None, 1, None, 'Try to eliminate predicate (relation) symbols before the search starts.'], # [None, None, None, 'parm', 'fold_denial_max', None, 0, [-1,sys.maxint], ''], ]), ('Goals/Denials', [ [None, None, None, 'flag', 'restrict_denials', None, 0, None, 'This flag applies only to Horn sets. It restricts the application of inference rules when negative clauses are involved, with the goal of producing more direct (forward) proofs.'], [None, None, None, 'flag', 'reuse_denials', None, 0, None, 'This flag allows multiple proofs of goals. (Applies to Horn sets only.'], ]), ('Select Given', [ [None, None, None, 'group', 'Selection Ratio', 'left'], [None, None, None, 'parm', 'hints_part', None, sys.maxint, [0,sys.maxint], 'Component for clauses that match hint.'], [None, None, None, 'parm', 'age_part', None, 1, [0,sys.maxint], 'Component for the oldest clauses.'], [None, None, None, 'parm', 'weight_part', None, 0, [0,sys.maxint], 'Component for the lightest clauses.'], [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, 'parm', 'true_part', None, 4, [0,sys.maxint], 'Component for the lightest true (w.r.t. an interpretation) clauses.'], [None, None, None, 'parm', 'random_part', None, 0, [0,sys.maxint], 'Component for random clauses.'], [None, None, None, 'group', 'Meta Options', 'right'], [None, None, None, 'parm', 'pick_given_ratio', None, 0, [0,sys.maxint], 'Selection by (Weight : Age) ratio (except for hints).'], [None, None, None, 'flag', 'breadth_first', None, 0, None, 'Selection by age only (except for hints).'], [None, None, None, 'flag', 'lightest_first', None, 0, None, 'Selection by weight only (except for hints).'], [None, None, None, 'flag', 'random_given', None, 0, None, 'Random selection (except for hints).'], # [None, None, None, 'flag', 'default_parts', None, 1, None, ''], [None, None, None, 'group', 'Others', 'right'], [None, None, None, 'flag', 'input_sos_first', None, 1, None, 'Before starting with selection ratio, select input clauses.'], [None, None, None, 'flag', 'breadth_first_hints', None, 0, None, 'For hints component, select by age rather than by weight.'], [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).'], ]), ('Inference Rules', [ [None, None, None, 'group', 'Ordinary Rules', 'left'], [None, None, None, 'flag', 'binary_resolution', None, 0, None, 'Binary resolution (not necessarily positive).'], [None, None, None, 'flag', 'neg_binary_resolution', None, 0, None, 'Negative binary resolution.'], [None, None, None, 'flag', 'hyper_resolution', None, 0, None, 'Synonym for pos_hyperresolution.'], [None, None, None, 'flag', 'pos_hyper_resolution', None, 0, None, 'Positive hyperresolution.'], [None, None, None, 'flag', 'neg_hyper_resolution', None, 0, None, 'Negative hyperresolution.'], [None, None, None, 'flag', 'ur_resolution', None, 0, None, 'Unit resulting resolution.'], [None, None, None, 'flag', 'pos_ur_resolution', None, 0, None, 'Positive-unit resulting resolution.'], [None, None, None, 'flag', 'neg_ur_resolution', None, 0, None, 'Negative-unit resulting resolution.'], [None, None, None, 'flag', 'paramodulation', None, 0, None, 'The inference rule for equality.'], [None, None, None, 'group', 'Other Rules', 'left'], [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, 'flag', 'factor', None, 0, None, ''], [None, None, None, 'group', 'General Restrictions', 'right'], [None, None, None, 'stringparm', 'literal_selection', None, 'max_negative', ['max_negative', 'all_negative', 'none'], 'Method for determining which literals in a multi-literal clause are eligible for resolution or paramodulation.'], [None, None, None, 'flag', 'positive_inference', None, 0, None, 'Resolution and Paramodulation are restricted so that one of the parents is a positive clause.'], [None, None, None, 'group', 'Resolution Restrictions', 'right'], [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, 'flag', 'check_res_instances', None, 0, None, 'The maximality checks are done after the application of the unifier for the inference.'], [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, '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, 'group', 'Paramodulation Restrictions', 'right'], [None, None, None, 'flag', 'ordered_para', None, 1, None, 'For paramodulation inferences, one or both parents must be maximal in the clause.'], [None, None, None, 'flag', 'check_para_instances', None, 0, None, 'The maximality checks are done after the application of the unifier for the inference.'], [None, None, None, 'flag', 'para_from_vars', None, 1, None, 'Paramodulation is allowed from variables (not allowing can block all proofs)..'], [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, 'flag', 'basic_paramodulation', None, 0, 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).'], ]), ('Rewriting', [ [None, None, None, 'group', 'Term Rewriting Limits', 'left'], [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, '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, 'group', 'Lex-Dependent Rewriting', 'right'], [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, '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, '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, '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, 'group', 'Others', 'left'], [None, None, None, 'flag', 'back_demod', None, 0, None, 'Use newly derived equations to rewrite old clauses.'], [None, None, None, 'flag', 'unit_deletion', None, 0, None, 'Remove literals from newly derived clauses with old unit clauses.'], [None, None, None, 'flag', 'back_unit_deletion', None, 0, None, 'Use newly derived unit clauses to remove literals from old clauses.'], [None, None, None, 'flag', 'cac_redundancy', None, 1, None, 'Eliminate some redundancy when there are commutative or associative-commutative operations.'], ]), ('Weighting', [ [None, None, None, 'group', 'Symbol Weights', 'left'], [None, None, None, 'parm', 'variable_weight', None, 1, [-sys.maxint,sys.maxint], 'Weight of variables .'], [None, None, None, 'parm', 'constant_weight', None, 1, [-sys.maxint,sys.maxint], 'Default weight of constants.'], [None, None, None, 'parm', 'not_weight', None, 0, [-sys.maxint,sys.maxint], 'Weight of the negation symbol.'], [None, None, None, 'parm', 'or_weight', None, 0, [-sys.maxint,sys.maxint], 'Weight of the disjunction symbol.'], [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, 'parm', 'prop_atom_weight', None, 1, [-sys.maxint,sys.maxint], 'Weight of propositional atoms.'], [None, None, None, 'group', 'Penalties', 'right'], [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, '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, '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, '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, 'group', 'Others', 'right'], [None, None, None, 'parm', 'default_weight', None, sys.maxint, [-sys.maxint,sys.maxint], ''], ]), ('Process Inferred', [ [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, 'flag', 'back_subsume', None, 1, None, 'When a newly-derived clause C is kept, discard all old clauses that are subsumed by C.'], ]), ('Input/Output', [ # [None, None, None, 'flag', 'echo_input', None, 1, None, ''], # [None, None, None, 'flag', 'bell', None, 1, None, ''], # [None, None, None, 'flag', 'quiet', None, 0, None, ''], [None, None, None, 'flag', 'print_initial_clauses', None, 1, None, 'Show clauses after preprocessing, before the start of the search.'], [None, None, None, 'flag', 'print_given', None, 1, None, 'Print clauses when they are selected as given clauses. These clauses say a lot about the progress of the search.'], [None, None, None, 'flag', 'print_gen', None, 0, None, 'Print all newly-derived clauses. This flag can cause an enormous amount of output for nontrivial searches.'], [None, None, None, 'flag', 'print_kept', None, 0, None, 'Print newly-derived clauses if they pass the retention tests.'], [None, None, None, 'flag', 'print_labeled', None, 0, None, 'Print newly-kept clauses that have labels.'], [None, None, None, 'flag', 'print_proofs', None, 1, None, 'Print all proofs that are found.'], # [None, None, None, 'flag', 'default_output', None, 1, 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, 'stringparm', 'stats', None, 'lots', ['none', 'some', 'lots', 'all'], 'How many statistics should be printed at the end of the perch and in "reports".'], [None, None, None, 'parm', 'report', None, -1, [-1,sys.maxint], 'Output a statistics report every n seconds.'], # [None, None, None, 'parm', 'report_stderr', None, -1, [-1,sys.maxint], ''], [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, 'stringparm', 'Proof_Format', None, 'standard', ['standard', 'parents_only', 'xml', 'hints', 'ivy'], 'Format for proofs. This option is different from the others in that it is used by the postprocessor "prooftrans" rather than by Prover9. This option is not given to Prover9 and is therefore not saved by "File->Save".'], ]), ('Hints', [ [None, None, None, 'flag', 'limit_hint_matchers', None, 0, None, 'Apply the parameters max_weight, max_vars, max_depth, and max_literals to clauses that match hints (as well as to those that do not match hints).'], [None, None, None, 'flag', 'collect_hint_labels', None, 0, None, 'When equivalent hints are input, only the first is kept. This flag causes any labels on the discarded hints to be appended to the retained hint.'], [None, None, None, 'flag', 'degrade_hints', None, 1, None, 'The more times a hint is matched, the less its effect becomes.'], [None, None, None, 'flag', 'back_demod_hints', None, 1, None, 'This flag causes hints, as well as ordinary clauses, to be rewritten by newly-derived equations.'], ]), ('Other Options', [ [None, None, None, 'parm', 'random_seed', None, 0, [-1,sys.maxint], 'Seed for random number generation.'], ]), ] def output_transformed(self): print ' options_sets = [' for (name,options) in self.option_sets: print "\n ('%s', " % name output_trans(options) print ")," print " ]" def __init__(self, parent): """ Use the option_set table to build adictionary, indexed by set name, of (hidden) options panels. """ panels = {} for (name,options) in self.option_sets: panels[name] = Options_panel(parent, name, None, options) panels[name].Show(False) # start out hidden # find and mark the shared options for (_,options1) in self.option_sets: for opt1 in options1: if opt1[Type] in ['flag', 'parm', 'stringparm']: for (_,options2) in self.option_sets: for opt2 in options2: if (opt1[Type] == opt2[Type] and opt1[Name] == opt2[Name] and not opt1 in opt2[Share]): link_options(opt1, opt2) # print 'Share:'; print_sharing(opt1) # print ' '; print_sharing(opt2) self.panels = panels def optionset_names(self): result = [] for (name,_) in self.option_sets: result.append(name) return result def nondefaults(self): triples = [] # order: 1,2,3,...,0 (because "basic" should be last) for (_,options) in self.option_sets[1:]: triples = nondefault_options(options, triples) triples = nondefault_options(self.option_sets[0][1], triples) # always include max_seconds, because GUI default is not program default if not option_triples_contains_name(triples, 'max_seconds'): opt = self.name_to_opt('max_seconds') if opt: triples.append((opt[Type],opt[Name],opt[Value])) return triples def name_to_opt(self, name): for (_,options) in self.option_sets: opt = name_to_option(name, options) if opt: return opt return None def share_external_option(self, external_opt): local_opt = self.name_to_opt(external_opt[Name]) if not local_opt: error_dialog('share_external_option(P4), not found') else: link_options(local_opt, external_opt) # print 'External(P9):'; print_sharing(local_opt) # print ' '; print_sharing(external_opt) def reset(self): for key in self.panels.keys(): self.panels[key].on_reset(None) # end class P9_options def set_options(opt_str, opt_class): not_handled = '' pat_flag = '(set|clear)\s*\(\s*([a-z0-9_]+)\s*\)' # without period r_flag = re.compile(pat_flag) pat_parm = 'assign\s*\(\s*([a-z0-9_]+)\s*,\s*([a-z0-9_-]+)\s*\)' # without period r_parm = re.compile(pat_parm) opts = opt_str.split('.')[:-1] # no option after last period for command in opts: m = r_flag.match(command) if m: (op,name) = m.groups() opt = opt_class.name_to_opt(name) if opt and opt[Type] == 'flag': update_option(opt, op == 'set') update_shared(opt) else: not_handled += command + '.\n' else: m = r_parm.match(command) if m: (name,string_val) = m.groups() try: value = int(string_val) opt_type = 'parm' except: value = string_val opt_type = 'stringparm' opt = opt_class.name_to_opt(name) if opt and opt[Type] == opt_type: update_option(opt, value) update_shared(opt) else: not_handled += command + '.\n' else: not_handled += command + '.\n' return not_handled def opt_intersect(s1, s2): t1 = s1.split('.\n') t2 = s2.split('.\n') y = utilities.intersect(t1, t2) return '.\n'.join(y) def set_options_either(opt_str, class1, class2): x1 = set_options(opt_str, class1) x2 = set_options(opt_str, class2) # (x1 intersect x2) was handled by neither return opt_intersect(x1,x2) p9m4-0.5.dfsg/bin-win32/0000755000175000017500000000000010730315252013231 5ustar bzedbzedp9m4-0.5.dfsg/options.py0000644000175000017500000014243210730114150013566 0ustar bzedbzed# Copyright (C) 2007 William McCune # # This file is part of the LADR Deduction Library. # # The LADR Deduction Library 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 2 of the # License, or (at your option) any later version. # # 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. # # system imports import os, sys, types import re import wx # local imports import utilities from wx_utilities import * # Types of Option record: Flag = 0 # Boolean value Parm = 1 # integer value Stringparm = 2 # string value Group = 3 # special case for layout only # Indexes into option records (Flag, Parm, Stringparm, unless noted otherwise): Id = 0 Label_id = 1 Share = 2 Depend = 3 Type = 4 # for all records Name = 5 # for all records Value = 6 Default = 7 Range = 8 # ignored for Flag Tip = 9 Column = 6 # only for Group # Option records: # # [id, label_id, share, depend, type, name, value, default, range, tooltip] # [None, None, None, Group, group_name, column] def id_to_option(id, options): "Given an option id, return the record." for opt in options: if opt[Type] in [Flag, Parm, Stringparm] and opt[Id] == id: return opt return None def name_to_option(name, options): "Given an option name, return the record." for opt in options: if opt[Type] in [Flag, Parm, Stringparm] and opt[Name] == name: return opt return None def nondefault_options(options, work): """Collect the options with nondefault values. A list of triples is returned: (type, name, value). We pass in a partially constructed list so that we can prevent duplicates.""" for opt in options: if (opt[Type] in [Flag, Parm, Stringparm] and opt[Value] != opt[Default]): triple = (opt[Type], opt[Name], opt[Value]) if not utilities.member(triple, work): work.append(triple) return work def option_triples_contains_name(triples, name): for (_,n,_) in triples: if name == n: return True return False def option_triples_to_string(triples): "Return a string that can be given to a LADR program (e.g., Prover9)." s = '' for (type,name,value) in triples: if type == Flag: if value: s += ' set(%s).\n' % name else: s += ' clear(%s).\n' % name elif type == Parm: s += ' assign(%s, %d).\n' % (name,value) elif type == Stringparm: s += ' assign(%s, %s).\n' % (name,value) return s def print_sharing(opt): "For debugging." print ' option: %d %s %s' % (opt[Id], opt[Name], str(opt[Value])) for o in opt[Share]: print ' %d %s' % (o[Id], o[Name]) def update_label(opt): "Given an option, set the color of its label." label = wx.FindWindowById(opt[Label_id]) if opt[Value] == opt[Default]: if len(opt[Depend]) > 0: label.SetForegroundColour('BLUE') else: label.SetForegroundColour('BLACK') label.Refresh() else: label.SetForegroundColour('RED') label.Refresh() def update_option(opt, value): """Update the value of an option: (1) option record, (2) option label, (3) the widget. """ opt[Value] = value update_label(opt) x = wx.FindWindowById(opt[Id]) if opt[Type] in [Flag, Parm]: x.SetValue(value) elif opt[Type] == Stringparm: x.SetStringSelection(value) def update_shared(opt): "Given an option record, update all of the other occurrences." for shared_opt in opt[Share]: if shared_opt != opt: update_option(shared_opt, opt[Value]) def update_dependent(opt): "Given an option record, update all of the dependent options." for (v1,dep_opt,v2) in opt[Depend]: if (v1 == opt[Value] or v1 == 'any' or (v1 == '>=0' and opt[Value] >= 0) or (v1 == '>0' and opt[Value] > 0)): if type(v2) == types.TupleType: (op, x) = v2 if op == 'multiply': update_option(dep_opt, opt[Value] * x) elif opt == 'add': update_option(dep_opt, opt[Value] + x) else: update_option(dep_opt, v2) update_shared(dep_opt) update_dependent(dep_opt) def link_options(opt1, opt2): """Given two option records, link them so that if one is uptdated, the other is updated in the same way. The options must have the same type. They can have different names, but that might be a bad idea.""" if opt1 in opt2[Share] or opt2 in opt1[Share]: error_dialog('link_options, already linked?') elif opt1[Type] != opt2[Type]: error_dialog('link_options, different types') else: shared = opt1[Share] + opt2[Share] for opt in shared: opt[Share] = shared def link_options_by_names(options1, options2, names): for name in names: opt1 = options1.name_to_opt(name) opt2 = options2.name_to_opt(name) if opt1 and opt2: link_options(opt1, opt2) else: error_dialog('link_options_by_names: not found') class Options_panel(wx.Panel): def __init__(self, parent, title, logo_bitmap, options): self.options = options wx.Panel.__init__(self, parent) if logo_bitmap: heading = wx.StaticBitmap(self, -1, logo_bitmap) else: heading = wx.StaticText(self, -1, title) # title.replace(' ', '_')) font = wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT) font.SetPointSize(font.GetPointSize()+2) font.SetWeight(wx.FONTWEIGHT_BOLD) heading.SetFont(font) reset_btn = wx.Button(self, -1, 'Reset These to Defaults') self.Bind(wx.EVT_BUTTON, self.on_reset, reset_btn) groups = [] for opt in self.options: if opt[Type] in [Flag, Parm, Stringparm]: if groups == []: # in case the options are not divided into groups box = wx.StaticBox(self, -1, '') g_sizer = wx.GridBagSizer(5, 5) groups.append((box, g_sizer, 'left')) row = 0 id = wx.NewId() label_id = wx.NewId() opt[Id] = id opt[Label_id] = label_id opt[Value] = opt[Default] opt[Share] = [opt] # note: this creates a cyclic structure opt[Depend] = [] label = wx.StaticText(self, label_id, opt[Name] + ':') if opt[Type] == Flag: x = wx.CheckBox(self, id, '') self.Bind(wx.EVT_CHECKBOX, self.on_change, x) x.SetValue(opt[Default]) tip = opt[Tip] elif opt[Type] == Parm: (min, max) = opt[Range] x = wx.SpinCtrl(self,id,min=min,max=max,size=(75,-1)) self.Bind(wx.EVT_SPINCTRL, self.on_change, x) x.SetValue(opt[Default]) tip = ('%s Range is [%d ... %d].' % (opt[Tip], min, max)) else: # stringparm x = wx.Choice(self, id, choices=opt[Range]) self.Bind(wx.EVT_CHOICE, self.on_change, x) x.SetStringSelection(opt[Default]) tip = opt[Tip] label.SetToolTipString(tip) if GTK(): # Tooltips on labels don't work in GTK. # Large tooltips on widgets obscure choices in Mac. x.SetToolTipString(tip) g_sizer.Add(label, (row,0), (1,1), wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL) g_sizer.Add(x, (row,1), (1,1), wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL) row += 1 elif opt[Type] == Group: box = wx.StaticBox(self, -1, opt[Name]) g_sizer = wx.GridBagSizer(5, 5) groups.append((box, g_sizer, opt[Column])) row = 0 else: # dividers? space? pass sizer = wx.BoxSizer(wx.VERTICAL) opt_sizer = wx.BoxSizer(wx.HORIZONTAL) left_sizer = wx.BoxSizer(wx.VERTICAL) right_sizer = wx.BoxSizer(wx.VERTICAL) right_column_populated = False for (box, g_sizer, column) in groups: box_sizer = wx.StaticBoxSizer(box, wx.VERTICAL) box_sizer.Add(g_sizer, 0, wx.ALL|wx.ALIGN_CENTER, 5) if column == 'left': left_sizer.Add(box_sizer, 0, wx.ALL|wx.GROW, 5) else: right_sizer.Add(box_sizer, 0, wx.ALL|wx.GROW, 5) right_column_populated = True opt_sizer.Add(left_sizer, 0, wx.ALL, 0) if right_column_populated: opt_sizer.Add(right_sizer, 0, wx.ALL, 0) sizer.Add(heading, 0, wx.ALIGN_CENTER, 5) sizer.Add(opt_sizer, 0, wx.ALIGN_CENTER, 5) sizer.Add(reset_btn, 0, wx.ALIGN_CENTER, 5) self.SetSizer(sizer) def on_change(self, evt): opt = id_to_option(evt.GetId(), self.options) x = evt.GetEventObject() if opt[Type] in [Flag, Parm]: opt[Value] = x.GetValue() elif opt[Type] == Stringparm: opt[Value] = x.GetStringSelection() update_label(opt) update_shared(opt) update_dependent(opt) def on_reset(self, evt): for opt in self.options: if (opt[Type] in [Flag, Parm, Stringparm] and opt[Value] != opt[Default]): update_option(opt, opt[Default]) update_shared(opt) # END class Options_panel(Panel) class M4_options: # Nonstandard Mace4 Options: # prolog_style_variables: shared with language tab and Prover9. # max_seconds: shared with Mace4 run panel (not with Prover9 run panel). # : different default, so always used. # domain_size: partly meta. # ignore_option_dependencies: "mandatory" option (always used). # # Omitted options: # print_models_tabular, verbose, trace, iterate_up_to # report_stderr, ignore_option_dependencies 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, 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, 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'], # [None, None, None, None, Flag, 'print_models', None, 1, None, 'Print models in standard form (for input to other LADR programs).'], # [None, None, None, None, Flag, 'print_models_tabular', None, 0, None, 'Print models in a tabular form.'], # [None, None, None, None, Flag, 'verbose', None, 0, None, 'Show more in the output file.'], # [None, None, None, None, Flag, 'trace', None, 0, None, 'USE THIS ONLY ON VERY SMALL SEARCHES!!'], [None, None, None, None, Group, 'Other Options', 'left'], [None, None, None, None, Flag, 'integer_ring', None, 0, None, 'Impose a ring structure (see sample input Ring-19.in).'], # [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, Flag, 'print_models', None, 1, None, 'Output models that are found.'], [None, None, None, None, Group, 'Experimental Options', 'right'], [None, None, None, None, Flag, 'lnh', None, 1, None, 'Least Number Optimization.'], [None, None, None, None, Flag, 'negprop', None, 1, None, 'Apply negative propagation.'], [None, None, None, None, Flag, 'neg_assign', None, 1, None, 'Negative propagation is triggered by assignments.'], [None, None, None, None, Flag, 'neg_assign_near', None, 1, None, 'Negative propagation is triggered by near-assignments.'], [None, None, None, None, Flag, 'neg_elim', None, 1, None, 'Negative propagation is triggered by eliminations.'], [None, None, None, None, Flag, 'neg_elim_near', None, 1, None, 'Negative propagation is triggered by near-eliminations.'], [None, None, None, None, Parm, 'selection_order', None, 2, [0,2], '0: all, 1: concentric, 2: concentric-band.'], [None, None, None, None, Parm, 'selection_measure', None, 4, [0,4], '0: first, 1: most occurrences, 2: most propagations, 3: most contradictions, 4: fewest values.'], ] dependencies = [ # (('print_models_tabular', True), ('print_models', False)), # (('print_models', True), ('print_models_tabular', False)), # (('iterate_primes', True), ('iterate_nonprimes', False)), # (('iterate_primes', True), ('iterate', 'primes')), # (('iterate_nonprimes', True), ('iterate_primes', False)), # (('iterate_nonprimes', True), ('iterate', 'nonprimes')), (('domain_size', 'any'), ('start_size', ('multiply', 1))), (('domain_size', 'any'), ('end_size', ('multiply', 1))), # (('iterate_up_to', 'any'), ('end_size', ('multiply', 1))), ] def __init__(self, parent, logo_bitmap): self.panel = wx.Panel(parent) self.options_panel = Options_panel(self.panel, 'Mace4 Options', logo_bitmap, self.options) # mark dependencies for ((n1,v1),(n2,v2)) in self.dependencies: o1 = self.name_to_opt(n1) o2 = self.name_to_opt(n2) if not o1: error_dialog('Mace4 option %s not found' % n1) elif not o2: error_dialog('Mace4 option %s not found' % n2) else: o1[Depend].append((v1, o2, v2)) update_label(o1) # layout sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add((0,0), 1) sizer.Add(self.options_panel, 0, wx.ALIGN_CENTER, 0) sizer.Add((0,0), 3) self.panel.SetSizer(sizer) def nondefaults(self): triples = nondefault_options(self.options, []) # always include max_seconds, because GUI default != program default. for name in ['max_seconds']: if not option_triples_contains_name(triples, name): opt = self.name_to_opt(name) if opt: triples.append((opt[Type],opt[Name],opt[Value])) return triples def name_to_opt(self, name): return name_to_option(name, self.options) def share_external_option(self, external_opt): local_opt = self.name_to_opt(external_opt[Name]) if not local_opt: error_dialog('share_external_option(M4), not found') else: link_options(local_opt, external_opt) # print 'External(M4):'; print_sharing(local_opt) # print ' '; print_sharing(external_opt) def reset(self): self.options_panel.on_reset(None) # end class M4_options class P9_options: # Nonstandard Mace4 Options: # prolog_style_variables: shared with language tab and Prover9. # max_seconds: shared with Prover9 run panel (not with Mace4 run panel). # : different default, so always used. # ignore_option_dependencies: "mandatory" option (always used). # # Omitted options: # min_sos_limit, lrs_ticks, lrs_interval, # default_parts, default_output, basic_paramodulation, # echo_input, quiet, bell, report_stderr, # ignore_option_dependencies option_sets = [ ('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, 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, Flag, 'prolog_style_variables', None, 0, None, 'Variables start with upper case instead of starting with u,v,w,x,y,z.'], ]), ('Meta Options', [ [None, None, None, None, Flag, 'auto', None, 1, None, 'Automatic Mode. This flag simply sets or clears the following 4 flags.'], [None, None, None, None, Flag, 'auto_setup', None, 1, None, 'Processing before the search starts.'], [None, None, None, None, Flag, 'auto_limits', None, 1, None, 'Search limits.'], [None, None, None, None, Flag, 'auto_denials', None, 1, None, 'Automatic handling of denials (negative clauses in Horn sets).'], [None, None, None, None, Flag, 'auto_inference', None, 1, None, 'Automatic selection of inference rules, based on the input.'], [None, None, None, None, Flag, 'auto_process', None, 1, None, 'Processing of inferred clauses.'], [None, None, None, None, Flag, 'auto2', None, 0, None, 'Experimental automatic mode.'], [None, None, None, None, Flag, 'raw', None, 0, None, 'Raw (anti-automatic) mode.'], ]), ('Term Ordering', [ [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, 'inverse_order', None, 1, None, 'Adjustment of term ordering, based on occurrences of inverse axioms in the input.'], ]), ('Limits', [ [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, 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, 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: '], ]), ('Search Prep', [ [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, 'dont_flip_input', None, 0, None, 'Do not flip input equalities, even if they violate the term ordering. Using this flag can cause nontermination of rewriting. It is usually better to adjust the term ordering instead.'], [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], ''], ]), ('Goals/Denials', [ [None, None, None, None, Flag, 'restrict_denials', None, 0, None, 'This flag applies only to Horn sets. It restricts the application of inference rules when negative clauses are involved, with the goal of producing more direct (forward) proofs.'], [None, None, None, None, Flag, 'reuse_denials', None, 0, None, 'This flag allows multiple proofs of goals. (Applies to Horn sets only.'], ]), ('Select Given', [ [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, 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, 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).'], # [None, None, None, None, Flag, 'default_parts', None, 1, None, ''], [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, Group, 'Others', 'right'], [None, None, None, None, Flag, 'input_sos_first', None, 1, None, 'Before starting with selection ratio, select input clauses.'], [None, None, None, None, Flag, 'breadth_first_hints', None, 0, None, 'For hints component, select by age rather than by weight.'], ]), ('Inference Rules', [ [None, None, None, None, Group, 'Ordinary Rules', 'left'], [None, None, None, None, Flag, 'binary_resolution', None, 0, None, 'Binary resolution (not necessarily positive).'], [None, None, None, None, Flag, 'neg_binary_resolution', None, 0, None, 'Negative binary resolution.'], [None, None, None, None, Flag, 'hyper_resolution', None, 0, None, 'Synonym for pos_hyperresolution.'], [None, None, None, None, Flag, 'pos_hyper_resolution', None, 0, None, 'Positive hyperresolution.'], [None, None, None, None, Flag, 'neg_hyper_resolution', None, 0, None, 'Negative hyperresolution.'], [None, None, None, None, Flag, 'ur_resolution', None, 0, None, 'Unit resulting resolution.'], [None, None, None, None, Flag, 'pos_ur_resolution', None, 0, None, 'Positive-unit resulting resolution.'], [None, None, None, None, Flag, 'neg_ur_resolution', None, 0, None, 'Negative-unit resulting resolution.'], [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, Flag, 'factor', None, 0, None, ''], [None, None, None, None, Group, 'General Restrictions', 'right'], [None, None, None, None, Stringparm, 'literal_selection', None, 'max_negative', ['max_negative', 'all_negative', 'none'], 'Method for determining which literals in a multi-literal clause are eligible for resolution or paramodulation.'], [None, None, None, None, Group, 'Resolution Restrictions', 'right'], [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, 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.'], [None, None, None, None, Flag, 'check_para_instances', None, 0, None, 'The maximality checks are done after the application of the unifier for the inference.'], [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).'], ]), ('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, 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, 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'], [None, None, None, None, Flag, 'back_demod', None, 1, None, 'Use newly derived equations to rewrite old clauses.'], [None, None, None, None, Flag, 'unit_deletion', None, 0, None, 'Remove literals from newly derived clauses with old unit clauses, and use newly derived unit clauses to remove literals from old clauses.'], [None, None, None, None, Flag, 'cac_redundancy', None, 1, None, 'Eliminate some redundancy when there are commutative or associative-commutative operations.'], ]), ('Weighting', [ [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, 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, Group, 'Others', 'right'], [None, None, None, None, Parm, 'default_weight', None, sys.maxint, [-sys.maxint,sys.maxint], ''], ]), ('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.'], ]), ('Input/Output', [ # [None, None, None, None, Flag, 'echo_input', None, 1, None, ''], # [None, None, None, None, Flag, 'bell', None, 1, None, ''], # [None, None, None, None, Flag, 'quiet', None, 0, None, ''], [None, None, None, None, Flag, 'print_initial_clauses', None, 1, None, 'Show clauses after preprocessing, before the start of the search.'], [None, None, None, None, Flag, 'print_given', None, 1, None, 'Print clauses when they are selected as given clauses. These clauses say a lot about the progress of the search.'], [None, None, None, None, Flag, 'print_gen', None, 0, None, 'Print all newly-derived clauses. This flag can cause an enormous amount of output for nontrivial searches.'], [None, None, None, None, Flag, 'print_kept', None, 0, None, 'Print newly-derived clauses if they pass the retention tests.'], [None, None, None, None, Flag, 'print_labeled', None, 0, None, 'Print newly-kept clauses that have labels.'], [None, None, None, None, Flag, 'print_proofs', None, 1, None, 'Print all proofs that are found.'], # [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, Flag, 'prolog_style_variables', None, 0, None, 'Variables start with upper case instead of starting with u,v,w,x,y,z.'], ]), ('Hints', [ [None, None, None, None, Flag, 'limit_hint_matchers', None, 0, None, 'Apply the parameters max_weight, max_vars, max_depth, and max_literals to clauses that match hints (as well as to those that do not match hints).'], [None, None, None, None, Flag, 'collect_hint_labels', None, 0, None, 'When equivalent hints are input, only the first is kept. This flag causes any labels on the discarded hints to be appended to the retained hint.'], [None, None, None, None, Flag, 'degrade_hints', None, 1, None, 'The more times a hint is matched, the less its effect becomes.'], [None, None, None, None, Flag, 'back_demod_hints', None, 1, None, 'This flag causes hints, as well as ordinary clauses, to be rewritten by newly-derived equations.'], ]), ('Other Options', [ [None, None, None, None, Parm, 'random_seed', None, 0, [-1,sys.maxint], 'Seed for random number generation.'], ]), ] dependencies = [ (('max_minutes', '>=0'), ('max_seconds', ('multiply', 60))), (('max_hours', '>=0'), ('max_seconds', ('multiply', 3600))), (('max_days', '>=0'), ('max_seconds', ('multiply', 86400))), (('para_units_only', True), ('para_lit_limit', 1)), (('hyper_resolution', True), ('pos_hyper_resolution', True)), (('hyper_resolution', False), ('pos_hyper_resolution', False)), (('ur_resolution', True), ('pos_ur_resolution', True)), (('ur_resolution', True), ('neg_ur_resolution', True)), (('ur_resolution', False), ('pos_ur_resolution', False)), (('ur_resolution', False), ('neg_ur_resolution', False)), (('lex_dep_demod', False), ('lex_dep_demod_lim', 0)), (('lex_dep_demod', True), ('lex_dep_demod_lim', 11)), (('lightest_first', True), ('weight_part', 1)), (('lightest_first', True), ('age_part', 0)), (('lightest_first', True), ('false_part', 0)), (('lightest_first', True), ('true_part', 0)), (('lightest_first', True), ('random_part', 0)), (('random_given', True), ('weight_part', 0)), (('random_given', True), ('age_part', 0)), (('random_given', True), ('false_part', 0)), (('random_given', True), ('true_part', 0)), (('random_given', True), ('random_part', 1)), (('pick_given_ratio', '>=0'), ('age_part', 1)), (('pick_given_ratio', '>=0'), ('weight_part', ('multiply', 1))), (('pick_given_ratio', '>=0'), ('false_part', 0)), (('pick_given_ratio', '>=0'), ('true_part', 0)), (('pick_given_ratio', '>=0'), ('random_part', 0)), (('breadth_first', True), ('age_part', 1)), (('breadth_first', True), ('weight_part', 0)), (('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), ('age_part', 1)), # (('default_parts', True), ('weight_part', 0)), # (('default_parts', True), ('false_part', 4)), # (('default_parts', True), ('true_part', 4)), # (('default_parts', True), ('random_part', 0)), # (('default_parts', False), ('hints_part', 0)), # (('default_parts', False), ('age_part', 0)), # (('default_parts', False), ('weight_part', 0)), # (('default_parts', False), ('false_part', 0)), # (('default_parts', False), ('true_part', 0)), # (('default_parts', False), ('random_part', 0)), # (('default_output', True), ('quiet', False)), # (('default_output', True), ('echo_input', True)), # (('default_output', True), ('print_initial_clauses', True)), # (('default_output', True), ('print_given', True)), # (('default_output', True), ('print_proofs', True)), # (('default_output', True), ('stats', 'lots')), # (('default_output', True), ('print_kept', False)), # (('default_output', True), ('print_gen', False)), (('auto_setup', True), ('predicate_elim', True)), (('auto_setup', True), ('eq_defs', 'unfold')), (('auto_setup', False), ('predicate_elim', False)), (('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), ('sos_limit', -1)), (('auto', True), ('auto_inference', True)), (('auto', True), ('auto_setup', True)), (('auto', True), ('auto_limits', True)), (('auto', True), ('auto_denials', True)), (('auto', True), ('auto_process', True)), (('auto', False), ('auto_inference', False)), (('auto', False), ('auto_setup', False)), (('auto', False), ('auto_limits', False)), (('auto', False), ('auto_denials', False)), (('auto', False), ('auto_process', False)), (('auto2', True), ('auto', True)), (('auto2', True), ('new_constants', 1)), (('auto2', True), ('fold_denial_max', 3)), (('auto2', True), ('max_weight', 200)), (('auto2', True), ('nest_penalty', 1)), (('auto2', True), ('skolem_penalty', 3)), (('auto2', True), ('sk_constant_weight', 0)), (('auto2', True), ('prop_atom_weight', 5)), (('auto2', True), ('sort_initial_sos', True)), (('auto2', True), ('sos_limit', -1)), # (('auto2', True), ('lrs_ticks', 3000)), (('auto2', True), ('max_megs', 400)), (('auto2', True), ('stats', 'some')), # (('auto2', True), ('echo_input', False)), # (('auto2', True), ('quiet', True)), (('auto2', True), ('print_initial_clauses', False)), (('auto2', True), ('print_given', False)), (('raw', True), ('auto', False)), (('raw', True), ('ordered_res', False)), (('raw', True), ('ordered_para', False)), (('raw', True), ('literal_selection', 'none')), (('raw', True), ('backsub_check', sys.maxint)), (('raw', True), ('lightest_first', True)), (('raw', True), ('cac_redundancy', False)), ] dependencies += [ # These are extra dependencies so that the GUI makes sense. # They are irrelevant to Prover9 because they change meta options only, # which Prover9 will ignore. (('breadth_first', True), ('lightest_first', False)), (('breadth_first', True), ('random_given', False)), (('breadth_first', True), ('pick_given_ratio', -1)), (('lightest_first', True), ('breadth_first', False)), (('lightest_first', True), ('random_given', False)), (('lightest_first', True), ('pick_given_ratio', -1)), (('random_given', True), ('lightest_first', False)), (('random_given', True), ('breadth_first', False)), (('random_given', True), ('pick_given_ratio', -1)), (('pick_given_ratio', '>=0'), ('breadth_first', False)), (('pick_given_ratio', '>=0'), ('lightest_first', False)), (('pick_given_ratio', '>=0'), ('random_given', False)), (('max_minutes', '>=0'), ('max_hours', -1)), (('max_minutes', '>=0'), ('max_days', -1)), (('max_hours', '>=0'), ('max_minutes', -1)), (('max_hours', '>=0'), ('max_days', -1)), (('max_days', '>=0'), ('max_minutes', -1)), (('max_days', '>=0'), ('max_hours', -1)) ] def __init__(self, parent): """ Use the option_set table to build a dictionary, indexed by set name, of (hidden) options panels. """ panels = {} for (name,options) in self.option_sets: panels[name] = Options_panel(parent, name, None, options) panels[name].Show(False) # start out hidden # find and mark the shared options for (_,options1) in self.option_sets: for opt1 in options1: if opt1[Type] in [Flag, Parm, Stringparm]: for (_,options2) in self.option_sets: for opt2 in options2: if (opt1[Type] == opt2[Type] and opt1[Name] == opt2[Name] and not opt1 in opt2[Share]): link_options(opt1, opt2) # print 'Share:'; print_sharing(opt1) # print ' '; print_sharing(opt2) # mark dependencies for ((n1,v1),(n2,v2)) in self.dependencies: o1 = self.name_to_opt(n1) o2 = self.name_to_opt(n2) if not o1: error_dialog('Prover9 option %s not found' % n1) elif not o2: error_dialog('Prover9 option %s not found' % n2) else: for o in o1[Share]: o[Depend].append((v1, o2, v2)) update_label(o) self.panels = panels def optionset_names(self): result = [] for (name,_) in self.option_sets: result.append(name) return result def nondefaults(self): triples = [] # order: 1,2,3,...,0 (because "basic" should be last) for (_,options) in self.option_sets[1:]: triples = nondefault_options(options, triples) triples = nondefault_options(self.option_sets[0][1], triples) # always include max_seconds, because GUI default is not program default if not option_triples_contains_name(triples, 'max_seconds'): opt = self.name_to_opt('max_seconds') if opt: triples.append((opt[Type],opt[Name],opt[Value])) return triples def name_to_opt(self, name): for (_,options) in self.option_sets: opt = name_to_option(name, options) if opt: return opt return None def share_external_option(self, external_opt): local_opt = self.name_to_opt(external_opt[Name]) if not local_opt: error_dialog('share_external_option(P4), not found') else: link_options(local_opt, external_opt) # print 'External(P9):'; print_sharing(local_opt) # print ' '; print_sharing(external_opt) def reset(self): for key in self.panels.keys(): self.panels[key].on_reset(None) # end class P9_options def set_options(opt_str, opt_class, handle_dep = True): not_handled = '' pat_flag = '(set|clear)\s*\(\s*([a-z0-9_]+)\s*\)' # without period r_flag = re.compile(pat_flag) pat_parm = 'assign\s*\(\s*([a-z0-9_]+)\s*,\s*([a-z0-9_-]+)\s*\)' # without period r_parm = re.compile(pat_parm) opts = opt_str.split('.')[:-1] # no option after last period for command in opts: m = r_flag.match(command) if m: (op,name) = m.groups() opt = opt_class.name_to_opt(name) if opt and opt[Type] == Flag: update_option(opt, op == 'set') update_shared(opt) if handle_dep: update_dependent(opt) else: not_handled += command + '.\n' else: m = r_parm.match(command) if m: (name,string_val) = m.groups() try: value = int(string_val) opt_type = Parm except: value = string_val opt_type = Stringparm opt = opt_class.name_to_opt(name) if opt and opt[Type] == opt_type: update_option(opt, value) update_shared(opt) if handle_dep: update_dependent(opt) else: not_handled += command + '.\n' else: not_handled += command + '.\n' return not_handled def opt_intersect(s1, s2): t1 = s1.split('.\n') t2 = s2.split('.\n') y = utilities.intersect(t1, t2) return '.\n'.join(y) def set_options_either(opt_str, class1, class2, handle_dep = True): x1 = set_options(opt_str, class1, handle_dep) x2 = set_options(opt_str, class2, handle_dep) # (x1 intersect x2) was handled by neither return opt_intersect(x1,x2) p9m4-0.5.dfsg/Mac.README0000644000175000017500000000020110702473232013073 0ustar bzedbzed% ./Mac.setup builds setup.py (so we shouldn't have our own source file setup.py) % ./Mac.build puts new app in dist p9m4-0.5.dfsg/p9-48.ico0000744000175000017500000000317610670412437013014 0ustar bzedbzed00h(0`'''777WWWgggwwwHHH333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333z3333333:33333333333333333333Z3333333333333333333383333333333333:3333338333333333333ꨓ3333338333333333333333333333333333333333333333333333333333:3333333333333333333:3333333383333333333:333333330333333333333333333333333333333333333333333333333383333333333333333333:3333333333833333333:333333333383333333333333333333033333333333333333333 33333333333333333333333333303%333339 Y33333333:3338333333:33:333333J333333336333:3:333 3333333333:#:33333333363333::33333333383333 :333333333:3333363333:3333:333;333333:3333:c333:33 333:3333ʪ333333:333:3333333:333:S33233333333333337333333z3333:3333333;3333333333333333333833333:333333333333<3333333383333333333333333*3333330333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333p9m4-0.5.dfsg/wx_utilities.py0000644000175000017500000002527010726324114014634 0ustar bzedbzed# Copyright (C) 2007 William McCune # # This file is part of the LADR Deduction Library. # # The LADR Deduction Library 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 2 of the # License, or (at your option) any later version. # # 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. # # system imports import os, re, wx # local imports from platforms import * class State: """ For various processes and threads. """ ready = 0 running = 1 suspended = 2 done = 3 error = 4 def to_top(w): while w.GetParent(): w = w.GetParent() return w def absolute_position(w): (x,y) = w.GetPosition() if not w.GetParent(): return (x,y) else: (a,b) = absolute_position(w.GetParent()) return (x+a, y+b) def size_that_fits(recommended_size): (r_width, r_height) = recommended_size screen_width = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_X) screen_height = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_Y) return (min(r_width, screen_width), min(r_height, screen_height)) def pos_for_center(size): (frame_width, frame_height) = size screen_width = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_X) screen_height = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_Y) x = screen_width/2 - frame_width/2 y = screen_height/2 - frame_height/2 return (max(x,0),max(y,0)) def center_of_screen(): screen_width = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_X) screen_height = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_Y) return (screen_width/2, screen_height/2) def error_dialog(message): dlg = wx.MessageDialog(None, message, '', wx.OK | wx.ICON_ERROR) dlg.ShowModal() dlg.Destroy() def info_dialog(message): dlg = wx.MessageDialog(None, message, '', wx.OK | wx.ICON_INFORMATION) dlg.ShowModal() dlg.Destroy() def open_dir_style(current_path): # Mac and Win32 remember directory, even after quitting program; # else (GTK), use our style = wx.OPEN if Mac() or Win32(): return ('', style) else: # return (os.getcwd(), wx.OPEN | wx.CHANGE_DIR) if current_path: return (os.path.dirname(current_path), style) else: return (os.getcwd(), style) def saveas_dir_style(current_path): style = wx.SAVE | wx.OVERWRITE_PROMPT if Win32(): # Win32 uses dir remembered from 'open' return ('', style) elif Mac(): # Mac doesn't use dir remembered from 'open' if current_path: return (os.path.dirname(current_path), style) else: return ('', wx.SAVE) else: # GTK doesn't remember # return (os.getcwd(), style | wx.CHANGE_DIR) if current_path: return (os.path.dirname(current_path), style) else: return (os.getcwd(), style) def max_width(strings, window): max_wid = 0 for s in strings: width = window.GetTextExtent(s)[0] max_wid = max(max_wid, width) return max_wid class Text_frame(wx.Frame): def __init__(self, parent, font, title, text, extension=None, saveas=True, off_center=0, saved_flag=None, extra_operations=[]): size = size_that_fits((900,650)) # reduce if screen too small (x,y) = pos_for_center(size) # position to center frame pos = (x+off_center, y+off_center) wx.Frame.__init__(self, parent, title=title, size=size, pos=pos) self.extension = extension self.saved_flag = saved_flag self.text = text if saveas: saveas_btn = wx.Button(self, -1, 'Save as...') self.Bind(wx.EVT_BUTTON, self.on_saveas, saveas_btn) extra_btns = [] for (label,func) in extra_operations: btn = wx.Button(self, -1, label) self.Bind(wx.EVT_BUTTON, func, btn) extra_btns.append(btn) close_btn = wx.Button(self, -1, 'Close') self.Bind(wx.EVT_BUTTON, self.on_close, close_btn) self.txt = wx.TextCtrl(self, style=wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL| wx.TE_RICH2) # TE_RICH2 allows > 32K in Win32 self.txt.SetFont(font) self.txt.AppendText(text) self.txt.ShowPosition(0) sub_sizer = wx.BoxSizer(wx.HORIZONTAL) if saveas: sub_sizer.Add(saveas_btn, 0, wx.ALL, 3) for btn in extra_btns: sub_sizer.Add(btn, 0, wx.ALL, 3) sub_sizer.Add((0,0), 1) # strechable space sub_sizer.Add(close_btn, 0, wx.ALL, 3) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(sub_sizer, 0, wx.ALL|wx.GROW, 3) sizer.Add(self.txt, 1, wx.ALL|wx.GROW, 3) self.SetSizer(sizer) def append(self, text): self.txt.AppendText(text) self.txt.ShowPosition(self.txt.GetLastPosition()) def on_saveas(self, evt): (dir,style) = saveas_dir_style(to_top(self).current_path) if to_top(self).current_path and self.extension: dfile = os.path.basename(to_top(self).current_path) dfile = re.sub('\.[^.]*$', '', dfile) # get rid of any extension dfile = '%s.%s' % (dfile,self.extension) # append new extension else: dfile = '' dlg = wx.FileDialog(self, message='Save file as ...', defaultDir=dir, defaultFile=dfile, style=style) if dlg.ShowModal() == wx.ID_OK: path = dlg.GetPath() # full path try: f = open(path, 'w') f.write(self.txt.GetValue()) # Do not update to_top(self).current_path if self.saved_flag: self.saved_flag[0] = True except IOError, e: error_dialog('Error opening file %s for writing.' % path) dlg.Destroy() def on_close(self, evt): self.Close() def hilite_error(self): start = self.txt.GetValue().find('%%START ERROR%%') if start > 0: end = self.txt.GetValue().find('%%END ERROR%%', start) if end > 0: self.txt.SetStyle(start+15, end, wx.TextAttr('RED', wx.Colour(200,200,255))) else: start = self.txt.GetValue().find('%%ERROR:') if start > 0: end = self.txt.GetValue().find('\n', start) if end > 0: self.txt.SetStyle(start+8, end, wx.TextAttr('RED', wx.Colour(200,200,255))) # END class Text_frame(wx.Frame) class Mini_info(wx.MiniFrame): def __init__(self, parent, title, items): # pos = center_of_screen() pos = absolute_position(parent) if Win32(): style = wx.STAY_ON_TOP|wx.DEFAULT_FRAME_STYLE elif Mac(): style = wx.STAY_ON_TOP|wx.CAPTION|wx.CLOSE_BOX else: style = wx.STAY_ON_TOP # GTK ignores style for MiniFrame wx.MiniFrame.__init__(self, parent, title=title, pos=pos, style=style) # Cannot get a close button on titlebar in GTK. if Win32() or Mac(): close_btn = None else: close_btn = wx.Button(self, -1, 'Close', style=wx.BU_EXACTFIT) self.Bind(wx.EVT_BUTTON, self.on_close, close_btn) self.Bind(wx.EVT_CLOSE, self.on_close) gsizer = wx.GridSizer(len(items), 2) self.val_labels = [] for (name,val) in items: name_lab = wx.StaticText(self, -1, name + ':') val_lab = wx.StaticText(self, -1, str(val), size=(75,-1), style=wx.ALIGN_RIGHT|wx.ST_NO_AUTORESIZE) self.val_labels.append(val_lab) gsizer.Add(name_lab, 0, wx.ALIGN_LEFT, 3) gsizer.Add(val_lab, 0, wx.ALIGN_RIGHT, 3) sizer = wx.BoxSizer(wx.VERTICAL) if close_btn: sizer.Add(close_btn, 0, wx.ALL|wx.ALIGN_RIGHT, 3) sizer.Add(gsizer, 0, wx.ALL|wx.ALIGN_CENTER, 3) self.SetSizer(sizer) self.Fit() self.Show() def on_close(self, evt): self.GetParent().info_reset() self.Destroy() def update(self, items): i = 0 for (_,val) in items: lab = self.val_labels[i] lab.SetLabel(str(val)) i += 1 self.Fit() # END class Mini_info(wx.MiniFrame) class Invoke_event(wx.PyEvent): """ This class is used so that a side thread can invoke a function in the main GUI thread. """ my_EVT_INVOKE = wx.NewEventType() def __init__(self, func, args, kwargs): wx.PyEvent.__init__(self) self.SetEventType(Invoke_event.my_EVT_INVOKE) self.__func = func self.__args = args self.__kwargs = kwargs def invoke(self): self.__func(*self.__args, **self.__kwargs) # END class Invoke_event(PyEvent) class Busy_bar(wx.Gauge): def __init__(self, parent, width=200, height=16, pixels_to_move=2, fill=.9, delay=200): wx.Gauge.__init__(self, parent, range=100, size=(width,height)) self.delay = delay self.range = range self.state = State.ready self.position = 40 self.direction = 1 def update_bar(self, evt): # This is run periodically, triggered by the timer in self.start(). self.position += self.direction if self.position >= 60: self.direction = -1 elif self.position <= 40: self.direction = 1 self.SetValue(self.position) def start(self): self.timer = wx.Timer(self, -1) wx.EVT_TIMER(self, self.timer.GetId(), self.update_bar) self.timer.Start(self.delay) self.state = State.running def pause(self): self.timer.Stop() self.state = State.suspended def resume(self): self.start() def stop(self): self.timer.Stop() self.SetValue(0) self.position = 40 self.direction = 1 self.state = State.ready # END class Busy_bar(Guage) p9m4-0.5.dfsg/Mac-setup.py0000644000175000017500000000260710717415076013750 0ustar bzedbzed# Copyright (C) 2007 William McCune # # This file is part of the LADR Deduction Library. # # The LADR Deduction Library 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 2 of the # License, or (at your option) any later version. # # 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. # """ This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup APP = ['prover9-mace4.py'] DATA_FILES = ['platforms.py', 'utilities.py', 'wx_utilities.py', 'files.py', 'options.py', 'partition_input.py', 'my_setup.py', 'control.py', 'Images', 'Samples', 'bin-mac'] OPTIONS = {'argv_emulation': True, 'iconfile': '/Users/mccune/gui/v4/p9.icns'} setup( app=APP, data_files=DATA_FILES, options={'py2app': OPTIONS}, setup_requires=['py2app'], ) p9m4-0.5.dfsg/files.py0000644000175000017500000000463410726330444013211 0ustar bzedbzed# Copyright (C) 2007 William McCune # # This file is part of the LADR Deduction Library. # # The LADR Deduction Library 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 2 of the # License, or (at your option) any later version. # # 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. # # system imports import os, sys, imp # local imports from platforms import * def path_info(): info = ('os.getcwd(): %s\n' 'sys.argv[0]: %s\n' 'sys.path[0]: %s\n' 'os.path.dirname(sys.executable): %s' 'os.path.dirname(os.path.abspath(sys.argv[0])): %s' % (os.getcwd(), sys.argv[0], sys.path[0], os.path.dirname(sys.executable), os.path.dirname(os.path.abspath(sys.argv[0])), )) return info def program_dir(): """ This gets the full pathname of the directory containing the program. It is used for referring to other files (binaries, images, etc.). """ if (Win32() and (hasattr(sys, 'frozen') or imp.is_frozen('__main__'))): # running from exe generated by py2exe return os.path.dirname(sys.executable) else: return sys.path[0] # return os.path.dirname(os.path.abspath(sys.argv[0])) def bin(): if Win32(): return 'bin-win32' elif Mac(): if Mac_ppc(): return 'bin-mac-ppc' else: return 'bin-mac-intel' else: return 'bin' def bin_dir(): return os.path.join(program_dir(), bin()) def image_dir(): return os.path.join(program_dir(), 'Images') def sample_dir(): return os.path.join(program_dir(), 'Samples') def binary_ok(fullpath): if not fullpath: return False elif Win32(): return os.access(fullpath + '.exe', os.X_OK) else: return os.access(fullpath, os.X_OK) p9m4-0.5.dfsg/Win32-setup.py0000644000175000017500000000217510717415076014152 0ustar bzedbzed# Copyright (C) 2007 William McCune # # This file is part of the LADR Deduction Library. # # The LADR Deduction Library 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 2 of the # License, or (at your option) any later version. # # 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. # from distutils.core import setup import py2exe setup(windows=[{'script' : 'prover9-mace4.py', 'icon_resources' : [(1, 'p9-48.ico')]}], data_files=[ #('Images', ['Images/prover9-5a-128t.gif']) ])