|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.udo.cs.ie.cowbots.logic.solver.Clingo
public class Clingo
wrapper for the clingo asp solver. clingo is clasp with gringo in one binary.
Nested Class Summary | |
---|---|
(package private) class |
Clingo.ReadThread
auxiliary class to read clingos stderr, stdout streams in parallel. |
Field Summary | |
---|---|
protected java.lang.String |
path2clingo
|
Constructor Summary | |
---|---|
Clingo(java.lang.String path2clingo)
instantiates a new clingo wrapper. |
Method Summary | |
---|---|
java.util.List<AnswerSet> |
computeModels(ELP program,
int maxmodels)
this method computes models for a given program |
java.util.List<AnswerSet> |
computeModels(SourceList input,
java.lang.String options,
int models)
this method computes models for a given program |
protected java.util.Set<ELPLiteral> |
parseModel(java.lang.String s)
simple parser function, extracts all literals from an answer set provided by clasp. if the empty answer set is found, an empty Set |
protected java.util.List<java.lang.String> |
runClingo(java.lang.String cmdln,
int models,
SourceList programs)
this method executes clingo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String path2clingo
Constructor Detail |
---|
public Clingo(java.lang.String path2clingo)
path2clingo
- path to clingo binaryMethod Detail |
---|
public java.util.List<AnswerSet> computeModels(ELP program, int maxmodels)
program
- logical program inputmaxmodels
- number of models to compute
public java.util.List<AnswerSet> computeModels(SourceList input, java.lang.String options, int models)
input
- logical program input source listoptions
- command line optionsmaxmodels
- number of models to compute
protected java.util.List<java.lang.String> runClingo(java.lang.String cmdln, int models, SourceList programs)
cmdln
- command line optionsmodels
- number of modelsprograms
- program sources
protected java.util.Set<ELPLiteral> parseModel(java.lang.String s)
s
- answer set from clasp
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |