Class DefaultSequence

java.lang.Object
org.tweetyproject.logics.rdl.semantics.DefaultSequence

public class DefaultSequence extends Object
sequence of defaults
Author:
Nils Geilen
  • Constructor Details

    • DefaultSequence

      public DefaultSequence(DefaultTheory dt)
      constructs an empty sequence of defaults of the default theory dt
      Parameters:
      dt - a default theory, from which defaults will be added to the sequence
    • DefaultSequence

      public DefaultSequence(DefaultSequence ds, DefaultRule d)
      constructs a sequence by appending d to ds
      Parameters:
      ds - a default sequence
      d - a default rule
  • Method Details

    • app

      public DefaultSequence app(DefaultRule d)
      Constructs a new DefaultSequence
      Parameters:
      d - a default rule
      Returns:
      new Sequence adding d to this
    • isApplicable

      public boolean isApplicable(DefaultRule d)
      applicable ^= pre in In and (not jus_i) not in In forall i
      Parameters:
      d - a default rule
      Returns:
      true iff d is applicable to In
    • getIn

      public Collection<FolFormula> getIn()
      Returns:
      the sequence's in set
    • getOut

      public Collection<FolFormula> getOut()
      Returns:
      the sequence's out set
    • isProcess

      public boolean isProcess()
      process <=> all defaults are unique and applicable in sequence
      Returns:
      true iff is process
    • isSuccessful

      public boolean isSuccessful()
      successfull <=> there is no x: x in In and x in Out
      Returns:
      true iff successfull
    • isClosed

      public boolean isClosed(DefaultTheory t)
      Tests wether all applicble defaukts from t have been applied
      Parameters:
      t - a default theory
      Returns:
      true iff every possible default is applied
    • toString

      public String toString()
      Overrides:
      toString in class Object