Class StaticLaw
java.lang.Object
org.tweetyproject.action.description.syntax.CLaw
org.tweetyproject.action.description.syntax.StaticLaw
This class represents a static rule in C, which has the following form:
 "caused H if G" where H is a propositional formula over the set of fluents and
 G is a propositional formula over the set of fluents and the set of actions
- Author:
- Sebastian Homann
- 
Constructor SummaryConstructorsConstructorDescriptionCreates an empty static law.StaticLaw(FolFormula headFormula) Creates an empty static law of the form "caused headFormula if True"StaticLaw(FolFormula headFormula, Set<GroundingRequirement> requirements) Creates an empty static law of the form "caused headFormula if True requires requirements"StaticLaw(FolFormula headFormula, FolFormula ifFormula) Creates an empty static law of the form "caused headFormula if ifFormula"StaticLaw(FolFormula headFormula, FolFormula ifFormula, Set<GroundingRequirement> requirements) Creates an empty static law of the form "caused headFormula if ifFormula" requires requirements
- 
Method SummaryModifier and TypeMethodDescriptionRetrieves the set of all grounded instances of this causal law.getAtoms()Retrieves the set of propositions (atoms) contained in all formulas within this law.Returns the set of formulas contained in this causal law, e.g.Returns the signature of the language of this formula.booleanReturns true iff this law is definite.Returns an equivalent definite causal law.toString()Methods inherited from class org.tweetyproject.action.description.syntax.CLawaddGroundingRequirement, getHeadFormula, getIfFormula, isGround
- 
Constructor Details- 
StaticLawpublic StaticLaw()Creates an empty static law.
- 
StaticLawCreates an empty static law of the form "caused headFormula if True"- Parameters:
- headFormula- some FOL formula
 
- 
StaticLawCreates an empty static law of the form "caused headFormula if True requires requirements"- Parameters:
- headFormula- some FOL formula
- requirements- a set of requirements
 
- 
StaticLawCreates an empty static law of the form "caused headFormula if ifFormula"- Parameters:
- headFormula- some FOL formula
- ifFormula- some FOL formula
 
- 
StaticLawpublic StaticLaw(FolFormula headFormula, FolFormula ifFormula, Set<GroundingRequirement> requirements) Creates an empty static law of the form "caused headFormula if ifFormula" requires requirements- Parameters:
- headFormula- some FOL formula
- ifFormula- some FOL formula
- requirements- a set of requirements
 
 
- 
- 
Method Details- 
isDefinitepublic boolean isDefinite()Description copied from class:CLawReturns true iff this law is definite. A causal law is definite if it's head is a literal or a contradiction and all formulas are conjunctions of literals.- Specified by:
- isDefinitein class- CLaw
- Returns:
- true, if this law is definite, false otherwise.
 
- 
toString
- 
toDefiniteDescription copied from class:CLawReturns an equivalent definite causal law. A causal law is definite if it's head is a literal or a contradiction and all formulas are conjunctions of literals.- Specified by:
- toDefinitein class- CLaw
- Returns:
- the equivalent definite causal law if one exists.
- Throws:
- IllegalStateException- when there is no equivalent definite causal law.
 
- 
getSignatureDescription copied from interface:FormulaReturns the signature of the language of this formula.- Specified by:
- getSignaturein interface- Formula
- Specified by:
- getSignaturein class- CLaw
- Returns:
- the signature of the language of this formula.
 
- 
getAtomsDescription copied from class:CLawRetrieves the set of propositions (atoms) contained in all formulas within this law.
- 
getAllGroundedDescription copied from class:CLawRetrieves the set of all grounded instances of this causal law.- Specified by:
- getAllGroundedin class- CLaw
- Returns:
- a `Set` of `CLaw` objects representing all grounded instances of this causal law.
 
- 
getFormulasDescription copied from class:CLawReturns the set of formulas contained in this causal law, e.g. in a static law, this contains the head formula and the if formula.- Specified by:
- getFormulasin class- CLaw
- Returns:
- the set of formulas contained in this causal law.
 
 
-