|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.udo.cs.ie.cowbots.logic.ELP
edu.udo.cs.ie.cowbots.elpParser.dlp.DisjunctiveLogicProgram
public class DisjunctiveLogicProgram
this class extends from the class ELP and is used only by parse of disjunctive extended logic programs which consist of a set of rules (and fact and constraints).
ELP
Field Summary | |
---|---|
(package private) java.util.ArrayList<DLPRule> |
rules
|
private DLPTermList |
terms
|
private Vocabulary |
vocabulary
|
Constructor Summary | |
---|---|
DisjunctiveLogicProgram()
Default constructor |
Method Summary | |
---|---|
void |
addDlpRule(DLPRule r)
add a new rule to DLP. |
void |
addTermList(java.util.List<DLPTerm> terms)
get Character and Predicate Dictionary for DLPs |
java.util.List<DLPLiteral> |
getDlpFacts()
|
java.util.ArrayList<DLPRule> |
getDlpRules()
get all rules in the program |
DLPRule |
getRule(int i)
get i-rule |
Vocabulary |
getVocabulary()
get Character and Predicate Dictionary for DLPs |
int |
nRules()
size of rules in DLPs |
void |
saveAs(java.lang.String filename)
store DLP on disc |
java.lang.String |
toString()
view content of a DLP |
Methods inherited from class edu.udo.cs.ie.cowbots.logic.ELP |
---|
add, addRaw, addRule, getAlphabet, getFacts, getRules, loadFrom, merge, split |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
java.util.ArrayList<DLPRule> rules
private Vocabulary vocabulary
private DLPTermList terms
Constructor Detail |
---|
public DisjunctiveLogicProgram()
Method Detail |
---|
public void addDlpRule(DLPRule r)
r
- a rule DLPRule
public java.lang.String toString()
toString
in class ELP
public int nRules()
nRules
in class ELP
Integer
public DLPRule getRule(int i)
getRule
in class ELP
i
- index of literal Integer
DLPLiteral
public java.util.ArrayList<DLPRule> getDlpRules()
rules
public Vocabulary getVocabulary()
Vocabulary
public void addTermList(java.util.List<DLPTerm> terms)
public java.util.List<DLPLiteral> getDlpFacts()
ELP.getFacts()
public void saveAs(java.lang.String filename)
saveAs
in class ELP
filename
- output file (should like be foo.dlp or bar.txt) String
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |