|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectai.planning.strips.PddlPlanAdaptor
public class PddlPlanAdaptor
Field Summary | |
---|---|
protected static inf.compilers.LexicalAnalyzer.TokenType |
actionsTT
the token types used |
protected static inf.compilers.LexicalAnalyzer.TokenType |
actionTT
the token types used |
protected static inf.compilers.LexicalAnalyzer.TokenType |
closebracketTT
the token types used |
protected static inf.compilers.LexicalAnalyzer.TokenType |
domainTT
the token types used |
protected static inf.compilers.LexicalAnalyzer.TokenType |
ignorableTT
the token types used |
protected static inf.compilers.LexicalAnalyzer.TokenType |
openbracketTT
the token types used |
protected static inf.compilers.LexicalAnalyzer.TokenType |
orderTT
the token types used |
protected static inf.compilers.LexicalAnalyzer.TokenType |
paramsTT
the token types used |
protected static inf.compilers.LexicalAnalyzer.TokenType |
planTT
the token types used |
protected java.util.Properties |
props
the properties used for reading and writing |
protected inf.compilers.LexicalAnalyzer |
scanner
the lexical analyzer used for tokenizing the input |
protected static inf.compilers.LexicalAnalyzer.TokenType |
sequenceTT
the token types used |
protected static inf.compilers.LexicalAnalyzer.TokenType |
typeTT
the token types used |
Constructor Summary | |
---|---|
PddlPlanAdaptor()
This constructor creates a SyntaxAdaptor that can be used to read statements in a (propositional) KIF syntax and create a propositional Sentence for it, or it can be used to write out a propositional Sentence in KIF syntax. |
Method Summary | |
---|---|
protected PddlPlanAdaptor |
clone()
|
java.lang.Class<SequentialPlan> |
getInternalClass()
This function returns the Class that holds the internal representation this adaptor translates to and from. |
java.lang.String |
getProperty(java.lang.String key)
This function gets the property that is associated with the given key. |
java.lang.String |
getSyntaxName()
This function returns the name that should identify the syntactical language that this adaptor translates to and from. |
protected SequentialPlan |
parsePlan()
|
void |
prettyPrint(int indent,
SequentialPlan plan,
java.io.Writer w)
This function takes a logical Sentence which is a Java Object in the internal representation, and writes it to the given Writer as a string conforming to the KIF syntax. |
static void |
prettyPrintActions(int indent,
java.util.List<Action> actions,
java.io.Writer w,
java.util.Properties props)
|
static void |
prettyPrintDomain(int indent,
Domain domain,
java.io.Writer w,
java.util.Properties props)
|
static void |
prettyPrintOrder(int indent,
SequentialPlan plan,
java.io.Writer w,
java.util.Properties props)
|
static void |
prettyPrintPlan(int indent,
SequentialPlan plan,
java.io.Writer w,
java.util.Properties props)
|
SequentialPlan |
read(java.io.Reader r)
This function attempts to parse characters from the given Reader until a Sentence that represents an object in the internal representation has been parsed. |
void |
setProperty(java.lang.String key,
java.lang.String value)
This function sets the property associated with the given key to the given value. |
void |
write(SequentialPlan plan,
java.io.Writer w)
This function takes a logical Sentence which is a Java Object in the internal representation, and writes it to the given Writer as a string conforming to the KIF syntax. |
static void |
writeAction(Action act,
java.io.Writer w,
java.util.Properties props)
|
static void |
writeActions(java.util.List<Action> actions,
java.io.Writer w,
java.util.Properties props)
|
static void |
writeDomain(Domain domain,
java.io.Writer w,
java.util.Properties props)
|
static void |
writeOrder(SequentialPlan plan,
java.io.Writer w,
java.util.Properties props)
|
static void |
writePlan(SequentialPlan plan,
java.io.Writer w,
java.util.Properties props)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static inf.compilers.LexicalAnalyzer.TokenType ignorableTT
protected static inf.compilers.LexicalAnalyzer.TokenType openbracketTT
protected static inf.compilers.LexicalAnalyzer.TokenType closebracketTT
protected static inf.compilers.LexicalAnalyzer.TokenType planTT
protected static inf.compilers.LexicalAnalyzer.TokenType domainTT
protected static inf.compilers.LexicalAnalyzer.TokenType actionsTT
protected static inf.compilers.LexicalAnalyzer.TokenType orderTT
protected static inf.compilers.LexicalAnalyzer.TokenType actionTT
protected static inf.compilers.LexicalAnalyzer.TokenType typeTT
protected static inf.compilers.LexicalAnalyzer.TokenType paramsTT
protected static inf.compilers.LexicalAnalyzer.TokenType sequenceTT
protected inf.compilers.LexicalAnalyzer scanner
protected java.util.Properties props
Constructor Detail |
---|
public PddlPlanAdaptor()
This constructor creates a SyntaxAdaptor that can be used to read statements in a (propositional) KIF syntax and create a propositional Sentence for it, or it can be used to write out a propositional Sentence in KIF syntax.
Method Detail |
---|
protected PddlPlanAdaptor clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public java.lang.Class<SequentialPlan> getInternalClass()
This function returns the Class that holds the internal representation this adaptor translates to and from.
getInternalClass
in interface inf.compilers.SyntaxAdaptor<SequentialPlan>
public java.lang.String getSyntaxName()
This function returns the name that should identify the syntactical language that this adaptor translates to and from.
getSyntaxName
in interface inf.compilers.SyntaxAdaptor<SequentialPlan>
public void write(SequentialPlan plan, java.io.Writer w) throws inf.compilers.ExpressivenessException, java.io.IOException
This function takes a logical Sentence which is a Java Object in the internal representation, and writes it to the given Writer as a string conforming to the KIF syntax.
write
in interface inf.compilers.SyntaxAdaptor<SequentialPlan>
stmt
- a Sentence in the internal representationw
- the Writer to which the syntactical translation is written
inf.compilers.ExpressivenessException
- if the syntactical language cannot
represent the given statement
java.io.IOException
- if writing to the given Writer failspublic void prettyPrint(int indent, SequentialPlan plan, java.io.Writer w) throws inf.compilers.ExpressivenessException, java.io.IOException
This function takes a logical Sentence which is a Java Object in the internal representation, and writes it to the given Writer as a string conforming to the KIF syntax.
prettyPrint
in interface inf.compilers.SyntaxAdaptor<SequentialPlan>
indent
- the amount of indentation for the first linestmt
- a Sentence in the internal representationw
- the Writer to which the syntactical translation is written
inf.compilers.ExpressivenessException
- if the syntactical language cannot
represent the given statement
java.io.IOException
- if writing to the given Writer failspublic SequentialPlan read(java.io.Reader r) throws inf.compilers.ExpressivenessException, java.text.ParseException, java.io.IOException
This function attempts to parse characters from the given Reader until a Sentence that represents an object in the internal representation has been parsed.
read
in interface inf.compilers.SyntaxAdaptor<SequentialPlan>
r
- the Reader from which the representation is to be parsed
inf.compilers.ExpressivenessException
- if the internal representation class is
not expressive enough for the given statement
java.text.ParseException
- if there is a syntax error in the given string
java.io.IOException
- if reading from the Reader failspublic java.lang.String getProperty(java.lang.String key)
This function gets the property that is associated with the given key. Not e that the key should not be null.
getProperty
in interface inf.compilers.SyntaxAdaptor<SequentialPlan>
public void setProperty(java.lang.String key, java.lang.String value)
This function sets the property associated with the given key to the given value. The given key must not be null, but the value may be.
setProperty
in interface inf.compilers.SyntaxAdaptor<SequentialPlan>
key
- the key with which the value is associatedvalue
- the associated valuepublic static void writePlan(SequentialPlan plan, java.io.Writer w, java.util.Properties props) throws inf.compilers.ExpressivenessException, java.io.IOException
inf.compilers.ExpressivenessException
java.io.IOException
public static void prettyPrintPlan(int indent, SequentialPlan plan, java.io.Writer w, java.util.Properties props) throws inf.compilers.ExpressivenessException, java.io.IOException
inf.compilers.ExpressivenessException
java.io.IOException
public static void writeDomain(Domain domain, java.io.Writer w, java.util.Properties props) throws inf.compilers.ExpressivenessException, java.io.IOException
inf.compilers.ExpressivenessException
java.io.IOException
public static void prettyPrintDomain(int indent, Domain domain, java.io.Writer w, java.util.Properties props) throws inf.compilers.ExpressivenessException, java.io.IOException
inf.compilers.ExpressivenessException
java.io.IOException
public static void writeActions(java.util.List<Action> actions, java.io.Writer w, java.util.Properties props) throws inf.compilers.ExpressivenessException, java.io.IOException
inf.compilers.ExpressivenessException
java.io.IOException
public static void prettyPrintActions(int indent, java.util.List<Action> actions, java.io.Writer w, java.util.Properties props) throws inf.compilers.ExpressivenessException, java.io.IOException
inf.compilers.ExpressivenessException
java.io.IOException
public static void writeAction(Action act, java.io.Writer w, java.util.Properties props) throws inf.compilers.ExpressivenessException, java.io.IOException
inf.compilers.ExpressivenessException
java.io.IOException
public static void writeOrder(SequentialPlan plan, java.io.Writer w, java.util.Properties props) throws inf.compilers.ExpressivenessException, java.io.IOException
inf.compilers.ExpressivenessException
java.io.IOException
public static void prettyPrintOrder(int indent, SequentialPlan plan, java.io.Writer w, java.util.Properties props) throws inf.compilers.ExpressivenessException, java.io.IOException
inf.compilers.ExpressivenessException
java.io.IOException
protected SequentialPlan parsePlan() throws inf.compilers.ExpressivenessException, java.text.ParseException, java.io.IOException
inf.compilers.ExpressivenessException
java.text.ParseException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |