Class DynamicLaw
- java.lang.Object
- 
- net.sf.tweety.action.description.syntax.CLaw
- 
- net.sf.tweety.action.description.syntax.DynamicLaw
 
 
- 
 public class DynamicLaw extends CLaw A dynamic law in C has the form caused F if G after U where F is a propositional formula over the set of fluent names (called headFormula) G is a propositional formula over the set of fluent names (called ifFormula) U is a propositional formula over the set of fluent names and the set of action names (called afterFormula)- Author:
- wutsch
 
- 
- 
Constructor SummaryConstructors Constructor Description DynamicLaw()Constructs a new empty dynamic law.DynamicLaw(FolFormula headFormula, FolFormula afterFormula)Creates a new dynamic law of the form caused headFormula after afterFormulaDynamicLaw(FolFormula headFormula, FolFormula afterFormula, java.util.Set<GroundingRequirement> requirements)Creates a new dynamic law of the form caused headFormula after afterFormula requires requirementsDynamicLaw(FolFormula headFormula, FolFormula ifFormula, FolFormula afterFormula)Creates a new dynamic law of the form: caused headFormula if ifFormula after afterFormulaDynamicLaw(FolFormula headFormula, FolFormula ifFormula, FolFormula afterFormula, java.util.Set<GroundingRequirement> requirements)Creates a new dynamic law of the form: caused headFormula if ifFormula after afterFormula requires requirements
 - 
Method SummaryModifier and Type Method Description FolFormulagetAfterFormula()Returns the afterFormula of this causal law.java.util.Set<CLaw>getAllGrounded()Returns the set of all grounded instances of this causal law.java.util.Set<FolAtom>getAtoms()Returns the set of propositions in all formulas in this law.java.util.Set<FolFormula>getFormulas()Returns the set of formulas contained in this causal law, e.g.SignaturegetSignature()Returns the signature of the language of this formula.booleanisDefinite()Returns true iff this law is definite.java.util.Set<CLaw>toDefinite()Returns an equivalent definite causal law.java.lang.StringtoString()- 
Methods inherited from class net.sf.tweety.action.description.syntax.CLawaddGroundingRequirement, getHeadFormula, getIfFormula, isGround
 
- 
 
- 
- 
- 
Constructor Detail- 
DynamicLawpublic DynamicLaw() Constructs a new empty dynamic law.
 - 
DynamicLawpublic DynamicLaw(FolFormula headFormula, FolFormula ifFormula, FolFormula afterFormula) Creates a new dynamic law of the form: caused headFormula if ifFormula after afterFormula- Parameters:
- headFormula- some FOL formula
- ifFormula- some FOL formula
- afterFormula- some FOL formula
 
 - 
DynamicLawpublic DynamicLaw(FolFormula headFormula, FolFormula ifFormula, FolFormula afterFormula, java.util.Set<GroundingRequirement> requirements) Creates a new dynamic law of the form: caused headFormula if ifFormula after afterFormula requires requirements- Parameters:
- headFormula- some FOL formula
- ifFormula- some FOL formula
- afterFormula- some FOL formula
- requirements- a set of requirements
 
 - 
DynamicLawpublic DynamicLaw(FolFormula headFormula, FolFormula afterFormula) Creates a new dynamic law of the form caused headFormula after afterFormula- Parameters:
- headFormula- some FOL formula
- afterFormula- some FOL formula
 
 - 
DynamicLawpublic DynamicLaw(FolFormula headFormula, FolFormula afterFormula, java.util.Set<GroundingRequirement> requirements) Creates a new dynamic law of the form caused headFormula after afterFormula requires requirements- Parameters:
- headFormula- some FOL formula
- afterFormula- some FOL formula
- requirements- a set of requirements
 
 
- 
 - 
Method Detail- 
getAfterFormulapublic FolFormula getAfterFormula() Returns the afterFormula of this causal law.- Returns:
- the afterFormula of this causal law.
 
 - 
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.
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
getSignaturepublic Signature getSignature() Description 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.
 
 - 
getAtomspublic java.util.Set<FolAtom> getAtoms() Description copied from class:CLawReturns the set of propositions in all formulas in this law.
 - 
toDefinitepublic java.util.Set<CLaw> toDefinite() Description 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.
 
 - 
getAllGroundedpublic java.util.Set<CLaw> getAllGrounded() Description copied from class:CLawReturns the set of all grounded instances of this causal law.- Specified by:
- getAllGroundedin class- CLaw
- Returns:
- the set of all grounded instances of this causal law.
 
 - 
getFormulaspublic java.util.Set<FolFormula> getFormulas() Description 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.
 
 
- 
 
-