Class DefaultSequence


  • public class DefaultSequence
    extends java.lang.Object
    sequence of defaults
    Author:
    Nils Geilen
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<DefaultRule> defaults
      the sequence of defaults
      private FolBeliefSet in
      the in set
      private java.util.Set<FolFormula> out
      the out set
      (package private) boolean process
      true if the sequence is a process
    • Method Summary

      Modifier and Type Method Description
      DefaultSequence app​(DefaultRule d)
      Constructs a new DefaultSequence
      java.util.Collection<FolFormula> getIn()  
      java.util.Collection<FolFormula> getOut()  
      boolean isApplicable​(DefaultRule d)
      applicable ^= pre in In and (not jus_i) not in In forall i
      boolean isClosed​(DefaultTheory t)
      Tests wether all applicble defaukts from t have been applied
      boolean isProcess()
      process <=> all defaults are unique and applicable in sequence
      boolean isSuccessful()
      successfull <=> there is no x: x in In and x in Out
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • defaults

        private java.util.List<DefaultRule> defaults
        the sequence of defaults
      • out

        private java.util.Set<FolFormula> out
        the out set
      • process

        boolean process
        true if the sequence is a process
    • Constructor Detail

      • 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 Detail

      • 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 java.util.Collection<FolFormula> getIn()
        Returns:
        the sequence's in set
      • getOut

        public java.util.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object