nltk.inference.MaceCommand¶
- class nltk.inference.MaceCommand[source]¶
Bases:
Prover9CommandParent
,BaseModelBuilderCommand
A
MaceCommand
specific to theMace
model builder. It contains a print_assumptions() method that is used to print the list of assumptions in multiple formats.- __init__(goal=None, assumptions=None, max_models=500, model_builder=None)[source]¶
- Parameters
goal (sem.Expression) – Input expression to prove
assumptions (list(sem.Expression)) – Input expressions to use as assumptions in the proof.
max_models (int) – The maximum number of models that Mace will try before simply returning false. (Use 0 for no maximum.)
- property valuation¶
- add_assumptions(new_assumptions)[source]¶
Add new assumptions to the assumption list.
- Parameters
new_assumptions (list(sem.Expression)) – new assumptions
- build_model(verbose=False)[source]¶
Attempt to build a model. Store the result to prevent unnecessary re-building.
- model(format=None)[source]¶
Return a string representation of the model
- Parameters
simplify – bool simplify the proof?
- Returns
str
- retract_assumptions(retracted, debug=False)[source]¶
Retract assumptions from the assumption list.
- Parameters
debug (bool) – If True, give warning when
retracted
is not present on assumptions list.retracted (list(sem.Expression)) – assumptions to be retracted