Package com.logic.api
Interface IFormula
- All Known Subinterfaces:
IFOLFormula
,IPLFormula
public interface IFormula
The
IFormula
interface represents a logical formula in either propositional logic or first-order logic.
It provides methods for retrieving the underlying expression, iterating over generic (arbitrary) components,
and checking for the presence of generics within the formula.
This interface serves as a common abstraction for various logical expressions, supporting:
- Propositional logic formulas
- First-order logic formulas
- Expressions containing generic placeholders
- Since:
- 08-03-2025
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncom.logic.exps.asts.IASTExp
getAST()
Retrieves the underlying logical expression represented by this formula.boolean
Determines whether this formula contains any generic (arbitrary) elements.Iterator
<com.logic.exps.asts.others.ASTArbitrary> Returns an iterator over the generic (arbitrary) elements present in this formula.
-
Method Details
-
getAST
com.logic.exps.asts.IASTExp getAST()Retrieves the underlying logical expression represented by this formula.- Returns:
- The expression (
IASTExp
) that defines this formula.
-
iterateGenerics
Iterator<com.logic.exps.asts.others.ASTArbitrary> iterateGenerics()Returns an iterator over the generic (arbitrary) elements present in this formula. Generics are placeholders used in logical expressions for abstraction and generalization.- Returns:
- An iterator over generic components in the formula.
-
hasGenerics
boolean hasGenerics()Determines whether this formula contains any generic (arbitrary) elements.- Returns:
true
if the formula includes generics,false
otherwise.
-