Added tests for derived predicate numbering.
These tests ensure that derived predicates are numbered correctly, whether they are introduced by the domain, the problem, or both.
This commit is contained in:
47
tests/data/normalization/normalization-6-1.pddl
Normal file
47
tests/data/normalization/normalization-6-1.pddl
Normal file
@@ -0,0 +1,47 @@
|
||||
; tests derived predicates are correclty numbered
|
||||
; variation 1: derived predicates both in domain and problem
|
||||
(define (domain test-normalization)
|
||||
(:predicates
|
||||
(test-predicate-0))
|
||||
|
||||
; introduces derived predicates 1 and 2
|
||||
(:action test-action-1
|
||||
:parameters
|
||||
(?x)
|
||||
:precondition
|
||||
(or
|
||||
(test-predicate-0)
|
||||
(and
|
||||
(test-predicate-0)
|
||||
(test-predicate-0)))
|
||||
:effect
|
||||
(test-predicate-0))
|
||||
|
||||
; introduces derived predicates 3 and 4
|
||||
(:action test-action-1
|
||||
:parameters
|
||||
(?x)
|
||||
:precondition
|
||||
(or
|
||||
(test-predicate-0)
|
||||
(and
|
||||
(test-predicate-0)
|
||||
(test-predicate-0)))
|
||||
:effect
|
||||
(test-predicate-0)))
|
||||
|
||||
(define (problem test-normalization)
|
||||
(:domain test-normalization)
|
||||
|
||||
(:objects a b c)
|
||||
|
||||
(:init
|
||||
(test-predicate-0))
|
||||
|
||||
; introduces derived predicates 5 and 6
|
||||
(:goal
|
||||
(or
|
||||
(test-predicate-0)
|
||||
(and
|
||||
(test-predicate-0)
|
||||
(test-predicate-0)))))
|
32
tests/data/normalization/normalization-6-2.pddl
Normal file
32
tests/data/normalization/normalization-6-2.pddl
Normal file
@@ -0,0 +1,32 @@
|
||||
; tests derived predicates are correclty numbered
|
||||
; variation 2: derived predicates in domain only
|
||||
(define (domain test-normalization)
|
||||
(:predicates
|
||||
(test-predicate-0))
|
||||
|
||||
; introduces derived predicates 1 and 2
|
||||
(:action test-action-1
|
||||
:parameters
|
||||
(?x)
|
||||
:precondition
|
||||
(or
|
||||
(test-predicate-0)
|
||||
(and
|
||||
(test-predicate-0)
|
||||
(test-predicate-0)))
|
||||
:effect
|
||||
(test-predicate-0))
|
||||
|
||||
; introduces derived predicates 3 and 4
|
||||
(:action test-action-1
|
||||
:parameters
|
||||
(?x)
|
||||
:precondition
|
||||
(or
|
||||
(test-predicate-0)
|
||||
(and
|
||||
(test-predicate-0)
|
||||
(test-predicate-0)))
|
||||
:effect
|
||||
(test-predicate-0))
|
||||
)
|
29
tests/data/normalization/normalization-6-3.pddl
Normal file
29
tests/data/normalization/normalization-6-3.pddl
Normal file
@@ -0,0 +1,29 @@
|
||||
; tests derived predicates are correclty numbered
|
||||
; variation 3: derived predicates in problem only
|
||||
(define (domain test-normalization)
|
||||
(:predicates
|
||||
(test-predicate-0))
|
||||
|
||||
(:action test-action-1
|
||||
:parameters
|
||||
(?x)
|
||||
:precondition
|
||||
(test-predicate-0)
|
||||
:effect
|
||||
(test-predicate-0)))
|
||||
|
||||
(define (problem test-normalization)
|
||||
(:domain test-normalization)
|
||||
|
||||
(:objects a b c)
|
||||
|
||||
(:init
|
||||
(test-predicate-0))
|
||||
|
||||
; introduces derived predicates 1 and 2
|
||||
(:goal
|
||||
(or
|
||||
(test-predicate-0)
|
||||
(and
|
||||
(test-predicate-0)
|
||||
(test-predicate-0)))))
|
Reference in New Issue
Block a user