public abstract class AbstractProofMacro extends Object implements ProofMacro
#finishAfterMacro() for compound macros
(see description in ProofMacro#finishAfterMacro()).ProofMacro.ProgressBarListener| Constructor and Description |
|---|
AbstractProofMacro() |
| Modifier and Type | Method and Description |
|---|---|
ProofMacroFinishedInfo |
applyTo(UserInterfaceControl uic,
Node node,
PosInOccurrence posInOcc,
ProverTaskListener listener)
Apply this macro on the given node.
|
boolean |
canApplyTo(Node node,
PosInOccurrence posInOcc)
Can this macro be applied on the given node?
This method should not make any changes but check if the macro can be
applied or not on the given node.
|
private static ImmutableList<Goal> |
getGoals(Node node) |
protected int |
getMaxSteps(Proof proof)
Gets the maximum number of rule applications allowed for a macro.
|
String |
getScriptCommandName()
Gets a unique short name for this macro that can be used in proof
scripts.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplyTo, canApplyTo, getCategory, getDescription, getNameprivate static ImmutableList<Goal> getGoals(Node node)
public String getScriptCommandName()
null is returned, the macro cannot be addressed from
within scripts.
By default, proof macros do not support scripts, thus null
is returned.getScriptCommandName in interface ProofMacronull if not supported, or a non-null
constant string as the short namepublic boolean canApplyTo(Node node, PosInOccurrence posInOcc)
ProofMacroProofMacro.canApplyTo(Proof, ImmutableList, PosInOccurrence) with
node.proof() as proof and all open goals below
node.canApplyTo in interface ProofMacronode - the node (not null)posInOcc - the position in occurrence (may be null)true, if the macro is allowed to be appliedpublic ProofMacroFinishedInfo applyTo(UserInterfaceControl uic, Node node, PosInOccurrence posInOcc, ProverTaskListener listener) throws InterruptedException, Exception
ProofMacroInterruptedException.
A ProverTaskListener can be provided to which the progress will
be reported. If no reports are desired, null can be used for
this parameter. If more than one listener is needed, consider combining
them using a single listener object using the composite pattern.applyTo in interface ProofMacrouic - the UserInterfaceControl to usenode - the node (not null)posInOcc - the position in occurrence (may be null)listener - the listener to use for progress reports (may be
null)InterruptedException - if the application of the macro has been interrupted.Exceptionprotected final int getMaxSteps(Proof proof)