public class Program extends net.sf.tweety.commons.util.rules.RuleSet<Rule> implements net.sf.tweety.logics.commons.syntax.interfaces.LogicProgram<DLPHead,DLPElement,Rule>
| Constructor and Description |
|---|
Program()
Default Ctor: Does nothing
|
Program(Collection<Rule> base)
Add all rules from base to this program.
|
Program(Program other)
Copy Ctor: Used by clone method
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Program other)
Adds another programs content to the content of this program.
|
void |
addFact(DLPHead fact) |
void |
addFact(DLPLiteral fact) |
Program |
clone() |
static Program |
defaultification(Program p)
Creates the defaultifictation p_d of a given program p.
|
Program |
exchange(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v,
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t) |
net.sf.tweety.logics.fol.syntax.FolSignature |
getSignature() |
boolean |
isExtendedProgram()
Checks if the program is an extended programs, that means the heads of the
literals have not more than one literal.
|
boolean |
isGround()
Checks whether this program is ground, i.e.
|
Program |
reduct(Collection<DLPLiteral> state)
Returns the reduct of this program wrt.
|
Program |
substitute(Map<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> map) |
Program |
substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v,
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t) |
String |
toString() |
String |
toStringFlat() |
getConclusions, getPremises, getRulesWithConclusionadd, clear, contains, isEmpty, iterator, remove, size, spliteratorequals, hashCode, removeAlladdAll, containsAll, retainAll, toArray, toArrayfinalize, getClass, notify, notifyAll, wait, wait, waitaddAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArrayparallelStream, removeIf, streampublic Program()
public Program(Program other)
public Program(Collection<Rule> base)
base - a collection of rulespublic void add(Program other)
other - Reference to the other program.public String toString()
toString in interface net.sf.tweety.commons.BeliefBasetoString in interface net.sf.tweety.logics.commons.syntax.interfaces.LogicProgram<DLPHead,DLPElement,Rule>toString in class AbstractCollection<Rule>public boolean isExtendedProgram()
public String toStringFlat()
public static Program defaultification(Program p)
p - The program which is not defaultificated yetpublic void addFact(DLPLiteral fact)
public net.sf.tweety.logics.fol.syntax.FolSignature getSignature()
getSignature in interface net.sf.tweety.commons.BeliefBasegetSignature in interface net.sf.tweety.logics.commons.syntax.interfaces.LogicProgram<DLPHead,DLPElement,Rule>public boolean isGround()
public Program reduct(Collection<DLPLiteral> state)
state - some set of literalspublic void addFact(DLPHead fact)
addFact in interface net.sf.tweety.logics.commons.syntax.interfaces.LogicProgram<DLPHead,DLPElement,Rule>public Program substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)
substitute in interface net.sf.tweety.logics.commons.syntax.interfaces.LogicProgram<DLPHead,DLPElement,Rule>public Program substitute(Map<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> map) throws IllegalArgumentException
substitute in interface net.sf.tweety.logics.commons.syntax.interfaces.LogicProgram<DLPHead,DLPElement,Rule>IllegalArgumentExceptionpublic Program exchange(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t) throws IllegalArgumentException
exchange in interface net.sf.tweety.logics.commons.syntax.interfaces.LogicProgram<DLPHead,DLPElement,Rule>IllegalArgumentExceptionCopyright © 2018. All rights reserved.