54 Commits

Author SHA1 Message Date
b72a17c190 Version bump for release 3.0.3. 2016-09-02 15:46:14 +02:00
6842bff04b Removed temporary directory. 2016-09-02 15:45:44 +02:00
6bec233e23 Moved IPC 2000 Elevator example instances to instance directory. 2016-09-02 15:44:33 +02:00
873ccef4ff Moved IPC 2008 OpenStacks example instances to instance directory. 2016-09-02 15:44:12 +02:00
4706d2915f Clarified how to plasp handle updates before executing the test suite. 2016-08-30 18:52:59 +02:00
1d59ad20c1 Merge branch 'develop' of github.com:potassco/plasp into develop 2016-08-30 18:48:40 +02:00
b4f7e4f102 Added test case covering unexpected whitespaces in SAS file. 2016-08-30 18:48:24 +02:00
e664fe8470 Updated readme file with new location of the meta encoding. 2016-08-30 14:28:29 +02:00
28b9d22a4c Hiding example instances from Linguist. 2016-08-30 13:05:03 +02:00
be376a9ffb Hiding mutex group section in output if there are none. 2016-08-30 13:02:00 +02:00
76f8df13fc Fixed parsing issue with unexpected whitespaces in SAS files. 2016-08-30 13:01:22 +02:00
9447912fbf Added a few SAS example instances for testing. 2016-08-29 18:26:59 +02:00
87717606b2 Moved PDDL example instances to subdirectory. 2016-08-29 17:49:57 +02:00
Torsten Schaub
348bc32cef generated some sas files from Rene's PDDL samples
- should be deleted later -
2016-08-28 21:00:05 +02:00
Torsten Schaub
fcdb0b65c2 fixed bug: frame axiom only on true fluents
renamed modified by changed (more frequent naming)
2016-08-28 20:53:25 +02:00
Torsten Schaub
0fb79d1268 just re-formatting 2016-08-26 18:21:33 +02:00
Torsten Schaub
69757e50ac fixed bug in conditional effects
- still one test screwing up -
2016-08-26 18:00:33 +02:00
06feeab244 Merge branch 'master' of github.com:potassco/plasp into develop 2016-08-26 15:51:07 +02:00
568945c7a8 Fixed incorrect output format of conditional effects with SAS. 2016-08-26 15:50:39 +02:00
dd33e47dd9 Fixed minor issues in output format documentation. 2016-08-26 15:42:39 +02:00
Torsten Schaub
7dfe760285 PRELIMINARY version of an encoding for sequential SAS planning
featuring: axioms and conditional effects
(extending Patrick's basic multi-valued encoding)
2016-08-23 18:31:33 +02:00
Torsten Schaub
d7b8cec50d simple fixed horizon-based encoding for sequential PDDL planning 2016-08-23 11:51:03 +02:00
Torsten Schaub
92f3018b89 first throw at PDDL specifc encoding for sequential planning using Boolean fluents only 2016-08-22 22:35:35 +02:00
3806fba9c2 Version bump after release 3.0.2. 2016-08-18 15:56:29 +02:00
b44c04d3c0 Version bump for release 3.0.2. 2016-08-18 15:55:51 +02:00
220b9959a3 Added IPC 2004 Satellite example instances. 2016-08-18 15:51:58 +02:00
f8ec341015 Added IPC 2006 TPP example instances. 2016-08-18 15:43:14 +02:00
3ceeb3ae40 Added IPC 2002 Driver Log example instances. 2016-08-18 15:29:27 +02:00
56f0091f1e Added IPC 2002 Depots example instances. 2016-08-18 15:25:10 +02:00
ec886e345b Added IPC 2000 Elevator example instances. 2016-08-18 15:06:53 +02:00
786eabb748 Added IPC 2000 Blocks World example instances. 2016-08-18 15:00:31 +02:00
fa18dc7979 Restructured example instances for consistency. 2016-08-18 14:53:26 +02:00
136f9ed00a Added IPC 1998 Gripper example instances. 2016-08-18 14:40:06 +02:00
e312740629 Fixed syntax error in output. 2016-08-18 14:39:40 +02:00
31d0a1fb38 Turned exception about unspecified requirements into a warning, now also for problems. 2016-08-18 14:30:47 +02:00
ca30f8a815 Turned exception about unspecified requirements into a warning. 2016-08-18 14:29:17 +02:00
21c337e0fa Removed now obsolete ASP variable handling for PDDL. 2016-08-18 00:25:47 +02:00
8251652445 Implemented parameter name normalization for PDDL to avoid escaping the names. 2016-08-18 00:24:10 +02:00
5e28dd046b Further simplified the output of the PDDL variable value facts. 2016-08-18 00:00:50 +02:00
363070b579 Replaced the two rules for the values of a PDDL variable with a single one. 2016-08-17 23:31:31 +02:00
63ed1299ec Updated documentation to recent change of PDDL translator output. 2016-08-17 19:05:01 +02:00
7bd483cd7e Added rule to PDDL translator output to make all unspecified initial state variables false by default. 2016-08-17 19:02:51 +02:00
91019f52aa Fixed issue with unsupported expression negations. 2016-08-16 18:58:30 +02:00
69a26cb22f Fixed undetected issue with unsupported negations. 2016-08-16 18:43:37 +02:00
cdb06fa5bf Improved output format and highlighting. 2016-08-16 18:35:55 +02:00
9c76ce7174 Documented type inheritance. 2016-08-16 18:07:18 +02:00
676dc44619 Updated meta encoding to new feature requirement format. 2016-08-15 18:24:51 +02:00
b8a3019e5b Made unconditional effects a keyword. 2016-08-15 16:59:28 +02:00
e0a15849df Updated documentation to changes of axiom rule output format. 2016-08-15 16:48:17 +02:00
ef57f27c6a Changed output format of axiom rules for consistency. 2016-08-15 16:33:33 +02:00
169c5ae8e9 Fixed typo. 2016-08-15 15:26:34 +02:00
760143a4a2 Documented CMake option for building tests. 2016-08-15 02:23:05 +02:00
b100bcd446 Disabled tests by default. 2016-08-15 02:23:05 +02:00
04ddbaabae Version bump after release 3.0.2 RC 1. 2016-08-14 17:40:51 +02:00
92 changed files with 18555 additions and 271 deletions

1
.gitattributes vendored
View File

@@ -4,3 +4,4 @@
.travis.yml export-ignore
tests/data/* linguist-documentation
instances/* linguist-documentation

View File

@@ -1,15 +1,25 @@
# Change Log
## (unreleased)
## 3.0.3 (2016-09-02)
Bug Fixes:
* fixes incorrect output format of conditional effects with SAS
* fixes parsing issue with unexpected whitespaces in SAS files
## 3.0.2 (2016-08-18)
Features:
* unified translation format for SAS and PDDL files
* documentation of `plasp`s output format
* improved output syntax highlighting
* uses ASP string literals to avoid escaping PDDL identifiers
Bug Fixes:
* fixes minor formatting issues in SAS translation
* fixes issue with unsupported expression negations
## 3.0.1 (2016-06-14)

View File

@@ -7,7 +7,7 @@ set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
add_definitions(-std=c++14)
option(BUILD_TESTS "Build unit tests" ON)
option(BUILD_TESTS "Build unit tests" OFF)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

View File

@@ -35,11 +35,11 @@ $ plasp output.sas
### Solving the Translated Instance
The translated instance can finally be solved incrementally with `clingo` and a meta encoding, for instance, `pddl-meta-sequential-incremental.lp`:
The translated instance can finally be solved incrementally with `clingo` and a meta encoding, for instance, [`sequential-incremental.lp`](encodings/sequential-incremental.lp):
```bash
$ plasp domain.pddl problem.pddl > instance.lp
$ clingo encodings/pddl-meta-sequential-incremental.lp instance.lp
$ clingo encodings/sequential-incremental.lp instance.lp
```
## Command-Line Interface
@@ -50,13 +50,13 @@ $ plasp [files] [options]
`plasp` automatically detects the language of the input program.
See [command-line interface](doc/command-line-interface.md) for more detail.
See [command-line interface](doc/command-line-interface.md) for more details.
## Output Format
`plasp` provides a uniform output format for SAS and PDDL input problems.
See [output format](doc/output-format.md) for more detail.
See [output format](doc/output-format.md) for more details.
If you want to write your own meta encoding for `plasp`s output, this [simple example encoding](encodings/sequential-incremental.lp) gets you started.
@@ -64,7 +64,7 @@ If you want to write your own meta encoding for `plasp`s output, this [simple
`plasp` requires `boost` and is built via CMake and a C++ compiler.
See [building instructions](doc/building-instructions.md) for more detail.
See [building instructions](doc/building-instructions.md) for more details.
## Contributors

View File

@@ -66,7 +66,7 @@ int main(int argc, char **argv)
if (variablesMap.count("version"))
{
std::cout << "plasp version 3.0.2-rc.1" << std::endl;
std::cout << "plasp version 3.0.3" << std::endl;
return EXIT_SUCCESS;
}

View File

@@ -33,8 +33,12 @@ $ git submodule init
$ git submodule update
```
Afterward, build and run the tests as follows:
Afterward, enable the flag `BUILD_TESTS` in your CMake configuration.
Finally, build and run the tests as follows:
```bash
$ make run-tests
```
After updating `plasp`, make sure to execute CMake again in order for the tests to run correctly.
Else, external files required by the test suite may be reported missing.

View File

@@ -66,12 +66,17 @@ The feature requirement predicates may be used in meta encodings to warn about u
% declares a <type>
type(type(<name>)).
% specifies <constant> to be of type type(<name>)
% specifies that <type 1> inherits <type 2>
inherits(type(<type 1>), type(<type 2>)).
% specifies <constant> to have type type(<name>)
has(<constant>, type(<name>)).
```
[Variables](#variables), [constants](#constants-objects), and [objects](#constants-objects) may be typed. Types are only available with PDDL and if typing is enabled.
`plasp` automatically generates all matching `has` predicates for objects with types that inherit other types.
### Variables
```prolog
@@ -88,10 +93,10 @@ Variables are linked to the problem's [objects](#constants-objects) and [constan
`plasp`s variables are multivalued, and each variable has exactly one value at each point in time.
With SAS, variable names are numbers starting at 0, `variable(<number>)`.
SAS variables are inherently multivalued, which results in two or more values of the form `value(<SAS predicate>, <bool>)` for each variable.
SAS variables are inherently multivalued, which results in two or more values of the form `value(<SAS predicate>, <SAS value>)` for each variable.
With PDDL, Boolean variables are created from the PDDL predicates.
Variables ared named after the PDDL predicates, `variable(<PDDL predicate>).`
Variables are named after the PDDL predicates, `variable(<PDDL predicate>).`
Each variable contains exactly two values (one `true`, one `false`) of the form `value(<PDDL predicate>, <bool>)`.
Note that with PDDL, variables and values are named identically.
@@ -133,7 +138,7 @@ Actions may also have *action costs* required to apply them. Action costs are cu
% declares a <constant> or object
constant(constant(<name>)).
% specifies <constant> to be of type type(<name>)
% specifies <constant> to have type type(<name>)
has(<constant>, <type>).
```
@@ -151,7 +156,7 @@ initialState(<variable>, <value>).
The initial state contains all [variable](#variables) assignments that hold before executing any [actions](#actions).
Note that with PDDL, the initial state might not assign values to all variables. Instead, unassigned values have to be assigned `false` manually.
Note that with PDDL, `plasp` sets all unspecified initial state variables to `false` in order to make the initial state total.
### Goal
@@ -190,12 +195,14 @@ axiomRule(axiomRule(<number>)).
precondition(<axiom rule>, <variable>, <value>).
% defines that after applying <axiom rule>, <variable> is assigned <value>
postcondition(<axiom rule>, <variable>, <value>).
postcondition(<axiom rule>, effect(unconditional), <variable>, <value>).
```
Axiom rules are similar to [actions](#actions) in that they modify [variables](#variables) if certain preconditions are satisfied.
However, axiom rules must be applied *immediately* as soon as their preconditions are satisfied.
The second argument of `postcondition`, `effect(unconditional)`, is not used and exists only for consistency with [actions](#actions).
Axiom rule facts are only present with SAS input programs and not PDDL.
Axiom rules contain essential information in order to find plans correctly.

View File

@@ -0,0 +1,28 @@
#const horizon=1.
step(0..horizon).
precondition(Action,variable(Fluent),Value) :- precondition(Action, variable(Fluent),value(Fluent,Value)).
postcondition(Action,variable(Fluent),Value) :- postcondition(Action,effect(unconditional),variable(Fluent),value(Fluent,Value)).
holds(variable(Fluent),0) :- initialState(variable(Fluent),value(Fluent,true)).
{ occurs(Action,T) : action(Action) } = 1 :- step(T), T>0.
:- occurs(Action,T), precondition(Action,Fluent,true), not holds(Fluent,T-1).
:- occurs(Action,T), precondition(Action,Fluent,false), holds(Fluent,T-1).
caused(Fluent,T) :- occurs(Action,T), postcondition(Action,Fluent,true).
holds(Fluent,T) :- caused(Fluent,T).
holds(Fluent,T) :- holds(Fluent,T-1), not occurs(Action,T) : postcondition(Action,Fluent,false); T<=horizon.
goalAt(T) :- holds(variable(Variable),T) : goal(variable(Variable), value(Variable,true));
not holds(variable(Variable),T) : goal(variable(Variable), value(Variable,false));
T=horizon.
:- not goalAt(horizon).
#show occurs/2.
% #show holds/2.

View File

@@ -0,0 +1,31 @@
#include <incmode>.
#program base.
precondition(Action,variable(Fluent),Value) :- precondition(Action, variable(Fluent),value(Fluent,Value)).
postcondition(Action,variable(Fluent),Value) :- postcondition(Action,effect(unconditional),variable(Fluent),value(Fluent,Value)).
holds(variable(Fluent),0) :- initialState(variable(Fluent),value(Fluent,true)).
#program step(t).
{ occurs(Action,t) : action(Action) } = 1.
:- occurs(Action,t), precondition(Action,Fluent,true), not holds(Fluent,t-1).
:- occurs(Action,t), precondition(Action,Fluent,false), holds(Fluent,t-1).
caused(Fluent,t) :- occurs(Action,t), postcondition(Action,Fluent,true).
holds(Fluent,t) :- caused(Fluent,t).
holds(Fluent,t) :- holds(Fluent,t-1), not occurs(Action,t) : postcondition(Action,Fluent,false).
#program check(t).
goalAt(t) :- holds(variable(Variable),t) : goal(variable(Variable), value(Variable,true));
not holds(variable(Variable),t) : goal(variable(Variable), value(Variable,false)).
:- not goalAt(t), query(t).
#show occurs/2.
% #show holds/2.

View File

@@ -0,0 +1,52 @@
#include <incmode>.
% Check feature requirements
% :- requires(feature(actionCosts)).
#program base.
% Establish initial state
holds(Variable, Value, 0) :- initialState(Variable, Value), not stateVariable(Variable).
% Identify (head and) state variables
headVariable(Rule,Variable) :- variable(Variable), axiomRule(Rule), postcondition(Rule,_,Variable,_).
stateVariable(Variable) :- headVariable(_,Variable).
#program step(t). % t=1,2,...
% Perform actions
1 {occurs(Action, t) : action(Action)} 1.
% Check preconditions
:- occurs(Action, t), precondition(Action, Variable, Value), not holds(Variable, Value, t - 1).
% Apply effects
caused(Variable, Value, t) :- occurs(Action, t), postcondition(Action, Effect, Variable, Value),
holds(Variable', Value', t - 1) : precondition(Effect, Variable', Value').
changed(Variable, t) :- caused(Variable, Value, t).
holds(Variable, Value, t) :- caused(Variable, Value, t).
holds(Variable, Value, t) :- holds(Variable, Value, t - 1), not changed(Variable, t), not stateVariable(Variable).
#program check(t). % t=0,1,...
% Check that variables have unique values
:- variable(Variable), {holds(Variable, Value, t) : contains(Variable, Value)} != 1.
% Check mutexes
:- mutexGroup(MutexGroup), {holds(Variable, Value, t) : contains(MutexGroup, Variable, Value)} > 1.
% Apply axioms
derived(Variable, Value, t) :- axiomRule(Rule), postcondition(Rule,_,Variable,Value),
holds(Variable', Value', t) : precondition(Rule, Variable', Value'), not headVariable(Rule,Variable').
modified(Variable, t) :- derived(Variable, Value, t).
holds(Variable, Value, t) :- derived(Variable, Value, t), stateVariable(Variable).
holds(Variable, Value, t) :- not modified(Variable, t), stateVariable(Variable), initialState(Variable, Value).
% Verify that goal is met
:- query(t), goal(Variable, Value), not holds(Variable, Value, t).
#show occurs/2.
% #show holds/3.

View File

@@ -1,18 +1,15 @@
#include <incmode>.
% Check feature requirements
:- requiresFeature(actionCosts).
:- requiresFeature(axiomRules).
:- requiresFeature(conditionalEffects).
:- requires(feature(actionCosts)).
:- requires(feature(axiomRules)).
:- requires(feature(conditionalEffects)).
#program base.
% Establish initial state
holds(Variable, Value, 0) :- initialState(Variable, Value).
% Make unspecified initial state variables false by default (for PDDL)
holds(variable(Variable), value(Variable, false), 0) :- variable(variable(Variable)), {initialState(variable(Variable), _)} 0.
#program step(t).
% Perform actions

View File

@@ -30,6 +30,8 @@ class Action
const Expression *precondition() const;
const Expression *effect() const;
void normalizeParameterNames();
private:
Action() = default;

View File

@@ -35,6 +35,8 @@ class Description
bool containsProblem() const;
const Problem &problem() const;
void normalizeParameterNames();
private:
Description();

View File

@@ -35,7 +35,7 @@ class Domain
const Requirements &requirements() const;
bool hasRequirement(Requirement::Type requirementType) const;
void checkRequirement(Requirement::Type requirementType) const;
void checkRequirement(Requirement::Type requirementType);
expressions::PrimitiveTypes &types();
const expressions::PrimitiveTypes &types() const;
@@ -51,6 +51,8 @@ class Domain
void checkConsistency();
void normalizeParameterNames();
private:
void parseSection();

View File

@@ -27,6 +27,11 @@ class PDDLParserPolicy
return std::iswspace(c);
}
static bool isBlankCharacter(char c)
{
return std::isblank(c);
}
static bool isIdentifierCharacter(char c)
{
return c != '?'

View File

@@ -33,7 +33,7 @@ class Problem
const Requirements &requirements() const;
bool hasRequirement(Requirement::Type requirementType) const;
void checkRequirement(Requirement::Type requirementType) const;
void checkRequirement(Requirement::Type requirementType);
expressions::Constants &objects();
const expressions::Constants &objects() const;

View File

@@ -19,7 +19,7 @@ namespace pddl
class TranslatorASP
{
public:
explicit TranslatorASP(const Description &description, utils::LogStream &outputStream);
explicit TranslatorASP(Description &description, utils::LogStream &outputStream);
void translate() const;
@@ -39,7 +39,7 @@ class TranslatorASP
void translateLiteral(const Expression &literal) const;
void translatePredicate(const expressions::Predicate &predicate) const;
const Description &m_description;
Description &m_description;
utils::LogStream &m_outputStream;
};

View File

@@ -29,6 +29,8 @@ class PredicateDeclaration: public ExpressionCRTP<PredicateDeclaration>
bool isDeclared() const;
void normalizeParameterNames();
private:
PredicateDeclaration();

View File

@@ -28,7 +28,9 @@ class Variable: public ExpressionCRTP<Variable>
const ExpressionContext &expressionContext);
public:
void setName(std::string name);
const std::string &name() const;
const Expression *type() const;
void setDirty(bool isDirty = true);

View File

@@ -46,7 +46,6 @@ struct Value
Value negated() const;
void printAsSAS(utils::LogStream &outputStream) const;
void printAsASP(utils::LogStream &outputStream) const;
void printAsASPPredicate(utils::LogStream &outputStream) const;
Sign sign() const;

View File

@@ -93,6 +93,26 @@ struct Token
////////////////////////////////////////////////////////////////////////////////////////////////////
struct RuleName: public Token
{
RuleName(const std::string &name)
: Token(name)
{
}
};
////////////////////////////////////////////////////////////////////////////////////////////////////
inline LogStream &operator<<(LogStream &stream, const RuleName &keyword)
{
return (stream
<< utils::Format(utils::Color::White, utils::FontWeight::Bold)
<< keyword.name
<< utils::ResetFormat());
}
////////////////////////////////////////////////////////////////////////////////////////////////////
struct Keyword: public Token
{
Keyword(const std::string &name)
@@ -106,11 +126,10 @@ struct Keyword: public Token
inline LogStream &operator<<(LogStream &stream, const Keyword &keyword)
{
return (stream
<< utils::Format(utils::Color::White, utils::FontWeight::Bold)
<< utils::Format(utils::Color::Blue, utils::FontWeight::Normal)
<< keyword.name
<< utils::ResetFormat());
}
////////////////////////////////////////////////////////////////////////////////////////////////////
struct Number: public Token
@@ -126,7 +145,7 @@ struct Number: public Token
inline LogStream &operator<<(LogStream &stream, const Number &number)
{
return (stream
<< utils::Format(utils::Color::Yellow, utils::FontWeight::Bold)
<< utils::Format(utils::Color::Yellow, utils::FontWeight::Normal)
<< number.name
<< utils::ResetFormat());
}
@@ -153,6 +172,66 @@ inline LogStream &operator<<(LogStream &stream, const Variable &variable)
////////////////////////////////////////////////////////////////////////////////////////////////////
struct String: public Token
{
String(const std::string &name)
: Token(name)
{
}
};
////////////////////////////////////////////////////////////////////////////////////////////////////
inline LogStream &operator<<(LogStream &stream, const String &string)
{
return (stream
<< utils::Format(utils::Color::Green, utils::FontWeight::Normal)
<< "\"" << string.name << "\""
<< utils::ResetFormat());
}
////////////////////////////////////////////////////////////////////////////////////////////////////
struct Boolean: public Token
{
Boolean(const std::string &name)
: Token(name)
{
}
};
////////////////////////////////////////////////////////////////////////////////////////////////////
inline LogStream &operator<<(LogStream &stream, const Boolean &string)
{
return (stream
<< utils::Format(utils::Color::Red, utils::FontWeight::Normal)
<< string.name
<< utils::ResetFormat());
}
////////////////////////////////////////////////////////////////////////////////////////////////////
struct Reserved: public Token
{
Reserved(const std::string &name)
: Token(name)
{
}
};
////////////////////////////////////////////////////////////////////////////////////////////////////
inline LogStream &operator<<(LogStream &stream, const Reserved &string)
{
return (stream
<< utils::Format(utils::Color::White, utils::FontWeight::Normal)
<< string.name
<< utils::ResetFormat());
}
////////////////////////////////////////////////////////////////////////////////////////////////////
struct Heading1: public Token
{
Heading1(const std::string &name)

View File

@@ -1,57 +0,0 @@
#ifndef __PLASP__UTILS__IO_H
#define __PLASP__UTILS__IO_H
#include <boost/algorithm/string/replace.hpp>
namespace plasp
{
namespace utils
{
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// IO
//
////////////////////////////////////////////////////////////////////////////////////////////////////
inline std::string escapeASP(const std::string &string)
{
auto escaped = string;
boost::replace_all(escaped, "_", "__");
boost::replace_all(escaped, "-", "_h");
boost::replace_all(escaped, "@", "_a");
return escaped;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
inline std::string unescapeASP(const std::string &string)
{
auto unescaped = string;
boost::replace_all(unescaped, "_a", "@");
boost::replace_all(unescaped, "_h", "-");
boost::replace_all(unescaped, "__", "_");
return unescaped;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
inline std::string escapeASPVariable(const std::string &string)
{
auto escaped = escapeASP(string);
escaped.front() = std::toupper(escaped.front());
return escaped;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
}
}
#endif

View File

@@ -118,11 +118,17 @@ class LogStream
inline LogStream &operator<<(bool value);
inline LogStream &operator<<(const void *value);
inline LogStream &operator<<(const char *value);
inline LogStream &operator<<(const signed char *value);
inline LogStream &operator<<(const unsigned char *value);
inline LogStream &operator<<(std::basic_streambuf<CharacterType, TraitsType> *sb);
inline LogStream &operator<<(std::ios_base &(*func)(std::ios_base &));
inline LogStream &operator<<(std::basic_ios<CharacterType, TraitsType> &(*func)(std::basic_ios<CharacterType, TraitsType> &));
inline LogStream &operator<<(std::basic_ostream<CharacterType, TraitsType> &(*func)(std::basic_ostream<CharacterType, TraitsType> &));
inline LogStream &operator<<(char value);
inline LogStream &operator<<(signed char value);
inline LogStream &operator<<(unsigned char value);
private:
StandardStream m_standardStream;
ColorPolicy m_colorPolicy;
@@ -242,6 +248,22 @@ LogStream &LogStream::operator<<(const char *value)
////////////////////////////////////////////////////////////////////////////////////////////////////
LogStream &LogStream::operator<<(const signed char *value)
{
ostream() << value;
return *this;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
LogStream &LogStream::operator<<(const unsigned char *value)
{
ostream() << value;
return *this;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
LogStream &LogStream::operator<<(std::basic_streambuf<CharacterType, TraitsType>* sb)
{
ostream() << sb;
@@ -283,6 +305,30 @@ inline LogStream &operator<<(LogStream &stream, const std::basic_string<Characte
////////////////////////////////////////////////////////////////////////////////////////////////////
LogStream &LogStream::operator<<(char value)
{
ostream() << value;
return *this;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
LogStream &LogStream::operator<<(signed char value)
{
ostream() << value;
return *this;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
LogStream &LogStream::operator<<(unsigned char value)
{
ostream() << value;
return *this;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
}
}

View File

@@ -72,6 +72,7 @@ class Parser: public Stream, public ParserPolicy
std::string parseLine();
void skipWhiteSpace();
void skipBlankSpace();
void skipLine();
private:
@@ -124,6 +125,17 @@ void Parser<ParserPolicy>::skipWhiteSpace()
////////////////////////////////////////////////////////////////////////////////////////////////////
template<class ParserPolicy>
void Parser<ParserPolicy>::skipBlankSpace()
{
check();
while (!atEnd() && ParserPolicy::isBlankCharacter(currentCharacter()))
advance();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
template<class ParserPolicy>
void Parser<ParserPolicy>::skipLine()
{

View File

@@ -27,6 +27,11 @@ class CaseSensitiveParserPolicy
return std::iswspace(c);
}
static bool isBlankCharacter(char c)
{
return std::isblank(c);
}
static bool isIdentifierCharacter(char c)
{
return std::isgraph(c);
@@ -48,6 +53,11 @@ class CaseInsensitiveParserPolicy
return std::iswspace(c);
}
static bool isBlankCharacter(char c)
{
return std::isblank(c);
}
static bool isIdentifierCharacter(char c)
{
return std::isgraph(c);

View File

@@ -0,0 +1,34 @@
(define (domain gripper-strips)
(:predicates (room ?r)
(ball ?b)
(gripper ?g)
(at-robby ?r)
(at ?b ?r)
(free ?g)
(carry ?o ?g))
(:action move
:parameters (?from ?to)
:precondition (and (room ?from) (room ?to) (at-robby ?from))
:effect (and (at-robby ?to)
(not (at-robby ?from))))
(:action pick
:parameters (?obj ?room ?gripper)
:precondition (and (ball ?obj) (room ?room) (gripper ?gripper)
(at ?obj ?room) (at-robby ?room) (free ?gripper))
:effect (and (carry ?obj ?gripper)
(not (at ?obj ?room))
(not (free ?gripper))))
(:action drop
:parameters (?obj ?room ?gripper)
:precondition (and (ball ?obj) (room ?room) (gripper ?gripper)
(carry ?obj ?gripper) (at-robby ?room))
:effect (and (at ?obj ?room)
(free ?gripper)
(not (carry ?obj ?gripper)))))

View File

@@ -0,0 +1,22 @@
(define (problem strips-gripper-x-1)
(:domain gripper-strips)
(:objects rooma roomb ball4 ball3 ball2 ball1 left right)
(:init (room rooma)
(room roomb)
(ball ball4)
(ball ball3)
(ball ball2)
(ball ball1)
(at-robby rooma)
(free left)
(free right)
(at ball4 rooma)
(at ball3 rooma)
(at ball2 rooma)
(at ball1 rooma)
(gripper left)
(gripper right))
(:goal (and (at ball4 roomb)
(at ball3 roomb)
(at ball2 roomb)
(at ball1 roomb))))

View File

@@ -0,0 +1,28 @@
(define (problem strips-gripper-x-2)
(:domain gripper-strips)
(:objects rooma roomb ball6 ball5 ball4 ball3 ball2 ball1 left right)
(:init (room rooma)
(room roomb)
(ball ball6)
(ball ball5)
(ball ball4)
(ball ball3)
(ball ball2)
(ball ball1)
(at-robby rooma)
(free left)
(free right)
(at ball6 rooma)
(at ball5 rooma)
(at ball4 rooma)
(at ball3 rooma)
(at ball2 rooma)
(at ball1 rooma)
(gripper left)
(gripper right))
(:goal (and (at ball6 roomb)
(at ball5 roomb)
(at ball4 roomb)
(at ball3 roomb)
(at ball2 roomb)
(at ball1 roomb))))

View File

@@ -0,0 +1,4 @@
instance | minimal horizon | #solutions with minimal horizon
============================================================
problem-01.pddl | 11 | 384
problem-02.pddl | 17 | 46080

View File

@@ -0,0 +1,49 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; 4 Op-blocks world
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (domain BLOCKS)
(:requirements :strips :typing)
(:types block)
(:predicates (on ?x - block ?y - block)
(ontable ?x - block)
(clear ?x - block)
(handempty)
(holding ?x - block)
)
(:action pick-up
:parameters (?x - block)
:precondition (and (clear ?x) (ontable ?x) (handempty))
:effect
(and (not (ontable ?x))
(not (clear ?x))
(not (handempty))
(holding ?x)))
(:action put-down
:parameters (?x - block)
:precondition (holding ?x)
:effect
(and (not (holding ?x))
(clear ?x)
(handempty)
(ontable ?x)))
(:action stack
:parameters (?x - block ?y - block)
:precondition (and (holding ?x) (clear ?y))
:effect
(and (not (holding ?x))
(not (clear ?y))
(clear ?x)
(handempty)
(on ?x ?y)))
(:action unstack
:parameters (?x - block ?y - block)
:precondition (and (on ?x ?y) (clear ?x) (handempty))
:effect
(and (holding ?x)
(clear ?y)
(not (clear ?x))
(not (handempty))
(not (on ?x ?y)))))

View File

@@ -0,0 +1,7 @@
(define (problem BLOCKS-4-0)
(:domain BLOCKS)
(:objects D B A C - block)
(:INIT (CLEAR C) (CLEAR A) (CLEAR B) (CLEAR D) (ONTABLE C) (ONTABLE A)
(ONTABLE B) (ONTABLE D) (HANDEMPTY))
(:goal (AND (ON D C) (ON C B) (ON B A)))
)

View File

@@ -0,0 +1,7 @@
(define (problem BLOCKS-5-1)
(:domain BLOCKS)
(:objects A D C E B - block)
(:INIT (CLEAR B) (CLEAR E) (CLEAR C) (ONTABLE D) (ONTABLE E) (ONTABLE C)
(ON B A) (ON A D) (HANDEMPTY))
(:goal (AND (ON D C) (ON C B) (ON B A) (ON A E)))
)

View File

@@ -0,0 +1,7 @@
(define (problem BLOCKS-8-1)
(:domain BLOCKS)
(:objects B A G C F D H E - block)
(:INIT (CLEAR E) (CLEAR H) (CLEAR D) (CLEAR F) (ONTABLE C) (ONTABLE G)
(ONTABLE D) (ONTABLE F) (ON E C) (ON H A) (ON A B) (ON B G) (HANDEMPTY))
(:goal (AND (ON C D) (ON D B) (ON B G) (ON G F) (ON F H) (ON H A) (ON A E)))
)

View File

@@ -0,0 +1,8 @@
(define (problem BLOCKS-9-2)
(:domain BLOCKS)
(:objects B I C E D A G F H - block)
(:INIT (CLEAR H) (CLEAR F) (ONTABLE G) (ONTABLE F) (ON H A) (ON A D) (ON D E)
(ON E C) (ON C I) (ON I B) (ON B G) (HANDEMPTY))
(:goal (AND (ON F G) (ON G H) (ON H D) (ON D I) (ON I E) (ON E B) (ON B C)
(ON C A)))
)

View File

@@ -0,0 +1,6 @@
instance | minimal horizon | #solutions with minimal horizon
============================================================
problem-04-00.pddl | 6 | 1
problem-05-01.pddl | 10 | 2
problem-08-01.pddl | 20 | 60
problem-09-02.pddl | 20 | 37

View File

@@ -0,0 +1,66 @@
(define (domain miconic)
(:requirements :strips)
(:types passenger - object
floor - object
)
(:predicates
(origin ?person - passenger ?floor - floor)
;; entry of ?person is ?floor
;; inertia
(destin ?person - passenger ?floor - floor)
;; exit of ?person is ?floor
;; inertia
(above ?floor1 - floor ?floor2 - floor)
;; ?floor2 is located above of ?floor1
(boarded ?person - passenger)
;; true if ?person has boarded the lift
(not-boarded ?person - passenger)
;; true if ?person has not boarded the lift
(served ?person - passenger)
;; true if ?person has alighted as her destination
(not-served ?person - passenger)
;; true if ?person is not at their destination
(lift-at ?floor - floor)
;; current position of the lift is at ?floor
)
;;stop and allow boarding
(:action board
:parameters (?f - floor ?p - passenger)
:precondition (and (lift-at ?f) (origin ?p ?f))
:effect (boarded ?p))
(:action depart
:parameters (?f - floor ?p - passenger)
:precondition (and (lift-at ?f) (destin ?p ?f)
(boarded ?p))
:effect (and (not (boarded ?p))
(served ?p)))
;;drive up
(:action up
:parameters (?f1 - floor ?f2 - floor)
:precondition (and (lift-at ?f1) (above ?f1 ?f2))
:effect (and (lift-at ?f2) (not (lift-at ?f1))))
;;drive down
(:action down
:parameters (?f1 - floor ?f2 - floor)
:precondition (and (lift-at ?f1) (above ?f2 ?f1))
:effect (and (lift-at ?f2) (not (lift-at ?f1))))
)

View File

@@ -0,0 +1,58 @@
(define (problem mixed-f6-p3-u0-v0-g0-a0-n0-A0-B0-N0-F0-r0)
(:domain miconic)
(:objects p0 p1 p2 - passenger
f0 f1 f2 f3 f4 f5 - floor)
(:init
(above f0 f1)
(above f0 f2)
(above f0 f3)
(above f0 f4)
(above f0 f5)
(above f1 f2)
(above f1 f3)
(above f1 f4)
(above f1 f5)
(above f2 f3)
(above f2 f4)
(above f2 f5)
(above f3 f4)
(above f3 f5)
(above f4 f5)
(origin p0 f1)
(destin p0 f4)
(origin p1 f3)
(destin p1 f1)
(origin p2 f5)
(destin p2 f1)
(lift-at f0)
)
(:goal (and
(served p0)
(served p1)
(served p2)
))
)

View File

@@ -0,0 +1,58 @@
(define (problem mixed-f6-p3-u0-v0-g0-a0-n0-A0-B0-N0-F0-r1)
(:domain miconic)
(:objects p0 p1 p2 - passenger
f0 f1 f2 f3 f4 f5 - floor)
(:init
(above f0 f1)
(above f0 f2)
(above f0 f3)
(above f0 f4)
(above f0 f5)
(above f1 f2)
(above f1 f3)
(above f1 f4)
(above f1 f5)
(above f2 f3)
(above f2 f4)
(above f2 f5)
(above f3 f4)
(above f3 f5)
(above f4 f5)
(origin p0 f2)
(destin p0 f5)
(origin p1 f5)
(destin p1 f2)
(origin p2 f4)
(destin p2 f1)
(lift-at f0)
)
(:goal (and
(served p0)
(served p1)
(served p2)
))
)

View File

@@ -0,0 +1,77 @@
(define (problem mixed-f8-p4-u0-v0-g0-a0-n0-A0-B0-N0-F0-r0)
(:domain miconic)
(:objects p0 p1 p2 p3 - passenger
f0 f1 f2 f3 f4 f5 f6 f7 - floor)
(:init
(above f0 f1)
(above f0 f2)
(above f0 f3)
(above f0 f4)
(above f0 f5)
(above f0 f6)
(above f0 f7)
(above f1 f2)
(above f1 f3)
(above f1 f4)
(above f1 f5)
(above f1 f6)
(above f1 f7)
(above f2 f3)
(above f2 f4)
(above f2 f5)
(above f2 f6)
(above f2 f7)
(above f3 f4)
(above f3 f5)
(above f3 f6)
(above f3 f7)
(above f4 f5)
(above f4 f6)
(above f4 f7)
(above f5 f6)
(above f5 f7)
(above f6 f7)
(origin p0 f7)
(destin p0 f6)
(origin p1 f1)
(destin p1 f3)
(origin p2 f1)
(destin p2 f7)
(origin p3 f2)
(destin p3 f4)
(lift-at f0)
)
(:goal (and
(served p0)
(served p1)
(served p2)
(served p3)
))
)

View File

@@ -0,0 +1,77 @@
(define (problem mixed-f8-p4-u0-v0-g0-a0-n0-A0-B0-N0-F0-r1)
(:domain miconic)
(:objects p0 p1 p2 p3 - passenger
f0 f1 f2 f3 f4 f5 f6 f7 - floor)
(:init
(above f0 f1)
(above f0 f2)
(above f0 f3)
(above f0 f4)
(above f0 f5)
(above f0 f6)
(above f0 f7)
(above f1 f2)
(above f1 f3)
(above f1 f4)
(above f1 f5)
(above f1 f6)
(above f1 f7)
(above f2 f3)
(above f2 f4)
(above f2 f5)
(above f2 f6)
(above f2 f7)
(above f3 f4)
(above f3 f5)
(above f3 f6)
(above f3 f7)
(above f4 f5)
(above f4 f6)
(above f4 f7)
(above f5 f6)
(above f5 f7)
(above f6 f7)
(origin p0 f0)
(destin p0 f5)
(origin p1 f7)
(destin p1 f4)
(origin p2 f0)
(destin p2 f7)
(origin p3 f1)
(destin p3 f6)
(lift-at f0)
)
(:goal (and
(served p0)
(served p1)
(served p2)
(served p3)
))
)

View File

@@ -0,0 +1,6 @@
instance | minimal horizon | #solutions with minimal horizon
============================================================
problem-03-00.pddl | 10 | 12
problem-03-01.pddl | 11 | 40
problem-04-00.pddl | 14 | 180
problem-04-01.pddl | 13 | 120

View File

@@ -0,0 +1,42 @@
(define (domain Depot)
(:requirements :typing)
(:types place locatable - object
depot distributor - place
truck hoist surface - locatable
pallet crate - surface)
(:predicates (at ?x - locatable ?y - place)
(on ?x - crate ?y - surface)
(in ?x - crate ?y - truck)
(lifting ?x - hoist ?y - crate)
(available ?x - hoist)
(clear ?x - surface))
(:action Drive
:parameters (?x - truck ?y - place ?z - place)
:precondition (and (at ?x ?y))
:effect (and (not (at ?x ?y)) (at ?x ?z)))
(:action Lift
:parameters (?x - hoist ?y - crate ?z - surface ?p - place)
:precondition (and (at ?x ?p) (available ?x) (at ?y ?p) (on ?y ?z) (clear ?y))
:effect (and (not (at ?y ?p)) (lifting ?x ?y) (not (clear ?y)) (not (available ?x))
(clear ?z) (not (on ?y ?z))))
(:action Drop
:parameters (?x - hoist ?y - crate ?z - surface ?p - place)
:precondition (and (at ?x ?p) (at ?z ?p) (clear ?z) (lifting ?x ?y))
:effect (and (available ?x) (not (lifting ?x ?y)) (at ?y ?p) (not (clear ?z)) (clear ?y)
(on ?y ?z)))
(:action Load
:parameters (?x - hoist ?y - crate ?z - truck ?p - place)
:precondition (and (at ?x ?p) (at ?z ?p) (lifting ?x ?y))
:effect (and (not (lifting ?x ?y)) (in ?y ?z) (available ?x)))
(:action Unload
:parameters (?x - hoist ?y - crate ?z - truck ?p - place)
:precondition (and (at ?x ?p) (at ?z ?p) (available ?x) (in ?y ?z))
:effect (and (not (in ?y ?z)) (not (available ?x)) (lifting ?x ?y)))
)

View File

@@ -0,0 +1,34 @@
(define (problem depotprob1818) (:domain Depot)
(:objects
depot0 - Depot
distributor0 distributor1 - Distributor
truck0 truck1 - Truck
pallet0 pallet1 pallet2 - Pallet
crate0 crate1 - Crate
hoist0 hoist1 hoist2 - Hoist)
(:init
(at pallet0 depot0)
(clear crate1)
(at pallet1 distributor0)
(clear crate0)
(at pallet2 distributor1)
(clear pallet2)
(at truck0 distributor1)
(at truck1 depot0)
(at hoist0 depot0)
(available hoist0)
(at hoist1 distributor0)
(available hoist1)
(at hoist2 distributor1)
(available hoist2)
(at crate0 distributor0)
(on crate0 pallet1)
(at crate1 depot0)
(on crate1 pallet0)
)
(:goal (and
(on crate0 pallet2)
(on crate1 pallet1)
)
))

View File

@@ -0,0 +1,40 @@
(define (problem depotprob7512) (:domain Depot)
(:objects
depot0 - Depot
distributor0 distributor1 - Distributor
truck0 truck1 - Truck
pallet0 pallet1 pallet2 - Pallet
crate0 crate1 crate2 crate3 - Crate
hoist0 hoist1 hoist2 - Hoist)
(:init
(at pallet0 depot0)
(clear crate0)
(at pallet1 distributor0)
(clear crate3)
(at pallet2 distributor1)
(clear crate2)
(at truck0 depot0)
(at truck1 depot0)
(at hoist0 depot0)
(available hoist0)
(at hoist1 distributor0)
(available hoist1)
(at hoist2 distributor1)
(available hoist2)
(at crate0 depot0)
(on crate0 pallet0)
(at crate1 distributor1)
(on crate1 pallet2)
(at crate2 distributor1)
(on crate2 crate1)
(at crate3 distributor0)
(on crate3 pallet1)
)
(:goal (and
(on crate0 pallet2)
(on crate1 crate3)
(on crate2 pallet0)
(on crate3 pallet1)
)
))

View File

@@ -0,0 +1,4 @@
instance | minimal horizon | #solutions with minimal horizon
============================================================
problem-01.pddl | 10 | 16
problem-02.pddl | 15 | 448

View File

@@ -0,0 +1,79 @@
(define (domain driverlog)
(:requirements :typing)
(:types location locatable - object
driver truck obj - locatable
)
(:predicates
(at ?obj - locatable ?loc - location)
(in ?obj1 - obj ?obj - truck)
(driving ?d - driver ?v - truck)
(link ?x ?y - location) (path ?x ?y - location)
(empty ?v - truck)
)
(:action LOAD-TRUCK
:parameters
(?obj - obj
?truck - truck
?loc - location)
:precondition
(and (at ?truck ?loc) (at ?obj ?loc))
:effect
(and (not (at ?obj ?loc)) (in ?obj ?truck)))
(:action UNLOAD-TRUCK
:parameters
(?obj - obj
?truck - truck
?loc - location)
:precondition
(and (at ?truck ?loc) (in ?obj ?truck))
:effect
(and (not (in ?obj ?truck)) (at ?obj ?loc)))
(:action BOARD-TRUCK
:parameters
(?driver - driver
?truck - truck
?loc - location)
:precondition
(and (at ?truck ?loc) (at ?driver ?loc) (empty ?truck))
:effect
(and (not (at ?driver ?loc)) (driving ?driver ?truck) (not (empty ?truck))))
(:action DISEMBARK-TRUCK
:parameters
(?driver - driver
?truck - truck
?loc - location)
:precondition
(and (at ?truck ?loc) (driving ?driver ?truck))
:effect
(and (not (driving ?driver ?truck)) (at ?driver ?loc) (empty ?truck)))
(:action DRIVE-TRUCK
:parameters
(?truck - truck
?loc-from - location
?loc-to - location
?driver - driver)
:precondition
(and (at ?truck ?loc-from)
(driving ?driver ?truck) (link ?loc-from ?loc-to))
:effect
(and (not (at ?truck ?loc-from)) (at ?truck ?loc-to)))
(:action WALK
:parameters
(?driver - driver
?loc-from - location
?loc-to - location)
:precondition
(and (at ?driver ?loc-from) (path ?loc-from ?loc-to))
:effect
(and (not (at ?driver ?loc-from)) (at ?driver ?loc-to)))
)

View File

@@ -0,0 +1,48 @@
(define (problem DLOG-2-2-2)
(:domain driverlog)
(:objects
driver1 - driver
driver2 - driver
truck1 - truck
truck2 - truck
package1 - obj
package2 - obj
s0 - location
s1 - location
s2 - location
p1-0 - location
p1-2 - location
)
(:init
(at driver1 s2)
(at driver2 s2)
(at truck1 s0)
(empty truck1)
(at truck2 s0)
(empty truck2)
(at package1 s0)
(at package2 s0)
(path s1 p1-0)
(path p1-0 s1)
(path s0 p1-0)
(path p1-0 s0)
(path s1 p1-2)
(path p1-2 s1)
(path s2 p1-2)
(path p1-2 s2)
(link s0 s1)
(link s1 s0)
(link s0 s2)
(link s2 s0)
(link s2 s1)
(link s1 s2)
)
(:goal (and
(at driver1 s1)
(at truck1 s1)
(at package1 s0)
(at package2 s0)
))
)

View File

@@ -0,0 +1,59 @@
(define (problem DLOG-2-2-4)
(:domain driverlog)
(:objects
driver1 - driver
driver2 - driver
truck1 - truck
truck2 - truck
package1 - obj
package2 - obj
package3 - obj
package4 - obj
s0 - location
s1 - location
s2 - location
p0-1 - location
p2-0 - location
p2-1 - location
)
(:init
(at driver1 s1)
(at driver2 s0)
(at truck1 s1)
(empty truck1)
(at truck2 s2)
(empty truck2)
(at package1 s0)
(at package2 s0)
(at package3 s1)
(at package4 s1)
(path s0 p0-1)
(path p0-1 s0)
(path s1 p0-1)
(path p0-1 s1)
(path s2 p2-0)
(path p2-0 s2)
(path s0 p2-0)
(path p2-0 s0)
(path s2 p2-1)
(path p2-1 s2)
(path s1 p2-1)
(path p2-1 s1)
(link s1 s0)
(link s0 s1)
(link s1 s2)
(link s2 s1)
(link s2 s0)
(link s0 s2)
)
(:goal (and
(at driver2 s2)
(at truck1 s1)
(at truck2 s2)
(at package1 s1)
(at package2 s1)
(at package3 s2)
))
)

View File

@@ -0,0 +1,4 @@
instance | minimal horizon | #solutions with minimal horizon
============================================================
problem-01.pddl | 7 | 1
problem-03.pddl | 12 | 1056

View File

@@ -0,0 +1,75 @@
(define (domain satellite)
(:requirements :strips :equality :typing)
(:types satellite direction instrument mode)
(:predicates
(on_board ?i - instrument ?s - satellite)
(supports ?i - instrument ?m - mode)
(pointing ?s - satellite ?d - direction)
(power_avail ?s - satellite)
(power_on ?i - instrument)
(calibrated ?i - instrument)
(have_image ?d - direction ?m - mode)
(calibration_target ?i - instrument ?d - direction))
(:action turn_to
:parameters (?s - satellite ?d_new - direction ?d_prev - direction)
:precondition (and (pointing ?s ?d_prev)
)
:effect (and (pointing ?s ?d_new)
(not (pointing ?s ?d_prev))
)
)
(:action switch_on
:parameters (?i - instrument ?s - satellite)
:precondition (and (on_board ?i ?s)
(power_avail ?s)
)
:effect (and (power_on ?i)
(not (calibrated ?i))
(not (power_avail ?s))
)
)
(:action switch_off
:parameters (?i - instrument ?s - satellite)
:precondition (and (on_board ?i ?s)
(power_on ?i)
)
:effect (and (not (power_on ?i))
(power_avail ?s)
)
)
(:action calibrate
:parameters (?s - satellite ?i - instrument ?d - direction)
:precondition (and (on_board ?i ?s)
(calibration_target ?i ?d)
(pointing ?s ?d)
(power_on ?i)
)
:effect (calibrated ?i)
)
(:action take_image
:parameters (?s - satellite ?d - direction ?i - instrument ?m - mode)
:precondition (and (calibrated ?i)
(on_board ?i ?s)
(supports ?i ?m)
(power_on ?i)
(pointing ?s ?d)
(power_on ?i)
)
:effect (have_image ?d ?m)
)
)

View File

@@ -0,0 +1,30 @@
(define (problem strips-sat-x-1)
(:domain satellite)
(:objects
satellite0 - satellite
instrument0 - instrument
image1 - mode
spectrograph2 - mode
thermograph0 - mode
Star0 - direction
GroundStation1 - direction
GroundStation2 - direction
Phenomenon3 - direction
Phenomenon4 - direction
Star5 - direction
Phenomenon6 - direction
)
(:init
(supports instrument0 thermograph0)
(calibration_target instrument0 GroundStation2)
(on_board instrument0 satellite0)
(power_avail satellite0)
(pointing satellite0 Phenomenon6)
)
(:goal (and
(have_image Phenomenon4 thermograph0)
(have_image Star5 thermograph0)
(have_image Phenomenon6 thermograph0)
))
)

View File

@@ -0,0 +1,40 @@
(define (problem strips-sat-x-1)
(:domain satellite)
(:objects
satellite0 - satellite
instrument0 - instrument
instrument1 - instrument
infrared0 - mode
infrared1 - mode
image2 - mode
GroundStation1 - direction
Star0 - direction
GroundStation2 - direction
Planet3 - direction
Planet4 - direction
Phenomenon5 - direction
Phenomenon6 - direction
Star7 - direction
)
(:init
(supports instrument0 infrared1)
(supports instrument0 infrared0)
(calibration_target instrument0 Star0)
(supports instrument1 image2)
(supports instrument1 infrared1)
(supports instrument1 infrared0)
(calibration_target instrument1 GroundStation2)
(on_board instrument0 satellite0)
(on_board instrument1 satellite0)
(power_avail satellite0)
(pointing satellite0 Planet4)
)
(:goal (and
(have_image Planet3 infrared0)
(have_image Planet4 infrared0)
(have_image Phenomenon5 image2)
(have_image Phenomenon6 infrared0)
(have_image Star7 infrared0)
))
)

View File

@@ -0,0 +1,52 @@
(define (problem strips-sat-x-1)
(:domain satellite)
(:objects
satellite0 - satellite
instrument0 - instrument
instrument1 - instrument
instrument2 - instrument
satellite1 - satellite
instrument3 - instrument
image1 - mode
infrared0 - mode
spectrograph2 - mode
Star1 - direction
Star2 - direction
Star0 - direction
Star3 - direction
Star4 - direction
Phenomenon5 - direction
Phenomenon6 - direction
Phenomenon7 - direction
)
(:init
(supports instrument0 spectrograph2)
(supports instrument0 infrared0)
(calibration_target instrument0 Star1)
(supports instrument1 image1)
(calibration_target instrument1 Star2)
(supports instrument2 infrared0)
(supports instrument2 image1)
(calibration_target instrument2 Star0)
(on_board instrument0 satellite0)
(on_board instrument1 satellite0)
(on_board instrument2 satellite0)
(power_avail satellite0)
(pointing satellite0 Star4)
(supports instrument3 spectrograph2)
(supports instrument3 infrared0)
(supports instrument3 image1)
(calibration_target instrument3 Star0)
(on_board instrument3 satellite1)
(power_avail satellite1)
(pointing satellite1 Star0)
)
(:goal (and
(pointing satellite0 Phenomenon5)
(have_image Star3 infrared0)
(have_image Star4 spectrograph2)
(have_image Phenomenon5 spectrograph2)
(have_image Phenomenon7 spectrograph2)
))
)

View File

@@ -0,0 +1,5 @@
instance | minimal horizon | #solutions with minimal horizon
============================================================
problem-01.pddl | 9 | 12
problem-02.pddl | 13 | 240
problem-03.pddl | 11 | 276

View File

@@ -0,0 +1,65 @@
; IPC5 Domain: TPP Propositional
; Authors: Alfonso Gerevini and Alessandro Saetti
(define (domain TPP-Propositional)
(:requirements :strips :typing)
(:types place locatable level - object
depot market - place
truck goods - locatable)
(:predicates (loaded ?g - goods ?t - truck ?l - level)
(ready-to-load ?g - goods ?m - market ?l - level)
(stored ?g - goods ?l - level)
(on-sale ?g - goods ?m - market ?l - level)
(next ?l1 ?l2 - level)
(at ?t - truck ?p - place)
(connected ?p1 ?p2 - place))
(:action drive
:parameters (?t - truck ?from ?to - place)
:precondition (and (at ?t ?from) (connected ?from ?to))
:effect (and (not (at ?t ?from)) (at ?t ?to)))
; ### LOAD ###
; ?l1 is the level of ?g ready to be loaded at ?m before loading
; ?l2 is the level of ?g ready to be loaded at ?m after loading
; ?l3 is the level of ?g in ?t before loading
; ?l4 is the level of ?g in ?t after loading
(:action load
:parameters (?g - goods ?t - truck ?m - market ?l1 ?l2 ?l3 ?l4 - level)
:precondition (and (at ?t ?m) (loaded ?g ?t ?l3)
(ready-to-load ?g ?m ?l2) (next ?l2 ?l1) (next ?l4 ?l3))
:effect (and (loaded ?g ?t ?l4) (not (loaded ?g ?t ?l3))
(ready-to-load ?g ?m ?l1) (not (ready-to-load ?g ?m ?l2))))
; ### UNLOAD ###
; ?l1 is the level of ?g in ?t before unloading
; ?l2 is the level of ?g in ?t after unloading
; ?l3 is the level of ?g in ?d before unloading
; ?l4 is the level of ?g in ?d after unloading
(:action unload
:parameters (?g - goods ?t - truck ?d - depot ?l1 ?l2 ?l3 ?l4 - level)
:precondition (and (at ?t ?d) (loaded ?g ?t ?l2)
(stored ?g ?l3) (next ?l2 ?l1) (next ?l4 ?l3))
:effect (and (loaded ?g ?t ?l1) (not (loaded ?g ?t ?l2))
(stored ?g ?l4) (not (stored ?g ?l3))))
; ### BUY ###
; ?l1 is the level of ?g on sale at ?m before buying
; ?l2 is the level of ?g on sale at ?m after buying
; ?l3 is the level of ?g ready to be loaded at ?m before buying
; ?l4 is the level of ?g ready to be loaded at ?m after buying
(:action buy
:parameters (?t - truck ?g - goods ?m - market ?l1 ?l2 ?l3 ?l4 - level)
:precondition (and (at ?t ?m) (on-sale ?g ?m ?l2) (ready-to-load ?g ?m ?l3)
(next ?l2 ?l1) (next ?l4 ?l3))
:effect (and (on-sale ?g ?m ?l1) (not (on-sale ?g ?m ?l2))
(ready-to-load ?g ?m ?l4) (not (ready-to-load ?g ?m ?l3))))
)

View File

@@ -0,0 +1,28 @@
(define (problem TPP)
(:domain TPP-Propositional)
(:objects
goods1 goods2 - goods
truck1 - truck
market1 - market
depot1 - depot
level0 level1 - level)
(:init
(next level1 level0)
(ready-to-load goods1 market1 level0)
(ready-to-load goods2 market1 level0)
(stored goods1 level0)
(stored goods2 level0)
(loaded goods1 truck1 level0)
(loaded goods2 truck1 level0)
(connected depot1 market1)
(connected market1 depot1)
(on-sale goods1 market1 level1)
(on-sale goods2 market1 level1)
(at truck1 depot1))
(:goal (and
(stored goods1 level1)
(stored goods2 level1)))
)

View File

@@ -0,0 +1,33 @@
(define (problem TPP)
(:domain TPP-Propositional)
(:objects
goods1 goods2 goods3 - goods
truck1 - truck
market1 - market
depot1 - depot
level0 level1 - level)
(:init
(next level1 level0)
(ready-to-load goods1 market1 level0)
(ready-to-load goods2 market1 level0)
(ready-to-load goods3 market1 level0)
(stored goods1 level0)
(stored goods2 level0)
(stored goods3 level0)
(loaded goods1 truck1 level0)
(loaded goods2 truck1 level0)
(loaded goods3 truck1 level0)
(connected depot1 market1)
(connected market1 depot1)
(on-sale goods1 market1 level1)
(on-sale goods2 market1 level1)
(on-sale goods3 market1 level1)
(at truck1 depot1))
(:goal (and
(stored goods1 level1)
(stored goods2 level1)
(stored goods3 level1)))
)

View File

@@ -0,0 +1,38 @@
(define (problem TPP)
(:domain TPP-Propositional)
(:objects
goods1 goods2 goods3 goods4 - goods
truck1 - truck
market1 - market
depot1 - depot
level0 level1 - level)
(:init
(next level1 level0)
(ready-to-load goods1 market1 level0)
(ready-to-load goods2 market1 level0)
(ready-to-load goods3 market1 level0)
(ready-to-load goods4 market1 level0)
(stored goods1 level0)
(stored goods2 level0)
(stored goods3 level0)
(stored goods4 level0)
(loaded goods1 truck1 level0)
(loaded goods2 truck1 level0)
(loaded goods3 truck1 level0)
(loaded goods4 truck1 level0)
(connected depot1 market1)
(connected market1 depot1)
(on-sale goods1 market1 level1)
(on-sale goods2 market1 level1)
(on-sale goods3 market1 level1)
(on-sale goods4 market1 level1)
(at truck1 depot1))
(:goal (and
(stored goods1 level1)
(stored goods2 level1)
(stored goods3 level1)
(stored goods4 level1)))
)

View File

@@ -0,0 +1,5 @@
instance | minimal horizon | #solutions with minimal horizon
============================================================
problem-02.pddl | 8 | 12
problem-03.pddl | 11 | 540
problem-04.pddl | 14 | 60480

View File

@@ -0,0 +1,76 @@
begin_version
3
end_version
begin_metric
0
end_metric
3
begin_variable
var0
-1
2
Atom boarded(p0)
NegatedAtom boarded(p0)
end_variable
begin_variable
var1
-1
2
Atom lift-at(f0)
Atom lift-at(f1)
end_variable
begin_variable
var2
-1
2
Atom served(p0)
NegatedAtom served(p0)
end_variable
1
begin_mutex_group
2
1 0
1 1
end_mutex_group
begin_state
1
0
1
end_state
begin_goal
1
2 0
end_goal
4
begin_operator
down f1 f0
0
1
0 1 1 0
1
end_operator
begin_operator
stop f0
1
1 0
2
0 0 -1 1
1 0 0 2 -1 0
1
end_operator
begin_operator
stop f1
1
1 1
1
1 2 1 0 -1 0
1
end_operator
begin_operator
up f0 f1
0
1
0 1 0 1
1
end_operator
0

View File

@@ -0,0 +1,76 @@
begin_version
3
end_version
begin_metric
0
end_metric
3
begin_variable
var0
-1
2
Atom boarded(p0)
NegatedAtom boarded(p0)
end_variable
begin_variable
var1
-1
2
Atom lift-at(f0)
Atom lift-at(f1)
end_variable
begin_variable
var2
-1
2
Atom served(p0)
NegatedAtom served(p0)
end_variable
1
begin_mutex_group
2
1 0
1 1
end_mutex_group
begin_state
1
0
1
end_state
begin_goal
1
2 0
end_goal
4
begin_operator
down f1 f0
0
1
0 1 1 0
1
end_operator
begin_operator
stop f0
1
1 0
1
1 2 1 0 -1 0
1
end_operator
begin_operator
stop f1
1
1 1
2
0 0 -1 1
1 0 0 2 -1 0
1
end_operator
begin_operator
up f0 f1
0
1
0 1 0 1
1
end_operator
0

View File

@@ -0,0 +1,76 @@
begin_version
3
end_version
begin_metric
0
end_metric
3
begin_variable
var0
-1
2
Atom boarded(p0)
NegatedAtom boarded(p0)
end_variable
begin_variable
var1
-1
2
Atom lift-at(f0)
Atom lift-at(f1)
end_variable
begin_variable
var2
-1
2
Atom served(p0)
NegatedAtom served(p0)
end_variable
1
begin_mutex_group
2
1 0
1 1
end_mutex_group
begin_state
1
0
1
end_state
begin_goal
1
2 0
end_goal
4
begin_operator
down f1 f0
0
1
0 1 1 0
1
end_operator
begin_operator
stop f0
1
1 0
2
0 0 -1 1
1 0 0 2 -1 0
1
end_operator
begin_operator
stop f1
1
1 1
1
1 2 1 0 -1 0
1
end_operator
begin_operator
up f0 f1
0
1
0 1 0 1
1
end_operator
0

View File

@@ -0,0 +1,76 @@
begin_version
3
end_version
begin_metric
0
end_metric
3
begin_variable
var0
-1
2
Atom boarded(p0)
NegatedAtom boarded(p0)
end_variable
begin_variable
var1
-1
2
Atom lift-at(f0)
Atom lift-at(f1)
end_variable
begin_variable
var2
-1
2
Atom served(p0)
NegatedAtom served(p0)
end_variable
1
begin_mutex_group
2
1 0
1 1
end_mutex_group
begin_state
1
0
1
end_state
begin_goal
1
2 0
end_goal
4
begin_operator
down f1 f0
0
1
0 1 1 0
1
end_operator
begin_operator
stop f0
1
1 0
2
0 0 -1 1
1 0 0 2 -1 0
1
end_operator
begin_operator
stop f1
1
1 1
1
1 2 1 0 -1 0
1
end_operator
begin_operator
up f0 f1
0
1
0 1 0 1
1
end_operator
0

View File

@@ -0,0 +1,76 @@
begin_version
3
end_version
begin_metric
0
end_metric
3
begin_variable
var0
-1
2
Atom boarded(p0)
NegatedAtom boarded(p0)
end_variable
begin_variable
var1
-1
2
Atom lift-at(f0)
Atom lift-at(f1)
end_variable
begin_variable
var2
-1
2
Atom served(p0)
NegatedAtom served(p0)
end_variable
1
begin_mutex_group
2
1 0
1 1
end_mutex_group
begin_state
1
0
1
end_state
begin_goal
1
2 0
end_goal
4
begin_operator
down f1 f0
0
1
0 1 1 0
1
end_operator
begin_operator
stop f0
1
1 0
2
0 0 -1 1
1 0 0 2 -1 0
1
end_operator
begin_operator
stop f1
1
1 1
1
1 2 1 0 -1 0
1
end_operator
begin_operator
up f0 f1
0
1
0 1 0 1
1
end_operator
0

View File

@@ -0,0 +1,177 @@
begin_version
3
end_version
begin_metric
0
end_metric
5
begin_variable
var0
-1
2
Atom boarded(p0)
NegatedAtom boarded(p0)
end_variable
begin_variable
var1
-1
2
Atom boarded(p1)
NegatedAtom boarded(p1)
end_variable
begin_variable
var2
-1
4
Atom lift-at(f0)
Atom lift-at(f1)
Atom lift-at(f2)
Atom lift-at(f3)
end_variable
begin_variable
var3
-1
2
Atom served(p0)
NegatedAtom served(p0)
end_variable
begin_variable
var4
-1
2
Atom served(p1)
NegatedAtom served(p1)
end_variable
1
begin_mutex_group
4
2 0
2 1
2 2
2 3
end_mutex_group
begin_state
1
1
0
1
1
end_state
begin_goal
2
3 0
4 0
end_goal
15
begin_operator
down f1 f0
0
1
0 2 1 0
1
end_operator
begin_operator
down f2 f0
0
1
0 2 2 0
1
end_operator
begin_operator
down f2 f1
0
1
0 2 2 1
1
end_operator
begin_operator
down f3 f0
0
1
0 2 3 0
1
end_operator
begin_operator
down f3 f1
0
1
0 2 3 1
1
end_operator
begin_operator
down f3 f2
0
1
0 2 3 2
1
end_operator
begin_operator
stop f1
1
2 1
1
1 4 1 1 -1 0
1
end_operator
begin_operator
stop f2
1
2 2
2
0 0 -1 1
1 0 0 3 -1 0
1
end_operator
begin_operator
stop f3
1
2 3
3
1 3 1 0 -1 0
0 1 -1 1
1 1 0 4 -1 0
1
end_operator
begin_operator
up f0 f1
0
1
0 2 0 1
1
end_operator
begin_operator
up f0 f2
0
1
0 2 0 2
1
end_operator
begin_operator
up f0 f3
0
1
0 2 0 3
1
end_operator
begin_operator
up f1 f2
0
1
0 2 1 2
1
end_operator
begin_operator
up f1 f3
0
1
0 2 1 3
1
end_operator
begin_operator
up f2 f3
0
1
0 2 2 3
1
end_operator
0

View File

@@ -0,0 +1,334 @@
begin_version
3
end_version
begin_metric
0
end_metric
7
begin_variable
var0
-1
2
Atom boarded(p0)
NegatedAtom boarded(p0)
end_variable
begin_variable
var1
-1
2
Atom boarded(p1)
NegatedAtom boarded(p1)
end_variable
begin_variable
var2
-1
2
Atom boarded(p2)
NegatedAtom boarded(p2)
end_variable
begin_variable
var3
-1
6
Atom lift-at(f0)
Atom lift-at(f1)
Atom lift-at(f2)
Atom lift-at(f3)
Atom lift-at(f4)
Atom lift-at(f5)
end_variable
begin_variable
var4
-1
2
Atom served(p0)
NegatedAtom served(p0)
end_variable
begin_variable
var5
-1
2
Atom served(p1)
NegatedAtom served(p1)
end_variable
begin_variable
var6
-1
2
Atom served(p2)
NegatedAtom served(p2)
end_variable
1
begin_mutex_group
6
3 0
3 1
3 2
3 3
3 4
3 5
end_mutex_group
begin_state
1
1
1
0
1
1
1
end_state
begin_goal
3
4 0
5 0
6 0
end_goal
34
begin_operator
down f1 f0
0
1
0 3 1 0
1
end_operator
begin_operator
down f2 f0
0
1
0 3 2 0
1
end_operator
begin_operator
down f2 f1
0
1
0 3 2 1
1
end_operator
begin_operator
down f3 f0
0
1
0 3 3 0
1
end_operator
begin_operator
down f3 f1
0
1
0 3 3 1
1
end_operator
begin_operator
down f3 f2
0
1
0 3 3 2
1
end_operator
begin_operator
down f4 f0
0
1
0 3 4 0
1
end_operator
begin_operator
down f4 f1
0
1
0 3 4 1
1
end_operator
begin_operator
down f4 f2
0
1
0 3 4 2
1
end_operator
begin_operator
down f4 f3
0
1
0 3 4 3
1
end_operator
begin_operator
down f5 f0
0
1
0 3 5 0
1
end_operator
begin_operator
down f5 f1
0
1
0 3 5 1
1
end_operator
begin_operator
down f5 f2
0
1
0 3 5 2
1
end_operator
begin_operator
down f5 f3
0
1
0 3 5 3
1
end_operator
begin_operator
down f5 f4
0
1
0 3 5 4
1
end_operator
begin_operator
stop f1
1
3 1
5
1 4 1 0 -1 0
0 1 -1 1
0 2 -1 1
1 1 0 5 -1 0
1 2 0 6 -1 0
1
end_operator
begin_operator
stop f3
1
3 3
1
1 5 1 1 -1 0
1
end_operator
begin_operator
stop f4
1
3 4
2
0 0 -1 1
1 0 0 4 -1 0
1
end_operator
begin_operator
stop f5
1
3 5
1
1 6 1 2 -1 0
1
end_operator
begin_operator
up f0 f1
0
1
0 3 0 1
1
end_operator
begin_operator
up f0 f2
0
1
0 3 0 2
1
end_operator
begin_operator
up f0 f3
0
1
0 3 0 3
1
end_operator
begin_operator
up f0 f4
0
1
0 3 0 4
1
end_operator
begin_operator
up f0 f5
0
1
0 3 0 5
1
end_operator
begin_operator
up f1 f2
0
1
0 3 1 2
1
end_operator
begin_operator
up f1 f3
0
1
0 3 1 3
1
end_operator
begin_operator
up f1 f4
0
1
0 3 1 4
1
end_operator
begin_operator
up f1 f5
0
1
0 3 1 5
1
end_operator
begin_operator
up f2 f3
0
1
0 3 2 3
1
end_operator
begin_operator
up f2 f4
0
1
0 3 2 4
1
end_operator
begin_operator
up f2 f5
0
1
0 3 2 5
1
end_operator
begin_operator
up f3 f4
0
1
0 3 3 4
1
end_operator
begin_operator
up f3 f5
0
1
0 3 3 5
1
end_operator
begin_operator
up f4 f5
0
1
0 3 4 5
1
end_operator
0

View File

@@ -0,0 +1,823 @@
begin_version
3
end_version
begin_metric
0
end_metric
11
begin_variable
var0
-1
2
Atom boarded(p0)
NegatedAtom boarded(p0)
end_variable
begin_variable
var1
-1
2
Atom boarded(p1)
NegatedAtom boarded(p1)
end_variable
begin_variable
var2
-1
2
Atom boarded(p2)
NegatedAtom boarded(p2)
end_variable
begin_variable
var3
-1
2
Atom boarded(p3)
NegatedAtom boarded(p3)
end_variable
begin_variable
var4
-1
2
Atom boarded(p4)
NegatedAtom boarded(p4)
end_variable
begin_variable
var5
-1
10
Atom lift-at(f0)
Atom lift-at(f1)
Atom lift-at(f2)
Atom lift-at(f3)
Atom lift-at(f4)
Atom lift-at(f5)
Atom lift-at(f6)
Atom lift-at(f7)
Atom lift-at(f8)
Atom lift-at(f9)
end_variable
begin_variable
var6
-1
2
Atom served(p0)
NegatedAtom served(p0)
end_variable
begin_variable
var7
-1
2
Atom served(p1)
NegatedAtom served(p1)
end_variable
begin_variable
var8
-1
2
Atom served(p2)
NegatedAtom served(p2)
end_variable
begin_variable
var9
-1
2
Atom served(p3)
NegatedAtom served(p3)
end_variable
begin_variable
var10
-1
2
Atom served(p4)
NegatedAtom served(p4)
end_variable
1
begin_mutex_group
10
5 0
5 1
5 2
5 3
5 4
5 5
5 6
5 7
5 8
5 9
end_mutex_group
begin_state
1
1
1
1
1
0
1
1
1
1
1
end_state
begin_goal
5
6 0
7 0
8 0
9 0
10 0
end_goal
97
begin_operator
down f1 f0
0
1
0 5 1 0
1
end_operator
begin_operator
down f2 f0
0
1
0 5 2 0
1
end_operator
begin_operator
down f2 f1
0
1
0 5 2 1
1
end_operator
begin_operator
down f3 f0
0
1
0 5 3 0
1
end_operator
begin_operator
down f3 f1
0
1
0 5 3 1
1
end_operator
begin_operator
down f3 f2
0
1
0 5 3 2
1
end_operator
begin_operator
down f4 f0
0
1
0 5 4 0
1
end_operator
begin_operator
down f4 f1
0
1
0 5 4 1
1
end_operator
begin_operator
down f4 f2
0
1
0 5 4 2
1
end_operator
begin_operator
down f4 f3
0
1
0 5 4 3
1
end_operator
begin_operator
down f5 f0
0
1
0 5 5 0
1
end_operator
begin_operator
down f5 f1
0
1
0 5 5 1
1
end_operator
begin_operator
down f5 f2
0
1
0 5 5 2
1
end_operator
begin_operator
down f5 f3
0
1
0 5 5 3
1
end_operator
begin_operator
down f5 f4
0
1
0 5 5 4
1
end_operator
begin_operator
down f6 f0
0
1
0 5 6 0
1
end_operator
begin_operator
down f6 f1
0
1
0 5 6 1
1
end_operator
begin_operator
down f6 f2
0
1
0 5 6 2
1
end_operator
begin_operator
down f6 f3
0
1
0 5 6 3
1
end_operator
begin_operator
down f6 f4
0
1
0 5 6 4
1
end_operator
begin_operator
down f6 f5
0
1
0 5 6 5
1
end_operator
begin_operator
down f7 f0
0
1
0 5 7 0
1
end_operator
begin_operator
down f7 f1
0
1
0 5 7 1
1
end_operator
begin_operator
down f7 f2
0
1
0 5 7 2
1
end_operator
begin_operator
down f7 f3
0
1
0 5 7 3
1
end_operator
begin_operator
down f7 f4
0
1
0 5 7 4
1
end_operator
begin_operator
down f7 f5
0
1
0 5 7 5
1
end_operator
begin_operator
down f7 f6
0
1
0 5 7 6
1
end_operator
begin_operator
down f8 f0
0
1
0 5 8 0
1
end_operator
begin_operator
down f8 f1
0
1
0 5 8 1
1
end_operator
begin_operator
down f8 f2
0
1
0 5 8 2
1
end_operator
begin_operator
down f8 f3
0
1
0 5 8 3
1
end_operator
begin_operator
down f8 f4
0
1
0 5 8 4
1
end_operator
begin_operator
down f8 f5
0
1
0 5 8 5
1
end_operator
begin_operator
down f8 f6
0
1
0 5 8 6
1
end_operator
begin_operator
down f8 f7
0
1
0 5 8 7
1
end_operator
begin_operator
down f9 f0
0
1
0 5 9 0
1
end_operator
begin_operator
down f9 f1
0
1
0 5 9 1
1
end_operator
begin_operator
down f9 f2
0
1
0 5 9 2
1
end_operator
begin_operator
down f9 f3
0
1
0 5 9 3
1
end_operator
begin_operator
down f9 f4
0
1
0 5 9 4
1
end_operator
begin_operator
down f9 f5
0
1
0 5 9 5
1
end_operator
begin_operator
down f9 f6
0
1
0 5 9 6
1
end_operator
begin_operator
down f9 f7
0
1
0 5 9 7
1
end_operator
begin_operator
down f9 f8
0
1
0 5 9 8
1
end_operator
begin_operator
stop f1
1
5 1
2
0 4 -1 1
1 4 0 10 -1 0
1
end_operator
begin_operator
stop f2
1
5 2
2
0 3 -1 1
1 3 0 9 -1 0
1
end_operator
begin_operator
stop f3
1
5 3
2
1 6 1 0 -1 0
1 8 1 2 -1 0
1
end_operator
begin_operator
stop f5
1
5 5
4
0 1 -1 1
0 2 -1 1
1 1 0 7 -1 0
1 2 0 8 -1 0
1
end_operator
begin_operator
stop f6
1
5 6
3
0 0 -1 1
1 9 1 3 -1 0
1 0 0 6 -1 0
1
end_operator
begin_operator
stop f7
1
5 7
1
1 7 1 1 -1 0
1
end_operator
begin_operator
stop f9
1
5 9
1
1 10 1 4 -1 0
1
end_operator
begin_operator
up f0 f1
0
1
0 5 0 1
1
end_operator
begin_operator
up f0 f2
0
1
0 5 0 2
1
end_operator
begin_operator
up f0 f3
0
1
0 5 0 3
1
end_operator
begin_operator
up f0 f4
0
1
0 5 0 4
1
end_operator
begin_operator
up f0 f5
0
1
0 5 0 5
1
end_operator
begin_operator
up f0 f6
0
1
0 5 0 6
1
end_operator
begin_operator
up f0 f7
0
1
0 5 0 7
1
end_operator
begin_operator
up f0 f8
0
1
0 5 0 8
1
end_operator
begin_operator
up f0 f9
0
1
0 5 0 9
1
end_operator
begin_operator
up f1 f2
0
1
0 5 1 2
1
end_operator
begin_operator
up f1 f3
0
1
0 5 1 3
1
end_operator
begin_operator
up f1 f4
0
1
0 5 1 4
1
end_operator
begin_operator
up f1 f5
0
1
0 5 1 5
1
end_operator
begin_operator
up f1 f6
0
1
0 5 1 6
1
end_operator
begin_operator
up f1 f7
0
1
0 5 1 7
1
end_operator
begin_operator
up f1 f8
0
1
0 5 1 8
1
end_operator
begin_operator
up f1 f9
0
1
0 5 1 9
1
end_operator
begin_operator
up f2 f3
0
1
0 5 2 3
1
end_operator
begin_operator
up f2 f4
0
1
0 5 2 4
1
end_operator
begin_operator
up f2 f5
0
1
0 5 2 5
1
end_operator
begin_operator
up f2 f6
0
1
0 5 2 6
1
end_operator
begin_operator
up f2 f7
0
1
0 5 2 7
1
end_operator
begin_operator
up f2 f8
0
1
0 5 2 8
1
end_operator
begin_operator
up f2 f9
0
1
0 5 2 9
1
end_operator
begin_operator
up f3 f4
0
1
0 5 3 4
1
end_operator
begin_operator
up f3 f5
0
1
0 5 3 5
1
end_operator
begin_operator
up f3 f6
0
1
0 5 3 6
1
end_operator
begin_operator
up f3 f7
0
1
0 5 3 7
1
end_operator
begin_operator
up f3 f8
0
1
0 5 3 8
1
end_operator
begin_operator
up f3 f9
0
1
0 5 3 9
1
end_operator
begin_operator
up f4 f5
0
1
0 5 4 5
1
end_operator
begin_operator
up f4 f6
0
1
0 5 4 6
1
end_operator
begin_operator
up f4 f7
0
1
0 5 4 7
1
end_operator
begin_operator
up f4 f8
0
1
0 5 4 8
1
end_operator
begin_operator
up f4 f9
0
1
0 5 4 9
1
end_operator
begin_operator
up f5 f6
0
1
0 5 5 6
1
end_operator
begin_operator
up f5 f7
0
1
0 5 5 7
1
end_operator
begin_operator
up f5 f8
0
1
0 5 5 8
1
end_operator
begin_operator
up f5 f9
0
1
0 5 5 9
1
end_operator
begin_operator
up f6 f7
0
1
0 5 6 7
1
end_operator
begin_operator
up f6 f8
0
1
0 5 6 8
1
end_operator
begin_operator
up f6 f9
0
1
0 5 6 9
1
end_operator
begin_operator
up f7 f8
0
1
0 5 7 8
1
end_operator
begin_operator
up f7 f9
0
1
0 5 7 9
1
end_operator
begin_operator
up f8 f9
0
1
0 5 8 9
1
end_operator
0

View File

@@ -0,0 +1,823 @@
begin_version
3
end_version
begin_metric
0
end_metric
11
begin_variable
var0
-1
2
Atom boarded(p0)
NegatedAtom boarded(p0)
end_variable
begin_variable
var1
-1
2
Atom boarded(p1)
NegatedAtom boarded(p1)
end_variable
begin_variable
var2
-1
2
Atom boarded(p2)
NegatedAtom boarded(p2)
end_variable
begin_variable
var3
-1
2
Atom boarded(p3)
NegatedAtom boarded(p3)
end_variable
begin_variable
var4
-1
2
Atom boarded(p4)
NegatedAtom boarded(p4)
end_variable
begin_variable
var5
-1
10
Atom lift-at(f0)
Atom lift-at(f1)
Atom lift-at(f2)
Atom lift-at(f3)
Atom lift-at(f4)
Atom lift-at(f5)
Atom lift-at(f6)
Atom lift-at(f7)
Atom lift-at(f8)
Atom lift-at(f9)
end_variable
begin_variable
var6
-1
2
Atom served(p0)
NegatedAtom served(p0)
end_variable
begin_variable
var7
-1
2
Atom served(p1)
NegatedAtom served(p1)
end_variable
begin_variable
var8
-1
2
Atom served(p2)
NegatedAtom served(p2)
end_variable
begin_variable
var9
-1
2
Atom served(p3)
NegatedAtom served(p3)
end_variable
begin_variable
var10
-1
2
Atom served(p4)
NegatedAtom served(p4)
end_variable
1
begin_mutex_group
10
5 0
5 1
5 2
5 3
5 4
5 5
5 6
5 7
5 8
5 9
end_mutex_group
begin_state
1
1
1
1
1
0
1
1
1
1
1
end_state
begin_goal
5
6 0
7 0
8 0
9 0
10 0
end_goal
97
begin_operator
down f1 f0
0
1
0 5 1 0
1
end_operator
begin_operator
down f2 f0
0
1
0 5 2 0
1
end_operator
begin_operator
down f2 f1
0
1
0 5 2 1
1
end_operator
begin_operator
down f3 f0
0
1
0 5 3 0
1
end_operator
begin_operator
down f3 f1
0
1
0 5 3 1
1
end_operator
begin_operator
down f3 f2
0
1
0 5 3 2
1
end_operator
begin_operator
down f4 f0
0
1
0 5 4 0
1
end_operator
begin_operator
down f4 f1
0
1
0 5 4 1
1
end_operator
begin_operator
down f4 f2
0
1
0 5 4 2
1
end_operator
begin_operator
down f4 f3
0
1
0 5 4 3
1
end_operator
begin_operator
down f5 f0
0
1
0 5 5 0
1
end_operator
begin_operator
down f5 f1
0
1
0 5 5 1
1
end_operator
begin_operator
down f5 f2
0
1
0 5 5 2
1
end_operator
begin_operator
down f5 f3
0
1
0 5 5 3
1
end_operator
begin_operator
down f5 f4
0
1
0 5 5 4
1
end_operator
begin_operator
down f6 f0
0
1
0 5 6 0
1
end_operator
begin_operator
down f6 f1
0
1
0 5 6 1
1
end_operator
begin_operator
down f6 f2
0
1
0 5 6 2
1
end_operator
begin_operator
down f6 f3
0
1
0 5 6 3
1
end_operator
begin_operator
down f6 f4
0
1
0 5 6 4
1
end_operator
begin_operator
down f6 f5
0
1
0 5 6 5
1
end_operator
begin_operator
down f7 f0
0
1
0 5 7 0
1
end_operator
begin_operator
down f7 f1
0
1
0 5 7 1
1
end_operator
begin_operator
down f7 f2
0
1
0 5 7 2
1
end_operator
begin_operator
down f7 f3
0
1
0 5 7 3
1
end_operator
begin_operator
down f7 f4
0
1
0 5 7 4
1
end_operator
begin_operator
down f7 f5
0
1
0 5 7 5
1
end_operator
begin_operator
down f7 f6
0
1
0 5 7 6
1
end_operator
begin_operator
down f8 f0
0
1
0 5 8 0
1
end_operator
begin_operator
down f8 f1
0
1
0 5 8 1
1
end_operator
begin_operator
down f8 f2
0
1
0 5 8 2
1
end_operator
begin_operator
down f8 f3
0
1
0 5 8 3
1
end_operator
begin_operator
down f8 f4
0
1
0 5 8 4
1
end_operator
begin_operator
down f8 f5
0
1
0 5 8 5
1
end_operator
begin_operator
down f8 f6
0
1
0 5 8 6
1
end_operator
begin_operator
down f8 f7
0
1
0 5 8 7
1
end_operator
begin_operator
down f9 f0
0
1
0 5 9 0
1
end_operator
begin_operator
down f9 f1
0
1
0 5 9 1
1
end_operator
begin_operator
down f9 f2
0
1
0 5 9 2
1
end_operator
begin_operator
down f9 f3
0
1
0 5 9 3
1
end_operator
begin_operator
down f9 f4
0
1
0 5 9 4
1
end_operator
begin_operator
down f9 f5
0
1
0 5 9 5
1
end_operator
begin_operator
down f9 f6
0
1
0 5 9 6
1
end_operator
begin_operator
down f9 f7
0
1
0 5 9 7
1
end_operator
begin_operator
down f9 f8
0
1
0 5 9 8
1
end_operator
begin_operator
stop f0
1
5 0
5
1 6 1 0 -1 0
0 3 -1 1
0 4 -1 1
1 3 0 9 -1 0
1 4 0 10 -1 0
1
end_operator
begin_operator
stop f1
1
5 1
3
0 0 -1 1
1 10 1 4 -1 0
1 0 0 6 -1 0
1
end_operator
begin_operator
stop f3
1
5 3
2
0 2 -1 1
1 2 0 8 -1 0
1
end_operator
begin_operator
stop f4
1
5 4
2
0 1 -1 1
1 1 0 7 -1 0
1
end_operator
begin_operator
stop f5
1
5 5
1
1 9 1 3 -1 0
1
end_operator
begin_operator
stop f6
1
5 6
1
1 8 1 2 -1 0
1
end_operator
begin_operator
stop f9
1
5 9
1
1 7 1 1 -1 0
1
end_operator
begin_operator
up f0 f1
0
1
0 5 0 1
1
end_operator
begin_operator
up f0 f2
0
1
0 5 0 2
1
end_operator
begin_operator
up f0 f3
0
1
0 5 0 3
1
end_operator
begin_operator
up f0 f4
0
1
0 5 0 4
1
end_operator
begin_operator
up f0 f5
0
1
0 5 0 5
1
end_operator
begin_operator
up f0 f6
0
1
0 5 0 6
1
end_operator
begin_operator
up f0 f7
0
1
0 5 0 7
1
end_operator
begin_operator
up f0 f8
0
1
0 5 0 8
1
end_operator
begin_operator
up f0 f9
0
1
0 5 0 9
1
end_operator
begin_operator
up f1 f2
0
1
0 5 1 2
1
end_operator
begin_operator
up f1 f3
0
1
0 5 1 3
1
end_operator
begin_operator
up f1 f4
0
1
0 5 1 4
1
end_operator
begin_operator
up f1 f5
0
1
0 5 1 5
1
end_operator
begin_operator
up f1 f6
0
1
0 5 1 6
1
end_operator
begin_operator
up f1 f7
0
1
0 5 1 7
1
end_operator
begin_operator
up f1 f8
0
1
0 5 1 8
1
end_operator
begin_operator
up f1 f9
0
1
0 5 1 9
1
end_operator
begin_operator
up f2 f3
0
1
0 5 2 3
1
end_operator
begin_operator
up f2 f4
0
1
0 5 2 4
1
end_operator
begin_operator
up f2 f5
0
1
0 5 2 5
1
end_operator
begin_operator
up f2 f6
0
1
0 5 2 6
1
end_operator
begin_operator
up f2 f7
0
1
0 5 2 7
1
end_operator
begin_operator
up f2 f8
0
1
0 5 2 8
1
end_operator
begin_operator
up f2 f9
0
1
0 5 2 9
1
end_operator
begin_operator
up f3 f4
0
1
0 5 3 4
1
end_operator
begin_operator
up f3 f5
0
1
0 5 3 5
1
end_operator
begin_operator
up f3 f6
0
1
0 5 3 6
1
end_operator
begin_operator
up f3 f7
0
1
0 5 3 7
1
end_operator
begin_operator
up f3 f8
0
1
0 5 3 8
1
end_operator
begin_operator
up f3 f9
0
1
0 5 3 9
1
end_operator
begin_operator
up f4 f5
0
1
0 5 4 5
1
end_operator
begin_operator
up f4 f6
0
1
0 5 4 6
1
end_operator
begin_operator
up f4 f7
0
1
0 5 4 7
1
end_operator
begin_operator
up f4 f8
0
1
0 5 4 8
1
end_operator
begin_operator
up f4 f9
0
1
0 5 4 9
1
end_operator
begin_operator
up f5 f6
0
1
0 5 5 6
1
end_operator
begin_operator
up f5 f7
0
1
0 5 5 7
1
end_operator
begin_operator
up f5 f8
0
1
0 5 5 8
1
end_operator
begin_operator
up f5 f9
0
1
0 5 5 9
1
end_operator
begin_operator
up f6 f7
0
1
0 5 6 7
1
end_operator
begin_operator
up f6 f8
0
1
0 5 6 8
1
end_operator
begin_operator
up f6 f9
0
1
0 5 6 9
1
end_operator
begin_operator
up f7 f8
0
1
0 5 7 8
1
end_operator
begin_operator
up f7 f9
0
1
0 5 7 9
1
end_operator
begin_operator
up f8 f9
0
1
0 5 8 9
1
end_operator
0

View File

@@ -0,0 +1,921 @@
begin_version
3
end_version
begin_metric
0
end_metric
34
begin_variable
var0
-1
15
Atom airborne(airplane_cfbeg, seg_rwe_0_50)
Atom airborne(airplane_cfbeg, seg_rww_0_50)
Atom at-segment(airplane_cfbeg, seg_pp_0_60)
Atom at-segment(airplane_cfbeg, seg_ppdoor_0_40)
Atom at-segment(airplane_cfbeg, seg_rw_0_400)
Atom at-segment(airplane_cfbeg, seg_rwe_0_50)
Atom at-segment(airplane_cfbeg, seg_rww_0_50)
Atom at-segment(airplane_cfbeg, seg_twe1_0_200)
Atom at-segment(airplane_cfbeg, seg_twe2_0_50)
Atom at-segment(airplane_cfbeg, seg_twe3_0_50)
Atom at-segment(airplane_cfbeg, seg_twe4_0_50)
Atom at-segment(airplane_cfbeg, seg_tww1_0_200)
Atom at-segment(airplane_cfbeg, seg_tww2_0_50)
Atom at-segment(airplane_cfbeg, seg_tww3_0_50)
Atom at-segment(airplane_cfbeg, seg_tww4_0_50)
end_variable
begin_variable
var1
-1
2
Atom blocked(seg_pp_0_60, airplane_cfbeg)
NegatedAtom blocked(seg_pp_0_60, airplane_cfbeg)
end_variable
begin_variable
var2
-1
2
Atom blocked(seg_ppdoor_0_40, airplane_cfbeg)
NegatedAtom blocked(seg_ppdoor_0_40, airplane_cfbeg)
end_variable
begin_variable
var3
-1
2
Atom blocked(seg_rw_0_400, airplane_cfbeg)
NegatedAtom blocked(seg_rw_0_400, airplane_cfbeg)
end_variable
begin_variable
var4
-1
2
Atom blocked(seg_rwe_0_50, airplane_cfbeg)
NegatedAtom blocked(seg_rwe_0_50, airplane_cfbeg)
end_variable
begin_variable
var5
-1
2
Atom blocked(seg_rwtw1_0_10, airplane_cfbeg)
NegatedAtom blocked(seg_rwtw1_0_10, airplane_cfbeg)
end_variable
begin_variable
var6
-1
2
Atom blocked(seg_rww_0_50, airplane_cfbeg)
NegatedAtom blocked(seg_rww_0_50, airplane_cfbeg)
end_variable
begin_variable
var7
-1
2
Atom blocked(seg_twe1_0_200, airplane_cfbeg)
NegatedAtom blocked(seg_twe1_0_200, airplane_cfbeg)
end_variable
begin_variable
var8
-1
2
Atom blocked(seg_twe2_0_50, airplane_cfbeg)
NegatedAtom blocked(seg_twe2_0_50, airplane_cfbeg)
end_variable
begin_variable
var9
-1
2
Atom blocked(seg_twe3_0_50, airplane_cfbeg)
NegatedAtom blocked(seg_twe3_0_50, airplane_cfbeg)
end_variable
begin_variable
var10
-1
2
Atom blocked(seg_twe4_0_50, airplane_cfbeg)
NegatedAtom blocked(seg_twe4_0_50, airplane_cfbeg)
end_variable
begin_variable
var11
-1
2
Atom blocked(seg_tww1_0_200, airplane_cfbeg)
NegatedAtom blocked(seg_tww1_0_200, airplane_cfbeg)
end_variable
begin_variable
var12
-1
2
Atom blocked(seg_tww2_0_50, airplane_cfbeg)
NegatedAtom blocked(seg_tww2_0_50, airplane_cfbeg)
end_variable
begin_variable
var13
-1
2
Atom blocked(seg_tww3_0_50, airplane_cfbeg)
NegatedAtom blocked(seg_tww3_0_50, airplane_cfbeg)
end_variable
begin_variable
var14
-1
2
Atom blocked(seg_tww4_0_50, airplane_cfbeg)
NegatedAtom blocked(seg_tww4_0_50, airplane_cfbeg)
end_variable
begin_variable
var15
-1
2
Atom facing(airplane_cfbeg, north)
Atom facing(airplane_cfbeg, south)
end_variable
begin_variable
var16
-1
14
Atom is-moving(airplane_cfbeg)
Atom is-parked(airplane_cfbeg, seg_pp_0_60)
Atom is-parked(airplane_cfbeg, seg_ppdoor_0_40)
Atom is-parked(airplane_cfbeg, seg_rw_0_400)
Atom is-parked(airplane_cfbeg, seg_rwe_0_50)
Atom is-parked(airplane_cfbeg, seg_rww_0_50)
Atom is-parked(airplane_cfbeg, seg_twe1_0_200)
Atom is-parked(airplane_cfbeg, seg_twe2_0_50)
Atom is-parked(airplane_cfbeg, seg_twe3_0_50)
Atom is-parked(airplane_cfbeg, seg_twe4_0_50)
Atom is-parked(airplane_cfbeg, seg_tww1_0_200)
Atom is-parked(airplane_cfbeg, seg_tww2_0_50)
Atom is-parked(airplane_cfbeg, seg_tww3_0_50)
Atom is-parked(airplane_cfbeg, seg_tww4_0_50)
end_variable
begin_variable
var17
1
2
Atom new-axiom@1(south, seg_ppdoor_0_40, seg_tww1_0_200, medium)
NegatedAtom new-axiom@1(south, seg_ppdoor_0_40, seg_tww1_0_200, medium)
end_variable
begin_variable
var18
1
2
Atom new-axiom@1(south, seg_rw_0_400, seg_rww_0_50, medium)
NegatedAtom new-axiom@1(south, seg_rw_0_400, seg_rww_0_50, medium)
end_variable
begin_variable
var19
1
2
Atom new-axiom@1(south, seg_tww1_0_200, seg_ppdoor_0_40, medium)
NegatedAtom new-axiom@1(south, seg_tww1_0_200, seg_ppdoor_0_40, medium)
end_variable
begin_variable
var20
1
2
Atom new-axiom@1(south, seg_tww1_0_200, seg_twe1_0_200, medium)
NegatedAtom new-axiom@1(south, seg_tww1_0_200, seg_twe1_0_200, medium)
end_variable
begin_variable
var21
-1
2
Atom occupied(seg_pp_0_60)
NegatedAtom occupied(seg_pp_0_60)
end_variable
begin_variable
var22
-1
2
Atom occupied(seg_ppdoor_0_40)
NegatedAtom occupied(seg_ppdoor_0_40)
end_variable
begin_variable
var23
-1
2
Atom occupied(seg_rw_0_400)
NegatedAtom occupied(seg_rw_0_400)
end_variable
begin_variable
var24
-1
2
Atom occupied(seg_rwe_0_50)
NegatedAtom occupied(seg_rwe_0_50)
end_variable
begin_variable
var25
-1
2
Atom occupied(seg_rww_0_50)
NegatedAtom occupied(seg_rww_0_50)
end_variable
begin_variable
var26
-1
2
Atom occupied(seg_twe1_0_200)
NegatedAtom occupied(seg_twe1_0_200)
end_variable
begin_variable
var27
-1
2
Atom occupied(seg_twe2_0_50)
NegatedAtom occupied(seg_twe2_0_50)
end_variable
begin_variable
var28
-1
2
Atom occupied(seg_twe3_0_50)
NegatedAtom occupied(seg_twe3_0_50)
end_variable
begin_variable
var29
-1
2
Atom occupied(seg_twe4_0_50)
NegatedAtom occupied(seg_twe4_0_50)
end_variable
begin_variable
var30
-1
2
Atom occupied(seg_tww1_0_200)
NegatedAtom occupied(seg_tww1_0_200)
end_variable
begin_variable
var31
-1
2
Atom occupied(seg_tww2_0_50)
NegatedAtom occupied(seg_tww2_0_50)
end_variable
begin_variable
var32
-1
2
Atom occupied(seg_tww3_0_50)
NegatedAtom occupied(seg_tww3_0_50)
end_variable
begin_variable
var33
-1
2
Atom occupied(seg_tww4_0_50)
NegatedAtom occupied(seg_tww4_0_50)
end_variable
4
begin_mutex_group
15
0 0
0 1
0 2
0 3
0 4
0 5
0 6
0 7
0 8
0 9
0 10
0 11
0 12
0 13
0 14
end_mutex_group
begin_mutex_group
13
0 2
0 3
0 4
0 5
0 6
0 7
0 8
0 9
0 10
0 11
0 12
0 13
0 14
end_mutex_group
begin_mutex_group
2
15 0
15 1
end_mutex_group
begin_mutex_group
14
16 0
16 1
16 2
16 3
16 4
16 5
16 6
16 7
16 8
16 9
16 10
16 11
16 12
16 13
end_mutex_group
begin_state
4
1
1
0
0
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
0
1
1
0
1
1
1
1
1
1
1
1
1
1
end_state
begin_goal
1
16 1
end_goal
43
begin_operator
move airplane_cfbeg medium north seg_pp_0_60 seg_ppdoor_0_40 north
2
15 0
16 0
5
0 0 2 3
0 1 -1 0
0 2 -1 0
0 21 -1 1
0 22 -1 0
1
end_operator
begin_operator
move airplane_cfbeg medium north seg_ppdoor_0_40 seg_tww1_0_200 south
2
16 0
17 1
8
0 0 3 11
0 1 -1 1
0 2 -1 0
0 7 -1 0
0 11 -1 0
0 15 0 1
0 22 -1 1
0 30 -1 0
1
end_operator
begin_operator
move airplane_cfbeg medium north seg_tww1_0_200 seg_ppdoor_0_40 south
2
16 0
19 1
8
0 0 11 3
0 2 -1 0
0 7 -1 0
0 11 -1 0
0 12 -1 1
0 15 0 1
0 22 -1 0
0 30 -1 1
1
end_operator
begin_operator
move airplane_cfbeg medium north seg_tww1_0_200 seg_twe1_0_200 south
2
16 0
20 1
8
0 0 11 7
0 2 -1 0
0 7 -1 0
0 11 -1 0
0 12 -1 1
0 15 0 1
0 26 -1 0
0 30 -1 1
1
end_operator
begin_operator
move airplane_cfbeg medium north seg_tww2_0_50 seg_tww1_0_200 north
2
15 0
16 0
6
0 0 12 11
0 11 -1 0
0 12 -1 0
0 13 -1 1
0 30 -1 0
0 31 -1 1
1
end_operator
begin_operator
move airplane_cfbeg medium north seg_tww3_0_50 seg_tww2_0_50 north
2
15 0
16 0
6
0 0 13 12
0 12 -1 0
0 13 -1 0
0 14 -1 1
0 31 -1 0
0 32 -1 1
1
end_operator
begin_operator
move airplane_cfbeg medium north seg_tww4_0_50 seg_tww3_0_50 north
2
15 0
16 0
7
0 0 14 13
0 5 -1 1
0 6 -1 1
0 13 -1 0
0 14 -1 0
0 32 -1 0
0 33 -1 1
1
end_operator
begin_operator
move airplane_cfbeg medium south seg_ppdoor_0_40 seg_pp_0_60 south
2
15 1
16 0
7
0 0 3 2
0 1 -1 0
0 2 -1 0
0 7 -1 1
0 11 -1 1
0 21 -1 0
0 22 -1 1
1
end_operator
begin_operator
move airplane_cfbeg medium south seg_rw_0_400 seg_rww_0_50 south
3
15 1
16 0
18 1
6
0 0 4 6
0 3 -1 0
0 4 -1 0
0 6 -1 0
0 23 -1 1
0 25 -1 0
1
end_operator
begin_operator
move airplane_cfbeg medium south seg_rwe_0_50 seg_rw_0_400 south
2
15 1
16 0
6
0 0 5 4
0 3 -1 0
0 4 -1 0
0 10 -1 1
0 23 -1 0
0 24 -1 1
1
end_operator
begin_operator
move airplane_cfbeg medium south seg_rww_0_50 seg_tww4_0_50 north
1
16 0
9
0 0 6 14
0 3 -1 1
0 4 -1 1
0 5 -1 0
0 6 -1 0
0 14 -1 0
0 15 1 0
0 25 -1 1
0 33 -1 0
1
end_operator
begin_operator
move airplane_cfbeg medium south seg_twe1_0_200 seg_twe2_0_50 south
2
15 1
16 0
7
0 0 7 8
0 2 -1 1
0 7 -1 0
0 8 -1 0
0 11 -1 1
0 26 -1 1
0 27 -1 0
1
end_operator
begin_operator
move airplane_cfbeg medium south seg_twe2_0_50 seg_twe3_0_50 south
2
15 1
16 0
6
0 0 8 9
0 7 -1 1
0 8 -1 0
0 9 -1 0
0 27 -1 1
0 28 -1 0
1
end_operator
begin_operator
move airplane_cfbeg medium south seg_twe3_0_50 seg_twe4_0_50 south
2
15 1
16 0
6
0 0 9 10
0 8 -1 1
0 9 -1 0
0 10 -1 0
0 28 -1 1
0 29 -1 0
1
end_operator
begin_operator
move airplane_cfbeg medium south seg_twe4_0_50 seg_rwe_0_50 south
2
15 1
16 0
6
0 0 10 5
0 4 -1 0
0 9 -1 1
0 10 -1 0
0 24 -1 0
0 29 -1 1
1
end_operator
begin_operator
park airplane_cfbeg medium seg_pp_0_60 north
2
0 2
15 0
1
0 16 0 1
1
end_operator
begin_operator
park airplane_cfbeg medium seg_pp_0_60 south
2
0 2
15 1
2
0 2 -1 1
0 16 0 1
1
end_operator
begin_operator
park airplane_cfbeg medium seg_ppdoor_0_40 north
2
0 3
15 0
2
0 1 -1 1
0 16 0 2
1
end_operator
begin_operator
park airplane_cfbeg medium seg_ppdoor_0_40 south
2
0 3
15 1
3
0 7 -1 1
0 11 -1 1
0 16 0 2
1
end_operator
begin_operator
park airplane_cfbeg medium seg_rw_0_400 north
2
0 4
15 0
2
0 6 -1 1
0 16 0 3
1
end_operator
begin_operator
park airplane_cfbeg medium seg_rw_0_400 south
2
0 4
15 1
2
0 4 -1 1
0 16 0 3
1
end_operator
begin_operator
park airplane_cfbeg medium seg_rwe_0_50 north
2
0 5
15 0
3
0 3 -1 1
0 6 -1 1
0 16 0 4
1
end_operator
begin_operator
park airplane_cfbeg medium seg_rwe_0_50 south
2
0 5
15 1
2
0 10 -1 1
0 16 0 4
1
end_operator
begin_operator
park airplane_cfbeg medium seg_rww_0_50 north
2
0 6
15 0
2
0 14 -1 1
0 16 0 5
1
end_operator
begin_operator
park airplane_cfbeg medium seg_rww_0_50 south
2
0 6
15 1
3
0 3 -1 1
0 4 -1 1
0 16 0 5
1
end_operator
begin_operator
park airplane_cfbeg medium seg_twe1_0_200 north
2
0 7
15 0
2
0 8 -1 1
0 16 0 6
1
end_operator
begin_operator
park airplane_cfbeg medium seg_twe1_0_200 south
2
0 7
15 1
3
0 2 -1 1
0 11 -1 1
0 16 0 6
1
end_operator
begin_operator
park airplane_cfbeg medium seg_twe2_0_50 north
2
0 8
15 0
2
0 9 -1 1
0 16 0 7
1
end_operator
begin_operator
park airplane_cfbeg medium seg_twe2_0_50 south
2
0 8
15 1
2
0 7 -1 1
0 16 0 7
1
end_operator
begin_operator
park airplane_cfbeg medium seg_twe3_0_50 north
2
0 9
15 0
2
0 10 -1 1
0 16 0 8
1
end_operator
begin_operator
park airplane_cfbeg medium seg_twe3_0_50 south
2
0 9
15 1
2
0 8 -1 1
0 16 0 8
1
end_operator
begin_operator
park airplane_cfbeg medium seg_twe4_0_50 north
2
0 10
15 0
2
0 4 -1 1
0 16 0 9
1
end_operator
begin_operator
park airplane_cfbeg medium seg_twe4_0_50 south
2
0 10
15 1
2
0 9 -1 1
0 16 0 9
1
end_operator
begin_operator
park airplane_cfbeg medium seg_tww1_0_200 north
2
0 11
15 0
2
0 12 -1 1
0 16 0 10
1
end_operator
begin_operator
park airplane_cfbeg medium seg_tww1_0_200 south
2
0 11
15 1
3
0 2 -1 1
0 7 -1 1
0 16 0 10
1
end_operator
begin_operator
park airplane_cfbeg medium seg_tww2_0_50 north
2
0 12
15 0
2
0 13 -1 1
0 16 0 11
1
end_operator
begin_operator
park airplane_cfbeg medium seg_tww2_0_50 south
2
0 12
15 1
2
0 11 -1 1
0 16 0 11
1
end_operator
begin_operator
park airplane_cfbeg medium seg_tww3_0_50 north
2
0 13
15 0
2
0 14 -1 1
0 16 0 12
1
end_operator
begin_operator
park airplane_cfbeg medium seg_tww3_0_50 south
2
0 13
15 1
2
0 12 -1 1
0 16 0 12
1
end_operator
begin_operator
park airplane_cfbeg medium seg_tww4_0_50 north
2
0 14
15 0
3
0 5 -1 1
0 6 -1 1
0 16 0 13
1
end_operator
begin_operator
park airplane_cfbeg medium seg_tww4_0_50 south
2
0 14
15 1
2
0 13 -1 1
0 16 0 13
1
end_operator
begin_operator
takeoff airplane_cfbeg seg_rwe_0_50 south
1
15 1
16
0 0 5 0
0 1 -1 1
0 2 -1 1
0 3 -1 1
0 4 -1 1
0 5 -1 1
0 6 -1 1
0 7 -1 1
0 8 -1 1
0 9 -1 1
0 10 -1 1
0 11 -1 1
0 12 -1 1
0 13 -1 1
0 14 -1 1
0 24 -1 1
1
end_operator
begin_operator
takeoff airplane_cfbeg seg_rww_0_50 north
1
15 0
16
0 0 6 1
0 1 -1 1
0 2 -1 1
0 3 -1 1
0 4 -1 1
0 5 -1 1
0 6 -1 1
0 7 -1 1
0 8 -1 1
0 9 -1 1
0 10 -1 1
0 11 -1 1
0 12 -1 1
0 13 -1 1
0 14 -1 1
0 25 -1 1
1
end_operator
4
begin_rule
1
22 1
20 0 1
end_rule
begin_rule
1
24 1
18 0 1
end_rule
begin_rule
1
26 1
17 0 1
end_rule
begin_rule
1
26 1
19 0 1
end_rule

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,997 @@
begin_version
3
end_version
begin_metric
0
end_metric
29
begin_variable
var0
-1
14
Atom activate(philosopher-0, forks--pid-rfork)
Atom activate(philosopher-0, forks--pid-wfork)
Atom activate(philosopher-0, forks-__-pidp1__2_-rfork)
Atom activate(philosopher-0, forks-__-pidp1__2_-wfork)
Atom blocked-trans(philosopher-0, forks--pid-rfork)
Atom blocked-trans(philosopher-0, forks--pid-wfork)
Atom blocked-trans(philosopher-0, forks-__-pidp1__2_-rfork)
Atom blocked-trans(philosopher-0, forks-__-pidp1__2_-wfork)
Atom enabled(philosopher-0, forks--pid-rfork)
Atom enabled(philosopher-0, forks--pid-wfork)
Atom enabled(philosopher-0, forks-__-pidp1__2_-rfork)
Atom enabled(philosopher-0, forks-__-pidp1__2_-wfork)
Atom pending(philosopher-0)
<none of those>
end_variable
begin_variable
var1
-1
14
Atom activate(philosopher-1, forks--pid-rfork)
Atom activate(philosopher-1, forks--pid-wfork)
Atom activate(philosopher-1, forks-__-pidp1__2_-rfork)
Atom activate(philosopher-1, forks-__-pidp1__2_-wfork)
Atom blocked-trans(philosopher-1, forks--pid-rfork)
Atom blocked-trans(philosopher-1, forks--pid-wfork)
Atom blocked-trans(philosopher-1, forks-__-pidp1__2_-rfork)
Atom blocked-trans(philosopher-1, forks-__-pidp1__2_-wfork)
Atom enabled(philosopher-1, forks--pid-rfork)
Atom enabled(philosopher-1, forks--pid-wfork)
Atom enabled(philosopher-1, forks-__-pidp1__2_-rfork)
Atom enabled(philosopher-1, forks-__-pidp1__2_-wfork)
Atom pending(philosopher-1)
<none of those>
end_variable
begin_variable
var2
-1
4
Atom advance-head(forks-0-)
Atom advance-tail(forks-0-)
Atom settled(forks-0-)
<none of those>
end_variable
begin_variable
var3
-1
4
Atom advance-head(forks-1-)
Atom advance-tail(forks-1-)
Atom settled(forks-1-)
<none of those>
end_variable
begin_variable
var4
-1
5
Atom at-process(philosopher-0, state-1)
Atom at-process(philosopher-0, state-3)
Atom at-process(philosopher-0, state-4)
Atom at-process(philosopher-0, state-5)
Atom at-process(philosopher-0, state-6)
end_variable
begin_variable
var5
-1
5
Atom at-process(philosopher-1, state-1)
Atom at-process(philosopher-1, state-3)
Atom at-process(philosopher-1, state-4)
Atom at-process(philosopher-1, state-5)
Atom at-process(philosopher-1, state-6)
end_variable
begin_variable
var6
-1
2
Atom blocked(philosopher-0)
NegatedAtom blocked(philosopher-0)
end_variable
begin_variable
var7
-1
2
Atom blocked(philosopher-1)
NegatedAtom blocked(philosopher-1)
end_variable
begin_variable
var8
0
2
Atom new-axiom@0(philosopher-0, philosopher, state-1)
NegatedAtom new-axiom@0(philosopher-0, philosopher, state-1)
end_variable
begin_variable
var9
0
2
Atom new-axiom@0(philosopher-0, philosopher, state-3)
NegatedAtom new-axiom@0(philosopher-0, philosopher, state-3)
end_variable
begin_variable
var10
0
2
Atom new-axiom@0(philosopher-0, philosopher, state-4)
NegatedAtom new-axiom@0(philosopher-0, philosopher, state-4)
end_variable
begin_variable
var11
0
2
Atom new-axiom@0(philosopher-0, philosopher, state-5)
NegatedAtom new-axiom@0(philosopher-0, philosopher, state-5)
end_variable
begin_variable
var12
0
2
Atom new-axiom@0(philosopher-0, philosopher, state-6)
NegatedAtom new-axiom@0(philosopher-0, philosopher, state-6)
end_variable
begin_variable
var13
0
2
Atom new-axiom@0(philosopher-1, philosopher, state-1)
NegatedAtom new-axiom@0(philosopher-1, philosopher, state-1)
end_variable
begin_variable
var14
0
2
Atom new-axiom@0(philosopher-1, philosopher, state-3)
NegatedAtom new-axiom@0(philosopher-1, philosopher, state-3)
end_variable
begin_variable
var15
0
2
Atom new-axiom@0(philosopher-1, philosopher, state-4)
NegatedAtom new-axiom@0(philosopher-1, philosopher, state-4)
end_variable
begin_variable
var16
0
2
Atom new-axiom@0(philosopher-1, philosopher, state-5)
NegatedAtom new-axiom@0(philosopher-1, philosopher, state-5)
end_variable
begin_variable
var17
0
2
Atom new-axiom@0(philosopher-1, philosopher, state-6)
NegatedAtom new-axiom@0(philosopher-1, philosopher, state-6)
end_variable
begin_variable
var18
0
2
Atom new-axiom@1()
NegatedAtom new-axiom@1()
end_variable
begin_variable
var19
-1
2
Atom queue-head-msg(forks-0-, empty)
NegatedAtom queue-head-msg(forks-0-, empty)
end_variable
begin_variable
var20
-1
2
Atom queue-head-msg(forks-0-, fork)
NegatedAtom queue-head-msg(forks-0-, fork)
end_variable
begin_variable
var21
-1
2
Atom queue-head-msg(forks-1-, empty)
NegatedAtom queue-head-msg(forks-1-, empty)
end_variable
begin_variable
var22
-1
2
Atom queue-head-msg(forks-1-, fork)
NegatedAtom queue-head-msg(forks-1-, fork)
end_variable
begin_variable
var23
-1
2
Atom queue-msg(forks-0-, qs-0, fork)
NegatedAtom queue-msg(forks-0-, qs-0, fork)
end_variable
begin_variable
var24
-1
2
Atom queue-msg(forks-1-, qs-0, fork)
NegatedAtom queue-msg(forks-1-, qs-0, fork)
end_variable
begin_variable
var25
-1
2
Atom queue-size(forks-0-, one)
Atom queue-size(forks-0-, zero)
end_variable
begin_variable
var26
-1
2
Atom queue-size(forks-1-, one)
Atom queue-size(forks-1-, zero)
end_variable
begin_variable
var27
-1
2
Atom queue-tail-msg(forks-0-, fork)
NegatedAtom queue-tail-msg(forks-0-, fork)
end_variable
begin_variable
var28
-1
2
Atom queue-tail-msg(forks-1-, fork)
NegatedAtom queue-tail-msg(forks-1-, fork)
end_variable
10
begin_mutex_group
13
0 0
0 1
0 2
0 3
0 4
0 5
0 6
0 7
0 8
0 9
0 10
0 11
0 12
end_mutex_group
begin_mutex_group
9
0 0
0 1
0 2
0 3
0 8
0 9
0 10
0 11
0 12
end_mutex_group
begin_mutex_group
13
1 0
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
end_mutex_group
begin_mutex_group
9
1 0
1 1
1 2
1 3
1 8
1 9
1 10
1 11
1 12
end_mutex_group
begin_mutex_group
3
2 0
2 1
2 2
end_mutex_group
begin_mutex_group
3
3 0
3 1
3 2
end_mutex_group
begin_mutex_group
5
4 0
4 1
4 2
4 3
4 4
end_mutex_group
begin_mutex_group
5
5 0
5 1
5 2
5 3
5 4
end_mutex_group
begin_mutex_group
2
25 0
25 1
end_mutex_group
begin_mutex_group
2
26 0
26 1
end_mutex_group
begin_state
12
12
2
2
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
1
1
1
1
1
1
end_state
begin_goal
2
6 0
7 0
end_goal
56
begin_operator
activate-trans philosopher-0 philosopher forks--pid-rfork state-6 state-3
2
4 4
18 1
1
0 0 12 0
1
end_operator
begin_operator
activate-trans philosopher-0 philosopher forks--pid-wfork state-1 state-6
2
4 0
18 1
1
0 0 12 1
1
end_operator
begin_operator
activate-trans philosopher-0 philosopher forks--pid-wfork state-4 state-5
2
4 2
18 1
1
0 0 12 1
1
end_operator
begin_operator
activate-trans philosopher-0 philosopher forks-__-pidp1__2_-rfork state-3 state-4
2
4 1
18 1
1
0 0 12 2
1
end_operator
begin_operator
activate-trans philosopher-0 philosopher forks-__-pidp1__2_-wfork state-5 state-6
2
4 3
18 1
1
0 0 12 3
1
end_operator
begin_operator
activate-trans philosopher-1 philosopher forks--pid-rfork state-6 state-3
2
5 4
18 1
1
0 1 12 0
1
end_operator
begin_operator
activate-trans philosopher-1 philosopher forks--pid-wfork state-1 state-6
2
5 0
18 1
1
0 1 12 1
1
end_operator
begin_operator
activate-trans philosopher-1 philosopher forks--pid-wfork state-4 state-5
2
5 2
18 1
1
0 1 12 1
1
end_operator
begin_operator
activate-trans philosopher-1 philosopher forks-__-pidp1__2_-rfork state-3 state-4
2
5 1
18 1
1
0 1 12 2
1
end_operator
begin_operator
activate-trans philosopher-1 philosopher forks-__-pidp1__2_-wfork state-5 state-6
2
5 3
18 1
1
0 1 12 3
1
end_operator
begin_operator
advance-empty-queue-tail forks-0- queue-1 qs-0 qs-0 fork empty zero one
1
27 0
5
0 2 1 2
0 19 0 1
0 20 -1 0
0 23 -1 0
0 25 1 0
1
end_operator
begin_operator
advance-empty-queue-tail forks-0- queue-1 qs-0 qs-0 fork fork zero one
2
20 0
27 0
3
0 2 1 2
0 23 -1 0
0 25 1 0
1
end_operator
begin_operator
advance-empty-queue-tail forks-1- queue-1 qs-0 qs-0 fork empty zero one
1
28 0
5
0 3 1 2
0 21 0 1
0 22 -1 0
0 24 -1 0
0 26 1 0
1
end_operator
begin_operator
advance-empty-queue-tail forks-1- queue-1 qs-0 qs-0 fork fork zero one
2
22 0
28 0
3
0 3 1 2
0 24 -1 0
0 26 1 0
1
end_operator
begin_operator
advance-queue-head forks-0- queue-1 qs-0 qs-0 fork one zero
1
23 0
3
0 2 0 2
0 20 -1 0
0 25 0 1
1
end_operator
begin_operator
advance-queue-head forks-1- queue-1 qs-0 qs-0 fork one zero
1
24 0
3
0 3 0 2
0 22 -1 0
0 26 0 1
1
end_operator
begin_operator
block philosopher-0 state-1 philosopher
2
4 0
8 1
1
0 6 -1 0
1
end_operator
begin_operator
block philosopher-0 state-3 philosopher
2
4 1
9 1
1
0 6 -1 0
1
end_operator
begin_operator
block philosopher-0 state-4 philosopher
2
4 2
10 1
1
0 6 -1 0
1
end_operator
begin_operator
block philosopher-0 state-5 philosopher
2
4 3
11 1
1
0 6 -1 0
1
end_operator
begin_operator
block philosopher-0 state-6 philosopher
2
4 4
12 1
1
0 6 -1 0
1
end_operator
begin_operator
block philosopher-1 state-1 philosopher
2
5 0
13 1
1
0 7 -1 0
1
end_operator
begin_operator
block philosopher-1 state-3 philosopher
2
5 1
14 1
1
0 7 -1 0
1
end_operator
begin_operator
block philosopher-1 state-4 philosopher
2
5 2
15 1
1
0 7 -1 0
1
end_operator
begin_operator
block philosopher-1 state-5 philosopher
2
5 3
16 1
1
0 7 -1 0
1
end_operator
begin_operator
block philosopher-1 state-6 philosopher
2
5 4
17 1
1
0 7 -1 0
1
end_operator
begin_operator
block-read-queue-empty philosopher-0 forks--pid-rfork forks-0- fork zero
1
25 1
2
0 0 0 4
0 2 2 3
1
end_operator
begin_operator
block-read-queue-empty philosopher-0 forks-__-pidp1__2_-rfork forks-1- fork zero
1
26 1
2
0 0 2 6
0 3 2 3
1
end_operator
begin_operator
block-read-queue-empty philosopher-1 forks--pid-rfork forks-1- fork zero
1
26 1
2
0 1 0 4
0 3 2 3
1
end_operator
begin_operator
block-read-queue-empty philosopher-1 forks-__-pidp1__2_-rfork forks-0- fork zero
1
25 1
2
0 1 2 6
0 2 2 3
1
end_operator
begin_operator
block-read-wrong-message philosopher-0 forks--pid-rfork forks-0- fork empty
1
19 0
2
0 0 0 4
0 2 2 3
1
end_operator
begin_operator
block-read-wrong-message philosopher-0 forks-__-pidp1__2_-rfork forks-1- fork empty
1
21 0
2
0 0 2 6
0 3 2 3
1
end_operator
begin_operator
block-read-wrong-message philosopher-1 forks--pid-rfork forks-1- fork empty
1
21 0
2
0 1 0 4
0 3 2 3
1
end_operator
begin_operator
block-read-wrong-message philosopher-1 forks-__-pidp1__2_-rfork forks-0- fork empty
1
19 0
2
0 1 2 6
0 2 2 3
1
end_operator
begin_operator
block-write philosopher-0 forks--pid-wfork forks-0- queue-1 fork one
1
25 0
2
0 0 1 5
0 2 2 3
1
end_operator
begin_operator
block-write philosopher-0 forks-__-pidp1__2_-wfork forks-1- queue-1 fork one
1
26 0
2
0 0 3 7
0 3 2 3
1
end_operator
begin_operator
block-write philosopher-1 forks--pid-wfork forks-1- queue-1 fork one
1
26 0
2
0 1 1 5
0 3 2 3
1
end_operator
begin_operator
block-write philosopher-1 forks-__-pidp1__2_-wfork forks-0- queue-1 fork one
1
25 0
2
0 1 3 7
0 2 2 3
1
end_operator
begin_operator
perform-trans philosopher-0 philosopher forks--pid-rfork state-6 state-3
1
18 1
2
0 0 8 12
0 4 4 1
1
end_operator
begin_operator
perform-trans philosopher-0 philosopher forks--pid-wfork state-1 state-6
1
18 1
2
0 0 9 12
0 4 0 4
1
end_operator
begin_operator
perform-trans philosopher-0 philosopher forks--pid-wfork state-4 state-5
1
18 1
2
0 0 9 12
0 4 2 3
1
end_operator
begin_operator
perform-trans philosopher-0 philosopher forks-__-pidp1__2_-rfork state-3 state-4
1
18 1
2
0 0 10 12
0 4 1 2
1
end_operator
begin_operator
perform-trans philosopher-0 philosopher forks-__-pidp1__2_-wfork state-5 state-6
1
18 1
2
0 0 11 12
0 4 3 4
1
end_operator
begin_operator
perform-trans philosopher-1 philosopher forks--pid-rfork state-6 state-3
1
18 1
2
0 1 8 12
0 5 4 1
1
end_operator
begin_operator
perform-trans philosopher-1 philosopher forks--pid-wfork state-1 state-6
1
18 1
2
0 1 9 12
0 5 0 4
1
end_operator
begin_operator
perform-trans philosopher-1 philosopher forks--pid-wfork state-4 state-5
1
18 1
2
0 1 9 12
0 5 2 3
1
end_operator
begin_operator
perform-trans philosopher-1 philosopher forks-__-pidp1__2_-rfork state-3 state-4
1
18 1
2
0 1 10 12
0 5 1 2
1
end_operator
begin_operator
perform-trans philosopher-1 philosopher forks-__-pidp1__2_-wfork state-5 state-6
1
18 1
2
0 1 11 12
0 5 3 4
1
end_operator
begin_operator
queue-read philosopher-0 forks--pid-rfork forks-0- fork
1
20 0
8
0 0 0 8
1 1 4 1 -1 13
1 1 5 1 -1 13
1 1 6 1 -1 13
1 1 7 1 -1 13
0 2 2 0
0 6 -1 1
0 7 -1 1
1
end_operator
begin_operator
queue-read philosopher-0 forks-__-pidp1__2_-rfork forks-1- fork
1
22 0
8
0 0 2 10
1 1 4 1 -1 13
1 1 5 1 -1 13
1 1 6 1 -1 13
1 1 7 1 -1 13
0 3 2 0
0 6 -1 1
0 7 -1 1
1
end_operator
begin_operator
queue-read philosopher-1 forks--pid-rfork forks-1- fork
1
22 0
8
1 0 4 0 -1 13
1 0 5 0 -1 13
1 0 6 0 -1 13
1 0 7 0 -1 13
0 1 0 8
0 3 2 0
0 6 -1 1
0 7 -1 1
1
end_operator
begin_operator
queue-read philosopher-1 forks-__-pidp1__2_-rfork forks-0- fork
1
20 0
8
1 0 4 0 -1 13
1 0 5 0 -1 13
1 0 6 0 -1 13
1 0 7 0 -1 13
0 1 2 10
0 2 2 0
0 6 -1 1
0 7 -1 1
1
end_operator
begin_operator
queue-write philosopher-0 forks--pid-wfork forks-0- fork
0
9
0 0 1 9
1 1 4 1 -1 13
1 1 5 1 -1 13
1 1 6 1 -1 13
1 1 7 1 -1 13
0 2 2 1
0 6 -1 1
0 7 -1 1
0 27 -1 0
1
end_operator
begin_operator
queue-write philosopher-0 forks-__-pidp1__2_-wfork forks-1- fork
0
9
0 0 3 11
1 1 4 1 -1 13
1 1 5 1 -1 13
1 1 6 1 -1 13
1 1 7 1 -1 13
0 3 2 1
0 6 -1 1
0 7 -1 1
0 28 -1 0
1
end_operator
begin_operator
queue-write philosopher-1 forks--pid-wfork forks-1- fork
0
9
1 0 4 0 -1 13
1 0 5 0 -1 13
1 0 6 0 -1 13
1 0 7 0 -1 13
0 1 1 9
0 3 2 1
0 6 -1 1
0 7 -1 1
0 28 -1 0
1
end_operator
begin_operator
queue-write philosopher-1 forks-__-pidp1__2_-wfork forks-0- fork
0
9
1 0 4 0 -1 13
1 0 5 0 -1 13
1 0 6 0 -1 13
1 0 7 0 -1 13
0 1 3 11
0 2 2 1
0 6 -1 1
0 7 -1 1
0 27 -1 0
1
end_operator
11
begin_rule
1
0 4
12 0 1
end_rule
begin_rule
1
0 5
8 0 1
end_rule
begin_rule
1
0 5
10 0 1
end_rule
begin_rule
1
0 6
9 0 1
end_rule
begin_rule
1
0 7
11 0 1
end_rule
begin_rule
1
1 4
17 0 1
end_rule
begin_rule
1
1 5
13 0 1
end_rule
begin_rule
1
1 5
15 0 1
end_rule
begin_rule
1
1 6
14 0 1
end_rule
begin_rule
1
1 7
16 0 1
end_rule
begin_rule
2
2 2
3 2
18 0 1
end_rule

View File

@@ -0,0 +1,815 @@
begin_version
3
end_version
begin_metric
1
end_metric
21
begin_variable
var0
-1
2
Atom made(p1)
NegatedAtom made(p1)
end_variable
begin_variable
var1
-1
2
Atom made(p2)
NegatedAtom made(p2)
end_variable
begin_variable
var2
-1
2
Atom made(p3)
NegatedAtom made(p3)
end_variable
begin_variable
var3
-1
2
Atom made(p4)
NegatedAtom made(p4)
end_variable
begin_variable
var4
-1
2
Atom made(p5)
NegatedAtom made(p5)
end_variable
begin_variable
var5
0
2
Atom new-axiom@0(p1)
NegatedAtom new-axiom@0(p1)
end_variable
begin_variable
var6
0
2
Atom new-axiom@0(p2)
NegatedAtom new-axiom@0(p2)
end_variable
begin_variable
var7
0
2
Atom new-axiom@0(p3)
NegatedAtom new-axiom@0(p3)
end_variable
begin_variable
var8
0
2
Atom new-axiom@0(p4)
NegatedAtom new-axiom@0(p4)
end_variable
begin_variable
var9
0
2
Atom new-axiom@0(p5)
NegatedAtom new-axiom@0(p5)
end_variable
begin_variable
var10
0
2
Atom new-axiom@1(o1)
NegatedAtom new-axiom@1(o1)
end_variable
begin_variable
var11
0
2
Atom new-axiom@1(o2)
NegatedAtom new-axiom@1(o2)
end_variable
begin_variable
var12
0
2
Atom new-axiom@1(o3)
NegatedAtom new-axiom@1(o3)
end_variable
begin_variable
var13
0
2
Atom new-axiom@1(o4)
NegatedAtom new-axiom@1(o4)
end_variable
begin_variable
var14
0
2
Atom new-axiom@1(o5)
NegatedAtom new-axiom@1(o5)
end_variable
begin_variable
var15
-1
3
Atom shipped(o1)
Atom started(o1)
Atom waiting(o1)
end_variable
begin_variable
var16
-1
3
Atom shipped(o2)
Atom started(o2)
Atom waiting(o2)
end_variable
begin_variable
var17
-1
3
Atom shipped(o3)
Atom started(o3)
Atom waiting(o3)
end_variable
begin_variable
var18
-1
3
Atom shipped(o4)
Atom started(o4)
Atom waiting(o4)
end_variable
begin_variable
var19
-1
3
Atom shipped(o5)
Atom started(o5)
Atom waiting(o5)
end_variable
begin_variable
var20
-1
6
Atom stacks-avail(n0)
Atom stacks-avail(n1)
Atom stacks-avail(n2)
Atom stacks-avail(n3)
Atom stacks-avail(n4)
Atom stacks-avail(n5)
end_variable
11
begin_mutex_group
3
15 0
15 1
15 2
end_mutex_group
begin_mutex_group
3
16 0
16 1
16 2
end_mutex_group
begin_mutex_group
3
17 0
17 1
17 2
end_mutex_group
begin_mutex_group
3
18 0
18 1
18 2
end_mutex_group
begin_mutex_group
3
19 0
19 1
19 2
end_mutex_group
begin_mutex_group
6
20 0
20 1
20 2
20 3
20 4
20 5
end_mutex_group
begin_mutex_group
2
15 1
15 2
end_mutex_group
begin_mutex_group
2
16 1
16 2
end_mutex_group
begin_mutex_group
2
17 1
17 2
end_mutex_group
begin_mutex_group
2
18 1
18 2
end_mutex_group
begin_mutex_group
2
19 1
19 2
end_mutex_group
begin_state
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
2
2
2
2
2
0
end_state
begin_goal
5
15 0
16 0
17 0
18 0
19 0
end_goal
60
begin_operator
make-product p1
1
5 1
1
0 0 1 0
0
end_operator
begin_operator
make-product p2
1
6 1
1
0 1 1 0
0
end_operator
begin_operator
make-product p3
1
7 1
1
0 2 1 0
0
end_operator
begin_operator
make-product p4
1
8 1
1
0 3 1 0
0
end_operator
begin_operator
make-product p5
1
9 1
1
0 4 1 0
0
end_operator
begin_operator
open-new-stack n0 n1
0
1
0 20 0 1
1
end_operator
begin_operator
open-new-stack n1 n2
0
1
0 20 1 2
1
end_operator
begin_operator
open-new-stack n2 n3
0
1
0 20 2 3
1
end_operator
begin_operator
open-new-stack n3 n4
0
1
0 20 3 4
1
end_operator
begin_operator
open-new-stack n4 n5
0
1
0 20 4 5
1
end_operator
begin_operator
ship-order o1 n0 n1
1
10 1
2
0 15 1 0
0 20 0 1
0
end_operator
begin_operator
ship-order o1 n1 n2
1
10 1
2
0 15 1 0
0 20 1 2
0
end_operator
begin_operator
ship-order o1 n2 n3
1
10 1
2
0 15 1 0
0 20 2 3
0
end_operator
begin_operator
ship-order o1 n3 n4
1
10 1
2
0 15 1 0
0 20 3 4
0
end_operator
begin_operator
ship-order o1 n4 n5
1
10 1
2
0 15 1 0
0 20 4 5
0
end_operator
begin_operator
ship-order o2 n0 n1
1
11 1
2
0 16 1 0
0 20 0 1
0
end_operator
begin_operator
ship-order o2 n1 n2
1
11 1
2
0 16 1 0
0 20 1 2
0
end_operator
begin_operator
ship-order o2 n2 n3
1
11 1
2
0 16 1 0
0 20 2 3
0
end_operator
begin_operator
ship-order o2 n3 n4
1
11 1
2
0 16 1 0
0 20 3 4
0
end_operator
begin_operator
ship-order o2 n4 n5
1
11 1
2
0 16 1 0
0 20 4 5
0
end_operator
begin_operator
ship-order o3 n0 n1
1
12 1
2
0 17 1 0
0 20 0 1
0
end_operator
begin_operator
ship-order o3 n1 n2
1
12 1
2
0 17 1 0
0 20 1 2
0
end_operator
begin_operator
ship-order o3 n2 n3
1
12 1
2
0 17 1 0
0 20 2 3
0
end_operator
begin_operator
ship-order o3 n3 n4
1
12 1
2
0 17 1 0
0 20 3 4
0
end_operator
begin_operator
ship-order o3 n4 n5
1
12 1
2
0 17 1 0
0 20 4 5
0
end_operator
begin_operator
ship-order o4 n0 n1
1
13 1
2
0 18 1 0
0 20 0 1
0
end_operator
begin_operator
ship-order o4 n1 n2
1
13 1
2
0 18 1 0
0 20 1 2
0
end_operator
begin_operator
ship-order o4 n2 n3
1
13 1
2
0 18 1 0
0 20 2 3
0
end_operator
begin_operator
ship-order o4 n3 n4
1
13 1
2
0 18 1 0
0 20 3 4
0
end_operator
begin_operator
ship-order o4 n4 n5
1
13 1
2
0 18 1 0
0 20 4 5
0
end_operator
begin_operator
ship-order o5 n0 n1
1
14 1
2
0 19 1 0
0 20 0 1
0
end_operator
begin_operator
ship-order o5 n1 n2
1
14 1
2
0 19 1 0
0 20 1 2
0
end_operator
begin_operator
ship-order o5 n2 n3
1
14 1
2
0 19 1 0
0 20 2 3
0
end_operator
begin_operator
ship-order o5 n3 n4
1
14 1
2
0 19 1 0
0 20 3 4
0
end_operator
begin_operator
ship-order o5 n4 n5
1
14 1
2
0 19 1 0
0 20 4 5
0
end_operator
begin_operator
start-order o1 n1 n0
0
2
0 15 2 1
0 20 1 0
0
end_operator
begin_operator
start-order o1 n2 n1
0
2
0 15 2 1
0 20 2 1
0
end_operator
begin_operator
start-order o1 n3 n2
0
2
0 15 2 1
0 20 3 2
0
end_operator
begin_operator
start-order o1 n4 n3
0
2
0 15 2 1
0 20 4 3
0
end_operator
begin_operator
start-order o1 n5 n4
0
2
0 15 2 1
0 20 5 4
0
end_operator
begin_operator
start-order o2 n1 n0
0
2
0 16 2 1
0 20 1 0
0
end_operator
begin_operator
start-order o2 n2 n1
0
2
0 16 2 1
0 20 2 1
0
end_operator
begin_operator
start-order o2 n3 n2
0
2
0 16 2 1
0 20 3 2
0
end_operator
begin_operator
start-order o2 n4 n3
0
2
0 16 2 1
0 20 4 3
0
end_operator
begin_operator
start-order o2 n5 n4
0
2
0 16 2 1
0 20 5 4
0
end_operator
begin_operator
start-order o3 n1 n0
0
2
0 17 2 1
0 20 1 0
0
end_operator
begin_operator
start-order o3 n2 n1
0
2
0 17 2 1
0 20 2 1
0
end_operator
begin_operator
start-order o3 n3 n2
0
2
0 17 2 1
0 20 3 2
0
end_operator
begin_operator
start-order o3 n4 n3
0
2
0 17 2 1
0 20 4 3
0
end_operator
begin_operator
start-order o3 n5 n4
0
2
0 17 2 1
0 20 5 4
0
end_operator
begin_operator
start-order o4 n1 n0
0
2
0 18 2 1
0 20 1 0
0
end_operator
begin_operator
start-order o4 n2 n1
0
2
0 18 2 1
0 20 2 1
0
end_operator
begin_operator
start-order o4 n3 n2
0
2
0 18 2 1
0 20 3 2
0
end_operator
begin_operator
start-order o4 n4 n3
0
2
0 18 2 1
0 20 4 3
0
end_operator
begin_operator
start-order o4 n5 n4
0
2
0 18 2 1
0 20 5 4
0
end_operator
begin_operator
start-order o5 n1 n0
0
2
0 19 2 1
0 20 1 0
0
end_operator
begin_operator
start-order o5 n2 n1
0
2
0 19 2 1
0 20 2 1
0
end_operator
begin_operator
start-order o5 n3 n2
0
2
0 19 2 1
0 20 3 2
0
end_operator
begin_operator
start-order o5 n4 n3
0
2
0 19 2 1
0 20 4 3
0
end_operator
begin_operator
start-order o5 n5 n4
0
2
0 19 2 1
0 20 5 4
0
end_operator
10
begin_rule
2
0 0
1 0
11 0 1
end_rule
begin_rule
1
1 0
10 0 1
end_rule
begin_rule
1
2 0
12 0 1
end_rule
begin_rule
2
2 0
3 0
13 0 1
end_rule
begin_rule
1
4 0
14 0 1
end_rule
begin_rule
2
15 1
16 1
6 0 1
end_rule
begin_rule
1
16 1
5 0 1
end_rule
begin_rule
2
17 1
18 1
7 0 1
end_rule
begin_rule
1
18 1
8 0 1
end_rule
begin_rule
1
19 1
9 0 1
end_rule

View File

@@ -0,0 +1,815 @@
begin_version
3
end_version
begin_metric
1
end_metric
21
begin_variable
var0
-1
2
Atom made(p1)
NegatedAtom made(p1)
end_variable
begin_variable
var1
-1
2
Atom made(p2)
NegatedAtom made(p2)
end_variable
begin_variable
var2
-1
2
Atom made(p3)
NegatedAtom made(p3)
end_variable
begin_variable
var3
-1
2
Atom made(p4)
NegatedAtom made(p4)
end_variable
begin_variable
var4
-1
2
Atom made(p5)
NegatedAtom made(p5)
end_variable
begin_variable
var5
0
2
Atom new-axiom@0(p1)
NegatedAtom new-axiom@0(p1)
end_variable
begin_variable
var6
0
2
Atom new-axiom@0(p2)
NegatedAtom new-axiom@0(p2)
end_variable
begin_variable
var7
0
2
Atom new-axiom@0(p3)
NegatedAtom new-axiom@0(p3)
end_variable
begin_variable
var8
0
2
Atom new-axiom@0(p4)
NegatedAtom new-axiom@0(p4)
end_variable
begin_variable
var9
0
2
Atom new-axiom@0(p5)
NegatedAtom new-axiom@0(p5)
end_variable
begin_variable
var10
0
2
Atom new-axiom@1(o1)
NegatedAtom new-axiom@1(o1)
end_variable
begin_variable
var11
0
2
Atom new-axiom@1(o2)
NegatedAtom new-axiom@1(o2)
end_variable
begin_variable
var12
0
2
Atom new-axiom@1(o3)
NegatedAtom new-axiom@1(o3)
end_variable
begin_variable
var13
0
2
Atom new-axiom@1(o4)
NegatedAtom new-axiom@1(o4)
end_variable
begin_variable
var14
0
2
Atom new-axiom@1(o5)
NegatedAtom new-axiom@1(o5)
end_variable
begin_variable
var15
-1
3
Atom shipped(o1)
Atom started(o1)
Atom waiting(o1)
end_variable
begin_variable
var16
-1
3
Atom shipped(o2)
Atom started(o2)
Atom waiting(o2)
end_variable
begin_variable
var17
-1
3
Atom shipped(o3)
Atom started(o3)
Atom waiting(o3)
end_variable
begin_variable
var18
-1
3
Atom shipped(o4)
Atom started(o4)
Atom waiting(o4)
end_variable
begin_variable
var19
-1
3
Atom shipped(o5)
Atom started(o5)
Atom waiting(o5)
end_variable
begin_variable
var20
-1
6
Atom stacks-avail(n0)
Atom stacks-avail(n1)
Atom stacks-avail(n2)
Atom stacks-avail(n3)
Atom stacks-avail(n4)
Atom stacks-avail(n5)
end_variable
11
begin_mutex_group
3
15 0
15 1
15 2
end_mutex_group
begin_mutex_group
3
16 0
16 1
16 2
end_mutex_group
begin_mutex_group
3
17 0
17 1
17 2
end_mutex_group
begin_mutex_group
3
18 0
18 1
18 2
end_mutex_group
begin_mutex_group
3
19 0
19 1
19 2
end_mutex_group
begin_mutex_group
6
20 0
20 1
20 2
20 3
20 4
20 5
end_mutex_group
begin_mutex_group
2
15 1
15 2
end_mutex_group
begin_mutex_group
2
16 1
16 2
end_mutex_group
begin_mutex_group
2
17 1
17 2
end_mutex_group
begin_mutex_group
2
18 1
18 2
end_mutex_group
begin_mutex_group
2
19 1
19 2
end_mutex_group
begin_state
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
2
2
2
2
2
0
end_state
begin_goal
5
15 0
16 0
17 0
18 0
19 0
end_goal
60
begin_operator
make-product p1
1
5 1
1
0 0 1 0
0
end_operator
begin_operator
make-product p2
1
6 1
1
0 1 1 0
0
end_operator
begin_operator
make-product p3
1
7 1
1
0 2 1 0
0
end_operator
begin_operator
make-product p4
1
8 1
1
0 3 1 0
0
end_operator
begin_operator
make-product p5
1
9 1
1
0 4 1 0
0
end_operator
begin_operator
open-new-stack n0 n1
0
1
0 20 0 1
1
end_operator
begin_operator
open-new-stack n1 n2
0
1
0 20 1 2
1
end_operator
begin_operator
open-new-stack n2 n3
0
1
0 20 2 3
1
end_operator
begin_operator
open-new-stack n3 n4
0
1
0 20 3 4
1
end_operator
begin_operator
open-new-stack n4 n5
0
1
0 20 4 5
1
end_operator
begin_operator
ship-order o1 n0 n1
1
10 1
2
0 15 1 0
0 20 0 1
0
end_operator
begin_operator
ship-order o1 n1 n2
1
10 1
2
0 15 1 0
0 20 1 2
0
end_operator
begin_operator
ship-order o1 n2 n3
1
10 1
2
0 15 1 0
0 20 2 3
0
end_operator
begin_operator
ship-order o1 n3 n4
1
10 1
2
0 15 1 0
0 20 3 4
0
end_operator
begin_operator
ship-order o1 n4 n5
1
10 1
2
0 15 1 0
0 20 4 5
0
end_operator
begin_operator
ship-order o2 n0 n1
1
11 1
2
0 16 1 0
0 20 0 1
0
end_operator
begin_operator
ship-order o2 n1 n2
1
11 1
2
0 16 1 0
0 20 1 2
0
end_operator
begin_operator
ship-order o2 n2 n3
1
11 1
2
0 16 1 0
0 20 2 3
0
end_operator
begin_operator
ship-order o2 n3 n4
1
11 1
2
0 16 1 0
0 20 3 4
0
end_operator
begin_operator
ship-order o2 n4 n5
1
11 1
2
0 16 1 0
0 20 4 5
0
end_operator
begin_operator
ship-order o3 n0 n1
1
12 1
2
0 17 1 0
0 20 0 1
0
end_operator
begin_operator
ship-order o3 n1 n2
1
12 1
2
0 17 1 0
0 20 1 2
0
end_operator
begin_operator
ship-order o3 n2 n3
1
12 1
2
0 17 1 0
0 20 2 3
0
end_operator
begin_operator
ship-order o3 n3 n4
1
12 1
2
0 17 1 0
0 20 3 4
0
end_operator
begin_operator
ship-order o3 n4 n5
1
12 1
2
0 17 1 0
0 20 4 5
0
end_operator
begin_operator
ship-order o4 n0 n1
1
13 1
2
0 18 1 0
0 20 0 1
0
end_operator
begin_operator
ship-order o4 n1 n2
1
13 1
2
0 18 1 0
0 20 1 2
0
end_operator
begin_operator
ship-order o4 n2 n3
1
13 1
2
0 18 1 0
0 20 2 3
0
end_operator
begin_operator
ship-order o4 n3 n4
1
13 1
2
0 18 1 0
0 20 3 4
0
end_operator
begin_operator
ship-order o4 n4 n5
1
13 1
2
0 18 1 0
0 20 4 5
0
end_operator
begin_operator
ship-order o5 n0 n1
1
14 1
2
0 19 1 0
0 20 0 1
0
end_operator
begin_operator
ship-order o5 n1 n2
1
14 1
2
0 19 1 0
0 20 1 2
0
end_operator
begin_operator
ship-order o5 n2 n3
1
14 1
2
0 19 1 0
0 20 2 3
0
end_operator
begin_operator
ship-order o5 n3 n4
1
14 1
2
0 19 1 0
0 20 3 4
0
end_operator
begin_operator
ship-order o5 n4 n5
1
14 1
2
0 19 1 0
0 20 4 5
0
end_operator
begin_operator
start-order o1 n1 n0
0
2
0 15 2 1
0 20 1 0
0
end_operator
begin_operator
start-order o1 n2 n1
0
2
0 15 2 1
0 20 2 1
0
end_operator
begin_operator
start-order o1 n3 n2
0
2
0 15 2 1
0 20 3 2
0
end_operator
begin_operator
start-order o1 n4 n3
0
2
0 15 2 1
0 20 4 3
0
end_operator
begin_operator
start-order o1 n5 n4
0
2
0 15 2 1
0 20 5 4
0
end_operator
begin_operator
start-order o2 n1 n0
0
2
0 16 2 1
0 20 1 0
0
end_operator
begin_operator
start-order o2 n2 n1
0
2
0 16 2 1
0 20 2 1
0
end_operator
begin_operator
start-order o2 n3 n2
0
2
0 16 2 1
0 20 3 2
0
end_operator
begin_operator
start-order o2 n4 n3
0
2
0 16 2 1
0 20 4 3
0
end_operator
begin_operator
start-order o2 n5 n4
0
2
0 16 2 1
0 20 5 4
0
end_operator
begin_operator
start-order o3 n1 n0
0
2
0 17 2 1
0 20 1 0
0
end_operator
begin_operator
start-order o3 n2 n1
0
2
0 17 2 1
0 20 2 1
0
end_operator
begin_operator
start-order o3 n3 n2
0
2
0 17 2 1
0 20 3 2
0
end_operator
begin_operator
start-order o3 n4 n3
0
2
0 17 2 1
0 20 4 3
0
end_operator
begin_operator
start-order o3 n5 n4
0
2
0 17 2 1
0 20 5 4
0
end_operator
begin_operator
start-order o4 n1 n0
0
2
0 18 2 1
0 20 1 0
0
end_operator
begin_operator
start-order o4 n2 n1
0
2
0 18 2 1
0 20 2 1
0
end_operator
begin_operator
start-order o4 n3 n2
0
2
0 18 2 1
0 20 3 2
0
end_operator
begin_operator
start-order o4 n4 n3
0
2
0 18 2 1
0 20 4 3
0
end_operator
begin_operator
start-order o4 n5 n4
0
2
0 18 2 1
0 20 5 4
0
end_operator
begin_operator
start-order o5 n1 n0
0
2
0 19 2 1
0 20 1 0
0
end_operator
begin_operator
start-order o5 n2 n1
0
2
0 19 2 1
0 20 2 1
0
end_operator
begin_operator
start-order o5 n3 n2
0
2
0 19 2 1
0 20 3 2
0
end_operator
begin_operator
start-order o5 n4 n3
0
2
0 19 2 1
0 20 4 3
0
end_operator
begin_operator
start-order o5 n5 n4
0
2
0 19 2 1
0 20 5 4
0
end_operator
10
begin_rule
1
0 0
11 0 1
end_rule
begin_rule
1
0 0
14 0 1
end_rule
begin_rule
2
0 0
2 0
10 0 1
end_rule
begin_rule
2
1 0
3 0
12 0 1
end_rule
begin_rule
1
4 0
13 0 1
end_rule
begin_rule
1
15 1
7 0 1
end_rule
begin_rule
3
15 1
16 1
19 1
5 0 1
end_rule
begin_rule
1
17 1
6 0 1
end_rule
begin_rule
1
17 1
8 0 1
end_rule
begin_rule
1
18 1
9 0 1
end_rule

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,6 @@
#include <plasp/pddl/Domain.h>
#include <plasp/pddl/ExpressionContext.h>
#include <plasp/pddl/expressions/Type.h>
#include <plasp/utils/IO.h>
namespace plasp
{
@@ -88,5 +87,13 @@ const Expression *Action::effect() const
////////////////////////////////////////////////////////////////////////////////////////////////////
void Action::normalizeParameterNames()
{
for (size_t i = 0; i < m_parameters.size(); i++)
m_parameters[i]->setName("X" + std::to_string(i));
}
////////////////////////////////////////////////////////////////////////////////////////////////////
}
}

View File

@@ -204,5 +204,12 @@ void Description::checkConsistency()
////////////////////////////////////////////////////////////////////////////////////////////////////
void Description::normalizeParameterNames()
{
m_domain->normalizeParameterNames();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
}
}

View File

@@ -8,7 +8,6 @@
#include <plasp/pddl/expressions/PredicateDeclaration.h>
#include <plasp/pddl/expressions/PrimitiveType.h>
#include <plasp/pddl/expressions/Variable.h>
#include <plasp/utils/IO.h>
#include <plasp/utils/ParserException.h>
namespace plasp
@@ -273,12 +272,14 @@ bool Domain::hasRequirement(Requirement::Type requirementType) const
////////////////////////////////////////////////////////////////////////////////////////////////////
void Domain::checkRequirement(Requirement::Type requirementType) const
void Domain::checkRequirement(Requirement::Type requirementType)
{
if (hasRequirement(requirementType))
return;
throw ConsistencyException("requirement “" + Requirement(requirementType).toPDDL() + "” used but never declared");
m_context.logger.logWarning(m_context.parser.coordinate(), "requirement “" + Requirement(requirementType).toPDDL() + "” used but never declared");
m_requirements.push_back(requirementType);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -414,5 +415,22 @@ void Domain::checkConsistency()
////////////////////////////////////////////////////////////////////////////////////////////////////
void Domain::normalizeParameterNames()
{
std::for_each(m_predicates.begin(), m_predicates.end(),
[](auto &predicate)
{
predicate->normalizeParameterNames();
});
std::for_each(m_actions.begin(), m_actions.end(),
[](auto &action)
{
action->normalizeParameterNames();
});
}
////////////////////////////////////////////////////////////////////////////////////////////////////
}
}

View File

@@ -11,7 +11,6 @@
#include <plasp/pddl/expressions/Predicate.h>
#include <plasp/pddl/expressions/PredicateDeclaration.h>
#include <plasp/pddl/expressions/Unsupported.h>
#include <plasp/utils/IO.h>
#include <plasp/utils/ParserException.h>
namespace plasp

View File

@@ -6,7 +6,6 @@
#include <plasp/pddl/ExpressionContext.h>
#include <plasp/pddl/IO.h>
#include <plasp/pddl/expressions/Constant.h>
#include <plasp/utils/IO.h>
#include <plasp/utils/ParserException.h>
namespace plasp
@@ -255,12 +254,14 @@ bool Problem::hasRequirement(Requirement::Type requirementType) const
////////////////////////////////////////////////////////////////////////////////////////////////////
void Problem::checkRequirement(Requirement::Type requirementType) const
void Problem::checkRequirement(Requirement::Type requirementType)
{
if (hasRequirement(requirementType))
return;
throw ConsistencyException("requirement “" + Requirement(requirementType).toPDDL() + "” used but never declared");
m_context.logger.logWarning(m_context.parser.coordinate(), "requirement “" + Requirement(requirementType).toPDDL() + "” used but never declared");
m_requirements.push_back(requirementType);
}
////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -4,7 +4,6 @@
#include <boost/assign.hpp>
#include <boost/bimap.hpp>
#include <plasp/utils/IO.h>
#include <plasp/utils/ParserException.h>
namespace plasp

View File

@@ -6,7 +6,6 @@
#include <plasp/pddl/expressions/Not.h>
#include <plasp/pddl/expressions/Predicate.h>
#include <plasp/utils/Formatting.h>
#include <plasp/utils/IO.h>
#include <plasp/utils/TranslatorException.h>
namespace plasp
@@ -20,10 +19,11 @@ namespace pddl
//
////////////////////////////////////////////////////////////////////////////////////////////////////
TranslatorASP::TranslatorASP(const Description &description, utils::LogStream &outputStream)
TranslatorASP::TranslatorASP(Description &description, utils::LogStream &outputStream)
: m_description(description),
m_outputStream(outputStream)
{
m_description.normalizeParameterNames();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -86,8 +86,8 @@ void TranslatorASP::translateTypes() const
if (types.empty())
{
m_outputStream
<< utils::Keyword("type") << "("
<< utils::Keyword("type") << "(object))." << std::endl;
<< utils::RuleName("type") << "("
<< utils::Keyword("type") << "(" << utils::String("object") << "))." << std::endl;
return;
}
@@ -95,31 +95,36 @@ void TranslatorASP::translateTypes() const
std::for_each(types.cbegin(), types.cend(),
[&](const auto &type)
{
const auto typeName = utils::escapeASP(type->name());
m_outputStream
<< utils::RuleName("type") << "("
<< utils::Keyword("type") << "("
<< utils::Keyword("type") << "("
<< typeName << "))." << std::endl;
<< utils::String(type->name())
<< "))." << std::endl;
const auto &parentTypes = type->parentTypes();
std::for_each(parentTypes.cbegin(), parentTypes.cend(),
[&](const auto &parentType)
{
const auto parentTypeName = utils::escapeASP(parentType->name());
m_outputStream
<< utils::RuleName("inherits") << "(" << utils::Keyword("type")
<< "(" << utils::String(type->name()) << "), " << utils::Keyword("type")
<< "(" << utils::String(parentType->name()) << "))." << std::endl;
});
});
m_outputStream
<< utils::Keyword("inherits") << "(" << utils::Keyword("type")
<< "(" << typeName << "), " << utils::Keyword("type")
<< "(" << parentTypeName << "))." << std::endl
<< utils::Keyword("has") << "(" << utils::Variable("X") << ", "
<< utils::Keyword("type") << "(" << parentTypeName << ")) :- "
<< utils::Keyword("has") << "(" << utils::Variable("X") << ", "
<< utils::Keyword("type") << "(" << typeName << "))." << std::endl;
});
});
<< std::endl
<< utils::RuleName("has") << "("
<< utils::Variable("X") << ", "
<< utils::Keyword("type") << "(" << utils::Variable("T2") << ")) :- "
<< utils::RuleName("has") << "("
<< utils::Variable("X") << ", "
<< utils::Keyword("type") << "(" << utils::Variable("T1") << ")), "
<< utils::RuleName("inherits") << "("
<< utils::Keyword("type") << "(" << utils::Variable("T1") << "), "
<< utils::Keyword("type") << "(" << utils::Variable("T2") << "))."
<< std::endl;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -133,31 +138,16 @@ void TranslatorASP::translatePredicates() const
const auto printPredicateName =
[&](const auto &predicate)
{
m_outputStream
<< utils::escapeASP(predicate->name());
this->translateVariablesHead(predicate->arguments());
};
const auto printValueRule =
[&](const auto &predicate, const auto &value)
if (predicate->arguments().empty())
{
m_outputStream
<< utils::Keyword("contains") << "("
<< utils::Keyword("variable") << "(";
m_outputStream << utils::String(predicate->name());
printPredicateName(predicate);
return;
}
m_outputStream
<< "), " << utils::Keyword("value") << "(";
printPredicateName(predicate);
m_outputStream << ", " << utils::Keyword(value) << "))";
this->translateVariablesBody(predicate->arguments());
m_outputStream << "." << std::endl;
m_outputStream << "(" << utils::String(predicate->name());
this->translateVariablesHead(predicate->arguments());
m_outputStream << ")";
};
std::for_each(predicates.cbegin(), predicates.cend(),
@@ -165,7 +155,7 @@ void TranslatorASP::translatePredicates() const
{
m_outputStream
<< std::endl
<< utils::Keyword("variable") << "("
<< utils::RuleName("variable") << "("
<< utils::Keyword("variable") << "(";
printPredicateName(predicate);
@@ -174,11 +164,20 @@ void TranslatorASP::translatePredicates() const
this->translateVariablesBody(predicate->arguments());
m_outputStream << "." << std::endl;
printValueRule(predicate, "true");
printValueRule(predicate, "false");
m_outputStream << ".";
});
m_outputStream
<< std::endl << std::endl
<< utils::RuleName("boolean") << "(" << utils::Boolean("true") << ")." << std::endl
<< utils::RuleName("boolean") << "(" << utils::Boolean("false") << ")." << std::endl
<< std::endl
<< utils::RuleName("contains") << "("
<< utils::Keyword("variable") << "(" << utils::Variable("X") << "), "
<< utils::Keyword("value") << "(" << utils::Variable("X") << ", " << utils::Variable("B") << ")) :- "
<< utils::RuleName("variable") << "(" << utils::Keyword("variable") << "(" << utils::Variable("X") << ")), "
<< utils::RuleName("boolean") << "(" << utils::Variable("B") << ")."
<< std::endl;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -192,11 +191,18 @@ void TranslatorASP::translateActions() const
const auto printActionName =
[&](const auto &action)
{
m_outputStream << utils::Keyword("action") << "(" << utils::escapeASP(action.name());
m_outputStream << utils::Keyword("action") << "(";
if (action.parameters().empty())
{
m_outputStream << utils::String(action.name()) << ")";
return;
}
m_outputStream << "(" << utils::String(action.name());
this->translateVariablesHead(action.parameters());
m_outputStream << ")";
m_outputStream << "))";
};
std::for_each(actions.cbegin(), actions.cend(),
@@ -206,19 +212,19 @@ void TranslatorASP::translateActions() const
const auto translateLiteral =
[&](const auto &ruleHead, const auto &literal, bool enumerateEffects = false)
{
m_outputStream << std::endl << utils::Keyword(ruleHead) << "(";
m_outputStream << std::endl << utils::RuleName(ruleHead) << "(";
printActionName(*action);
// TODO: implement conditional effects
if (enumerateEffects)
m_outputStream << ", " << utils::Keyword("effect") << "(unconditional)";
m_outputStream << ", " << utils::Keyword("effect") << "(" << utils::Reserved("unconditional") << ")";
m_outputStream << ", ";
this->translateLiteral(literal);
m_outputStream << ") :- " << utils::Keyword("action") << "(";
m_outputStream << ") :- " << utils::RuleName("action") << "(";
printActionName(*action);
@@ -228,7 +234,7 @@ void TranslatorASP::translateActions() const
m_outputStream << std::endl;
// Name
m_outputStream << utils::Keyword("action") << "(";
m_outputStream << utils::RuleName("action") << "(";
printActionName(*action);
m_outputStream << ")";
@@ -301,27 +307,25 @@ void TranslatorASP::translateConstants(const std::string &heading, const express
std::for_each(constants.cbegin(), constants.cend(),
[&](const auto &constant)
{
const auto constantName = utils::escapeASP(constant->name());
m_outputStream << std::endl
<< utils::RuleName("constant") << "("
<< utils::Keyword("constant") << "("
<< utils::Keyword("constant") << "("
<< constantName
<< utils::String(constant->name())
<< "))." << std::endl;
const auto *type = constant->type();
if (type != nullptr)
{
m_outputStream << utils::Keyword("has") << "("
<< utils::Keyword("constant") << "(" << constantName << "), "
<< utils::Keyword("type") << "(" << utils::escapeASP(type->name()) << "))." << std::endl;
m_outputStream << utils::RuleName("has") << "("
<< utils::Keyword("constant") << "(" << utils::String(constant->name()) << "), "
<< utils::Keyword("type") << "(" << utils::String(type->name()) << "))." << std::endl;
}
else
{
m_outputStream << utils::Keyword("has") << "("
<< utils::Keyword("constant") << "(" << constantName << "), "
<< utils::Keyword("type") << "(object))." << std::endl;
m_outputStream << utils::RuleName("has") << "("
<< utils::Keyword("constant") << "(" << utils::String(constant->name()) << "), "
<< utils::Keyword("type") << "(" << utils::String("object") << "))." << std::endl;
}
});
}
@@ -333,19 +337,12 @@ void TranslatorASP::translateVariablesHead(const expressions::Variables &variabl
if (variables.empty())
return;
m_outputStream << "(";
for (auto i = variables.cbegin(); i != variables.cend(); i++)
{
if (i != variables.cbegin())
m_outputStream << ", ";
const auto &variable = **i;
m_outputStream << utils::Variable(utils::escapeASPVariable(variable.name()));
m_outputStream << ", " << utils::Variable(variable.name());
}
m_outputStream << ")";
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -371,15 +368,15 @@ void TranslatorASP::translateVariablesBody(const expressions::Variables &variabl
const auto &type = *dynamic_cast<const expressions::PrimitiveType *>(variable.type());
m_outputStream << utils::Keyword("has") << "("
<< utils::Variable(utils::escapeASPVariable(variable.name())) << ", "
<< utils::Keyword("type") << "(" << utils::escapeASP(type.name()) << "))";
m_outputStream << utils::RuleName("has") << "("
<< utils::Variable(variable.name()) << ", "
<< utils::Keyword("type") << "(" << utils::String(type.name()) << "))";
}
else
{
m_outputStream << utils::Keyword("has") << "("
<< utils::Variable(utils::escapeASPVariable(variable.name())) << ", "
<< utils::Keyword("type") << "(object))";
m_outputStream << utils::RuleName("has") << "("
<< utils::Variable(variable.name()) << ", "
<< utils::Keyword("type") << "(" << utils::String("object") << "))";
}
}
}
@@ -397,19 +394,23 @@ void TranslatorASP::translateLiteral(const Expression &literal) const
this->translatePredicate(predicate);
m_outputStream << "), " << utils::Keyword("value") << "(";
this->translatePredicate(predicate);
m_outputStream << ", " << utils::Keyword("true") << ")";
m_outputStream << ", " << utils::Boolean("true") << ")";
}
// Assuming that "not" expression may only contain a predicate
else if (literal.expressionType() == Expression::Type::Not)
{
const auto &notExpression = dynamic_cast<const expressions::Not &>(literal);
if (notExpression.argument()->expressionType() != Expression::Type::Predicate)
throw utils::TranslatorException("only negations of primitive predicates supported as literals currently");
const auto &predicate = dynamic_cast<const expressions::Predicate &>(*notExpression.argument());
m_outputStream << utils::Keyword("variable") << "(";
this->translatePredicate(predicate);
m_outputStream << "), " << utils::Keyword("value") << "(";
this->translatePredicate(predicate);
m_outputStream << ", " << utils::Keyword("false") << ")";
m_outputStream << ", " << utils::Boolean("false") << ")";
}
else
throw utils::TranslatorException("only primitive predicates and their negations supported as literals currently");
@@ -419,33 +420,32 @@ void TranslatorASP::translateLiteral(const Expression &literal) const
void TranslatorASP::translatePredicate(const expressions::Predicate &predicate) const
{
m_outputStream << utils::escapeASP(predicate.name());
const auto &arguments = predicate.arguments();
if (arguments.empty())
{
m_outputStream << utils::String(predicate.name());
return;
}
m_outputStream << "(";
m_outputStream << "(" << utils::String(predicate.name());
for (auto i = arguments.cbegin(); i != arguments.cend(); i++)
{
if (i != arguments.cbegin())
m_outputStream << ", ";
if ((*i)->expressionType() == Expression::Type::Constant)
{
const auto &constant = dynamic_cast<const expressions::Constant &>(**i);
m_outputStream << utils::Keyword("constant") << "(" << utils::escapeASP(constant.name()) << ")";
m_outputStream << utils::Keyword("constant") << "(" << utils::String(constant.name()) << ")";
}
else if ((*i)->expressionType() == Expression::Type::Variable)
{
const auto &variable = dynamic_cast<const expressions::Variable &>(**i);
m_outputStream << utils::Variable(utils::escapeASPVariable(variable.name()));
m_outputStream << utils::Variable(variable.name());
}
else
throw utils::TranslatorException("only variables and constants supported in predicates currently");
@@ -493,7 +493,7 @@ void TranslatorASP::translateInitialState() const
std::for_each(initialStateFacts.cbegin(), initialStateFacts.cend(),
[&](const auto &fact)
{
m_outputStream << std::endl << utils::Keyword("initialState") << "(";
m_outputStream << std::endl << utils::RuleName("initialState") << "(";
// Translate single predicate
if (fact->expressionType() == Expression::Type::Predicate)
@@ -504,7 +504,7 @@ void TranslatorASP::translateInitialState() const
this->translatePredicate(predicate);
m_outputStream << "), " << utils::Keyword("value") << "(";
this->translatePredicate(predicate);
m_outputStream << ", " << utils::Keyword("true") << ")";
m_outputStream << ", " << utils::Boolean("true") << ")";
}
// Assuming that "not" expression may only contain a predicate
else if (fact->expressionType() == Expression::Type::Not)
@@ -520,7 +520,17 @@ void TranslatorASP::translateInitialState() const
m_outputStream << ").";
});
m_outputStream << std::endl;
m_outputStream
<< std::endl << std::endl
<< utils::RuleName("initialState") << "("
<< utils::Keyword("variable") << "(" << utils::Variable("X") << "), "
<< utils::Keyword("value") << "(" << utils::Variable("X") << ", " << utils::Boolean("false") << ")) :- "
<< utils::RuleName("variable") << "(" << utils::Keyword("variable") << "(" << utils::Variable("X") << ")), "
<< utils::Keyword("not") << " "
<< utils::RuleName("initialState") << "("
<< utils::Keyword("variable") << "(" << utils::Variable("X") << "), "
<< utils::Keyword("value") << "(" << utils::Variable("X") << ", " << utils::Boolean("true") << "))."
<< std::endl;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -536,7 +546,7 @@ void TranslatorASP::translateGoal() const
if (goal.expressionType() == Expression::Type::Predicate
|| goal.expressionType() == Expression::Type::Not)
{
m_outputStream << std::endl << utils::Keyword("goal") << "(";
m_outputStream << std::endl << utils::RuleName("goal") << "(";
translateLiteral(goal);
@@ -549,7 +559,7 @@ void TranslatorASP::translateGoal() const
std::for_each(andExpression.arguments().cbegin(), andExpression.arguments().cend(),
[&](const auto *argument)
{
m_outputStream << std::endl << utils::Keyword("goal") << "(";
m_outputStream << std::endl << utils::RuleName("goal") << "(";
this->translateLiteral(*argument);

View File

@@ -79,6 +79,14 @@ const Variables &PredicateDeclaration::arguments() const
////////////////////////////////////////////////////////////////////////////////////////////////////
void PredicateDeclaration::normalizeParameterNames()
{
for (size_t i = 0; i < m_parameters.size(); i++)
m_parameters[i]->setName("X" + std::to_string(i));
}
////////////////////////////////////////////////////////////////////////////////////////////////////
}
}
}

View File

@@ -164,6 +164,13 @@ const Variable *Variable::parseAndFind(Context &context, const ExpressionContext
////////////////////////////////////////////////////////////////////////////////////////////////////
void Variable::setName(std::string name)
{
m_name = name;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
const std::string &Variable::name() const
{
return m_name;

View File

@@ -4,7 +4,7 @@
#include <limits>
#include <sstream>
#include <plasp/utils/IO.h>
#include <plasp/utils/Formatting.h>
#include <plasp/utils/ParserException.h>
namespace plasp
@@ -30,14 +30,10 @@ Predicate Predicate::fromSAS(utils::Parser<> &parser)
while (true)
{
// Parse arguments until reaching newline
// TODO: reimplement
/*parser.skipWhiteSpace(
[&](const auto character)
{
return character != '\n' && std::isspace(character);
});*/
// Skip whitespace but not newlines
parser.skipBlankSpace();
// TODO: check \r handling
if (parser.currentCharacter() == '\n')
break;
@@ -91,19 +87,14 @@ void Predicate::printAsASP(utils::LogStream &outputStream) const
{
if (m_arguments.empty())
{
outputStream << utils::escapeASP(m_name);
outputStream << utils::String(m_name);
return;
}
outputStream << utils::escapeASP(m_name) << "(";
outputStream << "(" << utils::String(m_name);
for (size_t i = 0; i < m_arguments.size(); i++)
{
if (i > 0)
outputStream << ", ";
outputStream << utils::escapeASP(m_arguments[i]);
}
outputStream << ", " << utils::String(m_arguments[i]);
outputStream << ")";
}

View File

@@ -33,8 +33,12 @@ void TranslatorASP::translate() const
translateVariables();
m_outputStream << std::endl;
translateActions();
if (!m_description.mutexGroups().empty())
{
m_outputStream << std::endl;
translateMutexes();
}
if (m_description.usesAxiomRules())
{
@@ -55,13 +59,13 @@ void TranslatorASP::translateRequirements() const
m_outputStream << utils::Heading2("feature requirements") << std::endl;
if (m_description.usesActionCosts())
m_outputStream << utils::Keyword("requires") << "(" << utils::Keyword("feature") << "(actionCosts))." << std::endl;
m_outputStream << utils::RuleName("requires") << "(" << utils::Keyword("feature") << "(" << utils::Reserved("actionCosts") << "))." << std::endl;
if (m_description.usesAxiomRules())
m_outputStream << utils::Keyword("requires") << "(" << utils::Keyword("feature") << "(axiomRules))." << std::endl;
m_outputStream << utils::RuleName("requires") << "(" << utils::Keyword("feature") << "(" << utils::Reserved("axiomRules") << "))." << std::endl;
if (m_description.usesConditionalEffects())
m_outputStream << utils::Keyword("requires") << "(" << utils::Keyword("feature") << "(conditionalEffects))." << std::endl;
m_outputStream << utils::RuleName("requires") << "(" << utils::Keyword("feature") << "(" << utils::Reserved("conditionalEffects") << "))." << std::endl;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -75,7 +79,7 @@ void TranslatorASP::translateInitialState() const
std::for_each(initialStateFacts.cbegin(), initialStateFacts.cend(),
[&](const auto &fact)
{
m_outputStream << utils::Keyword("initialState") << "(";
m_outputStream << utils::RuleName("initialState") << "(";
fact.variable().printNameAsASPPredicate(m_outputStream);
m_outputStream << ", ";
fact.value().printAsASPPredicate(m_outputStream);
@@ -94,7 +98,7 @@ void TranslatorASP::translateGoal() const
std::for_each(goalFacts.cbegin(), goalFacts.cend(),
[&](const auto &fact)
{
m_outputStream << utils::Keyword("goal") << "(";
m_outputStream << utils::RuleName("goal") << "(";
fact.variable().printNameAsASPPredicate(m_outputStream);
m_outputStream << ", ";
fact.value().printAsASPPredicate(m_outputStream);
@@ -117,14 +121,14 @@ void TranslatorASP::translateVariables() const
BOOST_ASSERT(!values.empty());
m_outputStream << std::endl << utils::Keyword("variable") << "(";
m_outputStream << std::endl << utils::RuleName("variable") << "(";
variable.printNameAsASPPredicate(m_outputStream);
m_outputStream << ")." << std::endl;
std::for_each(values.cbegin(), values.cend(),
[&](const auto &value)
{
m_outputStream << utils::Keyword("contains") << "(";
m_outputStream << utils::RuleName("contains") << "(";
variable.printNameAsASPPredicate(m_outputStream);
m_outputStream << ", ";
value.printAsASPPredicate(m_outputStream);
@@ -146,7 +150,7 @@ void TranslatorASP::translateActions() const
std::for_each(operators.cbegin(), operators.cend(),
[&](const auto &operator_)
{
m_outputStream << std::endl << utils::Keyword("action") << "(";
m_outputStream << std::endl << utils::RuleName("action") << "(";
operator_.printPredicateAsASP(m_outputStream);
m_outputStream << ")." << std::endl;
@@ -155,7 +159,7 @@ void TranslatorASP::translateActions() const
std::for_each(preconditions.cbegin(), preconditions.cend(),
[&](const auto &precondition)
{
m_outputStream << utils::Keyword("precondition") << "(";
m_outputStream << utils::RuleName("precondition") << "(";
operator_.printPredicateAsASP(m_outputStream);
m_outputStream << ", ";
precondition.variable().printNameAsASPPredicate(m_outputStream);
@@ -171,39 +175,39 @@ void TranslatorASP::translateActions() const
{
const auto &conditions = effect.conditions();
m_outputStream << utils::RuleName("postcondition") << "(";
operator_.printPredicateAsASP(m_outputStream);
if (conditions.empty())
m_outputStream << ", " << utils::Keyword("effect") << "(" << utils::Reserved("unconditional") << "), ";
else
m_outputStream << ", " << utils::Keyword("effect") << "(" << utils::Number(std::to_string(currentEffectID)) << "), ";
effect.postcondition().variable().printNameAsASPPredicate(m_outputStream);
m_outputStream << ", ";
effect.postcondition().value().printAsASPPredicate(m_outputStream);
m_outputStream << ")." << std::endl;
std::for_each(conditions.cbegin(), conditions.cend(),
[&](const auto &condition)
{
// Conditions of conditional effects
m_outputStream << utils::Keyword("precondition") << "(";
operator_.printPredicateAsASP(m_outputStream);
m_outputStream << ", " << utils::Keyword("effect") << "(" << utils::Number(std::to_string(currentEffectID)) << "), ";
m_outputStream
<< utils::RuleName("precondition") << "("
<< utils::Keyword("effect") << "(" << utils::Number(std::to_string(currentEffectID)) << "), ";
condition.variable().printNameAsASPPredicate(m_outputStream);
m_outputStream << ", ";
condition.value().printAsASPPredicate(m_outputStream);
m_outputStream << ")." << std::endl;
});
m_outputStream << utils::Keyword("postcondition") << "(";
operator_.printPredicateAsASP(m_outputStream);
if (conditions.empty())
m_outputStream << ", " << utils::Keyword("effect") << "(unconditional), ";
else
{
m_outputStream << ", " << utils::Keyword("effect") << "(" << utils::Number(std::to_string(currentEffectID)) << "), ";
if (!conditions.empty())
currentEffectID++;
}
effect.postcondition().variable().printNameAsASPPredicate(m_outputStream);
m_outputStream << ", ";
effect.postcondition().value().printAsASPPredicate(m_outputStream);
m_outputStream << ")." << std::endl;
});
m_outputStream << utils::Keyword("costs") << "(";
m_outputStream << utils::RuleName("costs") << "(";
operator_.printPredicateAsASP(m_outputStream);
m_outputStream << ", " << operator_.costs() << ")." << std::endl;
m_outputStream << ", " << utils::Number(std::to_string(operator_.costs())) << ")." << std::endl;
});
}
@@ -225,7 +229,7 @@ void TranslatorASP::translateMutexes() const
m_outputStream
<< std::endl
<< utils::Keyword("mutexGroup") << "("
<< utils::RuleName("mutexGroup") << "("
<< utils::Keyword("mutexGroup") << "("
<< utils::Number(mutexGroupID)
<< "))." << std::endl;
@@ -235,7 +239,7 @@ void TranslatorASP::translateMutexes() const
std::for_each(facts.cbegin(), facts.cend(),
[&](const auto &fact)
{
m_outputStream << utils::Keyword("contains") << "(" << utils::Keyword("mutexGroup") << "(" << utils::Number(mutexGroupID) << "), ";
m_outputStream << utils::RuleName("contains") << "(" << utils::Keyword("mutexGroup") << "(" << utils::Number(mutexGroupID) << "), ";
fact.variable().printNameAsASPPredicate(m_outputStream);
m_outputStream << ", ";
fact.value().printAsASPPredicate(m_outputStream);
@@ -262,7 +266,7 @@ void TranslatorASP::translateAxiomRules() const
m_outputStream
<< std::endl
<< utils::Keyword("axiomRule") << "("
<< utils::RuleName("axiomRule") << "("
<< utils::Keyword("axiomRule") << "("
<< utils::Number(axiomRuleID)
<< "))." << std::endl;
@@ -272,7 +276,9 @@ void TranslatorASP::translateAxiomRules() const
std::for_each(conditions.cbegin(), conditions.cend(),
[&](const auto &condition)
{
m_outputStream << utils::Keyword("precondition") << "(" << utils::Keyword("axiomRule") << "(" << utils::Number(axiomRuleID) << "), ";
m_outputStream
<< utils::RuleName("precondition") << "("
<< utils::Keyword("axiomRule") << "(" << utils::Number(axiomRuleID) << "), ";
condition.variable().printNameAsASPPredicate(m_outputStream);
m_outputStream << ", ";
condition.value().printAsASPPredicate(m_outputStream);
@@ -281,7 +287,10 @@ void TranslatorASP::translateAxiomRules() const
const auto &postcondition = axiomRule.postcondition();
m_outputStream << utils::Keyword("postcondition") << "(" << utils::Keyword("axiomRule") << "(" << utils::Number(axiomRuleID) << "), ";
m_outputStream
<< utils::RuleName("postcondition") << "("
<< utils::Keyword("axiomRule") << "(" << utils::Number(axiomRuleID) << "), "
<< utils::Keyword("effect") << "(" << utils::Reserved("unconditional") << "), ";
postcondition.variable().printNameAsASPPredicate(m_outputStream);
m_outputStream << ", ";
postcondition.value().printAsASPPredicate(m_outputStream);

View File

@@ -4,7 +4,6 @@
#include <plasp/sas/Variable.h>
#include <plasp/utils/Formatting.h>
#include <plasp/utils/IO.h>
#include <plasp/utils/ParserException.h>
namespace plasp
@@ -128,27 +127,17 @@ const std::string &Value::name() const
////////////////////////////////////////////////////////////////////////////////////////////////////
void Value::printAsASP(utils::LogStream &outputStream) const
{
if (m_sign == Value::Sign::Negative)
outputStream << utils::Keyword("not") << " ";
outputStream << utils::escapeASP(m_name);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void Value::printAsASPPredicate(utils::LogStream &outputStream) const
{
// TODO: do not compare by value
if (*this == Value::None)
{
outputStream << utils::Keyword("value") << "(" << utils::Keyword("none") << ")";
outputStream << utils::Keyword("value") << "(" << utils::Reserved("none") << ")";
return;
}
outputStream << utils::Keyword("value") << "(" << utils::escapeASP(m_name) << ", "
<< (m_sign == Sign::Positive ? utils::Keyword("true") : utils::Keyword("false")) << ")";
outputStream << utils::Keyword("value") << "(" << utils::String(m_name) << ", "
<< (m_sign == Sign::Positive ? utils::Boolean("true") : utils::Boolean("false")) << ")";
}
////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -3,7 +3,6 @@
#include <iostream>
#include <plasp/utils/Formatting.h>
#include <plasp/utils/IO.h>
#include <plasp/utils/ParserException.h>
namespace plasp
@@ -55,7 +54,8 @@ Variable Variable::fromSAS(utils::Parser<> &parser)
void Variable::printNameAsASPPredicate(utils::LogStream &outputStream) const
{
outputStream << utils::Keyword("variable") << "(" << utils::Number(utils::escapeASP(m_name)) << ")";
// TODO: assert that name is a number indeed
outputStream << utils::Keyword("variable") << "(" << utils::Number(m_name) << ")";
}
////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -15,7 +15,16 @@ boost::iostreams::stream<boost::iostreams::null_sink> nullStream((boost::iostrea
TEST(PDDLTranslationTests, CheckIssues)
{
// Check that translating domains without typing information works
{
auto description = Description::fromFile("data/issues/issue-4.pddl");
const auto translator = TranslatorASP(description, description.context().logger.outputStream());
ASSERT_NO_THROW(translator.translate());
}
// Check that translating the simple blocks world domain works
{
auto description = Description::fromFile("data/issues/issue-5.pddl");
const auto translator = TranslatorASP(description, description.context().logger.outputStream());
ASSERT_NO_THROW(translator.translate());
}
}

View File

@@ -111,6 +111,8 @@ TEST_F(SASParserTests, ParseValidSASFile)
{
FAIL() << e.what();
}
// TODO: add whitespace test
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -175,3 +177,11 @@ TEST_F(SASParserTests, ParseRequirements)
FAIL() << e.what();
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////
TEST_F(SASParserTests, CheckIssues)
{
// Check issue where unexpected whitespaces in SAS files led to a parsing error
ASSERT_NO_THROW(plasp::sas::Description::fromFile("data/issues/issue-6.sas"));
}

View File

@@ -1,6 +1,5 @@
#include <gtest/gtest.h>
#include <plasp/utils/IO.h>
#include <plasp/utils/Parser.h>
#include <plasp/utils/ParserException.h>
@@ -331,17 +330,3 @@ TEST(UtilsTests, ParserRemoveComments)
ASSERT_TRUE(p3.atEnd());
}
////////////////////////////////////////////////////////////////////////////////////////////////////
TEST(UtilsTests, EscapeASP)
{
const std::string predicate = "action(stack_on(block-1, block-2, value@3, value@4))";
const auto escaped = plasp::utils::escapeASP(predicate);
const auto unescaped = plasp::utils::unescapeASP(escaped);
ASSERT_EQ(escaped.find("-"), std::string::npos);
ASSERT_EQ(escaped.find("@"), std::string::npos);
ASSERT_EQ(predicate, unescaped);
}

View File

@@ -0,0 +1,45 @@
(define (domain BLOCKS)
(:requirements :strips :typing)
(:types block)
(:predicates (on ?x - block ?y - block)
(ontable ?x - block)
(clear ?x - block)
(handempty)
(holding ?x - block)
)
(:action pick-up
:parameters (?x - block)
:precondition (and (clear ?x) (ontable ?x) (handempty))
:effect
(and (not (ontable ?x))
(not (clear ?x))
(not (handempty))
(holding ?x)))
(:action put-down
:parameters (?x - block)
:precondition (holding ?x)
:effect
(and (not (holding ?x))
(clear ?x)
(handempty)
(ontable ?x)))
(:action stack
:parameters (?x - block ?y - block)
:precondition (and (holding ?x) (clear ?y))
:effect
(and (not (holding ?x))
(not (clear ?y))
(clear ?x)
(handempty)
(on ?x ?y)))
(:action unstack
:parameters (?x - block ?y - block)
:precondition (and (on ?x ?y) (clear ?x) (handempty))
:effect
(and (holding ?x)
(clear ?y)
(not (clear ?x))
(not (handempty))
(not (on ?x ?y)))))

View File

@@ -0,0 +1,268 @@
begin_version
3
end_version
begin_metric
0
end_metric
7
begin_variable
var0
-1
2
Atom counter-at-zero()
NegatedAtom counter-at-zero()
end_variable
begin_variable
var1
-1
2
Atom have-cheese()
NegatedAtom have-cheese()
end_variable
begin_variable
var2
-1
2
Atom have-chips()
NegatedAtom have-chips()
end_variable
begin_variable
var3
-1
2
Atom have-crackers()
NegatedAtom have-crackers()
end_variable
begin_variable
var4
-1
2
Atom have-dip()
NegatedAtom have-dip()
end_variable
begin_variable
var5
-1
2
Atom have-pop()
NegatedAtom have-pop()
end_variable
begin_variable
var6
-1
2
Atom movie-rewound()
NegatedAtom movie-rewound()
end_variable
0
begin_state
1
1
1
1
1
1
1
end_state
begin_goal
7
0 0
1 0
2 0
3 0
4 0
5 0
6 0
end_goal
27
begin_operator
get-cheese z1
0
1
0 1 -1 0
1
end_operator
begin_operator
get-cheese z2
0
1
0 1 -1 0
1
end_operator
begin_operator
get-cheese z3
0
1
0 1 -1 0
1
end_operator
begin_operator
get-cheese z4
0
1
0 1 -1 0
1
end_operator
begin_operator
get-cheese z5
0
1
0 1 -1 0
1
end_operator
begin_operator
get-chips c1
0
1
0 2 -1 0
1
end_operator
begin_operator
get-chips c2
0
1
0 2 -1 0
1
end_operator
begin_operator
get-chips c3
0
1
0 2 -1 0
1
end_operator
begin_operator
get-chips c4
0
1
0 2 -1 0
1
end_operator
begin_operator
get-chips c5
0
1
0 2 -1 0
1
end_operator
begin_operator
get-crackers k1
0
1
0 3 -1 0
1
end_operator
begin_operator
get-crackers k2
0
1
0 3 -1 0
1
end_operator
begin_operator
get-crackers k3
0
1
0 3 -1 0
1
end_operator
begin_operator
get-crackers k4
0
1
0 3 -1 0
1
end_operator
begin_operator
get-crackers k5
0
1
0 3 -1 0
1
end_operator
begin_operator
get-dip d1
0
1
0 4 -1 0
1
end_operator
begin_operator
get-dip d2
0
1
0 4 -1 0
1
end_operator
begin_operator
get-dip d3
0
1
0 4 -1 0
1
end_operator
begin_operator
get-dip d4
0
1
0 4 -1 0
1
end_operator
begin_operator
get-dip d5
0
1
0 4 -1 0
1
end_operator
begin_operator
get-pop p1
0
1
0 5 -1 0
1
end_operator
begin_operator
get-pop p2
0
1
0 5 -1 0
1
end_operator
begin_operator
get-pop p3
0
1
0 5 -1 0
1
end_operator
begin_operator
get-pop p4
0
1
0 5 -1 0
1
end_operator
begin_operator
get-pop p5
0
1
0 5 -1 0
1
end_operator
begin_operator
reset-counter
0
1
0 0 -1 0
1
end_operator
begin_operator
rewind-movie
0
2
0 0 -1 1
0 6 -1 0
1
end_operator
0