Package nltk :: Package inference :: Module prover9 :: Class Prover9
[hide private]
[frames] | no frames]

type Prover9

source code

   object --+    
            |    
Prover9Parent --+
                |
   object --+   |
            |   |
   api.Prover --+
                |
               Prover9

Instance Methods [hide private]
 
__init__(self, timeout=60) source code
tuple: (bool, str)
_prove(self, goal=None, assumptions=None, verbose=False)
Use Prover9 to prove a theorem.
source code
 
prover9_input(self, goal, assumptions)
Returns: The input string that should be provided to the prover9 binary.
source code
 
_call_prover9(self, input_str, args=[], verbose=False)
Call the prover9 binary with the given input.
source code
 
_call_prooftrans(self, input_str, args=[], verbose=False)
Call the prooftrans binary with the given input.
source code

Inherited from Prover9Parent: binary_locations, config_prover9

Inherited from Prover9Parent (private): _call, _find_binary

Inherited from api.Prover: prove

Class Variables [hide private]
  _prover9_bin = None
  _prooftrans_bin = None

Inherited from Prover9Parent (private): _binary_location

Instance Variables [hide private]
  _timeout
The timeout value for prover9.
Method Details [hide private]

__init__(self, timeout=60)
(Constructor)

source code 
Overrides: Prover9Parent.__init__

_prove(self, goal=None, assumptions=None, verbose=False)

source code 

Use Prover9 to prove a theorem.

Returns: tuple: (bool, str)
A pair whose first element is a boolean indicating if the proof was successful (i.e. returns value of 0) and whose second element is the output of the prover.
Overrides: api.Prover._prove

prover9_input(self, goal, assumptions)

source code 
Returns:
The input string that should be provided to the prover9 binary. This string is formed based on the goal, assumptions, and timeout value of this object.
Overrides: Prover9Parent.prover9_input

See Also: Prover9Parent.prover9_input

_call_prover9(self, input_str, args=[], verbose=False)

source code 

Call the prover9 binary with the given input.

Parameters:
  • input_str - A string whose contents are used as stdin.
  • args - A list of command-line arguments.
Returns:
A tuple (stdout, returncode)

See Also: config_prover9

_call_prooftrans(self, input_str, args=[], verbose=False)

source code 

Call the prooftrans binary with the given input.

Parameters:
  • input_str - A string whose contents are used as stdin.
  • args - A list of command-line arguments.
Returns:
A tuple (stdout, returncode)

See Also: config_prover9


Instance Variable Details [hide private]

_timeout

The timeout value for prover9. If a proof can not be found in this amount of time, then prover9 will return false. (Use 0 for no timeout.)