public class DefeasibleLogicProgram extends BeliefSet<DelpRule>
Modifier and Type | Class and Description |
---|---|
private static class |
DefeasibleLogicProgram.DelpOptions |
Constructor and Description |
---|
DefeasibleLogicProgram()
Default constructor; initializes empty delpFacts, strict and defeasible rules
and empty comparison criterion.
|
DefeasibleLogicProgram(DefeasibleLogicProgram delp)
constructor; initializes this program with the given program
|
Modifier and Type | Method and Description |
---|---|
boolean |
disagree(java.util.Set<FolFormula> literals)
Checks whether the given set of literals disagree with respect to the strict part of this program.
|
java.util.Set<DelpArgument> |
getArguments()
Returns the set of all possible arguments, that can be built in this delp.
|
DungTheory |
getDungTheory()
This method translates this delp into an abstract Dung theory.
|
java.util.Set<DelpRule> |
getRulesWithHead(FolFormula l)
Returns all defeasible and strict rules appearing in this program with the given literal as head
|
Signature |
getSignature()
Returns the signature of the language of this knowledge base.
|
java.util.Set<FolFormula> |
getStrictClosure()
Computes the strict closure of the program, i.e., the set of all strictly derivable literals.
|
java.util.Set<FolFormula> |
getStrictClosure(java.util.Set<FolFormula> literals)
Computes the strict closure of the program, i.e., the set of all strictly derivable literals.
|
java.util.Set<FolFormula> |
getStrictClosure(java.util.Set<FolFormula> literals,
java.util.Set<DefeasibleRule> defeasibleRules)
Computes the strict closure of the program, i.e., the set of all strictly derivable literals.
|
java.util.Set<FolFormula> |
getStrictClosure(java.util.Set<FolFormula> literals,
java.util.Set<DefeasibleRule> defeasibleRules,
boolean usefacts)
Computes the strict closure of the program, i.e., the set of all strictly derivable literals.
|
DefeasibleLogicProgram |
ground()
In general, a delp comprises of rule schemes with variables.
|
DefeasibleLogicProgram |
ground(java.util.Set<Constant> constants)
In general, a delp comprises of rule schemes with variables.
|
boolean |
isConsistent(java.util.Set<DefeasibleRule> rules)
Checks whether the given set of defeasible rules are consistent given the strict part of this
program.
|
boolean |
isGround() |
static void |
main(java.lang.String[] args)
Parsing DeLP from given file and performing given query against it.
|
private static void |
printUsage(org.kohsuke.args4j.CmdLineParser parser,
java.io.PrintStream printStream) |
java.lang.String |
toString() |
add, addAll, clear, contains, containsAll, equals, hashCode, instantiateSet, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
public DefeasibleLogicProgram()
public DefeasibleLogicProgram(DefeasibleLogicProgram delp)
delp
- a defeasible logic programpublic DefeasibleLogicProgram ground()
public DefeasibleLogicProgram ground(java.util.Set<Constant> constants)
constants
- some set of constants.public DungTheory getDungTheory()
public java.util.Set<DelpArgument> getArguments()
public java.util.Set<FolFormula> getStrictClosure(java.util.Set<FolFormula> literals, java.util.Set<DefeasibleRule> defeasibleRules, boolean usefacts)
literals
- a set of literalsdefeasibleRules
- a set of defeasible rulesusefacts
- set to public java.util.Set<FolFormula> getStrictClosure(java.util.Set<FolFormula> literals, java.util.Set<DefeasibleRule> defeasibleRules)
literals
- a set of literalsdefeasibleRules
- a set of defeasible rulespublic java.util.Set<FolFormula> getStrictClosure(java.util.Set<FolFormula> literals)
literals
- a set of literalspublic java.util.Set<FolFormula> getStrictClosure()
public boolean isConsistent(java.util.Set<DefeasibleRule> rules)
rules
- a set of defeasible rulespublic boolean disagree(java.util.Set<FolFormula> literals)
literals
- a set of literalspublic boolean isGround()
public java.lang.String toString()
toString
in interface BeliefBase
toString
in class BeliefSet<DelpRule>
public java.util.Set<DelpRule> getRulesWithHead(FolFormula l)
l
- a literalpublic Signature getSignature()
BeliefBase
getSignature
in interface BeliefBase
getSignature
in class BeliefSet<DelpRule>
private static void printUsage(org.kohsuke.args4j.CmdLineParser parser, java.io.PrintStream printStream)
public static void main(java.lang.String[] args) throws java.io.IOException, org.kohsuke.args4j.CmdLineException
args
- Options and arguments (try "-h" to get a help text with details)java.io.IOException
org.kohsuke.args4j.CmdLineException