The arrival Reference Manual

This is the arrival Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Thu Feb 15 04:15:39 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 arrival

Classical planning plan validator written in modern Common Lisp

Author

Masataro Asai

Contact

License

LLGPL

Version

0.1

Dependencies
  • trivia (system).
  • alexandria (system).
  • iterate (system).
  • log4cl (system).
  • trivia.quasiquote (system).
Source

arrival.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 arrival/src

Source

arrival.asd.

Parent Component

arrival (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 arrival/arrival.asd

Source

arrival.asd.

Parent Component

arrival (system).

ASDF Systems

arrival.


4.1.2 arrival/src/0-package.lisp

Source

arrival.asd.

Parent Component

src (module).

Packages

4.1.3 arrival/src/1-fact-ordering.lisp

Source

arrival.asd.

Parent Component

src (module).

Internals

4.1.4 arrival/src/1-flatten-types.lisp

Source

arrival.asd.

Parent Component

src (module).

Internals

4.1.5 arrival/src/2-simulate.lisp

Source

arrival.asd.

Parent Component

src (module).

Internals

4.1.6 arrival/src/3-main.lisp

Source

arrival.asd.

Parent Component

src (module).

Internals

5 Packages

Packages are listed by definition order.


5.1 arrival

Source

0-package.lisp.

Use List
  • alexandria.
  • arrival.pddl.
  • common-lisp.
  • iterate.
  • trivia.level2.
Internals

5.2 arrival.pddl

The package for loading the symbols in the input

Source

0-package.lisp.

Used By List

arrival.


6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.2 Internals


6.2.1 Special variables

Special Variable: *actions*

A list of action definitions whose types are compiled away.

Package

arrival.

Source

1-flatten-types.lisp.

Special Variable: *allowed-conditions*
Package

arrival.

Source

3-main.lisp.

Special Variable: *axiom-table*
Package

arrival.

Source

2-simulate.lisp.

Special Variable: *axioms*

A list of axiom definitions whose types are compiled away.

Package

arrival.

Source

1-flatten-types.lisp.

Special Variable: *exclude-type-predicates-in-trace*
Package

arrival.

Source

2-simulate.lisp.

Special Variable: *fact-table*
Package

arrival.

Source

2-simulate.lisp.

Special Variable: *fluents*

A list of fluent type signatures (head arg-types* result-type) , e.g. ((content envelope paper) ...).

Package

arrival.

Source

1-flatten-types.lisp.

Special Variable: *goal*

Goal condition, whose types are compiled away. (types appears in forall/exists)

Package

arrival.

Source

1-flatten-types.lisp.

Special Variable: *hold-level*
Package

arrival.

Source

2-simulate.lisp.

Special Variable: *in-initialization*
Package

arrival.

Source

2-simulate.lisp.

Special Variable: *init*

Initial state augmented with the type predicates for the objects.

Package

arrival.

Source

1-flatten-types.lisp.

Special Variable: *new-fact-table*
Package

arrival.

Source

2-simulate.lisp.

Special Variable: *next-action*
Package

arrival.

Source

2-simulate.lisp.

Special Variable: *objects*

An alist of (name . type).

Package

arrival.

Source

1-flatten-types.lisp.

Special Variable: *plan*
Package

arrival.

Source

2-simulate.lisp.

Special Variable: *predicates*

A list of predicate type signatures (head arg-types*), e.g. ((next location location) ...)

Package

arrival.

Source

1-flatten-types.lisp.

Special Variable: *previous-action*
Package

arrival.

Source

2-simulate.lisp.

Special Variable: *proof-stack*

A special variable holding the proof stack as a list of axioms.
Whenever a new axiom is about to be proved/evaluated, it looks up this variable so that it avoids tautology/infinite loop.

Package

arrival.

Source

2-simulate.lisp.

Special Variable: *relaxed-planning*
Package

arrival.

Source

2-simulate.lisp.

Special Variable: *types*

An alist of (type . supertype).

Package

arrival.

Source

1-flatten-types.lisp.

Special Variable: *verbosity*

Value 0 No output
Value >=1 Reports the basic progress / steps that it is checking / action effects Value >=2 Prints the predicates and the axioms being checked
Value 3 Prints the backtracking for proving axioms

Package

arrival.

Source

2-simulate.lisp.


6.2.2 Macros

Macro: in-fresh-binding (&body body)
Package

arrival.

Source

2-simulate.lisp.

Macro: progv* (vars vals &body body)

progv + printing feature.

Package

arrival.

Source

2-simulate.lisp.


6.2.3 Ordinary functions

Function: %in-fresh-binding (fn)
Package

arrival.

Source

2-simulate.lisp.

Function: apply-action (action)

Checks the precondition and
applies an action of the form (name . args) to the current state.

Package

arrival.

Source

2-simulate.lisp.

Function: apply-effect (condition)

Applies the effect of the condition. It respects the conditional effect

Package

arrival.

Source

2-simulate.lisp.

Function: evaluate (form)

Evaluate atoms, predicates and (object/numeric) fluents.

Package

arrival.

Source

2-simulate.lisp.

Function: (setf evaluate) (form)

Evaluate the input into a form that is can be directly evaluated.

Package

arrival.

Source

2-simulate.lisp.

Function: fact< (arg1 arg2)
Package

arrival.

Source

1-fact-ordering.lisp.

Function: fact= (arg1 arg2)
Package

arrival.

Source

1-fact-ordering.lisp.

Function: facts ()

Returns a list of facts that hold in the current state. Depending on the value of the *exclude-type-predicates-in-trace*, it includes the type predicates (true by default)

Package

arrival.

Source

2-simulate.lisp.

Function: flatten-type (type)

Returns the list of all parent types (including itself and OBJECT), handling the infinite loop.
Signals an error when the type is not connected to the root OBJECT type.

Package

arrival.

Source

1-flatten-types.lisp.

Function: flatten-typed-def (typed-def)

Takes a typed-def L and returns three values:
1. the untyped version of L
2. a list of literals converted from the types of the parameters, including the parent types 3. alist of (arg . type)

Example: (?x - table) -> (?x), ((table ?x)), ((?x . table))

Package

arrival.

Source

1-flatten-types.lisp.

Function: flatten-types/argument (arg type)

Returns a list of type predicates for each parent type of TYPE,
with ARG as the argument. The result does not contain the OBJECT type.

Example: (flatten-types/argument ’?x ’airport) -> ((airport ?x) (location ?x))

Package

arrival.

Source

1-flatten-types.lisp.

Function: flatten-types/condition (condition)
Package

arrival.

Source

1-flatten-types.lisp.

Function: flatten-types/effect (effect)
Package

arrival.

Source

1-flatten-types.lisp.

Function: flatten-types/predicate (predicate &optional include-parent-types)

PREDICATE is a predicate form (name args...).
Look up the *predicates* and returns a list that contains itself
and the type predicates implied by its arguments.
By default, the implied type predicates contain only those for the most specific types,
minus the obvious OBJECT type.

Example: (flatten-types/predicate ’(next ?x ?y)) -> ((next ?x ?y) (location ?x) (location ?y))

When the optional argument INCLUDE-PARENT-TYPES is true, the list also contains all the type predicates up in the type hierarchy, minus the OBJECT type.

Package

arrival.

Source

1-flatten-types.lisp.

Function: goal-not-satisfied-error-printer (c s)
Package

arrival.

Source

2-simulate.lisp.

Function: grovel-actions (domain)
Package

arrival.

Source

1-flatten-types.lisp.

Function: grovel-axioms (domain)
Package

arrival.

Source

1-flatten-types.lisp.

Function: grovel-constants (domain)
Package

arrival.

Source

1-flatten-types.lisp.

Function: grovel-fluents (domain)
Package

arrival.

Source

1-flatten-types.lisp.

Function: grovel-goal (problem)
Package

arrival.

Source

1-flatten-types.lisp.

Function: grovel-init (problem)
Package

arrival.

Source

1-flatten-types.lisp.

Function: grovel-objects (problem)
Package

arrival.

Source

1-flatten-types.lisp.

Function: grovel-predicates (domain)
Package

arrival.

Source

1-flatten-types.lisp.

Function: grovel-types (domain)
Package

arrival.

Source

1-flatten-types.lisp.

Function: holds (condition result)

Utility for printing the predicate test

Package

arrival.

Source

2-simulate.lisp.

Function: initialize (next)
Package

arrival.

Source

2-simulate.lisp.

Function: new-variable ()

Interns a new symbol in ARRIVAL.PDDL

Package

arrival.

Source

1-flatten-types.lisp.

Function: package< (a b)
Package

arrival.

Source

1-fact-ordering.lisp.

Function: package= (a b)
Package

arrival.

Source

1-fact-ordering.lisp.

Function: parse-argument2 (domain problem plan-output-file trace-output)
Package

arrival.

Source

3-main.lisp.

Function: parse-argument3 (domain problem plan-output-file trace-output)
Package

arrival.

Source

3-main.lisp.

Function: parse-arguments (argv)
Package

arrival.

Source

3-main.lisp.

Function: parse-typed-def (list)

Parse a list of form [obj* - type]* .
Returns an alist of (obj . type).
Does not handle the type inheritance.
Untyped parameters are given the type OBJECT.
The order is preserved.
It does not care what the obj is. It can be a list, too.

Example: (parse-typed-def ’(airport1 - airport truck1 truck2 - truck banana))

-> ((airport1 . airport) (truck1 . truck) (truck2 . truck) (banana . object))

Example: (parse-typed-def ’((deposit ?p - person) - number (content ?e - envelope) - paper))

-> (((deposit ?p - person) . number) ((content ?e - envelope) . paper))

Package

arrival.

Source

1-flatten-types.lisp.

Function: pprint-facts (facts &optional s)

Print the list of facts to the stream, inside the PDDL package.

Package

arrival.

Source

2-simulate.lisp.

Function: pprint-pddl (thing &optional s)

Print THING to the stream, inside the PDDL package.

Package

arrival.

Source

2-simulate.lisp.

Function: pprint-pddl-to-string (thing)

Print THING to the string, inside the PDDL package.

Package

arrival.

Source

2-simulate.lisp.

Function: precondition-not-satisfied-error-printer (c s)
Package

arrival.

Source

2-simulate.lisp.

Function: prove-axiom (axioms name args)

Prove that the axiom with the given arguments hold in the current state. This function is not responsible for caching the result.

Package

arrival.

Source

2-simulate.lisp.

Function: prove-axiom1 (axiom args)
Package

arrival.

Source

2-simulate.lisp.

Function: simulate-main (&rest argv)
Package

arrival.

Source

3-main.lisp.

Function: simulate-plan-from-file (domain problem plan-input-file callback)

CALLBACK is a function with no argument, that is called after the initialization and after applying each action.

Package

arrival.

Source

2-simulate.lisp.

Function: simulate1 (domain problem *plan* callback)
Package

arrival.

Source

2-simulate.lisp.

Function: simulate2 (domain problem callback)
Package

arrival.

Source

2-simulate.lisp.

Function: simulate3 (callback)
Package

arrival.

Source

2-simulate.lisp.

Function: symbol< (a b)
Package

arrival.

Source

1-fact-ordering.lisp.

Function: symbol= (a b)
Package

arrival.

Source

1-fact-ordering.lisp.

Function: test (condition)

Test the condition in the current state. Returns true when the condition holds.

Package

arrival.

Source

2-simulate.lisp.

Function: unify-duplicates (variables fn)

If there are any duplicates in VARIABLES,
the second or later appearances are replaced with a new symbol. FN is called with two arguments; The new, unique variable list and a list of equality constraints.

Package

arrival.

Source

1-flatten-types.lisp.

Function: variablep (variable)
Package

arrival.

Source

1-flatten-types.lisp.


6.2.4 Conditions

Condition: domain-name-mismatch-error
Package

arrival.

Source

2-simulate.lisp.

Direct superclasses

error.

Condition: domain-parse-error
Package

arrival.

Source

2-simulate.lisp.

Direct superclasses

error.

Condition: goal-not-satisfied-error
Package

arrival.

Source

2-simulate.lisp.

Direct superclasses

error.

Direct slots
Slot: state
Initargs

:state

Slot: goal
Initargs

:goal

Condition: precondition-not-satisfied-error
Package

arrival.

Source

2-simulate.lisp.

Direct superclasses

error.

Direct slots
Slot: state
Initargs

:state

Slot: action
Initargs

:action

Slot: params
Initargs

:params

Slot: args
Initargs

:args

Slot: pre
Initargs

:pre

Condition: problem-parse-error
Package

arrival.

Source

2-simulate.lisp.

Direct superclasses

error.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
A   E   F   G   H   I   M   N   P   S   T   U   V  
Index Entry  Section

%
%in-fresh-binding: Private ordinary functions

(
(setf evaluate): Private ordinary functions

A
apply-action: Private ordinary functions
apply-effect: Private ordinary functions

E
evaluate: Private ordinary functions

F
fact<: Private ordinary functions
fact=: Private ordinary functions
facts: Private ordinary functions
flatten-type: Private ordinary functions
flatten-typed-def: Private ordinary functions
flatten-types/argument: Private ordinary functions
flatten-types/condition: Private ordinary functions
flatten-types/effect: Private ordinary functions
flatten-types/predicate: Private ordinary functions
Function, %in-fresh-binding: Private ordinary functions
Function, (setf evaluate): Private ordinary functions
Function, apply-action: Private ordinary functions
Function, apply-effect: Private ordinary functions
Function, evaluate: Private ordinary functions
Function, fact<: Private ordinary functions
Function, fact=: Private ordinary functions
Function, facts: Private ordinary functions
Function, flatten-type: Private ordinary functions
Function, flatten-typed-def: Private ordinary functions
Function, flatten-types/argument: Private ordinary functions
Function, flatten-types/condition: Private ordinary functions
Function, flatten-types/effect: Private ordinary functions
Function, flatten-types/predicate: Private ordinary functions
Function, goal-not-satisfied-error-printer: Private ordinary functions
Function, grovel-actions: Private ordinary functions
Function, grovel-axioms: Private ordinary functions
Function, grovel-constants: Private ordinary functions
Function, grovel-fluents: Private ordinary functions
Function, grovel-goal: Private ordinary functions
Function, grovel-init: Private ordinary functions
Function, grovel-objects: Private ordinary functions
Function, grovel-predicates: Private ordinary functions
Function, grovel-types: Private ordinary functions
Function, holds: Private ordinary functions
Function, initialize: Private ordinary functions
Function, new-variable: Private ordinary functions
Function, package<: Private ordinary functions
Function, package=: Private ordinary functions
Function, parse-argument2: Private ordinary functions
Function, parse-argument3: Private ordinary functions
Function, parse-arguments: Private ordinary functions
Function, parse-typed-def: Private ordinary functions
Function, pprint-facts: Private ordinary functions
Function, pprint-pddl: Private ordinary functions
Function, pprint-pddl-to-string: Private ordinary functions
Function, precondition-not-satisfied-error-printer: Private ordinary functions
Function, prove-axiom: Private ordinary functions
Function, prove-axiom1: Private ordinary functions
Function, simulate-main: Private ordinary functions
Function, simulate-plan-from-file: Private ordinary functions
Function, simulate1: Private ordinary functions
Function, simulate2: Private ordinary functions
Function, simulate3: Private ordinary functions
Function, symbol<: Private ordinary functions
Function, symbol=: Private ordinary functions
Function, test: Private ordinary functions
Function, unify-duplicates: Private ordinary functions
Function, variablep: Private ordinary functions

G
goal-not-satisfied-error-printer: Private ordinary functions
grovel-actions: Private ordinary functions
grovel-axioms: Private ordinary functions
grovel-constants: Private ordinary functions
grovel-fluents: Private ordinary functions
grovel-goal: Private ordinary functions
grovel-init: Private ordinary functions
grovel-objects: Private ordinary functions
grovel-predicates: Private ordinary functions
grovel-types: Private ordinary functions

H
holds: Private ordinary functions

I
in-fresh-binding: Private macros
initialize: Private ordinary functions

M
Macro, in-fresh-binding: Private macros
Macro, progv*: Private macros

N
new-variable: Private ordinary functions

P
package<: Private ordinary functions
package=: Private ordinary functions
parse-argument2: Private ordinary functions
parse-argument3: Private ordinary functions
parse-arguments: Private ordinary functions
parse-typed-def: Private ordinary functions
pprint-facts: Private ordinary functions
pprint-pddl: Private ordinary functions
pprint-pddl-to-string: Private ordinary functions
precondition-not-satisfied-error-printer: Private ordinary functions
progv*: Private macros
prove-axiom: Private ordinary functions
prove-axiom1: Private ordinary functions

S
simulate-main: Private ordinary functions
simulate-plan-from-file: Private ordinary functions
simulate1: Private ordinary functions
simulate2: Private ordinary functions
simulate3: Private ordinary functions
symbol<: Private ordinary functions
symbol=: Private ordinary functions

T
test: Private ordinary functions

U
unify-duplicates: Private ordinary functions

V
variablep: Private ordinary functions


A.3 Variables

Jump to:   *  
A   G   P   S  
Index Entry  Section

*
*actions*: Private special variables
*allowed-conditions*: Private special variables
*axiom-table*: Private special variables
*axioms*: Private special variables
*exclude-type-predicates-in-trace*: Private special variables
*fact-table*: Private special variables
*fluents*: Private special variables
*goal*: Private special variables
*hold-level*: Private special variables
*in-initialization*: Private special variables
*init*: Private special variables
*new-fact-table*: Private special variables
*next-action*: Private special variables
*objects*: Private special variables
*plan*: Private special variables
*predicates*: Private special variables
*previous-action*: Private special variables
*proof-stack*: Private special variables
*relaxed-planning*: Private special variables
*types*: Private special variables
*verbosity*: Private special variables

A
action: Private conditions
args: Private conditions

G
goal: Private conditions

P
params: Private conditions
pre: Private conditions

S
Slot, action: Private conditions
Slot, args: Private conditions
Slot, goal: Private conditions
Slot, params: Private conditions
Slot, pre: Private conditions
Slot, state: Private conditions
Slot, state: Private conditions
Special Variable, *actions*: Private special variables
Special Variable, *allowed-conditions*: Private special variables
Special Variable, *axiom-table*: Private special variables
Special Variable, *axioms*: Private special variables
Special Variable, *exclude-type-predicates-in-trace*: Private special variables
Special Variable, *fact-table*: Private special variables
Special Variable, *fluents*: Private special variables
Special Variable, *goal*: Private special variables
Special Variable, *hold-level*: Private special variables
Special Variable, *in-initialization*: Private special variables
Special Variable, *init*: Private special variables
Special Variable, *new-fact-table*: Private special variables
Special Variable, *next-action*: Private special variables
Special Variable, *objects*: Private special variables
Special Variable, *plan*: Private special variables
Special Variable, *predicates*: Private special variables
Special Variable, *previous-action*: Private special variables
Special Variable, *proof-stack*: Private special variables
Special Variable, *relaxed-planning*: Private special variables
Special Variable, *types*: Private special variables
Special Variable, *verbosity*: Private special variables
state: Private conditions
state: Private conditions


A.4 Data types

Jump to:   0   1   2   3  
A   C   D   F   G   M   P   S  
Index Entry  Section

0
0-package.lisp: The arrival/src/0-package․lisp file

1
1-fact-ordering.lisp: The arrival/src/1-fact-ordering․lisp file
1-flatten-types.lisp: The arrival/src/1-flatten-types․lisp file

2
2-simulate.lisp: The arrival/src/2-simulate․lisp file

3
3-main.lisp: The arrival/src/3-main․lisp file

A
arrival: The arrival system
arrival: The arrival package
arrival.asd: The arrival/arrival․asd file
arrival.pddl: The arrival․pddl package

C
Condition, domain-name-mismatch-error: Private conditions
Condition, domain-parse-error: Private conditions
Condition, goal-not-satisfied-error: Private conditions
Condition, precondition-not-satisfied-error: Private conditions
Condition, problem-parse-error: Private conditions

D
domain-name-mismatch-error: Private conditions
domain-parse-error: Private conditions

F
File, 0-package.lisp: The arrival/src/0-package․lisp file
File, 1-fact-ordering.lisp: The arrival/src/1-fact-ordering․lisp file
File, 1-flatten-types.lisp: The arrival/src/1-flatten-types․lisp file
File, 2-simulate.lisp: The arrival/src/2-simulate․lisp file
File, 3-main.lisp: The arrival/src/3-main․lisp file
File, arrival.asd: The arrival/arrival․asd file

G
goal-not-satisfied-error: Private conditions

M
Module, src: The arrival/src module

P
Package, arrival: The arrival package
Package, arrival.pddl: The arrival․pddl package
precondition-not-satisfied-error: Private conditions
problem-parse-error: Private conditions

S
src: The arrival/src module
System, arrival: The arrival system