Package org.tweetyproject.arg.lp.syntax
Class Argument
java.lang.Object
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<ASPRule>
,Collection<ASPRule>
,Deque<ASPRule>
,List<ASPRule>
,Queue<ASPRule>
,SequencedCollection<ASPRule>
,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:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
An argument may only contain nonempty ground rules (i.e.Returns the set of assumptions, i.e.Returns the set of conclusions of this argument, which is made up of the heads of all rules contained in this argument.Returns the signature of the language of this formula.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, reversed, 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 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 Details
-
Argument
Constructs an `Argument` object initialized with a single ASP rule.- Parameters:
rule
- an `ASPRule` object that represents the rule to be added to the argument.
-
Argument
-
-
Method Details
-
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
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
- Overrides:
toString
in classAbstractCollection<ASPRule>
-
getSignature
Description copied from interface:Formula
Returns the signature of the language of this formula.- Specified by:
getSignature
in interfaceFormula
- Returns:
- the signature of the language of this formula.
-