Added many PDDL syntax error tests.
This commit is contained in:
parent
2245422d0f
commit
d629f50661
@ -285,6 +285,47 @@ TEST(PDDLParserTests, ParseWithWhiteSpace)
|
||||
|
||||
TEST(PDDLParserTests, ParseWrongDomain)
|
||||
{
|
||||
ASSERT_THROW(Description::fromFile("data/blocksworld-problem.pddl"), plasp::pddl::ConsistencyException);
|
||||
ASSERT_THROW(Description::fromFile("data/blocksworld-problem.pddl"), ConsistencyException);
|
||||
ASSERT_THROW(Description::fromFiles({"data/blocksworld-problem.pddl", "data/storage-domain.pddl"}), plasp::utils::ParserException);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TEST(PDDLParserTests, ParseSyntaxErrors)
|
||||
{
|
||||
ASSERT_NO_THROW(Description::fromFile("data/pddl-syntax/domain-valid.pddl"));
|
||||
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-expressions-1.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-expressions-2.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-expressions-3.pddl"));
|
||||
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-expression-name-1.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-expression-name-2.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-expression-name-3.pddl"));
|
||||
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-parentheses-1.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-parentheses-2.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-parentheses-3.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-parentheses-4.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-parentheses-5.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-parentheses-6.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-parentheses-7.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-parentheses-8.pddl"));
|
||||
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-section-name-1.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-section-name-2.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-section-name-3.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-section-name-4.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-section-name-5.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-section-name-6.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-section-name-7.pddl"));
|
||||
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-types-1.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-types-2.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-types-3.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-types-4.pddl"));
|
||||
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-variables-1.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-variables-2.pddl"));
|
||||
ASSERT_ANY_THROW(Description::fromFile("data/pddl-syntax/domain-variables-3.pddl"));
|
||||
}
|
||||
|
45
tests/data/pddl-syntax/domain-expression-name-1.pddl
Normal file
45
tests/data/pddl-syntax/domain-expression-name-1.pddl
Normal 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
|
||||
(andX (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)))))
|
45
tests/data/pddl-syntax/domain-expression-name-2.pddl
Normal file
45
tests/data/pddl-syntax/domain-expression-name-2.pddl
Normal 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 (ontableX ?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)))))
|
45
tests/data/pddl-syntax/domain-expression-name-3.pddl
Normal file
45
tests/data/pddl-syntax/domain-expression-name-3.pddl
Normal 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 (notX (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)))))
|
45
tests/data/pddl-syntax/domain-expressions-1.pddl
Normal file
45
tests/data/pddl-syntax/domain-expressions-1.pddl
Normal 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)))))
|
45
tests/data/pddl-syntax/domain-expressions-2.pddl
Normal file
45
tests/data/pddl-syntax/domain-expressions-2.pddl
Normal 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 (clearX ?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)))))
|
45
tests/data/pddl-syntax/domain-expressions-3.pddl
Normal file
45
tests/data/pddl-syntax/domain-expressions-3.pddl
Normal 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 ?XX))
|
||||
(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)))))
|
45
tests/data/pddl-syntax/domain-parentheses-1.pddl
Normal file
45
tests/data/pddl-syntax/domain-parentheses-1.pddl
Normal 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)))))
|
45
tests/data/pddl-syntax/domain-parentheses-2.pddl
Normal file
45
tests/data/pddl-syntax/domain-parentheses-2.pddl
Normal 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)))))
|
45
tests/data/pddl-syntax/domain-parentheses-3.pddl
Normal file
45
tests/data/pddl-syntax/domain-parentheses-3.pddl
Normal 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)))))
|
45
tests/data/pddl-syntax/domain-parentheses-4.pddl
Normal file
45
tests/data/pddl-syntax/domain-parentheses-4.pddl
Normal 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))))
|
45
tests/data/pddl-syntax/domain-parentheses-5.pddl
Normal file
45
tests/data/pddl-syntax/domain-parentheses-5.pddl
Normal 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)))))
|
45
tests/data/pddl-syntax/domain-parentheses-6.pddl
Normal file
45
tests/data/pddl-syntax/domain-parentheses-6.pddl
Normal 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)))))
|
45
tests/data/pddl-syntax/domain-parentheses-7.pddl
Normal file
45
tests/data/pddl-syntax/domain-parentheses-7.pddl
Normal 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)))))
|
45
tests/data/pddl-syntax/domain-parentheses-8.pddl
Normal file
45
tests/data/pddl-syntax/domain-parentheses-8.pddl
Normal 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)))))
|
45
tests/data/pddl-syntax/domain-section-name-1.pddl
Normal file
45
tests/data/pddl-syntax/domain-section-name-1.pddl
Normal file
@ -0,0 +1,45 @@
|
||||
(defineX (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)))))
|
45
tests/data/pddl-syntax/domain-section-name-2.pddl
Normal file
45
tests/data/pddl-syntax/domain-section-name-2.pddl
Normal file
@ -0,0 +1,45 @@
|
||||
(define (domainX 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)))))
|
45
tests/data/pddl-syntax/domain-section-name-3.pddl
Normal file
45
tests/data/pddl-syntax/domain-section-name-3.pddl
Normal file
@ -0,0 +1,45 @@
|
||||
(define (domain BLOCKS)
|
||||
(:requirementsX :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)))))
|
45
tests/data/pddl-syntax/domain-section-name-4.pddl
Normal file
45
tests/data/pddl-syntax/domain-section-name-4.pddl
Normal file
@ -0,0 +1,45 @@
|
||||
(define (domain BLOCKS)
|
||||
(:requirements :strips :typing)
|
||||
(:typesX 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)))))
|
45
tests/data/pddl-syntax/domain-section-name-5.pddl
Normal file
45
tests/data/pddl-syntax/domain-section-name-5.pddl
Normal 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
|
||||
:parametersX (?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)))))
|
45
tests/data/pddl-syntax/domain-section-name-6.pddl
Normal file
45
tests/data/pddl-syntax/domain-section-name-6.pddl
Normal 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)
|
||||
:preconditionX (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)))))
|
45
tests/data/pddl-syntax/domain-section-name-7.pddl
Normal file
45
tests/data/pddl-syntax/domain-section-name-7.pddl
Normal 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))
|
||||
:effectX
|
||||
(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)))))
|
45
tests/data/pddl-syntax/domain-types-1.pddl
Normal file
45
tests/data/pddl-syntax/domain-types-1.pddl
Normal file
@ -0,0 +1,45 @@
|
||||
(define (domain BLOCKS)
|
||||
(:requirements :strips :typing)
|
||||
(:types block)
|
||||
(:predicates (on ?x - block ?y)
|
||||
(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)))))
|
45
tests/data/pddl-syntax/domain-types-2.pddl
Normal file
45
tests/data/pddl-syntax/domain-types-2.pddl
Normal 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)
|
||||
: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)))))
|
45
tests/data/pddl-syntax/domain-types-3.pddl
Normal file
45
tests/data/pddl-syntax/domain-types-3.pddl
Normal 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 - 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)))))
|
45
tests/data/pddl-syntax/domain-types-4.pddl
Normal file
45
tests/data/pddl-syntax/domain-types-4.pddl
Normal file
@ -0,0 +1,45 @@
|
||||
(define (domain BLOCKS)
|
||||
(:requirements :strips :typing)
|
||||
(:types blockX)
|
||||
(: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)))))
|
45
tests/data/pddl-syntax/domain-valid.pddl
Normal file
45
tests/data/pddl-syntax/domain-valid.pddl
Normal 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)))))
|
45
tests/data/pddl-syntax/domain-variables-1.pddl
Normal file
45
tests/data/pddl-syntax/domain-variables-1.pddl
Normal 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)))))
|
45
tests/data/pddl-syntax/domain-variables-2.pddl
Normal file
45
tests/data/pddl-syntax/domain-variables-2.pddl
Normal 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)))))
|
45
tests/data/pddl-syntax/domain-variables-3.pddl
Normal file
45
tests/data/pddl-syntax/domain-variables-3.pddl
Normal 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)))))
|
Reference in New Issue
Block a user