The shop3 Reference Manual

This is the shop3 Reference Manual, version 3.10.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Nov 06 14:53:13 2023 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 shop3

License

Mozilla Public License

Version

3.10.0

Dependencies
  • shop3/common (system)., at least version (:read-file-form "shop-version.lisp-expr")
  • shop3/theorem-prover (system)., at least version (:read-file-form "shop-version.lisp-expr")
  • trivial-garbage (system).
  • alexandria (system).
  • iterate (system).
Source

shop3.asd.

Child Components

2.2 shop3/common

License

Mozilla Public License

Version

3.10.0

Dependencies
Source

shop3.asd.

Child Components

2.3 shop3/unifier

License

Mozilla Public License

Version

3.10.0

Dependency

alexandria (system).

Source

shop3.asd.

Child Components

2.4 shop3/theorem-prover

License

Mozilla Public License

Version

3.10.0

Dependencies
Source

shop3.asd.

Child Components

3 Modules

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


3.1 shop3/io

Dependency

decls.lisp (file).

Source

shop3.asd.

Parent Component

shop3 (system).

Child Components

3.2 shop3/pddl

Dependency

io (module).

Source

shop3.asd.

Parent Component

shop3 (system).

Child Components

3.3 shop3/search

Dependency

pddl (module).

Source

shop3.asd.

Parent Component

shop3 (system).

Child Components

3.4 shop3/explicit-stack-search

Dependency

search (module).

Source

shop3.asd.

Parent Component

shop3 (system).

Child Components

3.5 shop3/looping-tasks

Dependency

explicit-stack-search (module).

Source

shop3.asd.

Parent Component

shop3 (system).

Child Component

loop-extensions.lisp (file).


3.6 shop3/tree

Dependency

looping-tasks (module).

Source

shop3.asd.

Parent Component

shop3 (system).

Child Components

3.7 shop3/minimal-subtree

When there’s an upset in plan execution, find a minimal affected subtree.

Dependency

tree (module).

Source

shop3.asd.

Parent Component

shop3 (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 shop3/shop3.asd

Source

shop3.asd.

Parent Component

shop3 (system).

ASDF Systems
Packages

shop-asd.

Public Interface

operation-done-p (method).

Internals

4.1.2 shop3/package.lisp

Source

shop3.asd.

Parent Component

shop3 (system).

Packages

4.1.3 shop3/decls.lisp

Dependency

package.lisp (file).

Source

shop3.asd.

Parent Component

shop3 (system).

Public Interface
Internals

4.1.4 shop3/io/input.lisp

Source

shop3.asd.

Parent Component

io (module).

Public Interface
Internals

4.1.5 shop3/io/output.lisp

Source

shop3.asd.

Parent Component

io (module).

Public Interface

print-current-state (function).

Internals

4.1.6 shop3/io/debugging.lisp

Source

shop3.asd.

Parent Component

io (module).

Public Interface
Internals

4.1.7 shop3/io/shop-pprint.lisp

Source

shop3.asd.

Parent Component

io (module).

Packages

shop3-pprint.

Internals

4.1.8 shop3/pddl/decls.lisp

Source

shop3.asd.

Parent Component

pddl (module).

Internals

+pddl-requirements-keywords+ (special variable).


4.1.9 shop3/pddl/fluents.lisp

Dependency

decls.lisp (file).

Source

shop3.asd.

Parent Component

pddl (module).

Internals

4.1.10 shop3/pddl/pddl.lisp

Dependency

fluents.lisp (file).

Source

shop3.asd.

Parent Component

pddl (module).

Public Interface
Internals

4.1.11 shop3/pddl/prover.lisp

Dependency

pddl.lisp (file).

Source

shop3.asd.

Parent Component

pddl (module).

Internals

4.1.12 shop3/search/protections.lisp

Source

shop3.asd.

Parent Component

search (module).

Internals

4.1.13 shop3/search/task-reductions.lisp

Source

shop3.asd.

Parent Component

search (module).

Public Interface
Internals

4.1.14 shop3/search/search.lisp

Source

shop3.asd.

Parent Component

search (module).

Public Interface
Internals

4.1.15 shop3/search/plan-trajectory.lisp

Source

shop3.asd.

Parent Component

search (module).

Public Interface

4.1.16 shop3/explicit-stack-search/plan-tree.lisp

Source

shop3.asd.

Parent Component

explicit-stack-search (module).

Public Interface
Internals

4.1.17 shop3/explicit-stack-search/decls.lisp

Dependency

plan-tree.lisp (file).

Source

shop3.asd.

Parent Component

explicit-stack-search (module).

Public Interface
Internals

4.1.18 shop3/explicit-stack-search/prepare-return-values.lisp

Dependency

decls.lisp (file).

Source

shop3.asd.

Parent Component

explicit-stack-search (module).

Public Interface

prepare-return-values (function).

Internals

4.1.19 shop3/explicit-stack-search/backtrack-stack.lisp

Dependency

prepare-return-values.lisp (file).

Source

shop3.asd.

Parent Component

explicit-stack-search (module).

Public Interface

print-object (method).

Internals

4.1.20 shop3/explicit-stack-search/analogical-replay.lisp

Dependency

backtrack-stack.lisp (file).

Source

shop3.asd.

Parent Component

explicit-stack-search (module).

Internals

4.1.21 shop3/explicit-stack-search/explicit-search.lisp

Dependency

analogical-replay.lisp (file).

Source

shop3.asd.

Parent Component

explicit-stack-search (module).

Public Interface
Internals

4.1.22 shop3/looping-tasks/loop-extensions.lisp

Source

shop3.asd.

Parent Component

looping-tasks (module).

Internals

4.1.23 shop3/tree/tree-accessors.lisp

Source

shop3.asd.

Parent Component

tree (module).

Public Interface
Internals

4.1.24 shop3/tree/tree-reductions.lisp

Dependency

tree-accessors.lisp (file).

Source

shop3.asd.

Parent Component

tree (module).

Internals

4.1.25 shop3/minimal-subtree/package.lisp

Source

shop3.asd.

Parent Component

minimal-subtree (module).

Packages

shop3-minimal-subtree.


4.1.26 shop3/minimal-subtree/decls.lisp

Dependency

package.lisp (file).

Source

shop3.asd.

Parent Component

minimal-subtree (module).

Public Interface

find-failed-task (generic function).


4.1.27 shop3/minimal-subtree/minimal-subtree.lisp

Dependency

decls.lisp (file).

Source

shop3.asd.

Parent Component

minimal-subtree (module).

Public Interface
Internals

4.1.28 shop3/plan-repair.lisp

Dependencies
Source

shop3.asd.

Parent Component

shop3 (system).

Public Interface

repair-plan (function).

Internals

4.1.29 shop3/shop3.lisp

Dependency

plan-repair.lisp (file).

Source

shop3.asd.

Parent Component

shop3 (system).

Public Interface

find-plans (function).

Internals

4.1.30 shop3/plan-printer.lisp

Dependencies
Source

shop3.asd.

Parent Component

shop3 (system).

Public Interface

pprint-plan (function).

Internals

pprint-step (function).


4.1.31 shop3/common/package-common.lisp

Source

shop3.asd.

Parent Component

shop3/common (system).

Packages

4.1.32 shop3/common/common.lisp

Dependency

package-common.lisp (file).

Source

shop3.asd.

Parent Component

shop3/common (system).

Public Interface

4.1.33 shop3/common/state-decls.lisp

Dependency

common.lisp (file).

Source

shop3.asd.

Parent Component

shop3/common (system).

Public Interface
Internals

4.1.34 shop3/common/state-utils.lisp

Dependency

state-decls.lisp (file).

Source

shop3.asd.

Parent Component

shop3/common (system).

Public Interface
Internals

4.1.35 shop3/common/tagged-state.lisp

Dependency

state-utils.lisp (file).

Source

shop3.asd.

Parent Component

shop3/common (system).

Public Interface
Internals

4.1.36 shop3/unifier/package-unifier.lisp

Source

shop3.asd.

Parent Component

shop3/unifier (system).

Packages

shop3.unifier.


4.1.37 shop3/unifier/tracer.lisp

Dependency

package-unifier.lisp (file).

Source

shop3.asd.

Parent Component

shop3/unifier (system).

Public Interface

4.1.38 shop3/unifier/unify.lisp

Dependency

tracer.lisp (file).

Source

shop3.asd.

Parent Component

shop3/unifier (system).

Public Interface
Internals

4.1.39 shop3/theorem-prover/package-thpr.lisp

Source

shop3.asd.

Parent Component

shop3/theorem-prover (system).

Packages

shop3.theorem-prover.


4.1.40 shop3/theorem-prover/decls.lisp

Dependency

package-thpr.lisp (file).

Source

shop3.asd.

Parent Component

shop3/theorem-prover (system).

Public Interface
Internals

4.1.41 shop3/theorem-prover/theorem-prover.lisp

Dependency

decls.lisp (file).

Source

shop3.asd.

Parent Component

shop3/theorem-prover (system).

Public Interface
Internals

5 Packages

Packages are listed by definition order.


5.1 %shop3-common-private%

Source

package-common.lisp.


5.2 shop3-user

SHOP3-USER is a "scratch" package for
experimenting with the SHOP3 API. Typically any real work should be moved to a dedicated package you create for yourself.

Source

package.lisp.

Nicknames
  • shop2-user
  • shop-user
Use List

5.3 shop3.common

Source

package-common.lisp.

Nicknames
  • shop2.common
  • shop.common
  • shop3cmn
Use List
Used By List
Public Interface
Internals

5.4 shop3.theorem-prover

Source

package-thpr.lisp.

Nicknames
  • shop.theorem-prover
  • shopthpr
Use List
Used By List

shop3.

Public Interface
Internals

5.5 shop-asd

Source

shop3.asd.

Nicknames
  • shop3-asd
  • shop2-asd
Use List
  • asdf/interface.
  • common-lisp.
Internals

5.6 shop3-pprint

Source

shop-pprint.lisp.

Nickname

shop2-pprint

Use List
  • common-lisp.
  • iterate.
  • shop3.
Internals

5.7 plan-tree

Source

package.lisp.

Nickname

shop-extended-plan-tree

Use List
  • common-lisp.
  • iterate.
Used By List

shop3-minimal-subtree.

Public Interface
Internals

5.8 shop3-minimal-subtree

Source

package.lisp.

Nicknames
  • shop2-minimal-subtree
  • subtree
  • shop-minimal-subtree
Use List
Public Interface

find-failed-task (generic function).

Internals

5.9 prepare-return-values

Source

package.lisp.

Nickname

prv

Use List
  • common-lisp.
  • iterate.
Public Interface

prepare-return-values (function).

Internals

5.10 shop3

The SHOP3 package is the package that exposes SHOP3’s API.

Source

package.lisp.

Nicknames
  • shop2
  • shop
Use List
Used By List
Public Interface
Internals

5.11 shop3.unifier

Source

package-unifier.lisp.

Nicknames
  • shop.unifier
  • shop2.unifier
  • shopunif
Use List

common-lisp.

Used By List
Public Interface
Internals

6 Definitions

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


6.1 Public Interface


6.1.1 Special variables

Special Variable: *attribution-list*
Package

shop3.common.

Source

common.lisp.

Special Variable: *current-state*
Package

shop3.common.

Source

common.lisp.

Special Variable: *defdomain-verbose*
Package

shop3.

Source

input.lisp.

Special Variable: *define-silently*

Set to a non-nil value to suppress output messages printed when SHOP3 model components (domains, etc.) are defined. When this value is NIL, SHOP3 defaults to printing messages when it is asked to define components.

Package

shop3.

Source

input.lisp.

Special Variable: *domain*

Default domain to use when planning.

Package

shop3.theorem-prover.

Source

decls.lisp.

Special Variable: *establishers*
Package

shop3.theorem-prover.

Source

decls.lisp.

Special Variable: *external-access*
Package

shop3.common.

Source

common.lisp.

Special Variable: *inferences*
Package

shop3.common.

Source

common.lisp.

Special Variable: *literals*
Package

shop3.theorem-prover.

Source

decls.lisp.

Special Variable: *record-dependencies-p*

Do we record dependencies when we find literals in the theorem prover. If so, see *LITERALS* and *ESTABLISHERS*.

Package

shop3.theorem-prover.

Source

decls.lisp.

Special Variable: *shop-trace*
Package

shop3.unifier.

Source

tracer.lisp.

Special Variable: *shop-trace-stream*
Package

shop3.unifier.

Source

tracer.lisp.

Special Variable: *state*

This special variable should be bound to the current
state inside FIND-SATISFIERS, qv., giving axioms access to the state data structure.

Package

shop3.theorem-prover.

Source

decls.lisp.

Special Variable: *state-encoding*
Package

shop3.common.

Source

common.lisp.

Special Variable: *trace-query*
Package

shop3.unifier.

Source

tracer.lisp.

Special Variable: *which*
Package

shop3.

Source

decls.lisp.


6.1.2 Macros

Macro: apply-substitution (target substitution)

APPLY-SUBSTITUTION searches through TARGET, replacing each variable symbol with the corresponding value (if any) in SUBSTITUTION

Package

shop3.unifier.

Source

unify.lisp.

Macro: call (fn &rest params)
Package

shop3.common.

Source

decls.lisp.

Macro: def-logical-keyword ((name domain-specializer) &body forms)

(def-logical-keyword name domain-specializer options &body forms) where forms should always include:

(:satisfier-method (goal other-goals state bindings level just1) forms)

The FORMS in the satisfier method will be wrapped in a block named :satisfier-method, in case one wishes to use a non-local exit. (return-from :satisfier-method ...) will work. The method should either fail (return NIL), or it should compute some list of binding lists
from GOAL, combine them with the input BINDINGS, and then recursively call SEEK-SATISFIERS on OTHER-GOALS, incorporating the new bindings.
The satisfier method may reference a formal named DOMAIN.

Defines a logical connective in the SHOP theorem prover.

Defines methods for REAL-SEEK-SATISFIERS-FOR and LOGICAL-KEYWORDP.

Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Macro: def-problem-set (list-name problem-list)
Package

shop3.

Source

input.lisp.

Macro: defdomain (name-and-options items)
Package

shop3.

Source

input.lisp.

Macro: defproblem (problem-name &rest args)

(DEFPROBLEM {<name>|<name-and-options>} <state> <tasks>) For backward compatibility, will support also (DEFPROBLEM <name> <domain-name> <state> <tasks>).

Package

shop3.

Source

input.lisp.

Macro: shop-fail ()
Package

shop3.common.

Source

common.lisp.

Macro: shop-trace (&rest items)

- (SHOP-TRACE) with no arguments will return a list of what’s
currently being traced.

- (SHOP-TRACE ITEM) will turn on tracing for ITEM.

ITEM may be any of the following:

- the name of a method, axiom, operator, task, or predicate;
- one of the keywords :METHODS, :AXIOMS, :OPERATORS, :TASKS,
:GOALS, :EFFECTS, or :PROTECTIONS, in which case SHOP will
trace all items of that type (:GOALS, :EFFECTS, and :PROTECTIONS
refer to three different ways predicates can occur: as goals to
be satisfied, and as effects or protections in operators);
- a pair of the form (:TASK <taskname>), (:METHOD <methodname>). SHOP will break when attempting to expand the task, or apply the method, respectively. - the keyword :STATES, in which case SHOP will include the current
state whenever it prints out a tracing message
- the keyword :ALL in which case SHOP will print out all the tracing information it knows how to.

- (SHOP-TRACE ITEM1 ITEM2 ...) will do the same for a list of items

Package

shop3.

Source

debugging.lisp.

Macro: shop-untrace (&rest items)

(SHOP-UNTRACE ...) is the inverse of (SHOP-TRACE ...)

Package

shop3.

Source

debugging.lisp.

Macro: trace-print (type item state &rest formats)
Package

shop3.unifier.

Source

tracer.lisp.

Macro: unify-fail (e1 e2)

It’s painful (and bug-inducing) to have to remember to compare the result of unify with ’fail.

Package

shop3.unifier.

Source

unify.lisp.

Macro: unify-fail-p (e1 e2)

Better-named alias for UNIFY-FAIL.

Package

shop3.unifier.

Source

unify.lisp.

Macro: unify-p (e1 e2)

It’s painful (and bug-inducing) to have to remember to compare the result of unify with ’fail. This checks to see whether E1 and E2 unify, and returns T or NIL, accordingly.

Package

shop3.unifier.

Source

unify.lisp.

Macro: variable-p (x)

An alias for VARIABLEP, for more consistent naming.

Package

shop3.unifier.

Source

unify.lisp.


6.1.3 Ordinary functions

Function: all-primitive-nodes (tree)
Package

shop3.

Source

tree-accessors.lisp.

Function: anonymous-var-p (x)

Does X name an anonymous variable?

Package

shop3.unifier.

Source

unify.lisp.

Function: binding-list-value (var binding-list &optional if-not-found)

Return the value of VAR in BINDING-LISP. When there is no such value, raises an error if IF-NOT-FOUND is :ERROR, else returns the value of IF-NOT-FOUND.

Package

shop3.unifier.

Source

unify.lisp.

Reader: binding-val (instance)

Binding structure accessor

Package

shop3.unifier.

Source

unify.lisp.

Target Slot

val.

Writer: (setf binding-val) (instance)
Package

shop3.unifier.

Source

unify.lisp.

Target Slot

val.

Reader: binding-var (instance)

Binding structure accessor

Package

shop3.unifier.

Source

unify.lisp.

Target Slot

var.

Writer: (setf binding-var) (instance)
Package

shop3.unifier.

Source

unify.lisp.

Target Slot

var.

Function: complex-node-children (structure)
Package

shop3.

Source

tree-accessors.lisp.

Function: (setf complex-node-children) (structure)
Package

shop3.

Source

tree-accessors.lisp.

Function: complex-node-p (tree-node)

Is TREE-NODE a representation of a complex node (i.e., not an operator) in the SHOP2 tree format as described in SHOP2?

Package

shop3.

Source

tree-accessors.lisp.

Function: complex-node-task (structure)
Package

shop3.

Source

tree-accessors.lisp.

Function: (setf complex-node-task) (structure)
Package

shop3.

Source

tree-accessors.lisp.

Reader: complex-tree-node-children (instance)
Writer: (setf complex-tree-node-children) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Target Slot

children.

Reader: complex-tree-node-method-name (instance)
Writer: (setf complex-tree-node-method-name) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Target Slot

method-name.

Function: compose-substitutions (sub1 sub2)
Package

shop3.unifier.

Source

unify.lisp.

Reader: consumer (instance)
Writer: (setf consumer) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Target Slot

consumer.

Function: copy-plan-tree (plan-tree lookup-table translation-table)

Make a new copy of PLAN-TREE (indexed by LOOKUP-TABLE), and using the input TRANSLATION-TABLE, which translates old primitive tasks to new primitive tasks.

Package

plan-tree.

Source

plan-tree.lisp.

Function: copy-plan-tree (tree)

Return a functional copy of TREE. By "functional" we mean satisfies the key tree property – the primitive tasks are EQ to the primitive tasks in the plan sequence – but the nodes will not be EQ to the nodes in the original tree (although they will be EQUALP.

Package

shop3.

Source

tree-accessors.lisp.

Function: decode-tag (tag)
Package

shop3.common.

Source

tagged-state.lisp.

Function: delete-state-tag-decoder ()
Package

shop3.common.

Source

tagged-state.lisp.

Function: delete-tag-map (tag)

Erase association of TAG with its operator/action instance.

Package

shop3.common.

Source

tagged-state.lisp.

Function: do-problems (problems &rest keywords)

DO-PROBLEMS runs FIND-PLANS on each problem in PROBLEMS, which may be either a problem-set name (a symbol) or a list of problems.

Returns nothing of interest: should only be run for what it displays on the console.

Package

shop3.

Source

input.lisp.

Reader: establisher (instance)
Writer: (setf establisher) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Target Slot

establisher.

Function: explain-satisfier (unified-goal state &key external domain)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: extract-variables (expr)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: find-all-complex-node-for-task (task-name tree)

Find all complex-nodes in the TREE whose task name is TASK.

Package

shop3.

Source

tree-accessors.lisp.

Function: find-all-complex-node-if (fun tree)

Return a complex node whose TASK satisfies FUN.

Package

shop3.

Source

tree-accessors.lisp.

Function: find-all-primitive-nodes-if (fun tree)

Return a list of all primitive nodes whose TASK satisfies FUN.

Package

shop3.

Source

tree-accessors.lisp.

Function: find-complex-node-for-task (task-name tree)

Find a complex-node in the TREE whose task name is TASK.

Package

shop3.

Source

tree-accessors.lisp.

Function: find-complex-node-if (fun tree-list &key node-fun)

If ‘NODE-FUN‘ is nil return a complex node whose *task* (first element) satisfies ‘FUN‘. If ‘NODE-FUN‘ is non-‘NIL‘, then return a complex node that satisfies ‘FUN‘. Takes a list of trees (list of nodes) as input. Won’t work properly on a true tree.

Package

shop3.

Source

tree-accessors.lisp.

Function: find-domain (name-or-obj &optional if-not-found)

Find and return a domain object with the name NAME. Will return the value in its IF-NOT-FOUND argument if no such domain is loaded. IF-NOT-FOUND defaults to :error, which will raise an error condition.

Package

shop3.

Source

input.lisp.

Function: find-plan-step (task plan-tree &optional plan-tree-hash)
Package

plan-tree.

Source

plan-tree.lisp.

Function: find-plans (problem &rest options &key domain which verbose gc pp plan-tree optimize-cost collect-state time-limit explanation depth-cutoff state tasks state-type hand-steer leashed out-stream plan-num-limit &allow-other-keys)

FIND-PLANS looks for solutions to the planning PROBLEM.
PROBLEM should be a problem-designator (a PROBLEM or a symbol naming one).
The keyword arguments are as follows:

:WHICH tells what kind of search to do. Its possible values are:

:FIRST - depth-first search, returning the first plan(s) found
(up to *plan-num-limit*).
:ALL - depth-first search for *all* plans.
:SHALLOWEST - depth-first search for the shallowest plan in the
search space (this usually is also the shortest plan).
If there’s more than one such plan, return the first. :ALL-SHALLOWEST - depth-first search for all shallowest plans.
:ID-FIRST - iterative deepening search, returning the first plan. :ID-ALL - iterative deepening search for all shallowest plans. :RANDOM - Randomized search. Returns plan(s) found by random selection (subject to *plan-num-limit*).
Used by Monroe. Not for normal SHOP3 domains, since
normal SHOP3 domains have order-dependent semantics.

:VERBOSE says how much information to print about the plans SHOP3
finds. Its values can be any of the following:
0 or NIL - print nothing
1 or :STATS - print some statistics on SHOP3’s operation
2 or :PLANS - print the stats and print all plans found, but omit operator costs and omit all operators whose names start with "!!"
3 or :LONG-PLANS - print the stats and plans, including all operator costs and all operators (even those whose names start with "!!")
:GC says whether to do a garbage collection before calling SEEK-PLANS :PLAN-TREE indicates whether or not to return plan tree(s).
:COLLECT-STATE indicates whether or not to return final state(s). For backward- compatibility, states are also returned whenever :PLAN-TREE is true. This should probably eventually change.
:PLAN-NUM-LIMIT is an int greater than or equal to 1 (its default value) specifying a limit on the number of plans to generate.
RETURN VALUES:
PLANS FOUND — a list of plans. Each plan is a list that alternates a between instantiated operators and costs
RUN TIME — floating point value in seconds
/if/ the PLAN-TREE keyword argument is supplied, there will be two additional return values:
PLAN-TREES — a list of plan trees, whose form is specified elsewhere. FINAL-STATES — a list of final state structures, one per plan.

Package

shop3.

Source

shop3.lisp.

Function: find-plans-stack (problem &key domain verbose plan-tree gc no-dependencies repairable rationale state-type out-stream which plan-num-limit analogical-replay unpack-returns make-analogy-table)

Top level search function for explicit-state search in SHOP3.
Does not support the full range of options supported by SHOP3’s ‘find-plans-stack‘.

Keyword arguments:
* domain : either a domain name (symbol) or a ‘shop:domain‘ object.
* verbose : 0, 1, 2, 3; default 0
* plan-tree : build and return a plan tree? (‘plan-tree:top-node‘),
defaults to ‘nil‘.
* gc : If possible, perform a full GC before starting to plan. Default: current value of ‘shop:*gc*‘.
* no-dependencies : if building a plan tree, build it *without* causal dependencies. Default: ‘nil‘.
* repairable : return plans that can be repaired. Default: ‘nil‘.
* rationale : build a plan tree with rationale information. Default: ‘nil‘. * state-type : what state type should be used for representing world states? (Note: world-state/SHOP state, *not* search-state). Default: ‘:mixed‘. * out-stream : where should output be printed. Default: ‘t‘ (standard output). * which : What/how many plans should be returned? Supports only ‘:first‘ (the default) and ‘:all‘.
* plan-num-limit: an int greater than or equal to 1 (its default value) specifying a limit on the number of plans to generate.
* analogical-replay : Do search informed by the contents of the ‘*analogical-replay-table*‘. Default: ‘nil‘.
* make-analogy-table : Populate ‘*analogical-replay-table*‘ while planning. Only works with ‘:which‘ = ‘:first‘. Default: ‘nil‘.
* unpack-returns : If true, return values in a way compatible with ‘find-plans‘. If false, return a list of ‘plan-return‘ objects instead. See discussion of return values, below. Default: ‘t‘.

Return values:
There are two possible return types, selected by the keyword argument ‘unpack-returns‘:

1. Default/compatible with ‘find-plans‘:
* List of plans
* List of plan trees (if computed)
* List of plan tree lookup tables
* List of final world states
* List of analogical replay tables (if computed)
To comply with SHOP3, always returns a list of plans.
If the PLAN-TREE keyword argument is non-NIL, will return an enhanced plan tree, with causal links, unless NO-DEPENDENCIES is true.
Returns the values returned by SEEK-PLANS-STACK, qv.

2. If UNPACK-RETURNS is NIL, then return one or more appropriate PLAN-RETURN objects.

Package

shop3.

Source

explicit-search.lisp.

Function: find-primitive-node-for-task (task tree)

Return a primitive node whose task matches TASK. When
the node is found, returns two values: the node itself, and its parent.

Package

shop3.

Source

tree-accessors.lisp.

Function: find-primitive-node-if (fun tree)

Return A primitive node whose TASK satisfies FUN. When
the node is found, returns two values: the node itself, and its parent.

Package

shop3.

Source

tree-accessors.lisp.

Function: find-problem (name-or-problem &optional errorp)
Package

shop3.

Source

decls.lisp.

Function: find-satisfiers (goals state &key just-one level domain)

Find and return a list of binding lists that represents the answer to goals (a list representation of a deductive query), where
state provides the database. level is a non-negative integer indicating the current depth of inference, used in debugging prints, and
JUST-ONE is a boolean indicating whether you want just one answer (non-nil) or all answers (nil).

Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: find-task-in-tree (task &optional hash-table plan-tree)

Return the PLAN-TREE:TREE-NODE in TREE corresponding to TASK.

Package

plan-tree.

Source

plan-tree.lisp.

Function: find-tree-node-if (function plan-tree)
Package

plan-tree.

Source

plan-tree.lisp.

Function: fix-uninterned-bindings (bindings query-vars)
Package

shop3.unifier.

Source

unify.lisp.

Function: get-alist (variables)

Takes a list of variable names as input (VARIABLES), and returns two values: a binding-list mapping the VARIABLES to newly created variables (made using VARIABLE-GENSYM), and a list of the new variables, made with VARIABLE-GENSYM.

Package

shop3.unifier.

Source

unify.lisp.

Function: get-problems (name &key print)

Get the list of problems for the problem set named NAME

Package

shop3.

Source

input.lisp.

Function: groundp (literal)

Is LITERAL a ground literal? Traverse the tree looking for a variable.

Package

shop3.unifier.

Source

unify.lisp.

Function: internal-operator-p (operator-name)
Package

shop3.

Source

task-reductions.lisp.

Function: make-binding (var val)
Package

shop3.unifier.

Source

unify.lisp.

Function: make-binding-list (variables values)

Takes a list of VARIABLES and VALUES and returns a BINDING-LIST.

Package

shop3.unifier.

Source

unify.lisp.

Function: make-complex-node (task children)
Package

shop3.

Source

tree-accessors.lisp.

Function: make-complex-tree-node (&key task expanded-task dependencies parent children method-name)
Package

plan-tree.

Source

plan-tree.lisp.

Function: make-dependency (&key establisher consumer prop)
Package

plan-tree.

Source

plan-tree.lisp.

Function: make-ordered-tree-node (&key task expanded-task dependencies parent children method-name)
Package

plan-tree.

Source

plan-tree.lisp.

Function: make-primitive-tree-node (&key task expanded-task dependencies parent)
Package

plan-tree.

Source

plan-tree.lisp.

Function: make-problem (problem-name-etc state tasks &rest extras)

MAKE-PROBLEM creates a planning problem named PROBLEM-NAME
by putting STATE and TASK onto PROBLEM-NAME’s property list under the indicators :STATE and :TASKS. As a side effect, sets the global variable *PROBLEM*.

Package

shop3.

Source

input.lisp.

Function: make-problem-set (list-name problem-list)
Package

shop3.

Source

input.lisp.

Function: make-tag-map (tag task primitive)

Record association of TAG with operator/action instance OPERATOR.

Package

shop3.common.

Source

tagged-state.lisp.

Function: make-top-node (&key task expanded-task dependencies parent children method-name lookup-table)
Package

plan-tree.

Source

plan-tree.lisp.

Function: make-unordered-tree-node (&key task expanded-task dependencies parent children method-name)
Package

plan-tree.

Source

plan-tree.lisp.

Function: node-parent (node tree)

Find ‘NODE‘’s parent in ‘TREE‘. Returns ‘NIL‘ if nothing found.

Package

shop3.

Source

tree-accessors.lisp.

Function: plan-final-state (plan &key domain problem initial-state)
Package

shop3.

Source

plan-trajectory.lisp.

Function: plan-states (plan &key domain problem)

Return a trajectory of states corresponding to the plan-sequence. The trajectory will be a list of states in which each state will be a list of atoms.

DOMAIN is a domain designator. PROBLEM is a SHOP problem designator. The PROBLEM keyword argument is *mandatory*. It must also be possible to find a domain, but this can be done either by supplying it directly, or taking it from the problem.

Package

shop3.

Source

plan-trajectory.lisp.

Function: pprint-plan (plan &optional stream)
Package

shop3.

Source

plan-printer.lisp.

Function: prepare-return-values (plan &key plan-tree bindings)

Take the PLAN and PLAN-TREE and create new PLAN and PLAN-TREE objects, copies of the originals, with the BINDINGS applied.

Package

prepare-return-values.

Source

prepare-return-values.lisp.

Function: prepare-state-tag-decoder ()
Package

shop3.common.

Source

tagged-state.lisp.

Function: primitive-node-cost (structure)
Package

shop3.

Source

tree-accessors.lisp.

Function: (setf primitive-node-cost) (structure)
Package

shop3.

Source

tree-accessors.lisp.

Function: primitive-node-p (tree-node)

Is TREE-NODE a representation of a primitive node (i.e., an operator) in the SHOP2 tree format as described in SHOP2?

Package

shop3.

Source

tree-accessors.lisp.

Function: primitive-node-position (structure)
Package

shop3.

Source

tree-accessors.lisp.

Function: (setf primitive-node-position) (structure)
Package

shop3.

Source

tree-accessors.lisp.

Function: primitive-node-task (structure)
Package

shop3.

Source

tree-accessors.lisp.

Function: (setf primitive-node-task) (structure)
Package

shop3.

Source

tree-accessors.lisp.

Function: print-axioms (&optional name domain)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: print-belief-state-readably (belief-state &optional stream)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: print-current-state (&key sorted state)
Package

shop3.

Source

output.lisp.

Function: print-methods (&optional name domain)
Package

shop3.

Source

debugging.lisp.

Function: print-operators (&optional name domain)
Package

shop3.

Source

debugging.lisp.

Function: process-axiom (domain axiom)
Package

shop3.

Source

input.lisp.

Reader: prop (instance)
Writer: (setf prop) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Target Slot

prop.

Function: prop-sorter (p1 p2)

Function that can be used inside CL:SORT to sort SHOP literals alphabetically for easier human inspection.

Package

shop3.common.

Source

state-utils.lisp.

Function: remove-costs (plan-and-costs)

The SHOP2 plans come with the operators interspersed with their costs. This function just throws away the costs.

Package

shop3.

Source

search.lisp.

Function: remove-internal-operators (complex-node)

Returns a new complex-node like the original, but with any children that are internal operators (primitive nodes) removed.

Package

shop3.

Source

tree-accessors.lisp.

Function: repair-plan (domain plan plan-tree executed divergence search-state &key verbose plan-tree-hash no-failed-task)

Arguments:
DOMAIN: SHOP2 domain object
PLAN: SHOP2 plan sequence (should work with costs or without, but don’t remove internal operators) PLAN-TREE: *Enhanced* plan tree object (not classic SHOP2 plan tree)
EXECUTED: Prefix of the PLAN
DIVERGENCE: Divergence between the expected state after EXECUTED, specified as (([:ADD|:DELETE] <fact>)+) SEARCH-STATE: Search state object
PLAN-TREE-HASH: Hash table indexing and optimizing access to PLAN-TREE. This is optional – we can manage access anyway, but it will be slower.
Returns: (1) new plan (2) new plan tree (enhanced plan tree, not old-style SHOP plan tree)
(3) plan tree lookup table (4) search-state object.

Package

shop3.

Source

plan-repair.lisp.

Function: set-domain (name)

NAME argument is a symbol. Will set the global variable *DOMAIN* to the domain with domain-name NAME.

Package

shop3.

Source

input.lisp.

Function: shop-trace-info ()

Information about the traced aspects of shop3.

Package

shop3.

Source

debugging.lisp.

Function: shop-union (s1 s2 &key test key)
Package

shop3.unifier.

Source

unify.lisp.

Function: shorter-plan (plan)

Removes the internal operators and costs from a plan sequence, and returns the resulting new sequence. Non-destructive.

Package

shop3.

Source

search.lisp.

Function: standardize (expr &optional subs)

Replace all variables in EXPR with newly-generated variables, with new names.

Package

shop3.unifier.

Source

unify.lisp.

Function: tag-for-action (action)
Package

shop3.common.

Source

tagged-state.lisp.

Function: task-name (task)
Package

shop3.

Source

tree-accessors.lisp.

Reader: tree-node-dependencies (instance)
Writer: (setf tree-node-dependencies) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Target Slot

dependencies.

Reader: tree-node-expanded-task (instance)
Writer: (setf tree-node-expanded-task) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Target Slot

expanded-task.

Reader: tree-node-parent (instance)
Writer: (setf tree-node-parent) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Target Slot

parent.

Reader: tree-node-task (instance)
Writer: (setf tree-node-task) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Target Slot

task.

Function: tree-node-task (tree-node)
Setf Expander: (setf tree-node-task) (tree-node)
Package

shop3.

Source

tree-accessors.lisp.

Function: tree-node-task-name (tree-node)
Package

shop3.

Source

tree-accessors.lisp.

Function: unify (e1 e2)

Checks to see whether or not E1 and E2 unify, returning a substitution (a binding list)
if they do, or FAIL (*NOT* nil) if they don’t.

Package

shop3.unifier.

Source

unify.lisp.

Function: uniquify-anonymous-variables (sexp)

Replace all anonymous variables in SEXP by standardization, so that all anonymous variables are distinct.

Package

shop3.unifier.

Source

unify.lisp.

Function: validate-plan (plan domain-file problem-file &key validator-progname shop3-domain verbose)

Check the plan for validity. PLAN can be either lisp list
or can be a filename. DOMAIN-FILE and PROBLEM-FILE should be PDDL domain and problem file designators. VALIDATOR-PROGNAME should be a string that names the
validator in a way that enables it to be found (either an absolute namestring, absolute pathname, or a path-relative namestring).

Package

shop3.

Source

pddl.lisp.

Function: variable-gensym (&optional base-name)

Return a new variable, made from BASE-NAME

Package

shop3.unifier.

Source

unify.lisp.

Function: variablep (x)

Is X a symbol representing a logical variable for SHOP’s theorem-prover?

Package

shop3.unifier.

Source

unify.lisp.

Function: write-pddl-plan (shop-plan &key domain stream filename)

Write the plan argument (in a way sensitive to the domain type)
to the FILENAME or STREAM in a format that it can be checked by the validator. This is an easier to use interface to the validator-export function, qv.

Package

shop3.

Source

pddl.lisp.


6.1.4 Generic functions

Generic Function: add-atom-to-state (atom state depth operator)

Destructively modifies STATE by adding ATOM
(a positive literal) to the state. DEPTH and OPERATOR are used only for debugging purposes. Will update tag information in state.

Package

shop3.common.

Source

state-decls.lisp.

Methods
Method: add-atom-to-state (atom (st tagged-state) depth operator)
Source

tagged-state.lisp.

Generic Function: apply-operator (domain state task-body operator protections depth in-unifier)

If OPERATOR is applicable to TASK in STATE, then APPLY-OPERATOR returns five values:
1. the operator as applied, with all bindings;
2. a state tag, for backtracking purposes;
3. a new set of protections;
4. the cost of the new operator;
5. unifier.
This function also DESTRUCTIVELY MODIFIES its STATE argument. Otherwise it returns FAIL.

Package

shop3.

Source

decls.lisp.

Methods
Method: apply-operator ((domain domain) state task-body operator protections depth in-unifier)

If OPERATOR is applicable to TASK in STATE, then APPLY-OPERATOR returns five values:
1. the operator as applied, with all bindings;
2. a state tag, for backtracking purposes;
3. a new set of protections;
4. the cost of the new operator;
5. unifier.
This function also DESTRUCTIVELY MODIFIES its STATE argument. Otherwise it returns FAIL.

Source

task-reductions.lisp.

Generic Function: axioms (thpr-domain predicate)

Return a list of all the SHOP axioms for PREDICATE in THPR-DOMAIN.

Package

shop3.theorem-prover.

Source

decls.lisp.

Methods
Method: axioms ((domain has-axioms-mixin) (name symbol))

Return a list of axioms for for NAME as defined in DOMAIN.

Method: axioms (no-axioms-domain predicate)
Generic Function: copy-shop-problem (name prob &key problem-class atoms tasks)
Package

shop3.

Source

decls.lisp.

Methods
Method: copy-shop-problem ((name symbol) (prob problem) &key problem-class atoms tasks)
Generic Function: copy-state (state)

Return a copy of the state

Package

shop3.common.

Source

state-decls.lisp.

Methods
Method: copy-state ((st bit-state))
Source

state-utils.lisp.

Method: copy-state ((st doubly-hashed-state))
Source

state-utils.lisp.

Method: copy-state ((st mixed-state))
Source

state-utils.lisp.

Method: copy-state ((st hash-state))
Source

state-utils.lisp.

Method: copy-state ((st list-state))
Source

state-utils.lisp.

Generic Reader: default-state-type (object)
Package

shop3.theorem-prover.

Methods
Reader Method: default-state-type ((thpr-domain thpr-domain))

automatically generated reader method

Source

decls.lisp.

Target Slot

default-state-type.

Generic Function: delete-atom-from-state (atom state depth operator)

Destructively modifies STATE by removing ATOM
(a positive literal) from the state. DEPTH and OPERATOR are used only for debugging purposes. Will update tag information in state.

Package

shop3.common.

Source

state-decls.lisp.

Methods
Method: delete-atom-from-state (atom (st tagged-state) depth operator)
Source

tagged-state.lisp.

Generic Function: delete-domain (domain-desig)
Package

shop3.

Source

input.lisp.

Methods
Method: delete-domain ((domain domain))
Method: delete-domain ((domain-name symbol))
Generic Function: delete-problem (problem)
Package

shop3.

Source

decls.lisp.

Methods
Method: delete-problem ((problem-name symbol))
Method: delete-problem ((problem problem))
Generic Reader: domain-axioms (object)
Package

shop3.theorem-prover.

Methods
Reader Method: domain-axioms ((has-axioms-mixin has-axioms-mixin))

automatically generated reader method

Source

decls.lisp.

Target Slot

axioms.

Generic Function: domain-methods (domain)

Returns a hash-table mapping complex task names to methods for expanding such tasks.

Package

shop3.

Source

decls.lisp.

Methods
Reader Method: domain-methods ((actions-domain-mixin actions-domain-mixin))

automatically generated reader method

Target Slot

methods.

Method: domain-methods ((domain-name symbol))
Generic Function: domain-name (object)
Package

shop3.common.

Methods
Method: domain-name ((probspec symbol))
Source

decls.lisp.

Reader Method: domain-name ((problem problem))

The programmer MAY (but is not obligated to) specify that a problem is intended for use with a particular domain definition.

Source

decls.lisp.

Target Slot

domain-name.

Reader Method: domain-name ((thpr-domain thpr-domain))

automatically generated reader method

Source

decls.lisp.

Target Slot

domain-name.

Generic Function: domain-operators (domain)

Returns a hash-table mapping primitive task names to operator definitions.

Package

shop3.

Source

decls.lisp.

Methods
Reader Method: domain-operators ((actions-domain-mixin actions-domain-mixin))

automatically generated reader method

Target Slot

operators.

Method: domain-operators ((domain-name symbol))
Generic Function: find-failed-task (domain plan plan-tree executed divergence &key plan-tree-hash)

Return the leftmost failed task in the PLAN that has a failed precondition.
Arguments:
PLAN: Sequence of primitive actions
PLAN-TREE: *Enhanced* SHOP2 plan tree with causal links EXECUTED: Prefix of PLAN that has been executed DIVERGENCE: Divergence between the expected state of the world after EXECUTED and the actual state of the world. Specified as follows (([:ADD|:DELETE] <fact>)+).
That is, any number of lists headed by the :ADD or :DELETE operators, and followed by a list of facts (ground literals). Keyword options:
PLAN-TREE-HASH: if non-NIL should be a hash table (returned by FIND-PLANS-STACK) indexing tasks into the plan-tree. If available, enables quicker lookup.
Returns:
Leftmost, minimal task (plan subtree) that has one or more broken causal links.

Package

shop3-minimal-subtree.

Source

decls.lisp.

Methods
Method: find-failed-task ((domain domain) plan (plan-tree tree-node) executed divergence &key plan-tree-hash)

Default method for FIND-FAILED-TASK.

Source

minimal-subtree.lisp.

Method: find-failed-task ((domain symbol) plan plan-tree executed divergence &key plan-tree-hash)
Source

minimal-subtree.lisp.

Method: find-failed-task :around ((domain symbol) plan plan-tree executed divergence &key plan-tree-hash)
Source

minimal-subtree.lisp.

Generic Function: get-state (problem)
Package

shop3.

Source

decls.lisp.

Methods
Method: get-state ((problem problem))
Method: get-state ((problem-name symbol))
Generic Function: get-tasks (problem)
Package

shop3.

Source

decls.lisp.

Methods
Method: get-tasks ((name symbol))
Method: get-tasks ((problem problem))
Generic Function: handle-domain-options (domain &key type &allow-other-keys)

Handle the options in option-list,
as presented to defdomain. These are typically ways of tailoring the domain object, and should be keyword arguments. Returns no value; operates by side effects on DOMAIN.

Package

shop3.

Source

decls.lisp.

Methods
Method: handle-domain-options ((domain domain) &key type)
Source

input.lisp.

Generic Function: has-static-preds-p (domain)
Package

shop3.theorem-prover.

Source

decls.lisp.

Methods
Method: has-static-preds-p (domain)
Method: has-static-preds-p ((domain static-predicates-mixin))
Generic Function: last-establisher (state literal)

Return the action that last established LITERAL before STATE.

Package

shop3.common.

Source

state-decls.lisp.

Methods
Method: last-establisher ((st tagged-state) literal)
Source

tagged-state.lisp.

Generic Function: make-initial-state (domain state-encoding atoms &key)

Make a state according to a specified domain type and state encoding. Always takes a list of atoms, for special domain types, may take keyword arguments for additional state components.

Package

shop3.common.

Source

state-decls.lisp.

Methods
Method: make-initial-state :around ((domain fluents-mixin) state-encoding atoms &key)

Rewrite initial state facts of the form (= <fluent-function> <value>) into new facts of the form (fluent-value fluent-function value).

Source

pddl.lisp.

Method: make-initial-state (domain (state-encoding (eql :bit)) atoms &key)
Source

state-utils.lisp.

Method: make-initial-state (domain (state-encoding (eql :doubly-hashed)) atoms &key)
Source

state-utils.lisp.

Method: make-initial-state (domain (state-encoding (eql :mixed)) atoms &key)
Source

state-utils.lisp.

Method: make-initial-state (domain (state-encoding (eql :hash)) atoms &key)
Source

state-utils.lisp.

Method: make-initial-state (domain (state-encoding (eql :list)) atoms &key)
Source

state-utils.lisp.

Generic Function: methods (domain task-name)

Return a list of all the SHOP methods for TASK-NAME in DOMAIN.

Package

shop3.

Source

decls.lisp.

Methods
Method: methods ((domain domain) (task-name symbol))
Method: methods ((domain symbol) task-name)
Method: methods :around (domain task-name)
Generic Reader: name (object)
Package

shop3.common.

Methods
Reader Method: name ((problem problem))

automatically generated reader method

Source

decls.lisp.

Target Slot

name.

Generic Function: parse-domain-items (domain items)

Process all the items in ITEMS. These will be
methods, operators, axioms, and whatever special items domain subclasses may require.
Returns no value; operates by side effects on DOMAIN. For example, in one case we define a method on this for a particular class of domain that adds to the set of items for the domain a list of standard axioms.

Package

shop3.

Source

decls.lisp.

Methods
Method: parse-domain-items :around ((domain pddl-typing-mixin) items)
Source

pddl.lisp.

Method: parse-domain-items :around ((domain equality-mixin) items)

Add the axiom that treats equality as a built-in predicate. This should later be compiled into find-satisfiers or something.

Source

pddl.lisp.

Method: parse-domain-items :around ((domain fluents-mixin) items)
Source

pddl.lisp.

Method: parse-domain-items ((domain domain) items)
Source

input.lisp.

Generic Function: plan-tree->sexp (plan-tree)

Translate PLAN-TREE into an s-expression for export to other systems.

Package

plan-tree.

Source

plan-tree.lisp.

Methods
Method: plan-tree->sexp ((top top-node))
Method: plan-tree->sexp ((cn complex-tree-node))
Method: plan-tree->sexp ((on ordered-tree-node))
Method: plan-tree->sexp ((un unordered-tree-node))
Method: plan-tree->sexp ((pn primitive-tree-node))
Generic Reader: problem-name (object)
Package

shop3.

Methods
Reader Method: problem-name ((problem problem))

automatically generated reader method

Source

decls.lisp.

Target Slot

name.

Generic Function: process-method (domain method-def)

This generic function allows for
specialization by domain type on how method definitions are parsed. Should return something suitable for installation in the methods table of DOMAIN.

Package

shop3.

Source

decls.lisp.

Methods
Method: process-method :before ((domain pure-logic-domain-mixin) method)
Source

input.lisp.

Method: process-method ((domain domain) method)
Source

input.lisp.

Generic Function: process-op (domain operator-def)

This generic function allows for specialization
by domain type on how operator definitions are parsed. Should return something suitable for installation in the operators table of DOMAIN.
This generic function supports the new syntax for operators that comes with the :OP keyword instead of :OPERATOR.

Package

shop3.

Source

decls.lisp.

Methods
Method: process-op ((domain domain) operator)
Source

input.lisp.

Generic Function: process-operator (domain operator-def)

This generic function allows for specialization
by domain type on how operator definitions are parsed. Should return something suitable for installation in the operators table of DOMAIN.

Package

shop3.

Source

decls.lisp.

Methods
Method: process-operator ((domain domain) operator)
Source

input.lisp.

Generic Function: query (goals state &key just-one domain return-dependencies record-dependencies state-type)

Find and return a list of binding lists that represents the answer to goals. QUERY is a more convenient top-level alternative to FIND-SATISFIERS, the function used internally by SHOP3.

Parameters:

GOALS
A list of goals; implicitly a conjunction (this may change).
STATE
A SHOP3 state object with the currently-true facts or a list of positive literals to be assembled into a state.
JUST-ONE
Boolean: If true, return only one solution instead of all solutions.
DOMAIN
A SHOP3 Theorem-prover domain designator.
RETURN-DEPENDENCIES
Boolean: If true, return dependencies (establishing actions)
for the answer(s).
RECORD-DEPENDENCIES
Deprecated synonym for RETURN-DEPENDENCIES.
STATE-TYPE
If supplied, and the state is a list of facts, what sort of state should query create from the facts?
Returns:

ANSWERS
List of answers for the query. Each answer is a list of variable bindings for the variables in the query (GOALS).
DEPENDENCIES
Optional. List of dependencies, one for each of the answers in the query.

Note: Manages optional arguments and ensures that the variable property
is properly set in GOALS.

Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Methods
Method: query :around (goals state &key just-one domain return-dependencies record-dependencies state-type)
Source

input.lisp.

Method: query (goals state &key just-one domain return-dependencies record-dependencies)
Generic Function: replay-state-changes (state update-list &optional stop-at)
Package

shop3.common.

Source

state-decls.lisp.

Methods
Method: replay-state-changes ((st tagged-state) tags-info-list &optional stop-at)
Source

tagged-state.lisp.

Generic Function: retract-state-changes (state tag)

Restore STATE to its contents *before* the
changes added by TAG. Side-effecting function: will undo individual changes step-by-step. Returns nothing of interest.

Package

shop3.common.

Source

state-decls.lisp.

Methods
Method: retract-state-changes ((st tagged-state) tag)
Source

tagged-state.lisp.

Generic Function: seek-plans-null (domain state which-plans partial-plan partial-plan-cost depth unifier)

This SEEK-PLANS-NULL is used with WebServices to strip the add and del lists from the actions in the partial plan before doing the actual SEEK-PLANS-NULL...

Package

shop3.

Source

decls.lisp.

Methods
Method: seek-plans-null ((domain domain) state which-plans partial-plan partial-plan-cost depth unifier)
Source

search.lisp.

Generic Function: seek-plans-primitive (domain task1 state tasks top-tasks partial-plan partial-plan-cost depth which-plans protections unifier)

If there is an OPERATOR that is applicable to the primitive TASK1 in STATE,
then SEEK-PLANS-PRIMITIVE applies that OPERATOR, generates the successor state, updates the current partial plan with the OPERATOR, and continues with planning by recursively calling SEEK-PLANS. Otherwise, it returns FAIL.

Package

shop3.

Source

decls.lisp.

Methods
Method: seek-plans-primitive ((domain domain) task1 state tasks top-tasks partial-plan partial-plan-cost depth which-plans protections unifier)
Source

search.lisp.

Generic Function: set-variable-property (domain x)

Record facts about X being a variable, operator, or
other special symbol. Done for side-effects. Returns nothing of interest.

Package

shop3.unifier.

Source

unify.lisp.

Methods
Method: set-variable-property (domain x)
Generic Function: sort-methods (domain methods which-plans)

Sort a list of METHODS in DOMAIN according to WHICH-PLANS.

Package

shop3.

Source

decls.lisp.

Methods
Method: sort-methods :around ((domain domain) (methods list) (which-plans symbol))
Source

explicit-search.lisp.

Method: sort-methods (domain (methods list) (which-plans symbol))
Method: sort-methods (domain (methods list) (which-plans (eql :random)))
Generic Function: sort-results (domain results unifiers which-plans)

Sort lists of RESULTS and UNIFIERS in DOMAIN according to WHICH-PLANS and return the new RESULTS and UNIFIERS.

Package

shop3.

Source

decls.lisp.

Methods
Method: sort-results (domain (results list) (unifiers list) (which-plans symbol))
Method: sort-results (domain (results list) (unifiers list) (which-plans (eql :random)))
Generic Function: sort-tasks (domain tasks unifier which-plans)

Sort the list of pending TASKS in DOMAIN.
This is a replacement for TASK-SORTER that takes an additional WHICH-PLANS argument for EQL-specialization.

Package

shop3.

Source

decls.lisp.

Methods
Method: sort-tasks (domain tasks unifier (which-plans symbol))

Call TASK-SORTER by default for backward compatibility.

Method: sort-tasks (domain (tasks list) unifier (which-plans (eql :random)))

Uniformly randomize the list of tasks (originally for Monroe).

Generic Reader: source-pddl-domain (object)
Package

shop3.

Methods
Reader Method: source-pddl-domain ((simple-pddl-domain simple-pddl-domain))

automatically generated reader method

Source

pddl.lisp.

Target Slot

source-pddl-domain.

Generic Reader: state (object)
Generic Writer: (setf state) (object)
Package

shop3.common.

Methods
Reader Method: state ((search-state search-state))
Writer Method: (setf state) ((search-state search-state))

SHOP2 world state object.

Source

decls.lisp.

Target Slot

world-state.

Generic Function: state->state-type (state)

Return the state-type keyword for STATE.

Package

shop3.common.

Source

state-decls.lisp.

Methods
Method: state->state-type ((state bit-state))
Source

state-utils.lisp.

Method: state->state-type ((state doubly-hashed-state))
Source

state-utils.lisp.

Method: state->state-type ((state mixed-state))
Source

state-utils.lisp.

Method: state->state-type ((state hash-state))
Source

state-utils.lisp.

Method: state->state-type ((state list-state))
Source

state-utils.lisp.

Method: state->state-type (state)
Generic Function: state-all-atoms-for-predicate (state pred)

Return all atoms in STATE that concern PRED. Used internally
by the theorem-prover. Must be implemented when adding a new state structure type.

Package

shop3.common.

Source

state-decls.lisp.

Methods
Method: state-all-atoms-for-predicate ((st bit-state) pred)
Source

state-utils.lisp.

Method: state-all-atoms-for-predicate ((st doubly-hashed-state) pred)
Source

state-utils.lisp.

Method: state-all-atoms-for-predicate ((st mixed-state) pred)
Source

state-utils.lisp.

Method: state-all-atoms-for-predicate ((st hash-state) pred)
Source

state-utils.lisp.

Method: state-all-atoms-for-predicate ((st list-state) pred)
Source

state-utils.lisp.

Generic Function: state-atoms (state)

Return the atoms of the state in a plain list

Package

shop3.common.

Source

state-decls.lisp.

Methods
Reader Method: state-atoms ((problem problem))

automatically generated reader method

Source

decls.lisp.

Target Slot

state-atoms.

Method: state-atoms ((st bit-state))
Source

state-utils.lisp.

Method: state-atoms ((st doubly-hashed-state))
Source

state-utils.lisp.

Method: state-atoms ((st mixed-state))
Source

state-utils.lisp.

Method: state-atoms ((st hash-state))
Source

state-utils.lisp.

Method: state-atoms ((st list-state))
Source

state-utils.lisp.

Generic Function: state-candidate-atoms-for-goal (state goal)

Return all atoms in STATE relevant to GOAL. Used internally
by the theorem-prover. Must be implemented when adding a new state structure type.

Package

shop3.common.

Source

state-decls.lisp.

Methods
Method: state-candidate-atoms-for-goal ((st bit-state) goal)
Source

state-utils.lisp.

Method: state-candidate-atoms-for-goal ((st doubly-hashed-state) goal)
Source

state-utils.lisp.

Method: state-candidate-atoms-for-goal ((st mixed-state) goal)
Source

state-utils.lisp.

Method: state-candidate-atoms-for-goal ((st hash-state) goal)
Source

state-utils.lisp.

Method: state-candidate-atoms-for-goal ((st list-state) goal)
Source

state-utils.lisp.

Generic Function: state-trajectory (state &key sorted)

Any state in SHOP implicitly defines a trajectory —
the sequence of states, starting from the initial state, and terminating at this state. This function returns a trajectory leading to STATE.

Package

shop3.common.

Source

state-decls.lisp.

Methods
Method: state-trajectory ((st tagged-state) &key sorted)
Source

state-utils.lisp.

Generic Reader: static-preds (domain)

Return a list of predicate names for static predicates.

Package

shop3.theorem-prover.

Source

decls.lisp.

Methods
Reader Method: static-preds ((static-predicates-mixin static-predicates-mixin))

automatically generated reader method

Target Slot

static-preds.

Generic Function: tag-state (state &optional increment)

Add a tag to a state; used to make tagged-states, which provide information about how to backtrack over state updates.

Package

shop3.common.

Source

state-decls.lisp.

Methods
Method: tag-state ((st tagged-state) &optional increment)
Source

tagged-state.lisp.

Generic Function: task-sorter (domain tasks unifier)

This function allows customization of choice of pending task
to expand. SHOP search behavior can be changed by specializing this generic function (most likely using the domain argument). Returns a sorted list of tasks in the order in which they should be expanded. A failure can be triggered by returning NIL.

Package

shop3.

Source

decls.lisp.

Methods
Method: task-sorter ((domain domain) tasks unifier)
Generic Function: trigger-trace (keyword item-name)

Allow extensible methods of matching to trigger printing.

Package

shop3.unifier.

Source

tracer.lisp.

Methods
Method: trigger-trace ((keyword (eql :tasks)) (item symbol))
Source

debugging.lisp.

Method: trigger-trace ((keyword (eql :goals)) (item symbol))
Source

debugging.lisp.

Method: trigger-trace ((keyword (eql :axioms)) (item symbol))
Source

debugging.lisp.

Method: trigger-trace ((keyword (eql :methods)) (item symbol))
Source

debugging.lisp.

Method: trigger-trace (keyword item-name)
Generic Function: validator-export (domain plan stream)

Print a plan in a way that it can be consumed by the VAL validator.

Package

shop3.

Source

pddl.lisp.

Methods
Method: validator-export ((domain domain) (plan list) stream)

6.1.5 Standalone methods

Method: make-load-form ((obj top-node) &optional environment)
Source

plan-tree.lisp.

Method: make-load-form ((problem problem) &optional environment)
Source

decls.lisp.

Method: make-load-form ((obj binding) &optional env)
Source

unify.lisp.

Method: operation-done-p ((o compile-op) (c tester-cl-source-file))

We are crushing the normal operation-done-p for compile-op, so that the tester files get recompiled, to take into account any changes to shop3.

Package

asdf/action.

Source

shop3.asd.

Method: print-object ((s state) str)
Source

state-utils.lisp.

Method: print-object ((d primitive-tree-node) str)
Source

plan-tree.lisp.

Method: print-object ((d complex-tree-node) str)
Source

plan-tree.lisp.

Method: print-object ((d unordered-tree-node) str)
Source

plan-tree.lisp.

Method: print-object ((d dependency) str)
Source

plan-tree.lisp.

Method: print-object ((d top-node) str)
Source

plan-tree.lisp.

Method: print-object ((d ordered-tree-node) str)
Source

plan-tree.lisp.

Method: print-object ((obj domain) str)
Source

decls.lisp.

Method: print-object ((x problem) stream)
Source

decls.lisp.

Method: print-object ((obj choice-entry) str)
Source

backtrack-stack.lisp.


6.1.6 Conditions

Condition: bad-argument
Package

shop3.theorem-prover.

Source

decls.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: predicate
Initargs

:predicate

Readers

predicate.

Writers

This slot is read-only.

Slot: argno
Initargs

:argno

Readers

argno.

Writers

This slot is read-only.

Slot: comment
Initargs

:comment

Readers

comment.

Writers

This slot is read-only.

Condition: incomplete-dependency-error
Package

shop3.theorem-prover.

Source

decls.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: logical-op
Initargs

:logical-op

Readers

logical-op.

Writers

This slot is read-only.

Slot: expression
Initargs

:expression

Readers

expression.

Writers

This slot is read-only.

Condition: instantiation-error
Package

shop3.theorem-prover.

Source

decls.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: predicate
Initargs

:predicate

Readers

predicate.

Writers

This slot is read-only.

Slot: argno
Initargs

:argno

Readers

argno.

Writers

This slot is read-only.

Condition: no-method-for-task
Package

shop3.

Source

decls.lisp.

Direct superclasses

shop-error.

Direct slots
Slot: task-name
Initargs

:task-name

Condition: non-ground-error
Package

shop3.theorem-prover.

Source

decls.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: var
Initargs

:var

Readers

var.

Writers

This slot is read-only.

Slot: expression
Initargs

:expression

Readers

expression.

Writers

This slot is read-only.

Condition: singleton-variable
Package

shop3.

Source

decls.lisp.

Direct superclasses

domain-item-parse-warning.

Direct methods
Direct slots
Slot: variable-names
Initargs

:variable-names

Readers

variable-names.

Writers

This slot is read-only.

Slot: construct-type
Initargs

:construct-type

Readers

construct-type.

Writers

This slot is read-only.

Slot: construct-name
Initargs

:construct-name

Readers

construct-name.

Writers

This slot is read-only.

Slot: construct
Initform

(quote nil)

Initargs

:construct

Readers

construct.

Writers

This slot is read-only.

Slot: branch-number
Initform

(quote nil)

Initargs

:branch-number

Readers

branch-number.

Writers

This slot is read-only.

Condition: task-arity-mismatch

An error representing the case where the LIBRARY-ENTRY has a way of performing LIBRARY-TASK whose arity does not match that of TASK, although the
task keyword of TASK and LIBRARY-TASK are the same.

Package

shop3.

Source

decls.lisp.

Direct superclasses

shop-error.

Direct methods
Direct slots
Slot: task
Initargs

:task

Readers

task-arity-mismatch-task.

Writers

This slot is read-only.

Slot: library-task
Initargs

:library-task

Readers

task-arity-mismatch-library-task.

Writers

This slot is read-only.

Slot: library-entry
Initargs

:library-entry

Readers

task-arity-mismatch-library-entry.

Writers

This slot is read-only.

Condition: theorem-prover-condition

This mixin class should be added to any condition raised by
the theorem-prover, in order to allow handlers to distinguish such conditions. It provides no additional behavior or slots, so that it can be mixed into warnings, errors, etc.

Package

shop3.theorem-prover.

Source

decls.lisp.

Direct superclasses

condition.

Direct subclasses

6.1.7 Structures

Structure: complex-tree-node
Package

plan-tree.

Source

plan-tree.lisp.

Direct superclasses

tree-node.

Direct subclasses
Direct methods
Direct slots
Slot: children
Readers

complex-tree-node-children.

Writers

(setf complex-tree-node-children).

Slot: method-name
Type

(or null symbol)

Readers

complex-tree-node-method-name.

Writers

(setf complex-tree-node-method-name).

Structure: dependency
Package

plan-tree.

Source

plan-tree.lisp.

Direct superclasses

structure-object.

Direct methods
Direct slots
Slot: establisher
Readers

establisher.

Writers

(setf establisher).

Slot: consumer
Readers

consumer.

Writers

(setf consumer).

Slot: prop
Readers

prop.

Writers

(setf prop).

Structure: ordered-tree-node
Package

plan-tree.

Source

plan-tree.lisp.

Direct superclasses

pseudo-node.

Direct methods
Structure: primitive-tree-node
Package

plan-tree.

Source

plan-tree.lisp.

Direct superclasses

tree-node.

Direct methods
Structure: pseudo-node
Package

plan-tree.

Source

plan-tree.lisp.

Direct superclasses

complex-tree-node.

Direct subclasses
Structure: state
Package

shop3.common.

Source

state-decls.lisp.

Direct superclasses

structure-object.

Direct subclasses

tagged-state.

Direct methods

print-object.

Direct slots
Slot: body
Readers

state-body.

Writers

(setf state-body).

Structure: tagged-state

The ‘tagged-state‘ type encapsulates the behaviors needed to support backtracking and backjumping.

Package

shop3.common.

Source

state-decls.lisp.

Direct superclasses

state.

Direct subclasses
Direct methods
Direct slots
Slot: tags-info
Initform

(list (list 0))

Readers

tagged-state-tags-info.

Writers

(setf tagged-state-tags-info).

Slot: block-at
Type

fixnum

Initform

0

Readers

tagged-state-block-at.

Writers

(setf tagged-state-block-at).

Structure: top-node
Package

plan-tree.

Source

plan-tree.lisp.

Direct superclasses

complex-tree-node.

Direct methods
Direct slots
Slot: lookup-table
Type

(or hash-table null)

Readers

top-node-lookup-table.

Writers

(setf top-node-lookup-table).

Structure: tree-node
Package

plan-tree.

Source

plan-tree.lisp.

Direct superclasses

structure-object.

Direct subclasses
Direct methods
Direct slots
Slot: task
Readers

tree-node-task.

Writers

(setf tree-node-task).

Slot: expanded-task
Readers

tree-node-expanded-task.

Writers

(setf tree-node-expanded-task).

Slot: dependencies
Readers

tree-node-dependencies.

Writers

(setf tree-node-dependencies).

Slot: parent
Readers

tree-node-parent.

Writers

(setf tree-node-parent).

Structure: unordered-tree-node
Package

plan-tree.

Source

plan-tree.lisp.

Direct superclasses

pseudo-node.

Direct methods

6.1.8 Classes

Class: adl-domain
Package

shop3.

Source

pddl.lisp.

Direct superclasses
Class: adl-mixin
Package

shop3.

Source

pddl.lisp.

Direct superclasses
Direct subclasses

adl-domain.

Class: conditional-effects-mixin
Package

shop3.

Source

pddl.lisp.

Direct subclasses
Direct methods

translate-effect.

Class: costs-mixin
Package

shop3.

Source

pddl.lisp.

Class: disjunctive-preconditions-mixin
Package

shop3.

Source

pddl.lisp.

Direct subclasses

adl-mixin.

Direct methods
Class: domain

An object representing a SHOP domain.

Package

shop3.

Source

decls.lisp.

Direct superclasses
Direct subclasses
Direct methods
Direct slots
Slot: items

Cached copy of the ITEMS source.

Readers

domain-items.

Writers

This slot is read-only.

Class: equality-mixin
Package

shop3.

Source

pddl.lisp.

Direct subclasses
Direct methods

parse-domain-items.

Class: existential-preconditions-mixin
Package

shop3.

Source

pddl.lisp.

Direct subclasses

quantified-preconditions-mixin.

Direct methods
Class: negative-preconditions-mixin
Package

shop3.

Source

pddl.lisp.

Direct subclasses

adl-mixin.

Direct methods
Class: pddl-domain

A new class of SHOP3 domain that permits inclusion of
PDDL operator definitions. Right now, this approximates what happens if you have the :adl flag in a PDDL domain file.

Package

shop3.

Source

pddl.lisp.

Direct superclasses
Class: pddl-typing-mixin
Package

shop3.

Source

pddl.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: pddl-types
Initargs

:%pddl-types

Readers

pddl-types.

Writers

(setf pddl-types).

Class: problem

An object representing a SHOP problem.

Package

shop3.

Source

decls.lisp.

Direct methods
Direct slots
Slot: state-atoms
Package

shop3.common.

Initargs

:state-atoms

Readers

state-atoms.

Writers

This slot is read-only.

Slot: tasks
Initargs

:tasks

Readers

tasks.

Writers

This slot is read-only.

Slot: name
Package

shop3.common.

Initargs

:name

Readers
Writers

This slot is read-only.

Slot: domain-name

The programmer MAY (but is not obligated to) specify that a problem is intended for use with a particular domain definition.

Package

shop3.common.

Initargs

:domain-name

Readers

domain-name.

Writers

This slot is read-only.

Class: pure-logic-domain-mixin

A MIXIN indicating that a domain should not use IF-THEN-ELSE semantics in methods.

Package

shop3.

Source

decls.lisp.

Direct methods

process-method.

Class: quantified-preconditions-mixin
Package

shop3.

Source

pddl.lisp.

Direct superclasses
Direct subclasses
Class: simple-pddl-domain

A new class of SHOP3 domain that permits inclusion of PDDL operator definitions.

Package

shop3.

Source

pddl.lisp.

Direct superclasses

domain.

Direct subclasses
Direct methods
Direct slots
Slot: source-pddl-domain
Initargs

:source-pddl-domain

Readers

source-pddl-domain.

Writers

This slot is read-only.

Class: static-predicates-mixin

Add this to domain classes that should have static predicates defined.

Package

shop3.theorem-prover.

Source

decls.lisp.

Direct subclasses

pddl-domain.

Direct methods
Direct slots
Slot: static-preds
Initargs

:static-preds

Readers

static-preds.

Writers

This slot is read-only.

Class: thpr-domain

An object representing a SHOP3 theorem prover domain.

Package

shop3.theorem-prover.

Source

decls.lisp.

Direct superclasses
Direct subclasses

domain.

Direct methods
Direct slots
Slot: domain-name
Package

shop3.common.

Initargs

:name, :domain-name

Readers

domain-name.

Writers

This slot is read-only.

Slot: default-state-type
Initform

:mixed

Initargs

:default-state-type

Readers

default-state-type.

Writers

This slot is read-only.

Class: universal-preconditions-mixin
Package

shop3.

Source

pddl.lisp.

Direct subclasses

quantified-preconditions-mixin.

Direct methods

6.1.9 Types

Type: binding-list ()
Package

shop3.unifier.

Source

unify.lisp.

Type: shop-variable ()

Type for variables used by the SHOP unifier. A subtype of SYMBOL.

Package

shop3.unifier.

Source

unify.lisp.


6.2 Internals


6.2.1 Constants

Constant: +anonymous-property-name+
Package

shop3.unifier.

Source

unify.lisp.

Constant: +primitive-property-name+
Package

shop3.unifier.

Source

unify.lisp.

Constant: +shop-trace-items+

Acceptable arguments for SHOP-TRACE (and SHOP-UNTRACE).

Package

shop3.

Source

debugging.lisp.

Constant: +shopyright+
Package

shop3.

Source

shop3.lisp.

Constant: +singleton-term+
Package

shop3.common.

Source

state-utils.lisp.

Constant: +variable-property-name+
Package

shop3.unifier.

Source

unify.lisp.

Constant: +variable-term+
Package

shop3.common.

Source

state-utils.lisp.


6.2.2 Special variables

Special Variable: *action-to-tag-map*

Will be bound to a hash table to look up a numerical tag from an operator/action instance.

Package

shop3.common.

Source

state-decls.lisp.

Special Variable: *all-method-names*

Will hold a hash table used to insure that all methods have unique names.

Package

shop3.

Source

input.lisp.

Special Variable: *all-problems*
Package

shop3.

Source

decls.lisp.

Special Variable: *analogical-replay*

If this variable is bound to T, SHOP will use analogical replay to provide guidance in heuristic search while planning.
Currently supported only in FIND-PLANS-STACK.

Package

shop3.

Source

decls.lisp.

Special Variable: *analogical-replay-table*

Hash table from task names to method choices.

Package

shop3.

Source

analogical-replay.lisp.

Special Variable: *back-quote-name*
Package

shop3.

Source

decls.lisp.

Special Variable: *before-extract-trees-hook*

This function exists solely for instrumenting for testing purposes. If this is bound to a function, that function will be called at the top of EXTRACT-PLAN-TREES. Generally should be NIL.

Package

shop3.

Source

decls.lisp.

Special Variable: *break-on-backtrack*

If this variable is bound to T, SHOP will enter a break loop upon backtracking.

Package

shop3.

Source

decls.lisp.

Special Variable: *collect-state*
Package

shop3.

Source

decls.lisp.

Special Variable: *current-plan*
Package

shop3.

Source

decls.lisp.

Special Variable: *current-tasks*
Package

shop3.

Source

decls.lisp.

Special Variable: *defdomain-pathname*

Dynamic variable used to enable INCLUDE directives to find files relative to the file containing the DEFDOMAIN. Necessary because ASDF breaks usage of *load-truename* by moving the FASLs.

Package

shop3.

Source

input.lisp.

Special Variable: *depth-cutoff*
Package

shop3.

Source

decls.lisp.

Special Variable: *enhanced-plan-tree*

Do we build a dependency-enhanced plan tree?

Package

shop3.

Source

explicit-search.lisp.

Special Variable: *expansions*
Package

shop3.

Source

decls.lisp.

Special Variable: *explanation*
Package

shop3.

Source

decls.lisp.

Special Variable: *gc*
Package

shop3.

Source

decls.lisp.

Special Variable: *hand-steer*

This variable will be DYNAMICALLY bound and used to indicate whether the user wishes to choose tasks for planning by hand.

Package

shop3.

Source

decls.lisp.

Special Variable: *ignore-singleton-variables*

When T – which should only be for legacy SHOP3 domains – do NOT emit singleton variable warnings.

Package

shop3.

Source

input.lisp.

Special Variable: *include-rationale*
Package

shop3.

Source

explicit-search.lisp.

Special Variable: *internal-time-limit*
Package

shop3.

Source

decls.lisp.

Special Variable: *internal-time-tag*
Package

shop3.

Source

decls.lisp.

Special Variable: *leashed*

This variable will be DYNAMICALLY bound and it will further constrain the behavior of SHOP when we hand-steer it (see *hand-steer*). If *leashed* is NIL, SHOP will simply proceed when choosing tasks, if there is no choice, i.e., when there’s only one task on the open list, or only one :immediate task. If *leashed* is non-nil, will consult the user even in these cases.

Package

shop3.

Source

decls.lisp.

Special Variable: *make-analogy-table*

If this variable is bound to T, SHOP will build a table for analogical replay (*analogical-replay-table*) while planning.
Currently supported only in FIND-PLANS-STACK.

Package

shop3.

Source

decls.lisp.

Special Variable: *more-tasks-p*

When NIL, it is safe to tail-call any plan-seeking function.

Package

shop3.

Source

decls.lisp.

Special Variable: *negation-deps-ok*
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Special Variable: *no-dependencies*

When building an ENHANCED-PLAN-TREE, do not record causal links. Defaults to NIL.

Package

shop3.

Source

explicit-search.lisp.

Special Variable: *node-children-table*
Package

shop3.

Source

tree-reductions.lisp.

Special Variable: *node-list*
Package

plan-tree.

Source

plan-tree.lisp.

Special Variable: *old-depth*

For iterative-deepening search, what was the maximum depth of the last iteration, so we can avoid duplicate plans.

Package

shop3.

Source

decls.lisp.

Special Variable: *operator-tasks*
Package

shop3.

Source

decls.lisp.

Special Variable: *optimal-cost*
Package

shop3.

Source

decls.lisp.

Special Variable: *optimal-plan*
Package

shop3.

Source

decls.lisp.

Special Variable: *optimize-cost*
Package

shop3.

Source

decls.lisp.

Special Variable: *optimize-first-retrieval*

In some cases we can optimize solutions to :FIRST to find only the first match.

Package

shop3.theorem-prover.

Source

decls.lisp.

Special Variable: *plan-num-limit*
Package

shop3.

Source

decls.lisp.

Special Variable: *plan-tree*
Package

shop3.

Source

decls.lisp.

Special Variable: *plans-found*
Package

shop3.

Source

decls.lisp.

Special Variable: *pp*
Package

shop3.

Source

decls.lisp.

Special Variable: *print-plans*
Package

shop3.

Source

decls.lisp.

Special Variable: *print-stats*
Package

shop3.

Source

decls.lisp.

Special Variable: *problem*
Package

shop3.

Source

decls.lisp.

Special Variable: *protections*
Package

shop3.

Source

decls.lisp.

Special Variable: *pshort*
Package

shop3.

Source

decls.lisp.

Special Variable: *shop-pprint-table*
Package

shop3.

Source

decls.lisp.

Special Variable: *shop-version*
Package

shop3.

Source

decls.lisp.

Special Variable: *start-real-time*
Package

shop3.

Source

debugging.lisp.

Special Variable: *start-run-time*
Package

shop3.

Source

debugging.lisp.

Special Variable: *state-tag-map*

Will be bound to a hash table to look up an operator/action instance from a tag.

Package

shop3.common.

Source

state-decls.lisp.

Special Variable: *states-found*
Package

shop3.

Source

decls.lisp.

Special Variable: *subtask-parents*
Package

shop3.

Source

decls.lisp.

Special Variable: *table-for-load-form*
Package

plan-tree.

Source

plan-tree.lisp.

Special Variable: *task-operator*
Package

shop3.

Source

decls.lisp.

Special Variable: *tasklist*
Package

shop3.

Source

decls.lisp.

Special Variable: *time-limit*
Package

shop3.

Source

decls.lisp.

Special Variable: *traced-axioms*
Package

shop3.

Source

debugging.lisp.

Special Variable: *traced-goals*
Package

shop3.

Source

debugging.lisp.

Special Variable: *traced-methods*
Package

shop3.

Source

debugging.lisp.

Special Variable: *traced-tasks*
Package

shop3.

Source

debugging.lisp.

Special Variable: *unifiers-found*
Package

shop3.

Source

decls.lisp.

Special Variable: *unique-method-names*

This variable will be dynamically bound by code for parsing domains
(and should *not* be set by users). If T, the system will raise an error
if methods do not have unique names. If :WARN, the system will issue a warning. If NIL, the system will accept non-unique names quietly.

Package

shop3.

Source

decls.lisp.

Special Variable: *validator-progname*
Package

shop3.

Source

pddl.lisp.

Special Variable: *verbose*
Package

shop3.

Source

decls.lisp.

Special Variable: +binary-numerical-operators+

Binary numerical operations permitted by the :fluents requirement.

Package

shop3.theorem-prover.

Source

fluents.lisp.

Special Variable: +fluent-updates+
Package

shop3.

Source

pddl.lisp.

Special Variable: +method-definition-keywords+

This constant holds a list of method definition keywords that are valid for default SHOP domains.

Package

shop3.

Source

decls.lisp.

Special Variable: +numerical-comparisons+

Numerical comparisons permitted by the :fluents requirement.

Package

shop3.theorem-prover.

Source

fluents.lisp.

Special Variable: +pddl-requirements-keywords+
Package

shop3.

Source

decls.lisp.


6.2.3 Macros

Macro: appendf (place value)
Package

shop3.

Source

decls.lisp.

Macro: catch-internal-time (&rest body)
Package

shop3.

Source

decls.lisp.

Macro: defconstant (name value &optional doc)
Package

shop3.

Source

decls.lisp.

Macro: print-unreadably ((&rest args) &body body)

This macro is for defining a method for printing un-readably, and deferring to the built-in method when trying to print readably. Particularly useful for structures, but could be generally applicable.

Package

plan-tree.

Source

plan-tree.lisp.

Macro: push-last (item list)
Package

shop3.

Source

decls.lisp.

Macro: seek-satisfiers (goals state var-val-list level just1 &key domain dependencies)

Find satisfying assignments to variables in GOALS, using STATE and VAR-VAL-LIST. Find just one assignment if JUST1 is non-NIL.
VAR-VAL-LIST is a list made up of either variables or the values assigned to those variables. This list will be harvested into a list of binding lists to be returned by FIND-SATISFIERS.
Semantically, returns *multiple answers*.
In terms of the program, returns two values:
1. a list of values for the variables (or the variables themselves, if unbound). 2. a list of dependencies, which will be computed if *RECORD-DEPENDENCIES-P* is non-NIL.

Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Macro: simple-backquote (x)
Package

shop3.

Source

decls.lisp.

Macro: stack-constructor (name-arg &rest arglist)
Package

shop3.

Source

backtrack-stack.lisp.

Macro: verbose-format (&rest args)
Package

shop3.

Source

decls.lisp.

Macro: when-done (&body body)
Package

shop3.

Source

search.lisp.

Macro: with-method-name-table (&rest body)
Package

shop3.

Source

input.lisp.


6.2.4 Ordinary functions

Function: %make-bit-state (&key body tags-info block-at)
Package

shop3.common.

Source

state-decls.lisp.

Function: %new-method-id (method-task-name)

Return a new name for a method expression (top level method form, as distinguished from a precondition/tasknet pair, which may be nested in a single ‘:method‘ expression with others).
This returns a symbol that is *not* interned.

Package

shop3.

Source

input.lisp.

Function: acceptable-cost-p (cost)
Package

shop3.

Source

search.lisp.

Function: add-protection (protections protect depth operator state)
Package

shop3.

Source

protections.lisp.

Function: add-source (unified-goal external explanation)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: all-elements-bindings (lst)
Package

shop3.unifier.

Source

unify.lisp.

Function: all-raw-depends-lists-p (list)
Package

shop3.theorem-prover.

Source

decls.lisp.

Function: all-raw-depends-p (list)
Package

shop3.theorem-prover.

Source

decls.lisp.

Function: all-roots (all-nodes subtask-parents-table)

Return the list of nodes in ALL-NODES that don’t have parents.
Parents are determined by the contents of the SUBTASK-PARENTS-TABLE.
As in many other places, the elements of ALL-NODES are either PRIMITIVE-NODEs or tasks (s-expressions).

Package

shop3.

Source

tree-reductions.lisp.

Function: already-immediate-p (reduction)
Package

shop3.

Source

task-reductions.lisp.

Function: anonymous-var-symbol-p (x)
Package

shop3.unifier.

Source

unify.lisp.

Function: answer-set-union (answer-list new-answer-list dependency-list new-dependency-list)

Remove redundant answers from ANSWER-LIST. If we remove an entry from ANSWER-LIST, also remove the corresponding entry from DEPENDENCY-LIST.
ANSWER-LIST is a list of lists of (variable | value).
Returns two values: the filtered answer-list and the filtered dependency-list.

Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: apply-action (domain state task-body action protections depth in-unifier)

If ACTION, a PDDL ACTION, is applicable to TASK in STATE, then APPLY-ACTION returns six values:
1. the operator as applied, with all bindings;
2. a state tag, for backtracking purposes;
3. a new set of protections;
4. the cost of the new operator;
5. unifier;
6. dependencies for primary and secondary effects, if *record-dependencies-p* is true.
This function also DESTRUCTIVELY MODIFIES its STATE argument.
Otherwise it returns FAIL.

Package

shop3.

Source

pddl.lisp.

Function: apply-method-bindings (task top-tasks tasks reduction unifier)
Package

shop3.

Source

search.lisp.

Function: apply-substitution-to-tree (bindings plan-tree)
Package

shop3.

Source

explicit-search.lisp.

Function: axiom-sexp-p (lst)
Package

shop3-pprint.

Source

shop-pprint.lisp.

Function: backtrack (format-string &rest args)
Package

shop3.

Source

output.lisp.

Function: binding-p (object)
Package

shop3.unifier.

Source

unify.lisp.

Function: bit-state-block-at (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: (setf bit-state-block-at) (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: bit-state-body (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: (setf bit-state-body) (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: bit-state-p (object)
Package

shop3.common.

Source

state-decls.lisp.

Function: bit-state-tags-info (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: (setf bit-state-tags-info) (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: bit-statebody-increment-position (position pred-type-counts)
Package

shop3.common.

Source

state-utils.lisp.

Function: bit-statebody-search-array (pred-array pred-type-counts entity-number-tables complex-position)
Package

shop3.common.

Source

state-utils.lisp.

Function: canonically-order (tree &optional keep-empty)
Package

shop3.

Source

tree-accessors.lisp.

Function: check-constraints (binding)

Check to make sure that all the constraints on the binding-val are satisfied.
Returns a boolean, and a second value (for debugging) listing a failed constraint.

Package

shop3.unifier.

Source

unify.lisp.

Function: check-for-singletons (var-table &key context-tables context-table construct-type construct-name construct branch-number)
Package

shop3.

Source

input.lisp.

Function: choose-immediate-task (immediate-tasks unifier)

Which of the set of IMMEDIATE-TASKS should SHOP2 work on first? Defaults to the first element, unless the user intervenes.

Package

shop3.

Source

search.lisp.

Function: choose-immediate-task-state (state)
Package

shop3.

Source

explicit-search.lisp.

Function: choose-method-bindings-state (state)
Package

shop3.

Source

explicit-search.lisp.

Function: choose-method-state (state domain)

Try to apply the first of the methods in the current set of alternatives to the search-state STATE, using DOMAIN. Return is boolean, true if the expansion is successful, otherwise NIL to trigger backtracking.

Package

shop3.

Source

explicit-search.lisp.

Function: choose-toplevel-task (state)
Package

shop3.

Source

explicit-search.lisp.

Function: clobbered-p (tree-node divergence)
Package

shop3-minimal-subtree.

Source

minimal-subtree.lisp.

Function: complex-tree-node-dependencies (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf complex-tree-node-dependencies) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: complex-tree-node-expanded-task (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf complex-tree-node-expanded-task) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: complex-tree-node-p (object)
Package

plan-tree.

Source

plan-tree.lisp.

Function: complex-tree-node-parent (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf complex-tree-node-parent) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: complex-tree-node-task (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf complex-tree-node-task) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: compute-fluent-updates (effect-expr state domain depth)

Translate a FLUENT-UPDATE EFFECT-EXPR into a set of ADD and DELETES (these will have as predicate FLUENT-VALUE), and optionally return a set of dependencies.

Package

shop3.

Source

pddl.lisp.

Function: copy-binding (instance)
Package

shop3.unifier.

Source

unify.lisp.

Function: copy-complex-node (sequence)

Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ.

Package

shop3.

Alias for

copy-seq.

Function: copy-complex-tree-node (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: copy-dependency (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: copy-hash-table (h1 &optional copy-fn)
Package

shop3.common.

Source

state-utils.lisp.

Function: copy-operator (sequence)

Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ.

Package

shop3.

Alias for

copy-seq.

Function: copy-ordered-tree-node (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: copy-pddl-action (sequence)

Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ.

Package

shop3.

Alias for

copy-seq.

Function: copy-primitive-node (sequence)

Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ.

Package

shop3.

Alias for

copy-seq.

Function: copy-primitive-tree-node (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: copy-pseudo-node (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: copy-raw-depend (instance)
Package

shop3.theorem-prover.

Source

decls.lisp.

Function: copy-replay-table-entry (instance)
Package

shop3.

Source

analogical-replay.lisp.

Function: copy-state-update (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: copy-task-tree (tt)
Package

shop3.

Source

task-reductions.lisp.

Function: copy-top-node (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: copy-tree-node (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: copy-unordered-tree-node (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: count-method-branches (method-body)
Package

shop3.

Source

input.lisp.

Function: create-node-children-table (subtask-parents-table all-nodes all-primitive-nodes)

Build and return a hash-table of nodes’ children using the SUBTASK-PARENTS-TABLE and the lists of ALL-NODES and ALL-PRIMITIVE-NODES. Elements of ALL-NODES are *either* PRIMITIVE-NODEs or TASKS (lists) for complex tasks.

Package

shop3.

Source

tree-reductions.lisp.

Function: decode-task (task all-primitive-nodes)

Take a TASK s-expression and return either: (a) NIL if it corresponds to a no-op (’SHOP::!!INOP), (b) the corresponding primitive-node, if the task is a primitive one, (c) the symbol :FAIL if the primitive task was not successfully expanded – if it is part of a failed search branch then or (c) TASK itself.

Package

shop3.

Source

tree-reductions.lisp.

Function: delete-protection (protections protect depth operator state)
Package

shop3.

Source

protections.lisp.

Function: delete-protections (dels protections state depth operator)
Package

shop3.

Source

task-reductions.lisp.

Function: delete-task-main-list (l task deleted)
Package

shop3.

Source

task-reductions.lisp.

Function: delete-task-top-list (l ml task)
Package

shop3.

Source

task-reductions.lisp.

Function: dependency-for-negation (positive-literal state)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: dependency-p (object)
Package

plan-tree.

Source

plan-tree.lisp.

Function: determine-verbosity (verbose)
Package

shop3.

Source

output.lisp.

Function: divergence-list-p (list)
Package

shop3.

Source

plan-repair.lisp.

Function: divergence-op-p (op)
Package

shop3.

Source

plan-repair.lisp.

Function: do-conjunct (domain goal1 remaining state bindings level just1 dependencies-in)

Where goal1 is an atomic predicate (not an atom per se, but a clause not headed by an operator or other symbol), try to find a binding that satisfies goal1 along with all of the other formulas in remaining.

Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: do-conjunct-from-atoms (domain goal1 remaining state bindings level just1 dependencies-in)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: do-conjunct-from-axiom (axiom domain goal1 remaining state bindings level just1 dependencies-in)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: do-conjunct-from-axioms (domain goal1 remaining state bindings level just1 dependencies-in)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: domain-include-search (path)

Search for PATH relative to *COMPILE-FILE-TRUENAME*, *LOAD-TRUENAME*, the cached location of the domain definition file, and *DEFAULT-PATHNAME-DEFAULTS*.

Package

shop3.

Source

input.lisp.

Function: doubly-hashed-state-block-at (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: (setf doubly-hashed-state-block-at) (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: doubly-hashed-state-body (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: (setf doubly-hashed-state-body) (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: doubly-hashed-state-p (object)
Package

shop3.common.

Source

state-decls.lisp.

Function: doubly-hashed-state-tags-info (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: (setf doubly-hashed-state-tags-info) (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: dummy-external-access-hook (goal)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: dump-higher-cost-plans! ()
Package

shop3.

Source

search.lisp.

Function: dump-previous-plans! ()

Clear out the data structures (special variables) we use to return plans.

Package

shop3.

Source

search.lisp.

Function: empty-p (state)
Package

shop3.

Source

explicit-search.lisp.

Function: expand-include (domain items)
Package

shop3.

Source

input.lisp.

Function: expand-includes (domain items)

Handle :INCLUDE directives, return a new items list if any are found, otherwise the original list.

Package

shop3.

Source

input.lisp.

Function: extend-plan-tree-nodes (base-nodes &optional acc)
Package

shop3.

Source

tree-reductions.lisp.

Function: external-find-satisfiers (domain goal state)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: external-query (domain query state)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: extract-adds-and-deletes (domain effect-expr state depth)

This function is intended for use on a PDDL :effect expression. It partitions the effects into adds and deletes and returns these two values, together with a set of dependencies as a third value, if dependency tracking is turned on.

Package

shop3.

Source

pddl.lisp.

Function: extract-method-id (domain method-expr task-name)
Package

shop3.

Source

input.lisp.

Function: extract-subtasks (reduction)
Package

shop3.

Source

tree-reductions.lisp.

Function: extract-subtree (root-node nodes)

Recursively build the subtree below ROOT-NODE from the set of possible nodes in NODES. At the top level, it returns a COMPLEX-NODE if ROOT-NODE is a complex task or ROOT-NODE if ROOT-NODE is a PRIMITIVE-NODE.

Package

shop3.

Source

tree-reductions.lisp.

Function: extract-suffix (plan prefix)
Package

shop3.

Source

plan-repair.lisp.

Function: extract-tree (plan)
Package

shop3.

Source

tree-reductions.lisp.

Function: extract-trees (plans-found unifiers-found)
Package

shop3.

Source

shop3.lisp.

Function: filter-singletons (singletons context-tables)
Package

shop3.

Source

input.lisp.

Function: find-adder (prop divergence-list)
Package

shop3-minimal-subtree.

Source

minimal-subtree.lisp.

Function: find-binding (target binding-list)

Find and return the value of TARGET that’s recorded in BINDING-LIST.

Package

shop3.unifier.

Source

unify.lisp.

Function: find-checking-path (tree-node)

Find and return the series of tree nodes that should be checked above TREE-NODE. Returns a list in order of checking (i.e., top-down).

Package

shop3-minimal-subtree.

Source

minimal-subtree.lisp.

Function: find-deleter (prop divergence-list)
Package

shop3-minimal-subtree.

Source

minimal-subtree.lisp.

Function: find-next-main-list (task l)
Package

shop3.

Source

task-reductions.lisp.

Function: find-plan-suffix (orig-plan executed-prefix)
Package

shop3-minimal-subtree.

Source

minimal-subtree.lisp.

Function: find-plans-1 (domain state tasks which problem &key out-stream &allow-other-keys)
Package

shop3.

Source

shop3.lisp.

Function: find-variable (tree)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: first-word-equal (string1 string2)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: force-immediate (reductions)
Package

shop3.

Source

task-reductions.lisp.

Function: force-immediate-reduction (reduction)
Package

shop3.

Source

task-reductions.lisp.

Function: force-immediate-unordered (unordered-list &optional previous)
Package

shop3.

Source

task-reductions.lisp.

Function: freeze-state (executed failed-action divergence search-state)

Arguments:
PLAN: sequence of primitive actions.
EXECUTED: Prefix of the plan that has been executed. FAILED-ACTION: First action whose preconditions are clobbered, or the leftmost leaf child of the first non-primitive task whose preconditions are broken.
DIVERGENCE: Divergence between the expected state after EXECUTED, specified as (([:ADD|:DELETE] <fact>)+) SEARCH-STATE: Search state object.

Returns:
Modified search state object.

Package

shop3.

Source

plan-repair.lisp.

Function: fully-instantiated-goal (goal)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: generate-reductions (domain reductions subtasks)
Package

shop3.

Source

loop-extensions.lisp.

Function: get-attribution (unified-query)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: get-immediate-list (tl)
Package

shop3.

Source

search.lisp.

Function: get-method-name (lst method-id branch-counter singleton method-head)
Package

shop3.

Source

input.lisp.

Function: get-task-body (task1)
Package

shop3.

Source

task-reductions.lisp.

Function: get-task-name (task1)

Return the name of the TASK in a task expression.
This is more than just taking the first element because that could be :TASK, could be modified by :IMMEDIATE, etc.

Package

shop3.

Source

task-reductions.lisp.

Function: get-top-tasks (l)
Package

shop3.

Source

task-reductions.lisp.

Function: goal-equalp (g1 g2)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: harvest-variables (sexp &optional all-vars)

Tree-walk the SEXP, harvesting all variables into a hash-table. The hash-table will have as keys variable names, and values will be counts of number of appearances. Defaults to *not* counting variables with the "ignore prefix" of underscore, unless ALL-VARS is non-NIL.
PRECONDITION: PROCESS-VARIABLE-PROPERTY must have been called on the surrounding context, becasue this relies on VARIABLEP working.

Package

shop3.

Source

input.lisp.

Function: hash-state-block-at (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: (setf hash-state-block-at) (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: hash-state-body (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: (setf hash-state-body) (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: hash-state-p (object)
Package

shop3.common.

Source

state-decls.lisp.

Function: hash-state-tags-info (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: (setf hash-state-tags-info) (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: id-search (domain state tasks top-tasks which out-stream &key depth-increment)
Package

shop3.

Source

shop3.lisp.

Function: immediate-tasks (state)
Package

shop3.

Source

explicit-search.lisp.

Function: incorporate-unifiers (unifiers remaining just-one state bindings dependencies-in added-dependencies domain newlevel)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: indented-format (indentation &rest body)
Package

shop3.

Source

output.lisp.

Function: index-method-on-domain (domain method-id method-obj)

Record the METHOD-ID/METHOD-OBJ association in DOMAIN.

Package

shop3.

Source

input.lisp.

Function: insert-if-necessary (obj &optional table)

Make an entry in TABLE for OBJ if it’s not already there.

Package

plan-tree.

Source

plan-tree.lisp.

Function: invoke-external-query (query state)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: leftmost-p (tree-node)
Package

shop3-minimal-subtree.

Source

minimal-subtree.lisp.

Function: list-insert-atom-into-statebody (atom statebody)
Package

shop3.common.

Source

state-utils.lisp.

Function: list-remove-atom-from-statebody (atom statebody)
Package

shop3.common.

Source

state-utils.lisp.

Function: list-state-block-at (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: (setf list-state-block-at) (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: list-state-body (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: (setf list-state-body) (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: list-state-p (object)
Package

shop3.common.

Source

state-decls.lisp.

Function: list-state-tags-info (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: (setf list-state-tags-info) (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: loop-body-item (key task-body)
Package

shop3.

Source

loop-extensions.lisp.

Function: loop-body-item-inner (key task-body)
Package

shop3.

Source

loop-extensions.lisp.

Function: loop-item (key task-body)
Package

shop3.

Source

loop-extensions.lisp.

Function: looping-p (task-name)
Package

shop3.

Source

loop-extensions.lisp.

Function: make-add-child-to-tree (&key parent child)

Constructor for ADD-CHILD-TO-TREE objects.

Package

shop3.

Source

backtrack-stack.lisp.

Function: make-add-dependencies (&key dependencies)

Constructor for ADD-DEPENDENCIES objects.

Package

shop3.

Source

backtrack-stack.lisp.

Function: make-bit-state (atoms)
Package

shop3.common.

Source

state-utils.lisp.

Package

plan-tree.

Source

plan-tree.lisp.

Function: make-cs-state (&key mode alternatives current-task)

Constructor for CHOICE-ENTRY objects.

Package

shop3.

Source

backtrack-stack.lisp.

Function: make-dependencies (tree-node depend-lists hash-table)
Package

shop3.

Source

explicit-search.lisp.

Function: make-domain (name-and-options &rest items)
Package

shop3.

Source

input.lisp.

Function: make-doubly-hashed-state (atoms)
Package

shop3.common.

Source

state-utils.lisp.

Function: make-hash-state (atoms)
Package

shop3.common.

Source

state-utils.lisp.

Function: make-list-state (atoms)
Package

shop3.common.

Source

state-utils.lisp.

Function: make-loop-state-expand (&rest arglist &key top-tasks tasks unifier)
Package

shop3.

Source

loop-extensions.lisp.

Function: make-method-instantiation (&key unifier top-tasks tasks)

Constructor for METHOD-INSTANTIATION objects.

Package

shop3.

Source

backtrack-stack.lisp.

Function: make-mixed-state (atoms)
Package

shop3.common.

Source

state-utils.lisp.

Function: make-operator (&key head preconditions deletions additions cost-fun)
Package

shop3.

Source

decls.lisp.

Function: make-operator-task-table ()
Package

shop3.

Source

tree-reductions.lisp.

Function: make-pddl-action (&key head precondition effect cost-fun)
Package

shop3.

Source

pddl.lisp.

Function: make-plan-copy (plan)

Copy the argument PLAN, and return the copy and a hash-table that maps the tasks in the original PLAN into the copy.
The hash table is essential because the plan tree is indexed by object equality, so when the plan is rewritten, any plan tree must be rewritten, as well.

Package

shop3.

Source

explicit-search.lisp.

Function: make-plan-tree-for-task-net (task-net parent hash-table)
Package

shop3.

Source

explicit-search.lisp.

Function: make-prim-state-expand (&key top-tasks tasks protections partial-plan unifier partial-plan-cost)

Constructor for PRIM-STATE-EXPAND objects.

Package

shop3.

Source

backtrack-stack.lisp.

Function: make-primitive-node (cost task position)
Package

shop3.

Source

tree-accessors.lisp.

Function: make-pseudo-node (&key task expanded-task dependencies parent children method-name)
Package

plan-tree.

Source

plan-tree.lisp.

Function: make-raw-depend (&key prop est)
Package

shop3.theorem-prover.

Source

decls.lisp.

Function: make-record-expansion (&key tree-node)

Constructor for RECORD-EXPANSION objects.

Package

shop3.

Source

backtrack-stack.lisp.

Function: make-record-expansion-for-replay (&key task method-id)

Constructor for RECORD-EXPANSION-FOR-REPLAY objects.

Package

shop3.

Source

backtrack-stack.lisp.

Function: make-replay-table-entry (&key singleton alist)
Package

shop3.

Source

analogical-replay.lisp.

Function: make-state-update (&key action literal)
Package

shop3.common.

Source

state-decls.lisp.

Function: make-subtask-parents-table ()
Package

shop3.

Source

tree-reductions.lisp.

Function: make-tree-node (&key task expanded-task dependencies parent)
Package

plan-tree.

Source

plan-tree.lisp.

Function: make-world-state-tag (&key tag)

Constructor for STATE-TAG objects.

Package

shop3.

Source

backtrack-stack.lisp.

Function: makedoubly-hashedstate (&key body tags-info block-at)
Package

shop3.common.

Source

state-decls.lisp.

Function: makehashstate (&key body tags-info block-at)
Package

shop3.common.

Source

state-decls.lisp.

Function: makeliststate (&key body tags-info block-at)
Package

shop3.common.

Source

state-decls.lisp.

Function: makemixedstate (&key body tags-info block-at)
Package

shop3.common.

Source

state-decls.lisp.

Function: merge-binding-set-lists (binding-sets1 binding-sets2 &optional original-binding-sets2)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: merge-binding-sets (binding-set1 binding-set2)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: method-printer (str method)
Package

shop3-pprint.

Source

shop-pprint.lisp.

Function: method-sexp-p (lst)
Package

shop3-pprint.

Source

shop-pprint.lisp.

Function: min-start (node)
Package

shop3.

Source

tree-accessors.lisp.

Function: mixed-state-block-at (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: (setf mixed-state-block-at) (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: mixed-state-body (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: (setf mixed-state-body) (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: mixed-state-p (object)
Package

shop3.common.

Source

state-decls.lisp.

Function: mixed-state-tags-info (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: (setf mixed-state-tags-info) (instance)
Package

shop3.common.

Source

state-decls.lisp.

Function: new-symbol (sym)
Package

shop3.

Source

loop-extensions.lisp.

Function: node-children (node &optional children-table)

Find all the nodes in NODES whose parent is NODE.

Package

shop3.

Source

tree-reductions.lisp.

Function: nshuffle-array (array)
Package

shop3.

Source

decls.lisp.

Function: nshuffle-list (list)

Shuffle the list using an intermediate vector.

Package

shop3.

Source

decls.lisp.

Function: obj-bindings (hash-table)

Return an ordered list of variable-name instantiator pairs for use in a LET form.

Package

plan-tree.

Source

plan-tree.lisp.

Function: occurs (variable-name expr)
Package

shop3.unifier.

Source

unify.lisp.

Function: of-type-exprs (vars types)

Because SHOP3 doesn’t have the same typing, we take variables and their types and generate a list of distinguished propositions we can use in preconditions.

Package

shop3.

Source

pddl.lisp.

Function: op-sexp-p (lst)
Package

shop3-pprint.

Source

shop-pprint.lisp.

Function: operator-additions (structure)
Package

shop3.

Source

decls.lisp.

Function: (setf operator-additions) (structure)
Package

shop3.

Source

decls.lisp.

Function: operator-cost-fun (structure)
Package

shop3.

Source

decls.lisp.

Function: (setf operator-cost-fun) (structure)
Package

shop3.

Source

decls.lisp.

Function: operator-deletions (structure)
Package

shop3.

Source

decls.lisp.

Function: (setf operator-deletions) (structure)
Package

shop3.

Source

decls.lisp.

Function: operator-head (structure)
Package

shop3.

Source

decls.lisp.

Function: (setf operator-head) (structure)
Package

shop3.

Source

decls.lisp.

Function: operator-name (operator)
Package

shop3.

Source

decls.lisp.

Function: operator-p (x)
Package

shop3.

Source

decls.lisp.

Function: operator-preconditions (structure)
Package

shop3.

Source

decls.lisp.

Function: (setf operator-preconditions) (structure)
Package

shop3.

Source

decls.lisp.

Function: operator-printer (str operator)
Package

shop3-pprint.

Source

shop-pprint.lisp.

Function: operator-sexp-p (lst)
Package

shop3-pprint.

Source

shop-pprint.lisp.

Function: operator-task (operator-node)
Package

shop3.

Source

tree-reductions.lisp.

Function: optimize-continue-p (which)
Package

shop3.

Source

search.lisp.

Function: ordered-tree-node-children (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf ordered-tree-node-children) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: ordered-tree-node-dependencies (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf ordered-tree-node-dependencies) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: ordered-tree-node-expanded-task (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf ordered-tree-node-expanded-task) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: ordered-tree-node-method-name (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf ordered-tree-node-method-name) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: ordered-tree-node-p (object)
Package

plan-tree.

Source

plan-tree.lisp.

Function: ordered-tree-node-parent (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf ordered-tree-node-parent) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: ordered-tree-node-task (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf ordered-tree-node-task) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: parse-pddl-method (domain method)
Package

shop3.

Source

pddl.lisp.

Function: parse-typed-list (typed-list)

Takes a typed-list (this is a PDDL construct) as argument and pulls out the declared items and types and returns two parallel lists of declared names and type names.

Package

shop3.

Source

pddl.lisp.

Function: pddl-action-cost-fun (structure)
Package

shop3.

Source

pddl.lisp.

Function: (setf pddl-action-cost-fun) (structure)
Package

shop3.

Source

pddl.lisp.

Function: pddl-action-effect (structure)
Package

shop3.

Source

pddl.lisp.

Function: (setf pddl-action-effect) (structure)
Package

shop3.

Source

pddl.lisp.

Function: pddl-action-head (structure)
Package

shop3.

Source

pddl.lisp.

Function: (setf pddl-action-head) (structure)
Package

shop3.

Source

pddl.lisp.

Function: pddl-action-name (pddl-action)
Package

shop3.

Source

pddl.lisp.

Function: pddl-action-p (x)
Package

shop3.

Source

pddl.lisp.

Function: pddl-action-precondition (structure)
Package

shop3.

Source

pddl.lisp.

Function: (setf pddl-action-precondition) (structure)
Package

shop3.

Source

pddl.lisp.

Function: pddl-satisfiers-for-exists (domain arguments other-goals state bindings newlevel just1 dependencies-in)
Package

shop3.theorem-prover.

Source

prover.lisp.

Function: pddl-satisfiers-for-f-exp (domain arguments other-goals state var-val-list level just1 dependencies-in)
Package

shop3.theorem-prover.

Source

prover.lisp.

Function: pddl-satisfiers-for-forall (domain arguments other-goals state bindings newlevel just1 dependencies-in)
Package

shop3.theorem-prover.

Source

prover.lisp.

Function: pddl-satisfiers-for-imply (domain arguments other-goals state bindings newlevel just1 dependencies-in)
Package

shop3.theorem-prover.

Source

prover.lisp.

Function: pddl-satisfiers-for-not (domain arguments other-goals state bindings newlevel just1 dependencies-in)
Package

shop3.theorem-prover.

Source

prover.lisp.

Function: phase-one (plan-tree translation-table bindings)
Package

prepare-return-values.

Source

prepare-return-values.lisp.

Function: plan-operator-nodes (plan &optional origin)

This function translates operator expressions into operator nodes, assembling together the operator, its the position in the plan and cost.

Package

shop3.

Source

tree-reductions.lisp.

Function: plan-returns (pr-list &optional unpack-returns)

Unpack the return values from PR-LIST, which should be a list of PLAN-RETURN objects.

Package

shop3.

Source

explicit-search.lisp.

Function: plan-tree-nodes (base-nodes)
Package

shop3.

Source

tree-reductions.lisp.

Function: populate-plan-return (&rest args)
Package

shop3.

Source

explicit-search.lisp.

Function: pprint-preconds (str preconds)
Package

shop3-pprint.

Source

shop-pprint.lisp.

Function: pprint-step (stream step)
Package

shop3.

Source

plan-printer.lisp.

Function: pprint-task-net (str task-net)
Package

shop3-pprint.

Source

shop-pprint.lisp.

Function: prepare-choose-immediate-task-state (state)
Package

shop3.

Source

explicit-search.lisp.

Function: primitive-symbol-p (x)
Package

shop3.unifier.

Source

unify.lisp.

Function: primitive-tree-node-dependencies (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf primitive-tree-node-dependencies) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: primitive-tree-node-expanded-task (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf primitive-tree-node-expanded-task) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: primitive-tree-node-p (object)
Package

plan-tree.

Source

plan-tree.lisp.

Function: primitive-tree-node-parent (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf primitive-tree-node-parent) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: primitive-tree-node-task (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf primitive-tree-node-task) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: primitivep (x)

PRIMITIVEP returns T if X is a symbol whose name begins with #!

Package

shop3.

Source

decls.lisp.

Function: print-current-plan ()
Package

shop3.

Source

output.lisp.

Function: print-current-tasks ()
Package

shop3.

Source

output.lisp.

Function: print-list-on-lines (str list)
Package

shop3-pprint.

Source

shop-pprint.lisp.

Function: print-list-suffix-lines (str list)
Package

shop3-pprint.

Source

shop-pprint.lisp.

Function: print-operator (operator &optional stream)
Package

shop3.

Source

debugging.lisp.

Function: print-output-file (plan)
Package

shop3.

Source

output.lisp.

Function: print-stats (depth plans tasks inferences runtime realtime &optional stream)
Package

shop3.

Source

output.lisp.

Function: print-stats-header (label &optional stream)
Package

shop3.

Source

output.lisp.

Function: print1 (obj)
Package

shop3.

Source

output.lisp.

Function: process-add-list (domain adds state)
Package

shop3.

Source

task-reductions.lisp.

Function: process-delete-list (domain dels state)
Package

shop3.

Source

task-reductions.lisp.

Function: process-pddl-method-pre (domain pre)

This is the main function that does the pre-processing, it looks through the preconditions finding the forall conditions and replacing the variables in that condition.

Package

shop3.

Source

pddl.lisp.

Function: process-task-list (tasks)
Package

shop3.

Source

input.lisp.

Function: protection-ok (domain state protections head)
Package

shop3.

Source

protections.lisp.

Function: pseudo-node-children (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf pseudo-node-children) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: pseudo-node-dependencies (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf pseudo-node-dependencies) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: pseudo-node-expanded-task (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf pseudo-node-expanded-task) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: pseudo-node-method-name (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf pseudo-node-method-name) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: pseudo-node-p (object)
Package

plan-tree.

Source

plan-tree.lisp.

Function: pseudo-node-parent (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf pseudo-node-parent) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: pseudo-node-task (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: (setf pseudo-node-task) (instance)
Package

plan-tree.

Source

plan-tree.lisp.

Function: pull-tag-info (tags-info tag &optional stop-at)
Package

shop3.common.

Source

tagged-state.lisp.

Function: query-current-state (first-symbol)
Package

shop3.

Source

output.lisp.

Function: quotify (x)
Package

shop3.

Source

decls.lisp.

Function: randomize-list (list)

Return a copy of LIST with all its members in a random order.

Package

shop3.

Source

decls.lisp.

Function: raw-depend-p (object)
Package

shop3.theorem-prover.

Source

decls.lisp.

Reader: rd-est (instance)
Writer: (setf rd-est) (instance)
Package

shop3.theorem-prover.

Source

decls.lisp.

Target Slot

est.

Reader: rd-prop (instance)
Writer: (setf rd-prop) (instance)
Package

shop3.theorem-prover.

Source

decls.lisp.

Target Slot

prop.

Function: rd-union (new-depends dependencies)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: real-apply-substitution (target binding-list)
Package

shop3.unifier.

Source

unify.lisp.

Function: real-seek-satisfiers (domain goals state var-val-list level just1 dependencies-in)
Package

shop3.theorem-prover.

Source

theorem-prover.lisp.

Function: record-node-expansion (tree-node expanded-task hash-table &key chosen-method)
Package

shop3.

Source

explicit-search.lisp.

Function: record-operator (task1 operator)
Package

shop3.

Source

tree-reductions.lisp.

Function: record-reduction (task1 reduction unifier)
Package

shop3.

Source

tree-reductions.lisp.

Function: remove-subtree-from-table (hash-table subtree)
Package

shop3.

Source

explicit-search.lisp.

Function: rename-sym (sym renaming-table)
Package

shop3.

Source

loop-extensions.lisp.

Function: replace-task-main-list (ml t1 t2)
Package

shop3.

Source

task-reductions.lisp.

Function: replace-task-top-list (l t1 t2)
Package

shop3.

Source

task-reductions.lisp.

Function: replan-from-failure (domain failed-tree-node search-state &key verbose plan-num-limit)
Package

shop3.

Source

plan-repair.lisp.

Reader: replay-table-entry-alist (instance)
Writer: (setf replay-table-entry-alist) (instance)
Package

shop3.

Source

analogical-replay.lisp.

Target Slot

alist.

Function: replay-table-entry-p (object)
Package

shop3.

Source

analogical-replay.lisp.

Reader: replay-table-entry-singleton (instance)
Writer: (setf replay-table-entry-singleton) (instance)
Package

shop3.

Source

analogical-replay.lisp.

Target Slot

singleton.

Function: report-no-method (x str)
Package

shop3.

Source

decls.lisp.

Function: report-task-arity-mismatch (condition stream)
Package

shop3.

Source

decls.lisp.

Function: rest-shop2-axiom-p (ax)
Package

shop3.

Source

input.lisp.

Function: resymbol-task (tsk renaming-table)
Package

shop3.

Source

loop-extensions.lisp.

Function: search-tree (item tree)
Package

shop3. </