ProveSPASS.hs revision ad69cb3627839ed3d33f13d71c81378b65a24b35
e9458b1a7a19a63aa4c179f9ab20f4d50681c168Jens ElknerModule : $Header$
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst SchulzDescription : Interface for the SPASS theorem prover.
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst SchulzCopyright : (c) Rene Wagner, Klaus Luettich, Rainer Grabbe,
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu Prodescu Uni Bremen 2005-2006
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst SchulzLicense : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst SchulzMaintainer : rainer25@informatik.uni-bremen.de
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst SchulzStability : provisional
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst SchulzPortability : needs POSIX
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst SchulzInterface for the SPASS theorem prover, uses GUI.GenericATP.
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst SchulzSee <http://spass.mpi-sb.mpg.de/> for details on SPASS.
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst Schulz - check if the theorem is used in the proof;
4d82cd7c26bfde17669c8bcb3986d62ef0e47d05Christian Maeder if not, the theory is inconsistent;
4d82cd7c26bfde17669c8bcb3986d62ef0e47d05Christian Maeder mark goal as proved and emmit a warning...
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst Schulz - Implement a consistency checker based on GUI
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst Schulzmodule SoftFOL.ProveSPASS (spassProver,
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst Schulz spassProveGUI,
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst Schulz spassProveCMDLautomatic,
4d82cd7c26bfde17669c8bcb3986d62ef0e47d05Christian Maeder spassProveCMDLautomaticBatch) where
4d82cd7c26bfde17669c8bcb3986d62ef0e47d05Christian Maederimport ChildProcess as CP
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst Schulzimport ProcessClasses
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst Schulzimport qualified Common.AS_Annotation as AS_Anno
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst Schulzimport qualified Common.Result as Result
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst Schulzimport Common.Utils (splitOn)
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst Schulzimport qualified Control.Concurrent as Concurrent
4d82cd7c26bfde17669c8bcb3986d62ef0e47d05Christian Maederimport qualified Control.Exception as Exception
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst Schulzimport Data.Time (TimeOfDay(..),midnight -- only in ghc-6.6.1: ,parseTime
4d82cd7c26bfde17669c8bcb3986d62ef0e47d05Christian Maeder-- * Prover implementation
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst Schulz The Prover implementation.
4442a735444b0696aa5d81e78023a570f17d3a31Christian Maeder Implemented are: a prover GUI, and both commandline prover interfaces.
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst SchulzspassProver :: Prover Sign Sentence SoftFOLMorphism () ProofTree
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst SchulzspassProver = (mkProverTemplate "SPASS" () spassProveGUI)
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst Schulz { proveCMDLautomatic = Just spassProveCMDLautomatic
75f241761ba1566fbec547ae45d276683e5a8e80Ewaryst Schulz , proveCMDLautomaticBatch = Just spassProveCMDLautomaticBatch }
24ec53d5bdce82359ca637fc98a17b3023dbd1a5Eugen Kuksa-- * Main prover functions
f0a8cb240fea2ac6868275be657f48f4470d9932Ewaryst Schulz-- ** Utility functions
75f241761ba1566fbec547ae45d276683e5a8e80Ewaryst Schulz Record for prover specific functions. This is used by both GUI and command
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder line interface.
proverHelpText = "http://www.spass-prover.org/\n",
'GUI.GenericATPState.ATPTactic_script' if possible. Otherwise a default
Implementation of 'Logic.Prover.proveCMDLautomatic' which provides an
-> IO (Result.Result ([Proof_status ProofTree]))
Implementation of 'Logic.Prover.proveCMDLautomaticBatch' which provides an
_ -> error "SoftFOL.Prove: wrong time format"
-> AS_Anno.Named SPTerm -- ^ goal to prove
spass <- newChildProcess "SPASS" [CP.arguments allOptions]
Exception.catch (runSpassReal spass)
(AS_Anno.senAttr nGoal) emptyProofTree)
(writeFile (thName++'_':AS_Anno.senAttr nGoal++".dfg") prob)
(openProof_status (AS_Anno.senAttr nGoal) (prover_name spassProver) $
{ goalStatus = Proved $ if elem (AS_Anno.senAttr nGoal) usedAxs
, usedAxioms = filter (/=(AS_Anno.senAttr nGoal)) usedAxs