Added normalization tests for implications.

These tests ensure that implications are correctly reduced to
disjunctions in preconditions (nested and not) and goal descriptions.
This commit is contained in:
2017-11-09 19:34:47 +01:00
parent b063f5047e
commit 0cf84dd5ca
2 changed files with 110 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
; tests that “imply” statements in preconditions are correctly reduced
(define (domain test-normalization)
(:predicates
(test-predicate-0)
(test-predicate-1 ?x)
(test-predicate-2 ?x ?y))
; top-level “imply” statement
(:action test-action-1
:parameters
(?x)
:precondition
(imply
(test-predicate-0)
(test-predicate-1 ?x))
:effect
(test-predicate-1 ?x))
; nested “imply” statement
(:action test-action-2
:parameters
(?x)
:precondition
(and
(and
(imply
(test-predicate-0)
(test-predicate-1 ?x))
(test-predicate-0))
(test-predicate-0))
:effect
(test-predicate-1 ?x))
)
(define (problem test-normalization)
(:domain test-normalization)
(:objects a b c)
(:init
(test-predicate-0))
; “imply” statement in goal
(:goal
(and
(imply
(test-predicate-0)
(test-predicate-1 a))
(test-predicate-0))))