jia-parse 1.0.0

Command-line and library parser for PDDL and Jia model files.
Documentation

jia-parse

coverage

jia-parse is a command-line parser for planning and modelling files used by Jia.

It currently parses:

  • PDDL domain and problem files
  • .jia / .jiacp model files

The crate also exposes a Rust library API for embedding the parsers in other tools.

Run

Parse PDDL:

jia-parse pddl --domain domain.pddl --problem problem.pddl

Print PDDL parse statistics:

jia-parse pddl --domain domain.pddl --problem problem.pddl --stats

Emit PDDL AST JSON:

jia-parse pddl --domain domain.pddl --problem problem.pddl --json

The JSON output is a single object:

{
  "domain": {},
  "problem": {}
}

Parse a .jia model:

jia-parse jia model.jia

Emit .jia AST JSON:

jia-parse jia model.jia --json

Validate only:

jia-parse pddl --domain domain.pddl --problem problem.pddl --validate
jia-parse jia model.jia --validate

Examples

Inspectable examples live under examples/:

  • examples/pddl/delivery/ - a compact typed PDDL domain and problem
  • examples/pddl/advanced/ - durative actions, numeric fluents, derived predicates, preferences, and constraints
  • examples/jia/job_shop.jia - CP scheduling model
  • examples/jia/resource_schedule.jia - CP scheduling model with optional tasks, real bounds, and resource demand
  • examples/jia/production_lp.jia - LP-style .jia model

Compile

Install from GitHub:

cargo install --git https://github.com/Feasbl/jia-parse.git --locked

After the crate is published to crates.io:

cargo install jia-parse --locked

Build from source:

cargo build --release

The binary will be written to:

target/release/jia-parse

Run tests:

cargo test

Install locally from a checkout:

cargo install --path .

Library

Use the parser from Rust:

let domain = jia_parse::pddl::parse_domain_str(domain_source)?;
let problem = jia_parse::pddl::parse_problem_str(problem_source)?;
let model = jia_parse::jia::parse_model_str(jia_source)?;

License

Apache-2.0. See LICENSE.