Hilbert II - JAVA-Packages - Principia Mathematica II

com.meyling.principia.logic.basic
Interface Formula

All Superinterfaces:
Argument
All Known Implementing Classes:
AbstractFormula, BasicFormulaPatternVariable, BasicPredicateVariablePatternVariable, LogicalOperatorWithTwoFormulas, Negation, PredicateVariable, PropositionVariable, Quantifier

public interface Formula
extends Argument

This interface tells us about the methods a Formula must have.

Version:
$Revision: 1.5 $
Author:
Michael Meyling

Method Summary
 SubjectVariables getBoundSubjectVariables()
          Get all bounded subject variables.
 SubjectVariables getFreeSubjectVariables()
          Get all free subject variables.
 Formula getPartFormula(int i)
          Get the requested part formula
 int getPartFormulaSize()
          Get the number of part formulas that this formula contains.
 SubjectVariables getSubjectVariables()
          Get all subject variables that occur in this formula.
 Formula replaceBoundSubjectVariable(Enumerator counter, int occurrence, SubjectVariable search, SubjectVariable replacement)
          Replace the occurrence-th occurence of a bound SubjectVariable by another one.
 Formula replaceBoundSubjectVariables(Enumerator counter)
          Replace every bound SubjectVariable by a BasicSubjectVariablePatternVariable
 
Methods inherited from interface com.meyling.principia.argument.Argument
containsPatternVariables, copy, create, equals, getArgument, getArgumentSize, getPatternVariables, getReplacementParents, getSearchParents, hashCode, matches, matches, replace, replace, replace, replaceMatches, toString
 

Method Detail

getPartFormulaSize

public int getPartFormulaSize()
Get the number of part formulas that this formula contains.

Returns:
number of part formulas that this formula is build of

getPartFormula

public Formula getPartFormula(int i)
                       throws IllegalArgumentException
Get the requested part formula

Parameters:
i - number of part formula (starting with 0)
Returns:
i-th part formula
Throws:
IllegalArgumentException - if i is not inbetween 0 and getPartFormulaSize() - 1

getFreeSubjectVariables

public SubjectVariables getFreeSubjectVariables()
Get all free subject variables.

Returns:
all free subject variables

getBoundSubjectVariables

public SubjectVariables getBoundSubjectVariables()
Get all bounded subject variables.

Returns:
all bounded subject variables

getSubjectVariables

public SubjectVariables getSubjectVariables()
Get all subject variables that occur in this formula.

Returns:
all subject variables

replaceBoundSubjectVariable

public Formula replaceBoundSubjectVariable(Enumerator counter,
                                           int occurrence,
                                           SubjectVariable search,
                                           SubjectVariable replacement)
                                    throws ArgumentException
Replace the occurrence-th occurence of a bound SubjectVariable by another one.

Parameters:
counter - number of matches so far
occurrence - number of matches to act on
search - subject variable to look for
replacement - replacement subject variable
Returns:
replaced formula
Throws:
ArgumentException - if creating replacement failed

replaceBoundSubjectVariables

public Formula replaceBoundSubjectVariables(Enumerator counter)
                                     throws ArgumentException
Replace every bound SubjectVariable by a BasicSubjectVariablePatternVariable

Parameters:
counter - contains starting number for replacement pattern variable, is increased after one complete replacement
Throws:
ArgumentException

Hilbert II - JAVA-Packages - Principia Mathematica II

©left GNU General Public Licence
All Rights Reserved.