Class DynamicLaw

  • All Implemented Interfaces:
    CausalLaw, net.sf.tweety.commons.Formula

    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 Summary

      Constructors 
      Constructor Description
      DynamicLaw()
      Constructs a new empty dynamic law.
      DynamicLaw​(net.sf.tweety.logics.fol.syntax.FolFormula headFormula, net.sf.tweety.logics.fol.syntax.FolFormula afterFormula)
      Creates a new dynamic law of the form caused headFormula after afterFormula
      DynamicLaw​(net.sf.tweety.logics.fol.syntax.FolFormula headFormula, net.sf.tweety.logics.fol.syntax.FolFormula afterFormula, Set<GroundingRequirement> requirements)
      Creates a new dynamic law of the form caused headFormula after afterFormula requires requirements
      DynamicLaw​(net.sf.tweety.logics.fol.syntax.FolFormula headFormula, net.sf.tweety.logics.fol.syntax.FolFormula ifFormula, net.sf.tweety.logics.fol.syntax.FolFormula afterFormula)
      Creates a new dynamic law of the form: caused headFormula if ifFormula after afterFormula
      DynamicLaw​(net.sf.tweety.logics.fol.syntax.FolFormula headFormula, net.sf.tweety.logics.fol.syntax.FolFormula ifFormula, net.sf.tweety.logics.fol.syntax.FolFormula afterFormula, Set<GroundingRequirement> requirements)
      Creates a new dynamic law of the form: caused headFormula if ifFormula after afterFormula requires requirements
    • Field Detail

      • afterFormula

        protected net.sf.tweety.logics.fol.syntax.FolFormula afterFormula
    • Constructor Detail

      • DynamicLaw

        public DynamicLaw()
        Constructs a new empty dynamic law.
      • DynamicLaw

        public DynamicLaw​(net.sf.tweety.logics.fol.syntax.FolFormula headFormula,
                          net.sf.tweety.logics.fol.syntax.FolFormula ifFormula,
                          net.sf.tweety.logics.fol.syntax.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
      • DynamicLaw

        public DynamicLaw​(net.sf.tweety.logics.fol.syntax.FolFormula headFormula,
                          net.sf.tweety.logics.fol.syntax.FolFormula ifFormula,
                          net.sf.tweety.logics.fol.syntax.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 formula
        ifFormula - some FOL formula
        afterFormula - some FOL formula
        requirements - a set of requirements
      • DynamicLaw

        public DynamicLaw​(net.sf.tweety.logics.fol.syntax.FolFormula headFormula,
                          net.sf.tweety.logics.fol.syntax.FolFormula afterFormula)
        Creates a new dynamic law of the form caused headFormula after afterFormula
        Parameters:
        headFormula - some FOL formula
        afterFormula - some FOL formula
      • DynamicLaw

        public DynamicLaw​(net.sf.tweety.logics.fol.syntax.FolFormula headFormula,
                          net.sf.tweety.logics.fol.syntax.FolFormula afterFormula,
                          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

      • getAfterFormula

        public net.sf.tweety.logics.fol.syntax.FolFormula getAfterFormula()
        Returns the afterFormula of this causal law.
        Returns:
        the afterFormula 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 class CLaw
        Returns:
        true, if this law is definite, false otherwise.
      • getSignature

        public net.sf.tweety.commons.Signature getSignature()
        Specified by:
        getSignature in interface net.sf.tweety.commons.Formula
        Specified by:
        getSignature in class CLaw
      • getAtoms

        public Set<net.sf.tweety.logics.fol.syntax.FolAtom> getAtoms()
        Description copied from class: CLaw
        Returns the set of propositions in all formulas in this law.
        Specified by:
        getAtoms in class CLaw
        Returns:
        the set of propositions in all formulas in this law.
      • toDefinite

        public Set<CLaw> 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 class CLaw
        Returns:
        the equivalent definite causal law if one exists.
      • getAllGrounded

        public Set<CLaw> getAllGrounded()
        Description copied from class: CLaw
        Returns the set of all grounded instances of this causal law.
        Specified by:
        getAllGrounded in class CLaw
        Returns:
        the set of all grounded instances of this causal law.
      • getFormulas

        public Set<net.sf.tweety.logics.fol.syntax.FolFormula> 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 class CLaw
        Returns:
        the set of formulas contained in this causal law.