Documented type inheritance.

This commit is contained in:
Patrick Lühne 2016-08-16 18:07:18 +02:00
parent 676dc44619
commit 9c76ce7174

View File

@ -66,12 +66,17 @@ The feature requirement predicates may be used in meta encodings to warn about u
% declares a <type> % declares a <type>
type(type(<name>)). type(type(<name>)).
% specifies that <type 1> inherits <type 2>
inherits(type(<type 1>), type(<type 2>)).
% specifies <constant> to be of type type(<name>) % specifies <constant> to be of type type(<name>)
has(<constant>, type(<name>)). has(<constant>, type(<name>)).
``` ```
[Variables](#variables), [constants](#constants-objects), and [objects](#constants-objects) may be typed. Types are only available with PDDL and if typing is enabled. [Variables](#variables), [constants](#constants-objects), and [objects](#constants-objects) may be typed. Types are only available with PDDL and if typing is enabled.
`plasp` automatically generates all matching `has` predicates for objects with types that inherit other types.
### Variables ### Variables
```prolog ```prolog