Package net.sf.tweety.arg.lp.syntax
Class Argument
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.AbstractSequentialList<E>
-
- java.util.LinkedList<net.sf.tweety.lp.asp.syntax.ASPRule>
-
- net.sf.tweety.arg.lp.syntax.Argument
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<net.sf.tweety.lp.asp.syntax.ASPRule>,Collection<net.sf.tweety.lp.asp.syntax.ASPRule>,Deque<net.sf.tweety.lp.asp.syntax.ASPRule>,List<net.sf.tweety.lp.asp.syntax.ASPRule>,Queue<net.sf.tweety.lp.asp.syntax.ASPRule>,net.sf.tweety.commons.Formula
public class Argument extends LinkedList<net.sf.tweety.lp.asp.syntax.ASPRule> implements net.sf.tweety.commons.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
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Method Summary
Modifier and Type Method Description booleancheckValid()An argument may only contain nonempty ground rules (i.e.Set<net.sf.tweety.lp.asp.syntax.ASPLiteral>getAssumptions()Returns the set of assumptions, i.e.Set<net.sf.tweety.lp.asp.syntax.ASPLiteral>getConclusions()Returns the set of conclusions of this argument, which is made up of the heads of all rules contained in this argument.net.sf.tweety.commons.SignaturegetSignature()StringtoString()-
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, removeRange, subList
-
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, replaceAll, retainAll, sort, subList
-
-
-
-
Constructor Detail
-
Argument
public Argument(net.sf.tweety.lp.asp.syntax.ASPRule rule)
-
Argument
public Argument(List<net.sf.tweety.lp.asp.syntax.ASPRule> rules)
-
-
Method Detail
-
getConclusions
public Set<net.sf.tweety.lp.asp.syntax.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 Set<net.sf.tweety.lp.asp.syntax.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 String toString()
- Overrides:
toStringin classAbstractCollection<net.sf.tweety.lp.asp.syntax.ASPRule>
-
getSignature
public net.sf.tweety.commons.Signature getSignature()
- Specified by:
getSignaturein interfacenet.sf.tweety.commons.Formula
-
-