Class Argument

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<ASPRule>, java.util.Collection<ASPRule>, java.util.Deque<ASPRule>, java.util.List<ASPRule>, java.util.Queue<ASPRule>, Formula

    public class Argument
    extends java.util.LinkedList<ASPRule>
    implements Formula
    Instances of this class represent arguments in the sense of Definition 2 in [1]. [1] Ralf Schweimeier and Michael Schroeder: A Parameterised Hierarchy of Argumentation Semantics for Extended Logic Programming and its Application to the Well-founded Semantics. In: Theory and Practice of Logic Programming, 5(1-2):207-242, 2003.
    Author:
    Sebastian Homann
    See Also:
    Serialized Form
    • Method Summary

      Modifier and Type Method Description
      boolean checkValid()
      An argument may only contain nonempty ground rules (i.e.
      java.util.Set<ASPLiteral> getAssumptions()
      Returns the set of assumptions, i.e.
      java.util.Set<ASPLiteral> getConclusions()
      Returns the set of conclusions of this argument, which is made up of the heads of all rules contained in this argument.
      Signature getSignature()
      Returns the signature of the language of this formula.
      java.lang.String toString()  
      • Methods inherited from class java.util.LinkedList

        add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, spliterator, toArray, toArray
      • Methods inherited from class java.util.AbstractSequentialList

        iterator
      • Methods inherited from class java.util.AbstractList

        equals, hashCode, listIterator, subList
      • Methods inherited from class java.util.AbstractCollection

        containsAll, isEmpty, removeAll, retainAll
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.util.Deque

        iterator
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, replaceAll, retainAll, sort, subList
    • Constructor Detail

      • Argument

        public Argument​(ASPRule rule)
      • Argument

        public Argument​(java.util.List<ASPRule> rules)
    • Method Detail

      • getConclusions

        public java.util.Set<ASPLiteral> getConclusions()
        Returns the set of conclusions of this argument, which is made up of the heads of all rules contained in this argument.
        Returns:
        the set of conclusions
      • getAssumptions

        public java.util.Set<ASPLiteral> getAssumptions()
        Returns the set of assumptions, i.e. the set of DLPLiterals, that appear default-negated in the premise of some rule in this argument. Ex.: Let a <- b, not -c. be a rule in argument A. Then A.getAssumptions() will contain -c.
        Returns:
        a set of literals which this argument assumes not to be true
      • checkValid

        public boolean checkValid()
        An argument may only contain nonempty ground rules (i.e. no constraints). Also, for an argument A = [r1, r2, ..., rn] for each literal Lj in the body of a rule ri there has to be a rule rk with k>i with head(rk) = Lj.
        Returns:
        true iff the the argument is valid
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.util.AbstractCollection<ASPRule>
      • getSignature

        public Signature getSignature()
        Description copied from interface: Formula
        Returns the signature of the language of this formula.
        Specified by:
        getSignature in interface Formula
        Returns:
        the signature of the language of this formula.