Skip to content

Commit

Permalink
Update abstract interpreter docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ztangent committed Apr 27, 2024
1 parent 5c93219 commit da6f900
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
23 changes: 22 additions & 1 deletion docs/src/ref/absint.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# Abstract Interpretation

Coming soon!
PDDL.jl supports [abstract interpretation](https://en.wikipedia.org/wiki/Abstract_interpretation) of PDDL domains, the semantics of which can also be compiled using the [PDDL.jl compiler](compiler.md). This functionality is exposed by the [`abstracted`](@ref) and [`abstractstate`](@ref) functions:

```@docs
abstracted
abstractstate
```

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:

```@docs
PDDL.AbstractInterpeter
```

## 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`](@ref) abstraction, while scalar numbers (corresponding to PDDL types like `integer`, `number` and `numeric`) are mapped to the [`IntervalAbs`](@ref) abstraction. Other types of values may use the [`SetAbs`](@ref) abstraction.

```@docs
PDDL.BooleanAbs
PDDL.IntervalAbs
PDDL.SetAbs
```
2 changes: 2 additions & 0 deletions docs/src/ref/compiler.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Compiler

PDDL.jl supports compilation of the semantics of PDDL domains through code-generation for PDDL actions and custom datatypes for PDDL states. See [Speeding Up PDDL.jl](../tutorials/speeding_up.md) for a more detailed explanation.

```@docs
compiled
compilestate
Expand Down
4 changes: 3 additions & 1 deletion src/abstractions/boolean.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ isboth(b) = false
"""
BooleanAbs
Belnap logic abstraction for Boolean values.
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.
"""
const BooleanAbs = Union{Missing,Bool,Both}

Expand Down
2 changes: 1 addition & 1 deletion src/interpreter/abstract/abstract.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

"""
AbstractInterpreter(
type_abstractions = default_abstypes(),
type_abstractions = PDDL.default_abstypes(),
fluent_abstractions = Dict(),
autowiden = false
)
Expand Down

0 comments on commit da6f900

Please sign in to comment.