2017-06-19 16:07:44 +02:00
# plasp [![GitHub Release](https://img.shields.io/github/release/potassco/plasp.svg?maxAge=3600)](https://github.com/potassco/plasp/releases) [![Build Status](https://img.shields.io/travis/potassco/plasp/master.svg?maxAge=3600&label=build%20%28master%29)](https://travis-ci.org/potassco/plasp?branch=master) [![Build Status](https://img.shields.io/travis/potassco/plasp/develop.svg?maxAge=3600&label=build%20%28develop%29)](https://travis-ci.org/potassco/plasp?branch=develop)
2016-05-20 15:29:24 +02:00
2017-10-14 02:37:46 +02:00
> ASP planning tools for PDDL
2016-11-04 16:10:34 +01:00
## Overview
2016-05-20 22:24:24 +02:00
2017-11-16 18:16:55 +01:00
`plasp` is a tool collection for planning in [*answer set programming* ](https://en.wikipedia.org/wiki/Answer_set_programming ).
`plasp` 3 supports the input languages [PDDL 3.1 ](https://helios.hud.ac.uk/scommv/IPC-14/software.html ) (except for advanced features such as durative actions, numerical fluents, and preferences) and [SAS ](http://www.fast-downward.org/TranslatorOutputFormat ) (full support of SAS 3), which is used by [Fast Downward ](http://www.fast-downward.org/ ).
2016-05-20 19:23:28 +02:00
2017-11-16 18:16:55 +01:00
The most notable tool provided by `plasp` is `plasp translate` , which translates PDDL descriptions to ASP facts.
2016-05-24 02:42:31 +02:00
2017-11-16 18:16:55 +01:00
## Translating PDDL to ASP Facts
2016-06-14 18:25:24 +02:00
PDDL instances are translated to ASP facts as follows:
2016-05-24 02:42:31 +02:00
2017-11-16 18:16:55 +01:00
```sh
plasp translate domain.pddl problem.pddl
2016-05-24 02:42:31 +02:00
```
2016-06-14 18:25:24 +02:00
Alternatively, PDDL instances may first be translated to SAS, the output format of [Fast Downward ](http://www.fast-downward.org/ ).
2016-05-24 02:57:00 +02:00
2017-11-16 18:16:55 +01:00
```sh
./fast-downward.py --translate --build=release64 domain.pddl problem.pddl
2016-05-24 12:53:09 +02:00
```
2017-11-16 18:16:55 +01:00
This creates a file called `output.sas` , which may now be translated by `plasp` as well.
2016-06-14 18:25:24 +02:00
2017-11-16 18:16:55 +01:00
```sh
plasp translate output.sas
2016-06-14 18:25:24 +02:00
```
### Solving the Translated Instance
2017-11-17 15:15:20 +01:00
The translated instance can finally be solved with `clingo` and a meta encoding, for instance, [`sequential-horizon.lp` ](encodings/sequential-horizon.lp ):
2016-05-24 12:53:09 +02:00
2017-11-16 18:16:55 +01:00
```sh
plasp translate domain.pddl problem.pddl > instance.lp
2017-11-17 15:15:20 +01:00
clingo encodings/sequential-horizon.lp -c horizon=10 instance.lp
2016-05-24 02:57:00 +02:00
```
2017-11-16 18:16:55 +01:00
### Translator Output Format
2016-06-14 18:40:40 +02:00
2017-11-16 18:16:55 +01:00
`plasp translate` provides a uniform output format for SAS and PDDL input problems.
See [output format ](doc/output-format.md ) for more details.
2016-06-14 18:40:40 +02:00
2017-11-17 15:15:20 +01:00
If you want to write your own meta encoding for `plasp translate` ’ s output, this [simple example encoding ](encodings/sequential-horizon.lp ) gets you started.
2016-08-14 16:34:39 +02:00
2017-11-16 18:16:55 +01:00
## Provided Tools
2016-06-14 18:40:40 +02:00
2017-11-16 18:16:55 +01:00
```sh
plasp < command > [< option > ...] [< input file > ...]
```
2016-08-14 16:23:28 +02:00
2017-11-16 18:16:55 +01:00
Aside from translating PDDL to ASP facts, `plasp` provides the following commands:
2016-08-14 16:34:39 +02:00
2017-11-16 18:16:55 +01:00
| command | description |
|---|---|
| `translate` | Translate PDDL and SAS to ASP facts |
| `normalize` | Normalize PDDL to plasp’ s custom PDDL format |
| `check-syntax` | Check the syntax of PDDL specifications |
| `beautify` | Cleanly format PDDL specifications |
| `help` | Display help message |
| `version` | Display version information |
2016-08-14 16:23:28 +02:00
2017-11-16 18:16:55 +01:00
`plasp help` shows a list of all commands provided by `plasp` .
To list all available options of a command, call `plasp <command> --help` or `plasp help <command>` .
2016-08-14 16:23:28 +02:00
2017-11-16 18:16:55 +01:00
`plasp` automatically detects the language (PDDL or SAS) of the input descriptions.
2016-05-24 02:51:33 +02:00
2017-11-16 18:16:55 +01:00
## Building
2016-05-24 02:51:33 +02:00
2017-11-16 18:16:55 +01:00
`plasp` is built with CMake and a C++ compiler.
2016-11-16 23:53:21 +01:00
See [building ](doc/building.md ) for more details.
2016-05-26 00:11:32 +02:00
2017-11-17 18:11:07 +01:00
## PDDL Feature Support
`plasp` supports a subset of PDDL 3.1.
See [PDDL feature support ](doc/pddl-feature-support.md ) for a list of supported and unsupported PDDL 3.1 features.
2016-05-20 15:29:24 +02:00
## Contributors
2016-11-03 18:36:57 +01:00
* [Patrick Lühne ](https://www.luehne.de )
2016-11-14 17:11:05 +01:00
* Martin Gebser (encodings)
2016-11-03 18:36:57 +01:00
* Torsten Schaub (encodings)
2016-05-20 19:23:28 +02:00
### Earlier Versions
2016-05-26 13:01:46 +02:00
* René Knaebel
* Murat Knecht