Class DynamicLaw
java.lang.Object
org.tweetyproject.action.description.syntax.CLaw
org.tweetyproject.action.description.syntax.DynamicLaw
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 Summary
ConstructorDescriptionConstructs a new empty dynamic law.DynamicLaw
(FolFormula headFormula, FolFormula afterFormula) Creates a new dynamic law of the form "caused headFormula after afterFormula"DynamicLaw
(FolFormula headFormula, FolFormula afterFormula, 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 afterFormula"DynamicLaw
(FolFormula headFormula, FolFormula ifFormula, FolFormula afterFormula, Set<GroundingRequirement> requirements) Creates a new dynamic law of the form: "caused headFormula if ifFormula after afterFormula requires requirements" -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the after formula of this causal law.Retrieves 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.boolean
Returns true iff this law is definite.Returns an equivalent definite causal law.toString()
Methods inherited from class org.tweetyproject.action.description.syntax.CLaw
addGroundingRequirement, getHeadFormula, getIfFormula, isGround
-
Constructor Details
-
DynamicLaw
public DynamicLaw()Constructs a new empty dynamic law. -
DynamicLaw
Creates a new dynamic law of the form: "caused headFormula if ifFormula after afterFormula"- Parameters:
headFormula
- some FOL formulaifFormula
- some FOL formulaafterFormula
- some FOL formula
-
DynamicLaw
public DynamicLaw(FolFormula headFormula, FolFormula ifFormula, FolFormula afterFormula, Set<GroundingRequirement> requirements) Creates a new dynamic law of the form: "caused headFormula if ifFormula after afterFormula requires requirements"- Parameters:
headFormula
- some FOL formulaifFormula
- some FOL formulaafterFormula
- some FOL formularequirements
- a set of requirements
-
DynamicLaw
Creates a new dynamic law of the form "caused headFormula after afterFormula"- Parameters:
headFormula
- some FOL formulaafterFormula
- some FOL formula
-
DynamicLaw
public DynamicLaw(FolFormula headFormula, FolFormula afterFormula, Set<GroundingRequirement> requirements) Creates a new dynamic law of the form "caused headFormula after afterFormula" requires requirements- Parameters:
headFormula
- some FOL formulaafterFormula
- some FOL formularequirements
- a set of requirements
-
-
Method Details
-
getAfterFormula
Retrieves the after formula of this causal law.- Returns:
- the `FolFormula` that constitutes the after formula of this causal law.
-
isDefinite
public boolean isDefinite()Description copied from class:CLaw
Returns 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:
isDefinite
in classCLaw
- Returns:
- true, if this law is definite, false otherwise.
-
toString
-
getSignature
Description copied from interface:Formula
Returns the signature of the language of this formula.- Specified by:
getSignature
in interfaceFormula
- Specified by:
getSignature
in classCLaw
- Returns:
- the signature of the language of this formula.
-
getAtoms
Description copied from class:CLaw
Retrieves the set of propositions (atoms) contained in all formulas within this law. -
toDefinite
Description copied from class:CLaw
Returns 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:
toDefinite
in classCLaw
- Returns:
- the equivalent definite causal law if one exists.
-
getAllGrounded
Description copied from class:CLaw
Retrieves the set of all grounded instances of this causal law.- Specified by:
getAllGrounded
in classCLaw
- Returns:
- a `Set` of `CLaw` objects representing all grounded instances of this causal law.
-
getFormulas
Description copied from class:CLaw
Returns 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:
getFormulas
in classCLaw
- Returns:
- the set of formulas contained in this causal law.
-