edu.udo.cs.ie.cowbots.elpParser.dlp
Class DisjunctiveLogicProgram

Package class diagram package DisjunctiveLogicProgram
java.lang.Object
  extended by edu.udo.cs.ie.cowbots.logic.ELP
      extended by edu.udo.cs.ie.cowbots.elpParser.dlp.DisjunctiveLogicProgram

public class DisjunctiveLogicProgram
extends ELP

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).

See Also:
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

rules

java.util.ArrayList<DLPRule> rules

vocabulary

private Vocabulary vocabulary

terms

private DLPTermList terms
Constructor Detail

DisjunctiveLogicProgram

public DisjunctiveLogicProgram()
Default constructor

Method Detail

addDlpRule

public void addDlpRule(DLPRule r)
add a new rule to DLP.

Parameters:
r - a rule DLPRule

toString

public java.lang.String toString()
view content of a DLP

Overrides:
toString in class ELP

nRules

public int nRules()
size of rules in DLPs

Overrides:
nRules in class ELP
Returns:
size Integer

getRule

public DLPRule getRule(int i)
get i-rule

Overrides:
getRule in class ELP
Parameters:
i - index of literal Integer
Returns:
aimed literal DLPLiteral

getDlpRules

public java.util.ArrayList<DLPRule> getDlpRules()
get all rules in the program

Returns:
rules

getVocabulary

public Vocabulary getVocabulary()
get Character and Predicate Dictionary for DLPs

Returns:
Vocabulary

addTermList

public void addTermList(java.util.List<DLPTerm> terms)
get Character and Predicate Dictionary for DLPs


getDlpFacts

public java.util.List<DLPLiteral> getDlpFacts()
See Also:
ELP.getFacts()

saveAs

public void saveAs(java.lang.String filename)
store DLP on disc

Overrides:
saveAs in class ELP
Parameters:
filename - output file (should like be foo.dlp or bar.txt) String