Skip to content

Commit d5c22c9

Browse files
committed
Add tests for all generators and fix small compilation/PDDL issues.
1 parent 8796ff3 commit d5c22c9

93 files changed

Lines changed: 442 additions & 227 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ubuntu.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,44 @@ jobs:
1212
matrix:
1313
include:
1414
- os: ubuntu-22.04
15-
python-version: "3.10"
15+
python-version: "3.11"
1616
- os: ubuntu-24.04
17-
python-version: "3.13"
17+
python-version: "3.14"
1818

1919
steps:
20-
- uses: actions/checkout@v4.2.2
20+
- uses: actions/checkout@v6
21+
22+
- name: Install Apptainer
23+
run: |
24+
sudo apt-get update
25+
sudo apt-get install -y software-properties-common
26+
sudo add-apt-repository -y ppa:apptainer/ppa
27+
sudo apt-get update
28+
sudo apt-get install -y apptainer
2129
2230
- name: Install dependencies
2331
run: |
2432
# ocaml is needed for crewplanning
2533
sudo apt install ocaml ocamlbuild tox
2634
curl -LsSf https://astral.sh/uv/install.sh | sh
35+
apptainer pull scorpion.sif oras://ghcr.io/jendrikseipp/scorpion:latest
36+
sudo cp scorpion.sif /usr/local/bin/
37+
38+
- name: Install VAL
39+
run: |
40+
sudo apt-get -y install g++ make flex bison
41+
git clone https://github.com/KCL-Planning/VAL.git
42+
pushd VAL
43+
git checkout a5565396007eee73ac36527fbf904142b3077c74
44+
make clean # Remove old build artifacts and binaries.
45+
sed -i 's/-Werror //g' Makefile # Ignore warnings.
46+
make -j
47+
cp validate /usr/local/bin/
48+
popd
49+
rm -r VAL
2750
2851
- name: Set up Python ${{ matrix.python-version }}
29-
uses: actions/setup-python@v5.6.0
52+
uses: actions/setup-python@v6
3053
with:
3154
python-version: ${{ matrix.python-version }}
3255

.gitignore

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
doc.tex
21
*.aux
32
*.log
43
*.out
54
*.pdf
65
*.toc
76
*.o
8-
Makefile.depend
97
.tox/
8+
doc.tex
9+
output.sas
1010
assembly/assembly
1111
blocksworld/3ops/2pddl/2pddl
1212
blocksworld/4ops/2pddl/2pddl
@@ -32,20 +32,11 @@ miconic/miconic
3232
miconic-fulladl/miconic
3333
miconic-simpleadl/miconic
3434
minigrid/log.txt
35-
minigrid/grid_4room2_fpl_s3_seed0_n0.pddl
3635
movie/movie
3736
mprime/mprime
3837
mystery/mystery
3938
nomystery/build/
4039
nomystery/nomystery
41-
nomystery/old/Makefile.depend
42-
nomystery/old/nomystery
43-
nomystery/release-search
44-
nomystery/CMakeFiles
45-
nomystery/CMakeCache.txt
46-
nomystery/cmake_install.cmake
47-
nomystery/Makefile
48-
nomystery/nomystery_opt
4940
npuzzle/n-puzzle-generator
5041
openstacks/generate_pddl
5142
openstacks/generate_problems

agricola/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
test:
2-
./GenAgricola.py 4 3
2+
./GenAgricola.py 1 2 > $${PDDL_TEST_DIR}/p01.pddl

assembly/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ distclean: clean
2727
rm -f assembly
2828

2929
test: build
30-
./assembly -d 5 -m 5 -h 90 -n 1 -r 5 -t 5 -a 25 -o 50
30+
./assembly -d 5 -m 5 -h 90 -n 1 -r 5 -t 5 -a 25 -o 50 > $${PDDL_TEST_DIR}/problem.pddl
3131

3232
lint:
3333
lclint -booltype Bool $(SOURCES)

assembly/domain.pddl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(define (domain assembly)
22
(:requirements :adl)
3-
(:types assembly resource) ; Individual parts are atomic assemblies
4-
(:predicates (available ?x - (either resource assembly))
3+
(:types assembly resource - object) ; Individual parts are atomic assemblies
4+
(:predicates (available ?x - object)
55
(complete ?a - assembly)
66
(requires ?a - assembly ?r - resource)
77
(committed ?r - resource ?a - assembly)
@@ -53,7 +53,7 @@
5353
; end.
5454
(:action remove
5555
:parameters (?part ?whole - assembly)
56-
:vars (?res - resource)
56+
; :vars (?res - resource)
5757
:precondition (and (forall (?res - resource)
5858
(imply (requires ?whole ?res)
5959
(committed ?res ?whole)))
@@ -79,4 +79,5 @@
7979
(not (= ?tp ?part))
8080
(incorporated ?tp ?whole)))))
8181
(and (complete ?whole)
82-
(available ?whole))))))
82+
(available ?whole)))))
83+
)

barman/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
test:
2-
./barman-generator.py 1 2 3
2+
./barman-generator.py 1 2 3 > $${PDDL_TEST_DIR}/p01.pddl

blocksworld/3ops/2pddl/2pddl.c

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
* (C) Copyright 2001 Albert Ludwigs University Freiburg
66
* Institute of Computer Science
77
*
8-
* All rights reserved. Use of this software is permitted for
9-
* non-commercial research purposes, and it may be copied only
8+
* All rights reserved. Use of this software is permitted for
9+
* non-commercial research purposes, and it may be copied only
1010
* for that use. All copies must include this copyright message.
1111
* This software is made available AS IS, and neither the authors
1212
* nor the Albert Ludwigs University Freiburg make any warranty
13-
* about the software or its performance.
13+
* about the software or its performance.
1414
*********************************************************************/
1515

1616

@@ -34,7 +34,7 @@ typedef unsigned char Bool;
3434
/* commands
3535
*/
3636
char *gdata;
37-
int gn;
37+
int gn;
3838

3939

4040

@@ -73,12 +73,18 @@ int main( int argc, char *argv[] )
7373
}
7474
while ( (c = fgetc( data )) != '\n' );
7575
for ( i = 0; i < gn; i++ ) {
76-
fscanf( data, " %d", &(initial[i + 1]) );
76+
if (fscanf( data, " %d", &(initial[i + 1]) ) != 1) {
77+
printf("Error reading initial state\n");
78+
exit(1);
79+
}
7780
}
7881
while ( (c = fgetc( data )) != '\n' );
7982
while ( (c = fgetc( data )) != '\n' );
8083
for ( i = 0; i < gn; i++ ) {
81-
fscanf( data, " %d", &(goal[i + 1]) );
84+
if (fscanf( data, " %d", &(goal[i + 1]) ) != 1) {
85+
printf("Error reading goal state\n");
86+
exit(1);
87+
}
8288
}
8389

8490
if ( 0 ) {
@@ -119,8 +125,8 @@ int main( int argc, char *argv[] )
119125
}
120126
}
121127
printf(")\n)\n)\n\n\n");
122-
123-
128+
129+
124130

125131
exit( 0 );
126132

blocksworld/3ops/2pddl/Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
####### FLAGS
66

7-
TYPE =
8-
ADDONS =
7+
TYPE =
8+
ADDONS =
99

1010
CC = gcc
1111

12-
CFLAGS = -O6 -Wall -g -ansi $(TYPE) $(ADDONS)
12+
CFLAGS = -O6 -Wall -g -ansi $(TYPE) $(ADDONS)
1313
# -g -pg
1414

1515
LIBS = -lm
@@ -30,9 +30,12 @@ OBJECTS = $(SOURCES:.c=.o)
3030
####### Build rules
3131

3232

33-
miconic: $(OBJECTS)
33+
2pddl: $(OBJECTS)
3434
$(CC) -o 2pddl $(OBJECTS) $(CFLAGS) $(LIBS)
3535

36+
test: 2pddl
37+
../../bwstates.1/bwstates -s 2 -n 5 -r 1 > $${PDDL_TEST_DIR}/problem.pddl
38+
3639
# misc
3740
clean:
3841
rm -f *.o *.bak *~ *% core *_pure_p9_c0_400.o.warnings \

blocksworld/4ops/2pddl/2pddl.c

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
* (C) Copyright 2001 Albert Ludwigs University Freiburg
66
* Institute of Computer Science
77
*
8-
* All rights reserved. Use of this software is permitted for
9-
* non-commercial research purposes, and it may be copied only
8+
* All rights reserved. Use of this software is permitted for
9+
* non-commercial research purposes, and it may be copied only
1010
* for that use. All copies must include this copyright message.
1111
* This software is made available AS IS, and neither the authors
1212
* nor the Albert Ludwigs University Freiburg make any warranty
13-
* about the software or its performance.
13+
* about the software or its performance.
1414
*********************************************************************/
1515

1616

@@ -34,7 +34,7 @@ typedef unsigned char Bool;
3434
/* commands
3535
*/
3636
char *gdata;
37-
int gn;
37+
int gn;
3838

3939

4040

@@ -73,12 +73,18 @@ int main( int argc, char *argv[] )
7373
}
7474
while ( (c = fgetc( data )) != '\n' );
7575
for ( i = 0; i < gn; i++ ) {
76-
fscanf( data, " %d", &(initial[i + 1]) );
76+
if (fscanf( data, " %d", &(initial[i + 1]) ) != 1) {
77+
printf("Error reading initial state\n");
78+
exit(1);
79+
}
7780
}
7881
while ( (c = fgetc( data )) != '\n' );
7982
while ( (c = fgetc( data )) != '\n' );
8083
for ( i = 0; i < gn; i++ ) {
81-
fscanf( data, " %d", &(goal[i + 1]) );
84+
if (fscanf( data, " %d", &(goal[i + 1]) ) != 1) {
85+
printf("Error reading goal state\n");
86+
exit(1);
87+
}
8288
}
8389

8490
if ( 0 ) {
@@ -120,8 +126,8 @@ int main( int argc, char *argv[] )
120126
}
121127
}
122128
printf(")\n)\n)\n\n\n");
123-
124-
129+
130+
125131

126132
exit( 0 );
127133

blocksworld/4ops/2pddl/Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
####### FLAGS
66

7-
TYPE =
8-
ADDONS =
7+
TYPE =
8+
ADDONS =
99

1010
CC = gcc
1111

12-
CFLAGS = -O6 -Wall -g -ansi $(TYPE) $(ADDONS)
12+
CFLAGS = -O6 -Wall -g -ansi $(TYPE) $(ADDONS)
1313
# -g -pg
1414

1515
LIBS = -lm
@@ -30,9 +30,12 @@ OBJECTS = $(SOURCES:.c=.o)
3030
####### Build rules
3131

3232

33-
miconic: $(OBJECTS)
33+
2pddl: $(OBJECTS)
3434
$(CC) -o 2pddl $(OBJECTS) $(CFLAGS) $(LIBS)
3535

36+
test: 2pddl
37+
../../bwstates.1/bwstates -s 2 -n 5 -r 1 > $${PDDL_TEST_DIR}/problem.pddl
38+
3639
# misc
3740
clean:
3841
rm -f *.o *.bak *~ *% core *_pure_p9_c0_400.o.warnings \

0 commit comments

Comments
 (0)