Abstract Interpretation
PDDL.jl supports abstract interpretation of PDDL domains. This functionality is exposed by the abstracted
and abstractstate
functions:
PDDL.abstracted
— Functionabstracted(domain; options...)
Construct an abstract domain from a concrete domain. See PDDL.AbstractInterpreter
for the list of options
.
abstracted(domain, state; options...)
abstracted(domain, problem; options...)
Construct an abstract domain and state from a concrete domain
and state
. A problem
can be provided instead of a state
. See PDDL.AbstractInterpreter
for the list of options
.
PDDL.abstractstate
— Functionabstractstate(domain, state)
Construct a state in an abstract domain
from a concrete state
.
The behavior of the abstract interpreter can be customized by specifying the Julia type used to represent abstract values for a particular fluent or PDDL type:
PDDL.AbstractInterpreter
— TypeAbstractInterpreter(
type_abstractions = PDDL.default_abstypes(),
fluent_abstractions = Dict(),
autowiden = false
)
Abstract PDDL interpreter based on Cartesian abstract interpretation of the PDDL state. Fluents in the state are converted to abstract values based on either their concrete type or fluent name, with fluent-specific abstractions overriding type-based abstractions.
Arguments
type_abstractions
: Mapping from PDDL types to the Julia type for abstract fluent values.fluent_abstractions
: Mapping from fluent names to the Julia type for abstract fluent values.autowiden
: Flag for automatic widening of values after a state transition.
Abstract semantics can also be compiled by calling compiled
on an abstracted domain and state:
domain, state = abstracted(domain, state)
domain, state = compiled(domain, state)
Abstract Values and Types
Abstract interpretation requires each concrete value to be mapped to an abstract value of a particular type, which represents an (over-approximation) of the set of the possible values reachable after a series of actions have been executed. By default, Boolean values (i.e. predicates) are mapped to the BooleanAbs
abstraction, while scalar numbers (corresponding to PDDL types like integer
, number
and numeric
) are mapped to the IntervalAbs
abstraction. Other types of values may use the SetAbs
abstraction.
PDDL.BooleanAbs
— TypeBooleanAbs
Belnap logic abstraction for Boolean values. In addition to true
, false
and missing
, the abstract value both
can be used to represent when a predicate is both false and true.
PDDL.IntervalAbs
— TypeIntervalAbs(lo::Real, hi::Real)
Interval abstraction for real-valued numbers.
PDDL.SetAbs
— TypeSetAbs(xs...)
Set abstraction for arbitrary objects.
When introducing a new global datatype using the PDDL.jl extension interfaces, a default abstraction can be associated with the type by defining a new method for PDDL.default_abstype
:
PDDL.default_abstype
— Functiondefault_abstype(name)
Mapping from PDDL types to default abstraction types.
The PDDL.@register
macro can also be used to register new default abstractions.