Class ScreenedRemainderSets
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<E>
-
- java.util.HashSet<Collection<T>>
-
- net.sf.tweety.lp.asp.beliefdynamics.baserevision.RemainderSets<net.sf.tweety.lp.asp.syntax.ASPRule>
-
- net.sf.tweety.lp.asp.beliefdynamics.baserevision.ScreenedRemainderSets
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Collection<net.sf.tweety.lp.asp.syntax.ASPRule>>,Collection<Collection<net.sf.tweety.lp.asp.syntax.ASPRule>>,Set<Collection<net.sf.tweety.lp.asp.syntax.ASPRule>>
public class ScreenedRemainderSets extends RemainderSets<net.sf.tweety.lp.asp.syntax.ASPRule>
This class represents the set of Screened Consistent Remainder Sets as defined in [1]. A screened remainder set X of P regarding a set of sentences R \subseteq P is a set X s.t. (1) R \subseteq X \subseteq P, (2) X is consistent and (3) there is no proper superset X' of X in P that is also consistent. [1] Kruempelmann, Patrick und Gabriele Kern-Isberner: Belief Base Change Operations for Answer Set Programming. In: Cerro, Luis Farinas, Andreas Herzig und Jerome Mengin (Herausgeber): Proceedings of the 13th European conference on Logics in Artificial Intelligence, Band 7519, Seiten 294-306, Toulouse, France, 2012. Springer Berlin Heidelberg.- Author:
- Sebastian Homann
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ScreenedRemainderSets(net.sf.tweety.lp.asp.syntax.Program p, net.sf.tweety.lp.asp.syntax.Program r, net.sf.tweety.lp.asp.reasoner.ASPSolver solver)Creates a new set of screened remainder sets of program p that all contain the screened rules r.
-
Method Summary
Modifier and Type Method Description Collection<net.sf.tweety.lp.asp.syntax.Program>asPrograms()Returns this set of remainder sets as a collection of programs where each program contains exactly the rules of one remainder set.net.sf.tweety.lp.asp.syntax.ProgramgetScreen()Returns the screened rules that are contained in every remainder set.net.sf.tweety.lp.asp.syntax.ProgramgetSourceBeliefBase()Returns the original program p for which this set represents the set of remainder sets.static voidmain(String[] args)Simple test case taken from [1]-
Methods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, iterator, remove, size, spliterator
-
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
-
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
-
-
-
-
Constructor Detail
-
ScreenedRemainderSets
public ScreenedRemainderSets(net.sf.tweety.lp.asp.syntax.Program p, net.sf.tweety.lp.asp.syntax.Program r, net.sf.tweety.lp.asp.reasoner.ASPSolver solver)Creates a new set of screened remainder sets of program p that all contain the screened rules r. An asp-solver is used to calculate the consistency of remainder set candidates.- Parameters:
p- an asp-program for which the screened remainder sets are calculatedr- an asp-program representing the set of rules, that have to be contained in every remainder set. Has to be a subset of psolver- an asp-solver
-
-
Method Detail
-
getSourceBeliefBase
public net.sf.tweety.lp.asp.syntax.Program getSourceBeliefBase()
Returns the original program p for which this set represents the set of remainder sets.- Specified by:
getSourceBeliefBasein classRemainderSets<net.sf.tweety.lp.asp.syntax.ASPRule>- Returns:
- an elp program.
-
getScreen
public net.sf.tweety.lp.asp.syntax.Program getScreen()
Returns the screened rules that are contained in every remainder set.- Returns:
- an elp program.
-
asPrograms
public Collection<net.sf.tweety.lp.asp.syntax.Program> asPrograms()
Returns this set of remainder sets as a collection of programs where each program contains exactly the rules of one remainder set.- Returns:
- a collection of programs.
-
main
public static void main(String[] args) throws net.sf.tweety.lp.asp.parser.ParseException
Simple test case taken from [1]- Parameters:
args- some arguments- Throws:
net.sf.tweety.lp.asp.parser.ParseException- if parsing failed
-
-