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
2016-11-04 16:10:34 +01:00
> Translate PDDL to ASP
## Overview
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-15 00:56:17 +02:00
`plasp` translates planning problem instances to ASP facts.
`plasp` 3 supports the input languages [PDDL 3.1 ](https://helios.hud.ac.uk/scommv/IPC-14/software.html ) (only basic features currently) 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-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-06-15 00:56:17 +02:00
$ ./fast-downward.py --translate --build=release64 domain.pddl problem.pddl
2016-05-24 12:53:09 +02:00
```
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-08-30 14:28:29 +02:00
The translated instance can finally be solved incrementally with `clingo` and a meta encoding, for instance, [`sequential-incremental.lp` ](encodings/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
2016-08-30 14:28:29 +02:00
$ clingo encodings/sequential-incremental.lp instance.lp
2016-05-24 02:57:00 +02:00
```
2016-08-14 16:31:23 +02:00
## Command-Line Interface
2016-06-14 18:40:40 +02:00
```bash
2016-11-29 02:01:23 +01:00
$ plasp [options] file...
2016-06-14 18:40:40 +02:00
```
2016-08-14 16:31:23 +02:00
`plasp` automatically detects the language of the input program.
2016-08-14 16:34:39 +02:00
2016-08-15 15:26:34 +02:00
See [command-line interface ](doc/command-line-interface.md ) for more details.
2016-06-14 18:40:40 +02:00
2016-08-14 16:23:28 +02:00
## Output Format
`plasp` provides a uniform output format for SAS and PDDL input problems.
2016-08-14 16:34:39 +02:00
2016-08-15 15:26:34 +02:00
See [output format ](doc/output-format.md ) for more details.
2016-08-14 16:23:28 +02:00
2016-08-14 16:33:11 +02:00
If you want to write your own meta encoding for `plasp` ’ s output, this [simple example encoding ](encodings/sequential-incremental.lp ) gets you started.
2016-08-14 16:23:28 +02:00
2016-05-24 02:51:33 +02:00
## Building
2016-08-14 16:27:43 +02:00
`plasp` requires `boost` and is built via CMake and a C++ compiler.
2016-05-24 02:51:33 +02:00
2016-11-16 23:53:21 +01:00
See [building ](doc/building.md ) for more details.
2016-05-26 00:11:32 +02:00
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