2016-05-20 15:29:24 +02:00
# plasp—Translate PDDL to ASP
2016-06-03 00:14:51 +02:00
[![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/develop.svg?maxAge=3600&label=build (master ))](https://travis-ci.org/potassco/plasp?branch=master)
[![Build Status ](https://img.shields.io/travis/potassco/plasp/develop.svg?maxAge=3600&label=build (develop ))](https://travis-ci.org/potassco/plasp?branch=develop)
2016-05-20 22:24:24 +02:00
2016-05-20 19:23:28 +02:00
`plasp` 3 is in early development and not intended for productive use yet.
2016-06-14 18:25:24 +02:00
`plasp` 3 translates planning problem instances to ASP facts.
`plasp` 3 supports the input languages [PDDL ](https://helios.hud.ac.uk/scommv/IPC-14/software.html ) (only basic features currently) and the [SAS ](http://www.fast-downward.org/TranslatorOutputFormat ) (full support of the current version 3), which is used by [Fast Downward ](http://www.fast-downward.org/ ).
2016-05-24 02:42:31 +02:00
2016-05-20 19:23:28 +02:00
Please get in touch with [Patrick Lühne ](https://www.luehne.de ) if you have any suggestions.
2016-05-20 15:29:24 +02:00
2016-05-24 02:42:31 +02:00
## Usage
2016-06-14 18:25:24 +02:00
### Translating PDDL to ASP Facts
PDDL instances are translated to ASP facts as follows:
2016-05-24 02:42:31 +02:00
```bash
2016-06-14 18:25:24 +02:00
$ plasp 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
```bash
2016-05-24 12:53:09 +02:00
$ ./fast-downward.py --translate --build=release64 domain.pddl instance.pddl
```
2016-06-14 18:25:24 +02:00
This creates a file called `output.sas` , which may now be translated by `plasp` .
```bash
$ plasp output.sas
```
### Solving the Translated Instance
2016-06-14 18:30:06 +02:00
The translated instance can finally be solved incrementally with `clingo` and a meta encoding, for instance, `pddl-meta-sequential-incremental.lp` :
2016-05-24 12:53:09 +02:00
```bash
2016-06-14 18:25:24 +02:00
$ plasp domain.pddl problem.pddl > instance.lp
$ clingo encodings/pddl-meta-sequential-incremental.lp instance.lp
2016-05-24 02:57:00 +02:00
```
2016-05-24 02:51:33 +02:00
## Building
2016-06-14 18:25:24 +02:00
`plasp` requires a C++14 compiler (preferrably GCC ≥ 6.1 or clang ≥ 3.8), the `boost` libraries (≥ 1.55), and CMake for building.
2016-05-24 02:51:33 +02:00
```bash
$ git clone https://github.com/potassco/plasp.git
$ cd plasp
$ mkdir -p build/release
$ cd build/release
$ cmake ../.. -DCMAKE_BUILD_TYPE=Release
$ make
```
The built `plasp` binary is then located at `plasp/build/release/bin/plasp` .
2016-05-26 00:11:32 +02:00
### Running the Tests
`plasp` provides unit tests written using the [Google Test ](https://github.com/google/googletest ) framework.
Before building and running the tests, make sure you have fetched the Google Test git submodule:
```bash
$ git submodule init
$ git submodule update
```
Afterward, build and run the tests as follows:
```bash
$ make run-tests
```
2016-05-20 15:29:24 +02:00
## Contributors
2016-05-24 15:24:23 +02:00
* [Patrick Lühne ](https://www.luehne.de ) (`plasp` 3)
2016-05-20 19:23:28 +02:00
### Earlier Versions
2016-05-26 13:01:46 +02:00
* René Knaebel
* Murat Knecht