This is the wouldwork Reference Manual, version 0.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Fri May 15 13:13:13 2026 GMT+0.
wouldwork/wouldwork.asdwouldwork/src/ww-packages.lispwouldwork/src/ww-utilities.lispwouldwork/src/ww-hstack.lispwouldwork/src/ww-preliminaries.lispwouldwork/src/ww-settings.lispwouldwork/src/ww-structures.lispwouldwork/src/ww-converter.lispwouldwork/src/ww-validator.lispwouldwork/src/ww-frequencies.lispwouldwork/src/ww-support.lispwouldwork/src/ww-happenings.lispwouldwork/src/ww-translator.lispwouldwork/src/ww-installer.lispwouldwork/src/ww-patroller-installer.lispwouldwork/src/ww-interface.lispwouldwork/src/ww-problem-tests.lispwouldwork/src/ww-set.lispwouldwork/src/ww-command-tests.lispwouldwork/src/problem.lispwouldwork/src/ww-action-trace.lispwouldwork/src/ww-goal-chaining.lispwouldwork/src/ww-solution-validation.lispwouldwork/src/ww-planner.lispwouldwork/src/ww-searcher.lispwouldwork/src/ww-backtracker.lispwouldwork/src/ww-parallel-infrastructure.lispwouldwork/src/ww-parallel.lispwouldwork/src/ww-initialize.lispThe main system appears first, followed by any subsystem dependency.
wouldworkclassical planning with the wouldwork planner
Program Development, Dave Brown <davypough@gmail.com>
Quicklisp Integration & Test, Gwang-Jin Kim <gwang.jin.kim.phd@gmail.com>
(GIT https://github.com/davypough/quick-wouldwork.git)
MIT
0.0.1
alexandria (system).
iterate (system).
lparallel (system).
src (module).
Modules are listed depth-first from the system components tree.
wouldwork/srcwouldwork (system).
ww-packages.lisp (file).
ww-utilities.lisp (file).
ww-hstack.lisp (file).
ww-preliminaries.lisp (file).
ww-settings.lisp (file).
ww-structures.lisp (file).
ww-converter.lisp (file).
ww-validator.lisp (file).
ww-frequencies.lisp (file).
ww-support.lisp (file).
ww-happenings.lisp (file).
ww-translator.lisp (file).
ww-installer.lisp (file).
ww-patroller-installer.lisp (file).
ww-interface.lisp (file).
ww-problem-tests.lisp (file).
ww-set.lisp (file).
ww-command-tests.lisp (file).
problem.lisp (file).
ww-action-trace.lisp (file).
ww-goal-chaining.lisp (file).
ww-solution-validation.lisp (file).
ww-planner.lisp (file).
ww-searcher.lisp (file).
ww-backtracker.lisp (file).
ww-parallel-infrastructure.lisp (file).
ww-parallel.lisp (file).
ww-initialize.lisp (file).
Files are sorted by type and then listed depth-first from the systems components trees.
wouldwork/wouldwork.asdwouldwork/src/ww-packages.lispwouldwork/src/ww-utilities.lispwouldwork/src/ww-hstack.lispwouldwork/src/ww-preliminaries.lispwouldwork/src/ww-settings.lispwouldwork/src/ww-structures.lispwouldwork/src/ww-converter.lispwouldwork/src/ww-validator.lispwouldwork/src/ww-frequencies.lispwouldwork/src/ww-support.lispwouldwork/src/ww-happenings.lispwouldwork/src/ww-translator.lispwouldwork/src/ww-installer.lispwouldwork/src/ww-patroller-installer.lispwouldwork/src/ww-interface.lispwouldwork/src/ww-problem-tests.lispwouldwork/src/ww-set.lispwouldwork/src/ww-command-tests.lispwouldwork/src/problem.lispwouldwork/src/ww-action-trace.lispwouldwork/src/ww-goal-chaining.lispwouldwork/src/ww-solution-validation.lispwouldwork/src/ww-planner.lispwouldwork/src/ww-searcher.lispwouldwork/src/ww-backtracker.lispwouldwork/src/ww-parallel-infrastructure.lispwouldwork/src/ww-parallel.lispwouldwork/src/ww-initialize.lispwouldwork/src/ww-utilities.lispww-packages.lisp (file).
src (module).
agent-starred-p (function).
collect-at-indexes (function).
count-agent-switches (function).
extract-symbols (function).
forget (function).
get-path-action-agent (function).
hash-table-present-p (function).
hash-table-same-keys-p (function).
if-it (macro).
interleave+ (function).
intern-symbol (function).
intersperse (function).
map-into-tree-atoms (function).
merge-sort (function).
merge-sort-list (function).
mvb (macro).
mvs (macro).
ninsert-list (function).
print-ht (function).
print-optimal-solutions (function).
prt (macro).
prt-if (macro).
remove-at-indexes (function).
retrieve (function).
save (function).
show (generic function).
sort-symbols (function).
sortf (macro).
subst-items-at-ascending-indexes (function).
transpose (function).
walk-tree (function).
wouldwork/src/ww-hstack.lispww-utilities.lisp (file).
src (module).
clear-hstack (function).
copy-hstack (function).
deletef-nth-hstack (function).
empty-hstack (function).
hstack (structure).
hstack-p (function).
hstack.keyfn (reader).
(setf hstack.keyfn) (writer).
hstack.table (reader).
(setf hstack.table) (writer).
hstack.vector (reader).
(setf hstack.vector) (writer).
length-hstack (function).
make-hstack (function).
nth-hstack (function).
peek-hstack (function).
pop-hstack (function).
push-hstack (function).
size-hstack (function).
wouldwork/src/ww-preliminaries.lispww-hstack.lisp (file).
src (module).
*debug* (special variable).
*integer-lock* (special variable).
*lock* (special variable).
*search-lock* (special variable).
*threads* (special variable).
*ww-loading* (special variable).
cleanup-resources (function).
define-global (macro).
increment-global (macro).
pop-global (macro).
push-global (macro).
read-init-vals (function).
reset-global-hash-tables (function).
reset-user-syms (function).
with-search-structures-lock (macro).
with-silenced-compilation (macro).
ww-reset (function).
wouldwork/src/ww-settings.lispww-preliminaries.lisp (file).
src (module).
*-* (special variable).
*accumulated-depths* (special variable).
*actions* (special variable).
*algorithm* (special variable).
*average-branching-factor* (special variable).
*best-states* (special variable).
*branch* (special variable).
*complements* (special variable).
*connectives* (special variable).
*constant-integers* (special variable).
*cost* (special variable).
*counter* (special variable).
*db* (special variable).
*depth-cutoff* (special variable).
*eff-param-vars* (special variable).
*fluent-relation-indices* (special variable).
*global-invariants* (special variable).
*goal* (special variable).
*hap-db* (special variable).
*hap-idb* (special variable).
*happening-names* (special variable).
*hdb* (special variable).
*hidb* (special variable).
*hybrid-goals* (special variable).
*hybrid-mode* (special variable).
*idb* (special variable).
*inconsistent-states-dropped* (special variable).
*init-actions* (special variable).
*integer-constants* (special variable).
*last-object-index* (special variable).
*max-depth-explored* (special variable).
*min-action-duration* (special variable).
*num-idle-threads* (special variable).
*num-init-successors* (special variable).
*num-paths* (special variable).
*objective-value-p* (special variable).
*parameter-headers* (special variable).
*print-updates* (special variable).
*prior-time* (special variable).
*prior-total-states-processed* (special variable).
*probe* (special variable).
*problem-name* (special variable).
*problem-type* (special variable).
*program-cycles* (special variable).
*progress-reporting-interval* (special variable).
*prop-key-cache* (special variable).
*query-names* (special variable).
*randomize-search* (special variable).
*relations* (special variable).
*rem-init-successors* (special variable).
*repeated-states* (special variable).
*search-tree* (special variable).
*solution-count* (special variable).
*solution-type* (special variable).
*solutions* (special variable).
*start-time* (special variable).
*state-codes* (special variable).
*static-db* (special variable).
*static-idb* (special variable).
*static-relations* (special variable).
*symmetrics* (special variable).
*total-states-processed* (special variable).
*tree-or-graph* (special variable).
*troubleshoot-current-node* (special variable).
*types* (special variable).
*unique-solutions* (special variable).
*update-names* (special variable).
*upper* (special variable).
*upper-bound* (special variable).
display-all (function).
display-current-parameters (function).
params (function).
wouldwork/src/ww-structures.lispww-settings.lisp (file).
src (module).
print-object (method).
print-object (method).
*start-state* (special variable).
action (structure).
action-p (function).
action.duration (reader).
(setf action.duration) (writer).
action.dynamic (reader).
(setf action.dynamic) (writer).
action.eff-defun-name (reader).
(setf action.eff-defun-name) (writer).
action.effect-adds (reader).
(setf action.effect-adds) (writer).
action.effect-lambda (reader).
(setf action.effect-lambda) (writer).
action.effect-variables (reader).
(setf action.effect-variables) (writer).
action.ieffect-lambda (reader).
(setf action.ieffect-lambda) (writer).
action.init (reader).
(setf action.init) (writer).
action.iprecondition-lambda (reader).
(setf action.iprecondition-lambda) (writer).
action.name (reader).
(setf action.name) (writer).
action.pre-defun-name (reader).
(setf action.pre-defun-name) (writer).
action.precondition-args (reader).
(setf action.precondition-args) (writer).
action.precondition-form (reader).
(setf action.precondition-form) (writer).
action.precondition-lambda (reader).
(setf action.precondition-lambda) (writer).
action.precondition-params (reader).
(setf action.precondition-params) (writer).
action.precondition-type-inst (reader).
(setf action.precondition-type-inst) (writer).
action.precondition-types (reader).
(setf action.precondition-types) (writer).
action.precondition-variables (reader).
(setf action.precondition-variables) (writer).
add-parent-to-node (function).
convert-to-fluent-proposition (function).
convert-to-proposition (function).
copy-action (function).
copy-idb (function).
copy-node (function).
copy-problem-state (function).
copy-problem-state-without-idb (function).
copy-solution (function).
copy-update (function).
database (function).
get-prop-fluent-indices (function).
list-database (function).
make-action (function).
make-node (function).
make-problem-state (function).
make-solution (function).
make-update (function).
node (structure).
node-p (function).
node-parent-entries (function).
node-parents-list (function).
node.depth (reader).
(setf node.depth) (writer).
node.parent (reader).
(setf node.parent) (writer).
node.state (reader).
(setf node.state) (writer).
print-problem-state (function).
problem-state (structure).
problem-state-p (function).
problem-state.happenings (reader).
(setf problem-state.happenings) (writer).
problem-state.heuristic (reader).
(setf problem-state.heuristic) (writer).
problem-state.hidb (reader).
(setf problem-state.hidb) (writer).
problem-state.idb (reader).
(setf problem-state.idb) (writer).
problem-state.idb-hash (reader).
(setf problem-state.idb-hash) (writer).
problem-state.instantiations (reader).
(setf problem-state.instantiations) (writer).
problem-state.name (reader).
(setf problem-state.name) (writer).
problem-state.time (reader).
(setf problem-state.time) (writer).
problem-state.value (reader).
(setf problem-state.value) (writer).
solution (structure).
solution-p (function).
solution.depth (reader).
(setf solution.depth) (writer).
solution.goal (reader).
(setf solution.goal) (writer).
solution.path (reader).
(setf solution.path) (writer).
solution.time (reader).
(setf solution.time) (writer).
solution.value (reader).
(setf solution.value) (writer).
update (structure).
update-p (function).
update.changes (reader).
(setf update.changes) (writer).
update.followups (reader).
(setf update.followups) (writer).
update.instantiations (reader).
(setf update.instantiations) (writer).
update.value (reader).
(setf update.value) (writer).
wouldwork/src/ww-converter.lispww-structures.lisp (file).
src (module).
associate-objects-with-integers (function).
compile-all-functions (function).
convert-databases-to-integers (function).
convert-prop-list (function).
convert-to-integer (function).
convert-to-integer-memoized (function).
do-integer-conversion (function).
register-dynamic-object (function).
subst-int-code (function).
wouldwork/src/ww-validator.lispww-converter.lisp (file).
src (module).
$var-or-$var-list-p (function).
$varp (function).
?var-or-?var-list-p (function).
?varp (function).
check-action (function).
check-bind-fluent-consistency (function).
check-effect-parameters (function).
check-form-body (function).
check-precondition-parameters (function).
check-predicate (function).
check-problem-parameter (function).
check-proposition (function).
check-query/update-call (function).
check-query/update-function (function).
check-relation (function).
check-variable-names (function).
header-p (function).
lisp-type-p (function).
subspec-p (function).
trim-1st-char (function).
type-or-query-or-either-p (function).
user-or-lisp-type-p (function).
varp (function).
wouldwork/src/ww-frequencies.lispww-validator.lisp (file).
src (module).
*freq-ht* (special variable).
freq (function).
process-solution (function).
wouldwork/src/ww-support.lispww-frequencies.lisp (file).
src (module).
add-prop (function).
add-proposition (function).
backward-path-exists (function).
copy-ht-set (function).
del-prop (function).
delete-actions (function).
delete-proposition (function).
different (function).
dissect-eff-params (function).
dissect-pre-params (function).
eql* (function).
equivalent (macro).
eval-instantiated-spec (function).
expand-into-plist (function).
generate-new-propositions (function).
generate-proposition-permutations (function).
get-complement-prop (function).
get-fluentless-prop (function).
get-pre-lambda-arg-lists (function).
get-state-codes (function).
instantiate-type-spec (function).
make-ht-set (function).
mvsetq (macro).
profile (function).
revise (function).
set-difference-ht-set (function).
troubleshoot (function).
union-ht-set (function).
update (function).
update-bt (function).
vectorize (function).
when-debug>= (macro).
wouldwork/src/ww-happenings.lispww-support.lisp (file).
src (module).
amend-happenings (function).
apply-rebound (function).
constraint-violated-in-act-hap-net (function).
get-following-happening (function).
interrupt-condition (function).
kill-condition (function).
rebound-condition (function).
wouldwork/src/ww-translator.lispww-happenings.lisp (file).
src (module).
*proposition-read-mode* (special variable).
*within-quantifier* (special variable).
cl-symbol-p (function).
forced-read-mode-p (function).
generate-fluent-bindings (function).
get-database-reference (function).
get-prop-fluents (function).
merge-idb-hidb (function).
translate (function).
translate-assert (function).
translate-assert-bt (function).
translate-bind (function).
translate-case (function).
translate-cond (function).
translate-conditional (function).
translate-connective (function).
translate-do (function).
translate-doall (function).
translate-equivalent (function).
translate-existential (function).
translate-fluent-atom (function).
translate-followup (function).
translate-function-call (function).
translate-let (function).
translate-list (function).
translate-mvsetq (function).
translate-negative-relation (function).
translate-positive-relation (function).
translate-print (function).
translate-proposition (function).
translate-setq (function).
translate-simple-atom (function).
translate-universal (function).
translate-ww-loop (function).
update-function-p (function).
validate-bind-form (function).
write-operation-p (function).
wouldwork/src/ww-installer.lispww-translator.lisp (file).
src (module).
check-happening (function).
create-action (function).
define-action (macro).
define-complementary-relations (macro).
define-constraint (macro).
define-dynamic-relations (macro).
define-goal (macro).
define-happening (macro).
define-init (macro).
define-init-action (macro).
define-invariant (macro).
define-query (macro).
define-static-relations (macro).
define-types (macro).
define-update (macro).
either (function).
final-charp (function).
fix-if-ignore (function).
fluent-spec-p (function).
generate-fluent-instances (function).
get-all-nonspecial-vars (function).
get-all-vars (function).
get-bound-?vars (function).
get-special-vars (function).
install-action (function).
install-complementary-relations (function).
install-constraint (function).
install-dynamic-relations (function).
install-goal (function).
install-happening (function).
install-init (function).
install-init-action (function).
install-query (function).
install-static-relations (function).
install-types (function).
install-update (function).
normalize-fluent-spec (function).
sort-either-types (function).
symmetric-type-indexes (function).
wouldwork/src/ww-patroller-installer.lispww-installer.lisp (file).
src (module).
check-patroller-spec (function).
define-patroller (macro).
generate-patroller-cycle-events (function).
generate-patroller-events (function).
generate-patroller-reverse-events (function).
install-patroller (function).
parse-patroller-slots (function).
wouldwork/src/ww-interface.lispww-patroller-installer.lisp (file).
src (module).
*globals-file* (special variable).
*problem-folder-paths* (special variable).
add-problem-folder (function).
display-globals (function).
get-src-folder-path (function).
help (function).
read-globals (function).
remove-problem-folder (function).
run (macro).
save-globals (function).
%run (function).
%stage (function).
*default-parameters* (special variable).
*refreshing* (special variable).
add-dir (function).
add-file (function).
copy-file-content (function).
directory-exists-p (function).
exchange-problem-file (function).
in-src (function).
list-all-problems (function).
list-problem-files-plist (function).
list-problem-names (function).
load-problem (function).
lookup (function).
lstrip (function).
read-from-file (function).
refresh (function).
reset-parameters (function).
rstrip (function).
save-to-file (function).
solve (function).
stage (macro).
string-prefix-p (function).
string-suffix-p (function).
strip-name (function).
wouldwork/src/ww-problem-tests.lispww-interface.lisp (file).
src (module).
run-test-problems (function).
*test-bt-problem-files* (special variable).
*test-problem-files* (special variable).
cleanup-test-files (function).
collect-solution-data (function).
parse-problem-name (function).
print-test-header (function).
prompt-user-action (function).
read-hash-table-from-file (function).
test (function).
test-bt (function).
write-hash-table-to-file (function).
wouldwork/src/ww-set.lispww-problem-tests.lisp (file).
src (module).
ww-set (macro).
wouldwork/src/ww-command-tests.lispww-set.lisp (file).
src (module).
command-test-1 (function).
command-test-2 (function).
command-test-3 (function).
command-test-4 (function).
detect-output (function).
test-commands (function).
wouldwork/src/problem.lispww-command-tests.lisp (file).
src (module).
wouldwork/src/ww-action-trace.lispproblem.lisp (file).
src (module).
*trace-action-name* (special variable).
*trace-count* (special variable).
*traced-instantiations* (special variable).
extract-effect-instantiation (function).
handle-trace-interception (function).
print-hash-table-delta (function).
print-list-delta (function).
print-state-delta (function).
print-state-propositions (function).
proposition-less-p (function).
trace-action (macro).
trace-action% (function).
trace-action-instantiation (function).
wouldwork/src/ww-goal-chaining.lispww-action-trace.lisp (file).
src (module).
*undo-checkpoint* (special variable).
continue-from-solution (function).
copy-undo-checkpoint (function).
extract-goal-state-from-solution (function).
make-undo-checkpoint (function).
save-undo-checkpoint (function).
undo-checkpoint (structure).
undo-checkpoint-goal (reader).
(setf undo-checkpoint-goal) (writer).
undo-checkpoint-p (function).
undo-checkpoint-start-state (reader).
(setf undo-checkpoint-start-state) (writer).
update-start-state-from-goal (function).
validate-continuation-preconditions (function).
ww-continue (macro).
ww-undo (function).
wouldwork/src/ww-solution-validation.lispww-goal-chaining.lisp (file).
src (module).
%validate-solution (function).
apply-action-to-state (function).
apply-followups (function).
apply-update-to-state (function).
args-match-with-combinations (function).
build-state-from-update (function).
check-validation-result (function).
diagnose-precondition-failure (function).
display-validation-state (function).
evaluate-precondition-clause (function).
extract-effect-args (function).
find-combination-var-groups (function).
get-precondition-args (function).
next-action-valid-p (function).
report-binding-mismatches (function).
report-state-mismatch (function).
report-validation-failure (function).
select-matching-effect (function).
subst-bindings-recursive (function).
substitute-bindings (function).
validate-solution (macro).
wouldwork/src/ww-planner.lispww-solution-validation.lisp (file).
src (module).
create-action-state (function).
do-init-action-updates (function).
estimate-to-goal (function).
expand (function).
format-action-with-effect-order (function).
generate-children (function).
get-new-states (function).
get-next-event-time (function).
get-wait-happenings (function).
initialize-act-state (function).
process-followups (function).
record-move (function).
update-is-inconsistent (function).
wouldwork/src/ww-searcher.lispww-planner.lisp (file).
src (module).
*closed* (special variable).
*fixed-ht-values-fn* (special variable).
*open* (special variable).
*shutdown-requested* (special variable).
at-max-depth (function).
best-states-last (function).
better-than-closed (function).
bounding-function (function).
choose-ht-value-test (function).
closed-key (function).
compute-average-branching-factor (function).
compute-idb-hash (function).
defer-hybrid-goal (function).
df-bnb1 (function).
dfs (function).
ensure-idb-hash (function).
enumerate-paths-to-node (function).
f-value-better (function).
finalize-hybrid-solutions (function).
finalize-path-depth (function).
fixed-keys-ht-equal (function).
fixed-keys-ht-hash (function).
fixedp (function).
generate-new-node (function).
get-closed-node (function).
get-closed-values (function).
get-next-node-for-expansion (function).
goal (function).
idb-in-open (function).
initialize-hybrid-mode (function).
lprt (macro).
narrate (function).
node.state.idb (function).
node.state.idb-hash (function).
on-current-path (function).
print-search-progress (function).
print-search-tree (function).
printout-search-progress (function).
printout-solution (function).
probe (function).
process-min-max-value (function).
process-successors (function).
record-solution-path (function).
register-solution (function).
search-serial (function).
simple-break (function).
solution-better-p (function).
summarize-search-results (function).
update-max-depth-explored (function).
update-open-if-succ-better (function).
update-search-tree (function).
validate-global-invariants (function).
ww-solve (function).
wouldwork/src/ww-backtracker.lispww-searcher.lisp (file).
src (module).
*backtrack-state* (special variable).
*choice-stack* (special variable).
backtrack (function).
choice (structure).
choice-p (function).
choice.act (reader).
(setf choice.act) (writer).
choice.forward-update (reader).
(setf choice.forward-update) (writer).
choice.inverse-update (reader).
(setf choice.inverse-update) (writer).
choice.level (reader).
(setf choice.level) (writer).
copy-choice (function).
detect-path-cycle (function).
generate-choices-for-single-combination-bt (function).
is-complete-solution (function).
make-choice (function).
narrate-bt (function).
reconstruct-solution-path (function).
register-choice-bt (function).
register-solution-bt (function).
search-backtracking (function).
undo-choice-bt (function).
update-search-tree-bt (function).
update-statistics (function).
wouldwork/src/ww-parallel-infrastructure.lispww-backtracker.lisp (file).
src (module).
*best-bound* (special variable).
*best-bound-lock* (special variable).
*best-solution-lock* (special variable).
*bound-refresh-interval* (special variable).
*closed-shard-locks* (special variable).
*closed-shard-mask* (special variable).
*closed-shards* (special variable).
*donation-check-interval* (special variable).
*donation-fraction* (special variable).
*donation-threshold* (special variable).
*enable-work-donation* (special variable).
*first-solution-found* (special variable).
*last-progress-time* (special variable).
*min-tasks* (special variable).
*num-closed-shards* (special variable).
*parallel-search-active* (special variable).
*parallel-timing* (special variable).
*progress-interval-seconds* (special variable).
*progress-lock* (special variable).
*split-depth-max* (special variable).
*tasks-per-thread* (special variable).
*worker-stats-vector* (special variable).
+initial-task-queue-size+ (constant).
aggregate-worker-stats (function).
apply-parallel-preset (function).
closed-shard (function).
closed-shard-lock (function).
closed-shards-distribution (function).
closed-shards-total-count (function).
closed-shards-total-size (function).
compute-donation-count (function).
compute-donation-totals (function).
compute-state-bound-value (function).
copy-parallel-timing (function).
copy-task-queue (function).
copy-worker-stats (function).
display-parallel-parameters (function).
display-parallel-timing (function).
display-worker-stats (function).
extract-donation-nodes (function).
format-timing (function).
get-worker-stats (function).
initial-best-bound (function).
initialize-closed-shard-locks (function).
initialize-closed-shards (function).
initialize-worker-stats (function).
make-new-task-queue (function).
make-parallel-timing (function).
make-task-queue (function).
make-worker-stats (function).
maybe-donate-work (function).
maybe-report-parallel-progress (function).
node-can-improve-bound-p (function).
parallel-help (function).
parallel-timing (structure).
parallel-timing-p (function).
pt-finalization-ms (reader).
(setf pt-finalization-ms) (writer).
pt-task-generation-ms (reader).
(setf pt-task-generation-ms) (writer).
pt-total-ms (reader).
(setf pt-total-ms) (writer).
pt-worker-search-ms (reader).
(setf pt-worker-search-ms) (writer).
register-parallel-solution (function).
report-parallel-progress (function).
reset-parallel-control-flags (function).
shard-index-for-hash (function).
shard-index-for-state (function).
state-bound-better-p (function).
task-queue (structure).
task-queue-p (function).
tq-active-workers (reader).
(setf tq-active-workers) (writer).
tq-buffer (reader).
(setf tq-buffer) (writer).
tq-count (reader).
(setf tq-count) (writer).
tq-done-p (reader).
(setf tq-done-p) (writer).
tq-empty-p (function).
tq-grow-buffer (function).
tq-head (reader).
(setf tq-head) (writer).
tq-mutex (reader).
(setf tq-mutex) (writer).
tq-needs-work-p (function).
tq-pop-blocking (function).
tq-push (function).
tq-push-many (function).
tq-register-worker (function).
tq-signal-done (function).
tq-tail (reader).
(setf tq-tail) (writer).
tq-try-pop (function).
tq-waiting-workers-p (function).
tq-waitqueue (reader).
(setf tq-waitqueue) (writer).
validate-parallel-settings (function).
with-closed-shard-lock (macro).
with-closed-shard-lock-by-index (macro).
worker-stats (structure).
worker-stats-p (function).
ws-accumulated-depths (reader).
(setf ws-accumulated-depths) (writer).
ws-donation-events (reader).
(setf ws-donation-events) (writer).
ws-finalize-path (function).
ws-inc-cycles (function).
ws-inc-repeated (function).
ws-inc-solutions (function).
ws-inc-states (function).
ws-max-depth (reader).
(setf ws-max-depth) (writer).
ws-nodes-donated (reader).
(setf ws-nodes-donated) (writer).
ws-num-paths (reader).
(setf ws-num-paths) (writer).
ws-program-cycles (reader).
(setf ws-program-cycles) (writer).
ws-repeated-states (reader).
(setf ws-repeated-states) (writer).
ws-solutions-found (reader).
(setf ws-solutions-found) (writer).
ws-states-processed (reader).
(setf ws-states-processed) (writer).
ws-update-max-depth (function).
wouldwork/src/ww-parallel.lispww-parallel-infrastructure.lisp (file).
src (module).
compute-target-tasks (function).
finalize-parallel-search-results (function).
generate-root-tasks (function).
initialize-closed-infrastructure (function).
initialize-closed-locks (function).
parallel-worker (function).
process-partitioned-parallel (function).
solution-equivalent-p (function).
total-parallel-frontier (function).
worker-local-dfs (function).
worker-process-successors-phase1 (function).
wouldwork/src/ww-initialize.lispww-parallel.lisp (file).
src (module).
ensure-start-state-synchronized (function).
init (function).
init-start-state (function).
validate-start-state-consistency (function).
Packages are listed by definition order.
utilitiesut
common-lisp.
agent-starred-p (function).
collect-at-indexes (function).
count-agent-switches (function).
extract-symbols (function).
forget (function).
get-path-action-agent (function).
hash-table-present-p (function).
hash-table-same-keys-p (function).
if-it (macro).
interleave+ (function).
intern-symbol (function).
intersperse (function).
map-into-tree-atoms (function).
merge-sort (function).
merge-sort-list (function).
mvb (macro).
mvs (macro).
ninsert-list (function).
print-ht (function).
print-optimal-solutions (function).
prt (macro).
prt-if (macro).
remove-at-indexes (function).
retrieve (function).
save (function).
show (generic function).
sort-symbols (function).
sortf (macro).
subst-items-at-ascending-indexes (function).
transpose (function).
walk-tree (function).
hstackhs
common-lisp.
clear-hstack (function).
copy-hstack (function).
deletef-nth-hstack (function).
empty-hstack (function).
hstack (structure).
hstack-p (function).
hstack.keyfn (reader).
(setf hstack.keyfn) (writer).
hstack.table (reader).
(setf hstack.table) (writer).
hstack.vector (reader).
(setf hstack.vector) (writer).
length-hstack (function).
make-hstack (function).
nth-hstack (function).
peek-hstack (function).
pop-hstack (function).
push-hstack (function).
size-hstack (function).
wouldworkww
common-lisp.
iterate.
sb-ext.
*globals-file* (special variable).
*problem-folder-paths* (special variable).
add-problem-folder (function).
display-globals (function).
get-src-folder-path (function).
help (function).
read-globals (function).
remove-problem-folder (function).
run (macro).
run-test-problems (function).
save-globals (function).
$var-or-$var-list-p (function).
$varp (function).
%run (function).
%stage (function).
%validate-solution (function).
*-* (special variable).
*accumulated-depths* (special variable).
*actions* (special variable).
*algorithm* (special variable).
*average-branching-factor* (special variable).
*backtrack-state* (special variable).
*best-bound* (special variable).
*best-bound-lock* (special variable).
*best-solution-lock* (special variable).
*best-states* (special variable).
*bound-refresh-interval* (special variable).
*branch* (special variable).
*choice-stack* (special variable).
*closed* (special variable).
*closed-shard-locks* (special variable).
*closed-shard-mask* (special variable).
*closed-shards* (special variable).
*complements* (special variable).
*connectives* (special variable).
*constant-integers* (special variable).
*cost* (special variable).
*counter* (special variable).
*db* (special variable).
*debug* (special variable).
*default-parameters* (special variable).
*depth-cutoff* (special variable).
*donation-check-interval* (special variable).
*donation-fraction* (special variable).
*donation-threshold* (special variable).
*eff-param-vars* (special variable).
*enable-work-donation* (special variable).
*first-solution-found* (special variable).
*fixed-ht-values-fn* (special variable).
*fluent-relation-indices* (special variable).
*freq-ht* (special variable).
*global-invariants* (special variable).
*goal* (special variable).
*hap-db* (special variable).
*hap-idb* (special variable).
*happening-names* (special variable).
*hdb* (special variable).
*hidb* (special variable).
*hybrid-goals* (special variable).
*hybrid-mode* (special variable).
*idb* (special variable).
*inconsistent-states-dropped* (special variable).
*init-actions* (special variable).
*integer-constants* (special variable).
*integer-lock* (special variable).
*last-object-index* (special variable).
*last-progress-time* (special variable).
*lock* (special variable).
*max-depth-explored* (special variable).
*min-action-duration* (special variable).
*min-tasks* (special variable).
*num-closed-shards* (special variable).
*num-idle-threads* (special variable).
*num-init-successors* (special variable).
*num-paths* (special variable).
*objective-value-p* (special variable).
*open* (special variable).
*parallel-search-active* (special variable).
*parallel-timing* (special variable).
*parameter-headers* (special variable).
*print-updates* (special variable).
*prior-time* (special variable).
*prior-total-states-processed* (special variable).
*probe* (special variable).
*problem-name* (special variable).
*problem-type* (special variable).
*program-cycles* (special variable).
*progress-interval-seconds* (special variable).
*progress-lock* (special variable).
*progress-reporting-interval* (special variable).
*prop-key-cache* (special variable).
*proposition-read-mode* (special variable).
*query-names* (special variable).
*randomize-search* (special variable).
*refreshing* (special variable).
*relations* (special variable).
*rem-init-successors* (special variable).
*repeated-states* (special variable).
*search-lock* (special variable).
*search-tree* (special variable).
*shutdown-requested* (special variable).
*solution-count* (special variable).
*solution-type* (special variable).
*solutions* (special variable).
*split-depth-max* (special variable).
*start-state* (special variable).
*start-time* (special variable).
*state-codes* (special variable).
*static-db* (special variable).
*static-idb* (special variable).
*static-relations* (special variable).
*symmetrics* (special variable).
*tasks-per-thread* (special variable).
*test-bt-problem-files* (special variable).
*test-problem-files* (special variable).
*threads* (special variable).
*total-states-processed* (special variable).
*trace-action-name* (special variable).
*trace-count* (special variable).
*traced-instantiations* (special variable).
*tree-or-graph* (special variable).
*troubleshoot-current-node* (special variable).
*types* (special variable).
*undo-checkpoint* (special variable).
*unique-solutions* (special variable).
*update-names* (special variable).
*upper* (special variable).
*upper-bound* (special variable).
*within-quantifier* (special variable).
*worker-stats-vector* (special variable).
*ww-loading* (special variable).
+initial-task-queue-size+ (constant).
?var-or-?var-list-p (function).
?varp (function).
action (structure).
action-p (function).
action.duration (reader).
(setf action.duration) (writer).
action.dynamic (reader).
(setf action.dynamic) (writer).
action.eff-defun-name (reader).
(setf action.eff-defun-name) (writer).
action.effect-adds (reader).
(setf action.effect-adds) (writer).
action.effect-lambda (reader).
(setf action.effect-lambda) (writer).
action.effect-variables (reader).
(setf action.effect-variables) (writer).
action.ieffect-lambda (reader).
(setf action.ieffect-lambda) (writer).
action.init (reader).
(setf action.init) (writer).
action.iprecondition-lambda (reader).
(setf action.iprecondition-lambda) (writer).
action.name (reader).
(setf action.name) (writer).
action.pre-defun-name (reader).
(setf action.pre-defun-name) (writer).
action.precondition-args (reader).
(setf action.precondition-args) (writer).
action.precondition-form (reader).
(setf action.precondition-form) (writer).
action.precondition-lambda (reader).
(setf action.precondition-lambda) (writer).
action.precondition-params (reader).
(setf action.precondition-params) (writer).
action.precondition-type-inst (reader).
(setf action.precondition-type-inst) (writer).
action.precondition-types (reader).
(setf action.precondition-types) (writer).
action.precondition-variables (reader).
(setf action.precondition-variables) (writer).
add-dir (function).
add-file (function).
add-parent-to-node (function).
add-prop (function).
add-proposition (function).
aggregate-worker-stats (function).
amend-happenings (function).
apply-action-to-state (function).
apply-followups (function).
apply-parallel-preset (function).
apply-rebound (function).
apply-update-to-state (function).
args-match-with-combinations (function).
associate-objects-with-integers (function).
at-max-depth (function).
backtrack (function).
backward-path-exists (function).
best-states-last (function).
better-than-closed (function).
bounding-function (function).
build-state-from-update (function).
check-action (function).
check-bind-fluent-consistency (function).
check-effect-parameters (function).
check-form-body (function).
check-happening (function).
check-patroller-spec (function).
check-precondition-parameters (function).
check-predicate (function).
check-problem-parameter (function).
check-proposition (function).
check-query/update-call (function).
check-query/update-function (function).
check-relation (function).
check-validation-result (function).
check-variable-names (function).
choice (structure).
choice-p (function).
choice.act (reader).
(setf choice.act) (writer).
choice.forward-update (reader).
(setf choice.forward-update) (writer).
choice.inverse-update (reader).
(setf choice.inverse-update) (writer).
choice.level (reader).
(setf choice.level) (writer).
choose-ht-value-test (function).
cl-symbol-p (function).
cleanup-resources (function).
cleanup-test-files (function).
closed-key (function).
closed-shard (function).
closed-shard-lock (function).
closed-shards-distribution (function).
closed-shards-total-count (function).
closed-shards-total-size (function).
collect-solution-data (function).
command-test-1 (function).
command-test-2 (function).
command-test-3 (function).
command-test-4 (function).
compile-all-functions (function).
compute-average-branching-factor (function).
compute-donation-count (function).
compute-donation-totals (function).
compute-idb-hash (function).
compute-state-bound-value (function).
compute-target-tasks (function).
constraint-violated-in-act-hap-net (function).
continue-from-solution (function).
convert-databases-to-integers (function).
convert-prop-list (function).
convert-to-fluent-proposition (function).
convert-to-integer (function).
convert-to-integer-memoized (function).
convert-to-proposition (function).
copy-action (function).
copy-choice (function).
copy-file-content (function).
copy-ht-set (function).
copy-idb (function).
copy-node (function).
copy-parallel-timing (function).
copy-problem-state (function).
copy-problem-state-without-idb (function).
copy-solution (function).
copy-task-queue (function).
copy-undo-checkpoint (function).
copy-update (function).
copy-worker-stats (function).
create-action (function).
create-action-state (function).
database (function).
defer-hybrid-goal (function).
define-action (macro).
define-complementary-relations (macro).
define-constraint (macro).
define-dynamic-relations (macro).
define-global (macro).
define-goal (macro).
define-happening (macro).
define-init (macro).
define-init-action (macro).
define-invariant (macro).
define-patroller (macro).
define-query (macro).
define-static-relations (macro).
define-types (macro).
define-update (macro).
del-prop (function).
delete-actions (function).
delete-proposition (function).
detect-output (function).
detect-path-cycle (function).
df-bnb1 (function).
dfs (function).
diagnose-precondition-failure (function).
different (function).
directory-exists-p (function).
display-all (function).
display-current-parameters (function).
display-parallel-parameters (function).
display-parallel-timing (function).
display-validation-state (function).
display-worker-stats (function).
dissect-eff-params (function).
dissect-pre-params (function).
do-init-action-updates (function).
do-integer-conversion (function).
either (function).
ensure-idb-hash (function).
ensure-start-state-synchronized (function).
enumerate-paths-to-node (function).
eql* (function).
equivalent (macro).
estimate-to-goal (function).
eval-instantiated-spec (function).
evaluate-precondition-clause (function).
exchange-problem-file (function).
expand (function).
expand-into-plist (function).
extract-donation-nodes (function).
extract-effect-args (function).
extract-effect-instantiation (function).
extract-goal-state-from-solution (function).
f-value-better (function).
final-charp (function).
finalize-hybrid-solutions (function).
finalize-parallel-search-results (function).
finalize-path-depth (function).
find-combination-var-groups (function).
fix-if-ignore (function).
fixed-keys-ht-equal (function).
fixed-keys-ht-hash (function).
fixedp (function).
fluent-spec-p (function).
forced-read-mode-p (function).
format-action-with-effect-order (function).
format-timing (function).
freq (function).
generate-children (function).
generate-choices-for-single-combination-bt (function).
generate-fluent-bindings (function).
generate-fluent-instances (function).
generate-new-node (function).
generate-new-propositions (function).
generate-patroller-cycle-events (function).
generate-patroller-events (function).
generate-patroller-reverse-events (function).
generate-proposition-permutations (function).
generate-root-tasks (function).
get-all-nonspecial-vars (function).
get-all-vars (function).
get-bound-?vars (function).
get-closed-node (function).
get-closed-values (function).
get-complement-prop (function).
get-database-reference (function).
get-fluentless-prop (function).
get-following-happening (function).
get-new-states (function).
get-next-event-time (function).
get-next-node-for-expansion (function).
get-pre-lambda-arg-lists (function).
get-precondition-args (function).
get-prop-fluent-indices (function).
get-prop-fluents (function).
get-special-vars (function).
get-state-codes (function).
get-wait-happenings (function).
get-worker-stats (function).
goal (function).
handle-trace-interception (function).
header-p (function).
idb-in-open (function).
in-src (function).
increment-global (macro).
init (function).
init-start-state (function).
initial-best-bound (function).
initialize-act-state (function).
initialize-closed-infrastructure (function).
initialize-closed-locks (function).
initialize-closed-shard-locks (function).
initialize-closed-shards (function).
initialize-hybrid-mode (function).
initialize-worker-stats (function).
install-action (function).
install-complementary-relations (function).
install-constraint (function).
install-dynamic-relations (function).
install-goal (function).
install-happening (function).
install-init (function).
install-init-action (function).
install-patroller (function).
install-query (function).
install-static-relations (function).
install-types (function).
install-update (function).
instantiate-type-spec (function).
interrupt-condition (function).
is-complete-solution (function).
kill-condition (function).
lisp-type-p (function).
list-all-problems (function).
list-database (function).
list-problem-files-plist (function).
list-problem-names (function).
load-problem (function).
lookup (function).
lprt (macro).
lstrip (function).
make-action (function).
make-choice (function).
make-ht-set (function).
make-new-task-queue (function).
make-node (function).
make-parallel-timing (function).
make-problem-state (function).
make-solution (function).
make-task-queue (function).
make-undo-checkpoint (function).
make-update (function).
make-worker-stats (function).
maybe-donate-work (function).
maybe-report-parallel-progress (function).
merge-idb-hidb (function).
mvsetq (macro).
narrate (function).
narrate-bt (function).
next-action-valid-p (function).
node (structure).
node-can-improve-bound-p (function).
node-p (function).
node-parent-entries (function).
node-parents-list (function).
node.depth (reader).
(setf node.depth) (writer).
node.parent (reader).
(setf node.parent) (writer).
node.state (reader).
(setf node.state) (writer).
node.state.idb (function).
node.state.idb-hash (function).
normalize-fluent-spec (function).
on-current-path (function).
parallel-help (function).
parallel-timing (structure).
parallel-timing-p (function).
parallel-worker (function).
params (function).
parse-patroller-slots (function).
parse-problem-name (function).
pop-global (macro).
print-hash-table-delta (function).
print-list-delta (function).
print-problem-state (function).
print-search-progress (function).
print-search-tree (function).
print-state-delta (function).
print-state-propositions (function).
print-test-header (function).
printout-search-progress (function).
printout-solution (function).
probe (function).
problem-state (structure).
problem-state-p (function).
problem-state.happenings (reader).
(setf problem-state.happenings) (writer).
problem-state.heuristic (reader).
(setf problem-state.heuristic) (writer).
problem-state.hidb (reader).
(setf problem-state.hidb) (writer).
problem-state.idb (reader).
(setf problem-state.idb) (writer).
problem-state.idb-hash (reader).
(setf problem-state.idb-hash) (writer).
problem-state.instantiations (reader).
(setf problem-state.instantiations) (writer).
problem-state.name (reader).
(setf problem-state.name) (writer).
problem-state.time (reader).
(setf problem-state.time) (writer).
problem-state.value (reader).
(setf problem-state.value) (writer).
probs (function).
process-followups (function).
process-min-max-value (function).
process-partitioned-parallel (function).
process-solution (function).
process-successors (function).
profile (function).
prompt-user-action (function).
proposition-less-p (function).
pt-finalization-ms (reader).
(setf pt-finalization-ms) (writer).
pt-task-generation-ms (reader).
(setf pt-task-generation-ms) (writer).
pt-total-ms (reader).
(setf pt-total-ms) (writer).
pt-worker-search-ms (reader).
(setf pt-worker-search-ms) (writer).
push-global (macro).
read-from-file (function).
read-hash-table-from-file (function).
read-init-vals (function).
rebound-condition (function).
reconstruct-solution-path (function).
record-move (function).
record-solution-path (function).
refresh (function).
register-choice-bt (function).
register-dynamic-object (function).
register-parallel-solution (function).
register-solution (function).
register-solution-bt (function).
report-binding-mismatches (function).
report-parallel-progress (function).
report-state-mismatch (function).
report-validation-failure (function).
reset-global-hash-tables (function).
reset-parallel-control-flags (function).
reset-parameters (function).
reset-user-syms (function).
revise (function).
rstrip (function).
save-to-file (function).
save-undo-checkpoint (function).
search-backtracking (function).
search-serial (function).
select-matching-effect (function).
set-difference-ht-set (function).
shard-index-for-hash (function).
shard-index-for-state (function).
simple-break (function).
solution (structure).
solution-better-p (function).
solution-equivalent-p (function).
solution-p (function).
solution.depth (reader).
(setf solution.depth) (writer).
solution.goal (reader).
(setf solution.goal) (writer).
solution.path (reader).
(setf solution.path) (writer).
solution.time (reader).
(setf solution.time) (writer).
solution.value (reader).
(setf solution.value) (writer).
solve (function).
sort-either-types (function).
stage (macro).
state-bound-better-p (function).
string-prefix-p (function).
string-suffix-p (function).
strip-name (function).
subspec-p (function).
subst-bindings-recursive (function).
subst-int-code (function).
substitute-bindings (function).
summarize-search-results (function).
symmetric-type-indexes (function).
task-queue (structure).
task-queue-p (function).
test (function).
test-bt (function).
test-commands (function).
total-parallel-frontier (function).
tq-active-workers (reader).
(setf tq-active-workers) (writer).
tq-buffer (reader).
(setf tq-buffer) (writer).
tq-count (reader).
(setf tq-count) (writer).
tq-done-p (reader).
(setf tq-done-p) (writer).
tq-empty-p (function).
tq-grow-buffer (function).
tq-head (reader).
(setf tq-head) (writer).
tq-mutex (reader).
(setf tq-mutex) (writer).
tq-needs-work-p (function).
tq-pop-blocking (function).
tq-push (function).
tq-push-many (function).
tq-register-worker (function).
tq-signal-done (function).
tq-tail (reader).
(setf tq-tail) (writer).
tq-try-pop (function).
tq-waiting-workers-p (function).
tq-waitqueue (reader).
(setf tq-waitqueue) (writer).
trace-action (macro).
trace-action% (function).
trace-action-instantiation (function).
translate (function).
translate-assert (function).
translate-assert-bt (function).
translate-bind (function).
translate-case (function).
translate-cond (function).
translate-conditional (function).
translate-connective (function).
translate-do (function).
translate-doall (function).
translate-equivalent (function).
translate-existential (function).
translate-fluent-atom (function).
translate-followup (function).
translate-function-call (function).
translate-let (function).
translate-list (function).
translate-mvsetq (function).
translate-negative-relation (function).
translate-positive-relation (function).
translate-print (function).
translate-proposition (function).
translate-setq (function).
translate-simple-atom (function).
translate-universal (function).
translate-ww-loop (function).
trim-1st-char (function).
troubleshoot (function).
type-or-query-or-either-p (function).
undo-checkpoint (structure).
undo-checkpoint-goal (reader).
(setf undo-checkpoint-goal) (writer).
undo-checkpoint-p (function).
undo-checkpoint-start-state (reader).
(setf undo-checkpoint-start-state) (writer).
undo-choice-bt (function).
union-ht-set (function).
update (function).
update (structure).
update-bt (function).
update-function-p (function).
update-is-inconsistent (function).
update-max-depth-explored (function).
update-open-if-succ-better (function).
update-p (function).
update-search-tree (function).
update-search-tree-bt (function).
update-start-state-from-goal (function).
update-statistics (function).
update.changes (reader).
(setf update.changes) (writer).
update.followups (reader).
(setf update.followups) (writer).
update.instantiations (reader).
(setf update.instantiations) (writer).
update.value (reader).
(setf update.value) (writer).
user-or-lisp-type-p (function).
validate-bind-form (function).
validate-continuation-preconditions (function).
validate-global-invariants (function).
validate-parallel-settings (function).
validate-solution (macro).
validate-start-state-consistency (function).
varp (function).
vectorize (function).
when-debug>= (macro).
with-closed-shard-lock (macro).
with-closed-shard-lock-by-index (macro).
with-search-structures-lock (macro).
with-silenced-compilation (macro).
worker-local-dfs (function).
worker-process-successors-phase1 (function).
worker-stats (structure).
worker-stats-p (function).
write-hash-table-to-file (function).
write-operation-p (function).
ws-accumulated-depths (reader).
(setf ws-accumulated-depths) (writer).
ws-donation-events (reader).
(setf ws-donation-events) (writer).
ws-finalize-path (function).
ws-inc-cycles (function).
ws-inc-repeated (function).
ws-inc-solutions (function).
ws-inc-states (function).
ws-max-depth (reader).
(setf ws-max-depth) (writer).
ws-nodes-donated (reader).
(setf ws-nodes-donated) (writer).
ws-num-paths (reader).
(setf ws-num-paths) (writer).
ws-program-cycles (reader).
(setf ws-program-cycles) (writer).
ws-repeated-states (reader).
(setf ws-repeated-states) (writer).
ws-solutions-found (reader).
(setf ws-solutions-found) (writer).
ws-states-processed (reader).
(setf ws-states-processed) (writer).
ws-update-max-depth (function).
ww-continue (macro).
ww-reset (function).
ww-set (macro).
ww-solve (function).
ww-undo (function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
In the vals.lisp file of this package the values of parameters
are stored as a list.
This should preserve when reloading the package for problems
the values of these global variables.
This variable holds all folder pathnames which can hold problems in this system.
The user cann add custom folder pathnames to this folder using the function
‘add-problem-folder‘ and remove by ‘remove-problem-folder‘.
The Package directory’s ‘src‘ folder, however will always persist.
Adds an additional path to a folder containing problem-*.lisp files to the global list ‘*problem-folder-paths*‘.
Read and setf values for global variables from vals.lisp file.
Removes folder-path from global ‘*problem-folder-paths*‘ list. It always leaves the packages’ ‘src‘ folder present!
Save the values of the globals in the vals.lisp file.
problem-state) stream) ¶Initial capacity of task queue. Will grow if needed during task generation.
Division marker for debugging printout convenience.
Sums the final depths of all terminated paths so far.
List of all potential actions.
Specify search algorithm: ’depth-first (default) or ’backtracking. depth-first: Traditional DFS with state copying (current behavior) backtracking: DFS with single state and undo operations (memory efficient)
Average branching factor so far during search (shared).
The single working state for backtracking search
Current best solution bound for pruning.
For min-length/min-time/min-value: lower is better.
For max-value: stored as negated value (so lower is still better).
Workers cache this locally and refresh periodically.
Protects updates to *best-bound*.
Protects updates to *solutions* and *unique-solutions* during parallel search.
Holds the best states encountered during a graph search.
Number of cycles between bound cache refreshes in workers.
Lower = more responsive to bound updates, higher = less overhead.
If n>0, explore only the nth branch from the *start-state*.
Stack of choices made during backtracking search; path back to start state.
Contains the set of closed state idbs for graph search, idb -> (depth time value).
Vector of mutexes for sharded *closed*. One per shard.
Bitmask for fast shard computation: (logand hash mask).
Vector of hash tables for sharded *closed*. One per shard.
Table of complement relations.
Logical connectives.
Integer codes for the problem’s object constants.
For misc debugging with probe function
Initial database of dynamic db relations.
Set the debug level for subsequent runs.
0 - no debugging
1 - display full search tree
2 - display full search tree with states
3 - display basic nodes
4 - display full nodes
5 - display full nodes + break after each expansion cycle
Default parameter values in save/read order
Negative or 0 means no cutoff.
Number of cycles between donation eligibility checks.
Lower = more responsive load balancing, higher = less overhead.
Fraction of local stack to donate when donating (0.0 to 1.0). Donates the shallowest nodes (largest subtrees).
Minimum local stack size before a worker considers donating work. Must have at least this many nodes to donate.
Make eff-param-vars available in translate-assert.
When T, workers can donate excess work back to the task queue. Set to NIL to disable load balancing (for debugging/comparison).
Set to T by any worker finding a solution when *solution-type* is FIRST.
Determines which equality test to use in fixed-keys-ht-equal.
List of fluent argument indices for a relation.
List of invariant query functions to check on every state.
Holds the current user goal specification.
Initial database of happenings propositions.
Initial integer database of happenings propositions.
The list of objects having exogenous events.
Initial database of dynamic hdb relations.
Initial integer database of dynamic hidb propositions.
In hybrid mode, stores (current-node . goal-state) pairs for deferred enumeration.
When T, hybrid graph search is active for enumerating all solutions at *depth-cutoff*.
Initial integer database of dynamic idb propositions.
Count of successor states dropped due to convergence failure.
List of all initialization actions.
Translating codes back to constants for printout.
Last index of object constants seen so far in propositions.
Internal time of last progress report.
Keeps track of the maximum depth reached so far during the search (shared).
The least action duration among all actions.
Minimum number of tasks to generate regardless of thread count.
Number of shards for parallel *closed* table. Must be power of 2. Default 64 provides good distribution for up to 64 cores.
Holds the number of currently idle threads (shared).
The number of branches completed so far from the start state.
Tracks the total number of paths explored so far.
Does the variable $objective-value appear in an action rule.
The hash-stack structure containing the stack of open nodes as a vector, and hash table of idb -> node.
T when partitioned parallel search is running.
Timing data from most recent parallel search.
The different ways values can be combined in a pre-parameter list.
Print each database update while T
Time since last progress printing (shared).
Count of states produced since last progress printing (shared).
Inserts a probe to stop processing at a specific state.
Name of the current problem, reassigned in problem.lisp by user.
Spedify whether it’s a planning problem or constraint satisfaction problem.
Count of complete cycles of searching (shared).
Minimum seconds between progress reports.
Prevents interleaved progress output from multiple workers.
Print progress during search after each multiple n of states examined.
Cache for prop-key-to-integer conversions
Dynamic variable controlling read/write mode during translation.
When :unbound: Use context-dependent behavior (default)
When t: Force read operations (queries only)
When nil: Force write operations
List of all user-defined query functions.
Set to t or nil.
Flag to skip read-globals during refresh, preserving REPL-set parameters.
Dynamic relations.
Holds the remaining initial branch nodes from the start state.
Count of the repeated states during a graph search.
DFS search tree for debugging (serial processing only).
Variable used to signal threads shutdown, if *threads* > 0
Holds the total number of solutions found following search.
Specify whether to search for first, min-length, min-time, or every solution.
Holds the solutions found during search.
Maximum depth for task generation. With branching factor 4, depth 4 yields up to 256 tasks.
Start search from this state.
Stores time at beginning of the search.
Holding place for integer state codes in bi-directional search.
Initial database of static propositions.
Initial integer database of static propositions.
Static relations.
Symmetric relations.
Target multiplier: aim for (* *tasks-per-thread* *threads*) tasks minimum.
The number of parallel threads to use.
0 means no parallelism (ie, serial processing)
1 means use one parallel thread
(in addition to parallel management, effectively serial, useful for debugging)
2 means two or more parallel processing threads
N up to the number of available CPU threads
Count of states either newly generated, updated, or regenerated while searching (shared).
When non-nil, traces execution of this action when encountered during search.
Counts how many unique instantiations have been traced.
Hash table tracking which instantiations have been traced to avoid duplicates. Key: normalized instantiation list, Value: T
Whether there are repeated states (graph) or not (tree); try both.
A flag telling wouldwork to redo the current node for debugging.
Table of all types.
Saved state from most recent ww-continue, or nil if none.
List of all user-defined update functions.
Dynamic variable indicating whether translation is occurring within a quantifier context.
When T, IF statements return explicit T/NIL for control flow semantics.
When NIL, IF statements preserve natural value-returning semantics.
Vector of worker-stats structures, one per worker thread.
Flag to indicate if Wouldwork is currently being loaded. Reset in ww-initialize.lisp
Define an invariant condition that must always be true. Registers the invariant for global checking during planning.
Define a path-following patroller object.
Syntax:
(define-patroller <name>
path <area-list>
mode <:reverse | :cycle>
[timings <time-list>]
[interrupt <condition>]
[rebound <condition>])
Arguments:
path - Required. List of areas defining the path (minimum 2).
mode - Required. :reverse for ping-pong, :cycle for wrap-around.
timings - Optional. List of durations for each segment. Default: all 1s.
interrupt - Optional. Condition that pauses patroller movement.
rebound - Optional. Condition that reverses direction (Phase 2).
The patroller’s initial location must be specified via define-init.
The path traversal begins from that location.
Example:
(define-patroller buzzer1
path (area1 area2 area3 area4 area5)
mode :reverse
rebound (exists (?c cargo)
(and (loc buzzer1 $area)
(loc ?c $area))))
Returns true if all forms evaluate to nil, or if all forms evaluate to non-nil.
Binds the variable ’it’ to the result of evaluating the form, which can then be used subsequently in the then or else clauses.
Print some variable values in a thread for debugging.
Abbreviation for multiple-value-bind.
Abbreviation for multiple-value-setq.
Print the names & values of given forms (ie,variables or accessors). Can wrap around an expression, returning its value.
Conditional prt–eg, (ut::prt-if (?x 3) (?y ’abc) (ut::prt ’printing-x&y ?x ?y))
Modifies a referenced sequence by sorting it.
Loads a specified problem to be subsequently solved. This allows the user to verify/debug their problem specification, and check the current parameters, without asking wouldwork to solve it as run does. Once the problem loads correctly, it can then be solved with a follow-up (solve) command.
Validate a sequence of actions starting from *start-state*.
Usage:
(validate-solution
(move-to agent1 area2)
(pickup agent1 connector1)
(connect agent1 transmitter1 receiver3))
Options (must appear first):
:verbose - Show detailed diagnostic output for each action
Returns:
- The final state if all actions succeed and goal is satisfied
- The intermediate state if all actions succeed but goal not satisfied
- NIL if any action fails (with diagnostic output)
Output:
- On success: displays final state
- On partial success: displays intermediate state
- On failure: displays failed action, reason, and state at failure
Inserts debugging expressions when *debug* >= n, otherwise NIL
Execute BODY while holding the shard lock for STATE.
STATE must be a problem-state with idb-hash computed (or computable).
Multiple threads can execute concurrently if accessing different shards.
Execute BODY while holding the shard lock for SHARD-INDEX. Use when you have the shard index but not the full state.
Protects composite operations on *open* and *closed* search structures.
Macro to suppress normal compilation output while preserving error reporting.
Continue search from the final state of the previous solution.
Installs GOAL-FORM as the new goal and updates *start-state*.
Usage:
(solve) ; Solve initial goal
(ww-continue (loc agent area)) ; Set up continuation with new goal
(solve) ; Solve for new goal
Updates only the starting conditions:
- Previous goal state becomes new *start-state*
- New goal installed and compiled
- Heuristic re-applied to new start state
The next (solve) call will automatically reset all search counters
and initialize data structures as usual.
Allows resetting of user parameters during and after loading.
Stages and solves a user specified problem with default parameters.
Loads a specified problem to be subsequently solved. This allows the user to verify/debug their problem specification, and check the current parameters, without asking wouldwork to solve it as run does. Once the problem loads correctly, it can then be solved with a follow-up (solve) command.
Internal implementation of validate-solution.
Executes ACTION-LIST sequentially from *start-state*.
ACTION-LIST may be either:
- Plain actions: ((ACTION arg1 arg2) (ACTION2 arg1) ...)
- Timestamped actions: ((1.0 (ACTION arg1 arg2)) (2.0 (ACTION2 arg1)) ...)
If VERBOSE is true, shows diagnostic output for each action.
init.
name.
Add to absolute path an additional directory
Add to absolute path a filename
Adds NEW-PARENT to NODE’s parent slot for hybrid mode.
In hybrid mode, stores (parent-node . move) pairs; checks for duplicate parents.
In non-hybrid mode, stores just the parent node.
Thread-safe: uses locking when *threads* > 0.
Effectively adds an atomic proposition to the database.
Adds an atomic proposition and all its symmetries to the database.
Returns T if AGENT symbol name ends with asterisk.
Sum all worker statistics into global variables. Called after search.
Creates hap-state with happenings up through the action completion time for all happenings. Returns net-state = act-state + hap-state, and checks for constraint violation.
Apply a single action form to state.
Returns (values new-state success-p failure-reason).
ACTION-FORM is (action-name arg1 arg2 ...)
STATE is the current problem-state.
NEXT-ACTION-FORM is the following action (for multi-effect disambiguation) or nil.
VERBOSE if true shows diagnostic output.
Apply followup functions to state, modifying it in place. Followups are (function-name . args) pairs.
Apply a named configuration preset for common scenarios. PRESET can be: :default, :aggressive, :conservative, :debug
Compute mirror index for rebound. For :reverse mode patrollers,
reverses direction by jumping to the mirror event in the events array.
Mirror formula: for events array of length N, mirror of index I is (N - I).
Apply an update structure to a state, modifying it in place.
Compare effect-args with provided-args, treating combination-derived
positions as order-independent (set equality).
Returns T if arguments match, NIL otherwise.
Build list of all object constants requiring conversion.
Determines if installing a nongoal successor to the current node will be pointless, based on it being at the max allowable depth.
Recursive backtracking search over new states from assert clauses.
Use in forward search goal to check existence of backward path.
Used to sort a list of expanded states according to the user-defined heuristic.
Check if succ-state is better than the closed version. CALLER MUST HOLD THE APPROPRIATE SHARD LOCK in parallel mode.
Applies the bounding function, if there is one.
Create a new state by applying update to state.
Test an action by finding a valid instantiation and showing the effect.
:ADD is a list of propositions to add to the test state to satisfy preconditions.
Validates that fluent positions in bind statements use $var arguments.
Fluent positions (per relation definition) must use $var to receive bound values.
Checks a user action effect.
Detects an error in a ww translated form expression.
Validate the patroller specification.
Checks a user precondition action or logical parameter list.
Detects an error in the use of an unknown predicate.
Detects an error in a proposition–eg, (height block1 3) or (loc ?queen $row (1+ $col)).
Checks the validity of a call to a query or update function during translation–eg, (cleartop? ?block)
Detects an error in the supplied arguments to a user-defined query or update function–eg, (?queen $row $col).
Checks for errors in a user-defined relation–eg, (height ?obj $fixnum).
Check if goal is satisfied and report result.
Checks the validity (eg, spelling) of vars in an action rule.
act.
Chooses either #’equal or #’equalp as a test for *closed* ht (idb) keys.
Return true if item is from the common-lisp package.
Attempt to shutdown dangling threads safely in SBCL.
Delete temporary problem.lisp and vals.lisp files
Generates the appropriate key for *closed* hash table lookup/storage.
Standard mode: idb-hash (state identity only)
Hybrid mode: (cons idb-hash depth) for (state, depth) pair identity.
Return the hash table shard for STATE.
Caller should hold the shard lock via with-closed-shard-lock.
Return the mutex for STATE’s shard.
Return list of (shard-index . count) for non-empty shards. Useful for checking distribution quality.
Return total entry count across all closed shards.
Return total allocated size across all closed shards.
Collect items at given indexes from a list.
Collect best solution and state from current problem results
Verify default blocks3 runs properly if no prior problem.lisp or vals.lisp
Verify wouldwork properly switches to a new problem
Verify proper notification if requested problem file does not exist
Verify basic ww-set for *depth-cutoff* *tree-or-graph* *solution-type* *progress-reporting-interval* *randomize-search* *branch* *probe* *debug*
Compile all action preconditions/effects, queries, updates, goal, and constraint functions. Should only be called once during initialization.
Average branching on each cycle.
Compute how many nodes to donate based on stack size and donation fraction.
Compute total donation statistics across all workers. Returns (values total-nodes-donated total-donation-events).
Computes a fixnum hash from an idb hash table.
Uses XOR of sxhash values for deterministic hashing.
Compute the bound value for STATE at DEPTH based on *solution-type*. Returns value in ’lower is better’ convention.
Compute target number of tasks based on thread count.
Determines whether the input states violate a constraint or not.
Internal implementation of ww-continue.
Updates *start-state* and goal, then lets normal (solve) flow handle the rest.
Convert propositions in databases to integer keys and store in integer databases. This can be called multiple times to convert newly-added propositions.
Converts a statement form in an action–eg, (list ’loc ?jammer ?area) with no $vars to an integer key form for efficient db access.
Converts an idb partial prop -> index values into literal prop.
Thread-safe original version with narrower locking.
Only the create-new-code path runs under the lock; summing happens outside.
Memoized version for straightforward lookup
Converts an integer code back to a proposition.
Replace the content of target-file by the content of source-file.
Copy a set hash table (with t values).
Copies a Wouldwork database with thread-safe hash table in parallel mode.
Copies a problem-state but omits the idb field (leaves it as new empty hash table). Used when the idb will be immediately replaced with a different one.
Counts transitions between starred and unstarred agents in PATH.
Creates a new wait or non-wait state.
Prints the current database for state.
Use as (ut::prt (database state)) as diagnostic in rules & functions.
Stores a goal-reaching pair for deferred enumeration after search completes. Called in hybrid mode when a goal is reached.
Effectively removes an atomic proposition from the database.
Deletes named actions from *actions* at run-time.
Deletes the nth entry in a hash stack and returns it.
If a function prints to *standard-output*, then capture the output, otherwise return nil. Returns a fresh simple string to ensure consistent behavior.
Check if new-choice immediately undoes the last choice using set-based comparison
Performs expansion of one node from open. Returns
new successor nodes, (first), or nil if no new nodes generated.
Main search program.
Diagnose which clause in a precondition fails by evaluating each clause
in sequence. Reports the first failing clause with bindings substituted.
ACTION is the action structure.
PROVIDED-ARGS is the list of argument values from the action form.
STATE is the current problem-state.
Determines whether two symbols are different.
Returns pathname if the directory exists and is a directory. Currently only works with SBCL - but not CLISP!
Display current parallel search parameter settings.
Display timing breakdown from most recent parallel search.
Display a state in readable form.
Display per-worker statistics from most recent parallel search.
Returns a list of primitive eff-parameter variables and types.
Checks precondition of each init-action and applies updates.
For backtracking algorithm, uses incremental updates within each assert.
Convert all objects to integers, populate integer databases, and compile all functions. This is the main initialization function called during problem loading.
Determine if a hash stack is empty.
Ensures the idb-hash is computed and cached for the given state. Returns the state’s idb-hash.
Converts start state’s hash tables to synchronized versions for parallel mode. Must be called after init-start-state and before search begins.
Enumerates all paths from the start node to NODE.
Returns a list of paths, where each path is a list of (action instantiations) moves.
Paths are in forward order (start to node).
In hybrid mode, uses moves stored in (parent-node . move) pairs.
In standard mode with single parents, returns a single-element list.
Heuristic (h) for estimating distance to a goal state from this state; Return 0 to use no heuristic.
Receives possibly nested static or dynamic input from instantiate-type-spec, and evaluates it. Works with state, idb parameter.
Evaluate a single precondition clause against state.
Returns (values result new-$var-values) where result is T/NIL
and new-$var-values contains updated fluent bindings.
Copies problem file to src/problem.lisp so it will be compiled by asdf.
Returns the new states.
Return alternating plist of variable/type from input parameter list.
Extract NUM-TO-DONATE nodes from LOCAL-STACK for donation.
Preferentially extracts shallower nodes (larger subtrees).
Returns (values donated-nodes remaining-stack).
Strategy: Sort by depth, donate the shallowest half.
Extract effect variable values from precondition args and result. Maps precondition variables to effect variables.
Extracts the effect variable instantiation in canonical form for duplicate detection.
Extract the final goal state from most recent solution based on *solution-type*.
Splits a symbol, whose print name contains the delimiter #., into two symbols.
Computes f-value of current-node to see if it’s better than best solution so far.
Determines if a symbol has a given final character in its name.
Enumerates all solutions from stored goal-reaching pairs after search completes. Called once when all parent DAGs are fully constructed.
Post-process parallel search results for interface consistency.
Records the path depth of a path that terminates.
Extract variable groups from combination parameters in precondition-params. Returns a list of variable groups, e.g., ((?T1 ?T2)) for a 2-way combination. Handles nested parameter structures recursively.
Ignores variable symbols that are not in the lambda-body.
Quick equality test with *closed* for two hash tables with the same fixed keys. The equality predicate tests the hash table values, skipping the keys.
Determines if all relations have $var args, and thus have fixed keys idb.
Returns T if spec is or contains fluent variables.
Returns t if read mode has been explicitly forced via *proposition-read-mode*.
Removes a symbol from the current package.
Returns action name consed with instantiation values in effect-variables order.
Format milliseconds as appropriate time unit.
Return the alist of sequences with their respective counts, max first.
Returns the legitimate children of a state. Checks precondition of each action, and if true, then updates db according to action effects.
Generate choices by executing effect with incremental updates to *backtrack-state*. Effect modifies state, then changes are undone. Returns choices with forward/inverse ops.
Generates setf forms for binding fluent variables to retrieved values. Optimizes accessor patterns for common cases while handling arbitrary arity.
Generate all combinations of instances for a relation signature, where nil values represent fluent positions.
Produces a new node for a given successor.
In hybrid mode, stores parent as (parent-node . move) pair.
Collects new propositions for each prop in propositions.
Generate events for cycle mode traversal.
For path (a1 a2 a3 a4 a5), generates transitions:
a1→a2→a3→a4→a5→a1, then repeats.
The wrap-around segment (aN→a1) uses 1 time unit by default.
Generate the events array for a patroller based on mode. Returns a simple-vector compatible with the happening machinery.
Generate events for ping-pong (reverse) mode traversal.
For path (a1 a2 a3 a4 a5), generates transitions:
a1→a2→a3→a4→a5→a4→a3→a2→a1, then repeats.
Event format matches define-happening:
(cumulative-time (not (loc obj from)) (loc obj to))
Returns list of propositions generated from given proposition replacing items at indices with vars, respectively.
Generate initial task pool by expanding from START-NODE up to *split-depth-max*.
Returns list of nodes (tasks) at the split frontier.
Strategy: BFS-style expansion until we have enough tasks or hit depth limit.
Each task is a node that a worker will DFS from.
For graph search: tracks visited states in *closed* shards during generation.
Selects one each of non-special variables in the tree satisfying fn.
Selects one each of all variables in the tree satisfying fn.
Retrieves the bound ?vars from a code tree.
Retrieve the node stored in *closed* for hybrid mode.
CALLER MUST HOLD THE APPROPRIATE SHARD LOCK in parallel mode.
Retrieve the closed values for a state.
CALLER MUST HOLD THE APPROPRIATE SHARD LOCK in parallel mode.
Derives the complement proposition counterpart from a given proposition.
Determines appropriate database reference for proposition evaluation.
Handles static relations, dynamic relations, and happening contexts consistently.
Derives the fluentless proposition counterpart from a full proposition.
Derive the following happening update for an object.
Creates new states given current state and the new updates.
Returns the time of the next happening event, considering all objects.
Returns the node at the top of open.
Extracts the agent from a path element of form (time (action agent ...)).
Returns list of instantiations as arg list for a rule precondition.
Get precondition argument combinations, handling dynamic vs static actions.
Returns the fluent values in an arbitrary proposition.
Collects any special declared variables from tree.
User calls this after finding backwards *solutions*.
Return the stats structure for WORKER-ID.
Returns t or nil depending on if state is a goal state.
Called from generate-children when target action’s precondition succeeds. Traces each unique instantiation.
Determines if a key is present in ht.
Returns t if two hash tables have the same keys.
Determines if a state’s idb matches the contents of a key in open’s table. Uses idb-hash for O(1) lookup with idb verification for collision safety. In hybrid mode, also requires depth match (succ-depth must be provided). Returns the node in open or nil.
Shortcut to add filename to current package directory’s src folder
Return the initial value for *best-bound* based on *solution-type*. All optimization types use ’lower is better’ convention internally.
Returns a new child of state incorporating action updated-db list, or nil if repeating previous wait action.
Legacy compatibility: delegates to infrastructure module.
Legacy compatibility: no-op, locks are in shards now.
Create the vector of per-shard mutexes.
Initialize the sharded closed table infrastructure. HASH-TEST is ’equal (hybrid mode) or ’eql (standard mode). Creates N independent hash tables and N mutexes.
Checks constraints for hybrid graph search mode.
Returns T if hybrid mode should activate, NIL otherwise.
Prints diagnostic messages when *solution-type* is EVERY but constraints prevent hybrid mode.
Create fresh statistics structures for all workers.
Install a patroller as a happening with auto-generated events.
The patroller’s initial location must be specified separately via define-init.
Integration with existing happening machinery:
- Stores :events as simple-vector (same format as define-happening)
- Sets :repeat to t (patrollers always cycle)
- Registers in *happening-names* for compilation
- Interrupt lambda stored in :interrupt-lambda for compile-all-functions
Revised query function installation with read-only semantics
Installs a user-defined update function.
Update functions translate according to current *algorithm* setting.
Init-action processing (do-init-action-updates) handles both formats:
- Depth-first: changes as hash-table with integer keys
- Backtracking: changes as list of (forward inverse) pairs
Given the pre-type-spec from dissect-pre-params,
eg (product gate (get-remaining? ladder) (product fan fan)),
instantiate all of the included types,
eg (product (gate1 gate2) (get-remaining? ladder) (product (fan1 fan2) (fan1 fan2))).
Inserts a + sign between list items.
Interns a symbol created by concatenating args. Based on symb in Let Over Lambda.
Determines if the interrupt function for object is satisfied in this state; eg, if the object is currently being jammed, and therefore disabled.
Returns a list with element inserted at odd indexed locations.
Hook: Check if we have reached a complete solution
Determines if the kill condition for object is satisfied in this state; eg, if a mine has moved into the agent’s location, killing them.
Determines if a symbol is a valid Common Lisp type.
List all problem names in the problem folder. One-per-line: (list-all t) or (list-all :pretty)
Used to printout idb in propositional form.
Return a plist of files in the ’src’ directory that start with ’problem-’.
The key is the filename without ’problem-’ and ’.lisp’.
The value is the full path of the file. Uses the root directory of the ’wouldwork’ system.
Given a problem-name, replace the content of the problem.lisp file by the content of the correponsing problem file, and then reload everything.
Key value lookup in plist with #’string= or any other function as test. The plist-related getf can only handle eql.
Removes prefix from str (only 1x).
Makes a wouldwork hash-table that works as a set container for the user.
Create a new task queue with specified initial size.
Returns a new tree with all atoms replaced by the value of fn.
Check if donation is appropriate and donate if so.
Returns the (possibly reduced) local stack.
Donation occurs when:
1. Work donation is enabled
2. Queue needs work (empty)
3. Local stack exceeds threshold
4. Search is not terminating
Report progress if enough time has passed. Only one worker reports at a time.
Merges the two databases of state.
Adds an item to list of items sorted.
Enhanced narration function with refined progressive debug level disclosure
Check if action with given args can execute from state.
Destructively inserts new element in a list at given position. For position 0, returns new list with element prepended. For position > length, extends list with NILs then inserts.
Check if NODE can possibly lead to a solution better than LOCAL-BOUND.
Uses optimistic estimate (current depth/value as lower bound on final solution).
Returns T if worth exploring, NIL if should prune.
Returns the parent entries of NODE for hybrid mode path enumeration.
Returns list of (parent-node . move) pairs.
Only valid in hybrid mode; returns nil otherwise.
Returns the parent node(s) of NODE as a list.
Normalizes access for both standard mode (single parent) and hybrid mode (parent-move pairs).
In hybrid mode, extracts just the parent nodes from (parent-node . move) pairs.
Gets the idb of a node.
Gets the cached idb-hash of a node’s state.
Strips $ prefix from fluent specifications.
Determines if a successor is already on the current path from the start state.
Uses cached idb-hash for O(1) comparison with equalp verification on hash collision.
Display help information for parallel search configuration.
Main worker loop: fetch tasks and perform local DFS. May also receive donated work from other workers. Returns when no more tasks available.
Parse the slot-value pairs from define-patroller into a plist. Recognized slots: path, mode, timings, interrupt, rebound, kill
Extract problem name from filename (e.g., ’problem-blocks3.lisp’ -> ’blocks3’)
Pops an element from hstack’s vector and removes it from the table. Error if hstk empty.
Prints delta for depth-first algorithm (hash-table format).
Prints a hash table line by line.
Prints delta for backtracking algorithm (list format).
Format is (forward-list inverse-list) where forward-list contains
propositions or (not proposition) forms.
Prints optimal solutions from SOLUTIONS list.
Optimal solutions: (1) begin with unstarred agent, (2) minimize agent switches.
Requires all solutions to have the same depth.
Print search progress using appropriate global variables
Prints the difference between initial state and updated state.
Prints all propositions in the state.
Print test header for a problem
Printout of nodes expanded so far during search modulo reporting interval.
Breaks when the current node matches action name, instantiations, depth, and count from start–eg, (put (a b) 1).
hidb.
idb.
name.
time.
Triggering forms are saved previously during effect apply.
Determines if succ-state value is an improvement, and if so updates *best-states*.
Main entry point for partitioned parallel search.
Generates tasks, spawns workers, waits for completion, aggregates results.
Installs sequences of run-length in a solution into a hash table.
Processes successor states: checks goals, handles duplicates, generates nodes. In hybrid mode, accumulates parent pointers for multi-path enumeration.
Deterministically profiles Wouldwork.
Prompt user for Continue/Skip/All/Quit. Returns (values should-process continue-all)
Comparison function for sorting propositions by predicate name.
Pushes an element onto hstack’s vector and table. Returns the hstack and whether the element was added.
Load critical initialization parameters from vals.lisp if it exists.
Sets *problem-name*, *algorithm*, and *debug* for proper loading.
Returns the problem-name string for eval-when path construction, or nil if file absent.
Determines if a rebound condition is satisfied in this state.
Reconstruct the solution path from the choice stack with correct cumulative time
Returns some user-friendly representation of the move from the parent state to the current state.
Recovers a path from a goal node back to the start node following parent links.
Refreshes the current problem.lisp file–eg, after editing it. Preserves REPL-set parameters not overridden in the problem file.
Register a choice by applying its forward operations to *backtrack-state*.
Registers a dynamically-created object in the integer constants system
and adds the type proposition to the static database.
This function MUST be called immediately after creating any dynamic object
(via intern, gensym, etc.) and BEFORE using it in any propositions.
Purpose:
- Assigns an integer code enabling database lookups for the new object
- Creates type proposition (type-name object) in *static-idb*
- Makes the object discoverable via type queries (e.g., (beam ?b))
- Ensures thread-safe registration in parallel search environments
Parameters:
- object: The dynamically-created symbol (e.g., BEAM3)
- type-name: The type it belongs to (e.g., BEAM)
Returns: The registered object (for convenient chaining)
Example Usage:
(setq $new-beam (intern (format nil "BEAM~D" $index)))
(register-dynamic-object $new-beam ’beam)
;; Now $new-beam can be safely used in propositions like:
;; (beam-segment $new-beam ?source ?target $x $y)
Thread-safe solution registration during parallel search.
Updates *solutions*, *unique-solutions*, and *best-bound* as needed.
Inserts a new solution on the list of *solutions*.
Register a solution found via backtracking using the choice stack
Removes items at given indexes from a list.
Report mismatches between $var values bound from database evaluation
vs. values provided in the action form.
$VARS is the list of fluent variable names from precondition.
$VAR-VALUES is the list of values bound during clause evaluation.
EFFECT-VARS is the list of effect variable names.
PROVIDED-ARGS is the list of values from the action form.
Print current search progress aggregated across workers.
Report mismatches between provided argument values and actual bound values.
ACTION is the action structure.
PROVIDED-ARGS is the list of values from the action form.
ACTUAL-EFFECT-ARGS is the effect-args extracted from a passing precondition.
Report a validation failure with diagnostics.
Clear all global hash tables and reset global lists between problem loads.
Critical for parallel mode where sb-ext:defglobal prevents reinitialization.
In parallel mode (*threads* > 0), define-global uses sb-ext:defglobal which
only evaluates initialization forms ONCE. On subsequent ASDF reloads, the
variables remain bound to their previous values, causing state contamination
between sequential problem loads.
This function must execute at top-level in ww-preliminaries.lisp so it runs
on every system reload, before problem files populate the hash tables with
new data.
Reset all parallel control flags for a new search.
Resets global parameters to defaults
Unintern symbols and unbind any functions stored in function name lists.
Retrieves one or more objects from a file.
Updates a database given a simple list of atomic propositions.
Removes suffix from str (only 1x).
Saves an object to a file so it can be read in later.
Save current state after ww-continue completes modifications. Captures continuation *start-state* and *goal* for potential undo.
Main entry point for backtracking search with algorithm-compatible processing
Branch & Bound DFS serial search.
Select the effect that is consistent with the next action.
If only one effect, return it.
If multiple effects and no next action, try goal satisfaction.
If multiple effects with next action, find one that enables next action.
Returns a new hash table that represents the set difference of HT1 and HT2.
Compute shard index from hash value using bitmask.
Compute shard index for a problem state.
Call to simplify debugger printout on a break.
Returns T if NEW-SOLN is better than OLD-SOLN based on *solution-type*.
Compare solutions for equivalence by goal state.
goal.
path.
time.
Alphabetically sorts the ’either’ types in a relation.
Sorts a list of symbols alphabetically.
Returns T if NEW-BOUND is better than CURRENT-BOUND. Both values should be in ’lower is better’ convention.
Return T if PREFIX is a prefix of STR, otherwise NIL.
Return T if SUFFIX is a suffix of STR, otherwise NIL.
Removes prefix and suffix from str.
Recursively substitute bindings in form.
Substitutes for elements at given indexes in a list. Indexes & items must correspond and be in ascending order.
Substitute variable bindings into a form for display. Replaces ?vars and $vars with their corresponding values.
Returns the set of type indexes for the multi-types of a symmetric relation.
Run standard test suite using depth-first search.
Run test problems using backtracking algorithm to certify backtracking functionality. This parallels the standard test function but forces *algorithm* to backtracking.
Run a series of tests to exercise potential user REPL commands.
Legacy compatibility: returns 0 since we don’t track global frontier.
Returns T if queue has no items. Caller should hold lock.
Double the queue buffer size. Caller must hold lock.
Check if the task queue needs work (empty or nearly empty). Non-blocking check for donation decisions.
Push ITEM onto the queue. Thread-safe, grows buffer if needed.
Push multiple ITEMS onto the queue efficiently. Thread-safe.
Register a worker as active. Call before worker starts processing.
Signal that no more tasks will be added. Wake all waiting workers.
Non-blocking pop. Returns (values item t) or (values nil nil). Thread-safe.
Check if any workers are waiting for work.
Returns T if active-workers < total workers expected.
Runs search until ACTION-NAME’s precondition succeeds, then traces a unique instantiation. User can interrupt search at any time with Ctrl-C.
Traces a single action instantiation from current state through final delta.
Beginning translator for all forms in actions.
For depth-first, translates an assert statement with selective write-mode context.
For backtracking with incremental updates, translates an assert statement. Applies updates directly to state (incremental) while tracking both forward and inverse operations.
Revised binding translation with unified state reference strategy.
Translates binding operations like (bind (loc ?obj $area)) where fluent variables
get bound to values retrieved from the database. Always performs read-only queries
regardless of syntactic context.
Returns:
- t if proposition found and variables successfully bound
- nil if proposition not found in database
Side effects:
- Sets fluent variables to corresponding values from retrieved proposition
Translates a case statement.
Translates a cond statement by converting to nested if statements.
Each cond clause (test result1 result2 ...) becomes an if branch.
Leverages translate-conditional for all semantic complexity.
Structure: (cond (test1 result1...) (test2 result2...) ...)
Translation strategy:
- Recursively converts clauses to nested if statements from back to front
- Multiple result forms wrapped in do (translates to progn)
- Bare test clauses return test value if true (standard CL semantics)
- Final else defaults to nil
- Delegates all context handling to translate-conditional
Conditional translation with proper read-mode isolation.
Translates logical connectives (and, or, etc.) by recursively translating all operands
with consistent context propagation. Preserves the original connective structure while
ensuring each operand is translated according to the current context flag.
Context Behaviors:
- pre: All operands become read operations against original state
- eff: All operands follow read/write determination based on syntactic context
Read-mode propagation: Connectives preserve current *proposition-read-mode* context,
allowing sub-forms to make appropriate read/write decisions.
Examples:
(and (connected ?a ?b) (color ?a blue))
→ Precondition: Both operands query state
→ Effect: Both operands update state (unless in read-mode)
Translates a simple set of clauses.
DOALL translation with translation-time quantifier context.
Translates equivalence by forcing read operations on all operands
Existential translation with context-dependent semantics.
Pre: Query semantics returning T/NIL based on satisfaction
Eff: Assertion semantics - assert first satisfying instantiation
Translates propositions with fluents using standardized database reference.
Corrected function call translation with robust update function detection
Translates a let clause, including binding forms.
Most basic form translation.
Translates a multiple-value-setq clause.
Always returns t to maintain logical continuation semantics.
Unified negative relation translation with incremental updates for backtracking.
Unified positive relation translation with context-aware read/write determination. For backtracking: applies changes incrementally while tracking forward and inverse.
Translates a print statement for debugging actions.
Distinguishes fluent from non-fluent propositions.
Translates a setq statement. Used to assign a variable the value of a function. Always returns t, even if nil is assigned.
Example usage of get-state-reference with proper database selection logic.
Eg, (velocity ?car wheel1 50) -> (list ’velocity ?car ’wheel1 50) with no fluents.
Universal translation with translation-time quantifier context.
WW-loop translation with translation-time context override.
Regroups all first elements together, second elements together, etc into a new list-of-lists. Changes instantiate-types into arg format for some, every, etc. ((a b) (c d) (e f)) -> ((a c e) (b d f))
Trims the first character from a symbol–eg, $block -> block.
goal.
Undo a choice from the current state with time reversal and stack management
Unions two hash tables keys. Assumes values are all t and have the same :test function.
For depth-first, single add or delete from db. Returns the literal for change tracking.
For backtracking, single add or delete from db.
Returns the update proposition as first value.
For fluent updates, returns the previous literal as second value.
Robust update function detection using multiple criteria
Returns T if update contains the inconsistent-state marker.
Handles both depth-first (hash-table) and backtracking (list) representations.
Determines if f-value of successor is better than open state, and updates it.
Update *start-state* with all components from goal-state. Preserves temporal continuity: time, happenings, databases.
Update search statistics.
Determines if a symbol is either a user-defined type or a lisp type.
Validates bind form structure and proposition format. Ensures proper syntax before translation proceeds.
Verify system state allows continuation.
Validate all registered global invariants on the given succ-state.
Returns T if all invariants pass, NIL if any fail.
If current-node is nil, this is a start state validation.
Validate parallel search settings and report any issues. Returns T if all settings are valid, NIL if issues found.
Checks if start state contains inconsistent-state marker. Errors out if initial state failed to converge.
Turns a list of lists into vector vectors.
Apply fun to each cons and atom in tree.
Perform complete DFS subtree search starting from TASK-NODE.
Uses local stack. Updates STATS (worker-local, no locking).
May donate work back to TASK-QUEUE when other workers are starving.
Returns when subtree exhausted or termination signaled.
Process successor states with full graph search support.
Returns list of new successor nodes, or ’FIRST-FOUND.
For tree search: cycle detection on current path only.
For graph search: sharded closed table with atomic check+update.
Returns t if we should perform write operations (database updates).
Write operations occur in effect contexts unless read mode is explicitly forced.
Record a terminated path at DEPTH.
Increment program-cycles for worker.
Increment repeated-states for worker.
Increment solutions-found for worker.
Increment states-processed for worker.
Update max-depth if DEPTH is greater.
Delete problem.lisp, then reload wouldwork with default problem.
Runs a branch & bound search on the problem specification.
Restore state from most recent ww-continue.
Allows user to adjust parameters and retry from the same point.
Can be called multiple times to retry different approaches.
Displays an object in a user-friendly format.
structure-object.
symbol
symbol
symbol
real
0.0
list
list
list
list
list
(or list symbol)
list
(member nil t)
list
list
list
list
list
list
Represents a choice point in backtracking search
An hstack (hash stack) is a functional stack containing an adjustable one-dimensional array of elements, plus a hash table for quickly determining if an element is in the stack. Keyfn is applied to elements to access the hash table. New elements are pushed at the fill-pointer, and popped at the fill-pointer minus 1.
structure-object.
common-lisp.
(array * (*))
(make-array 0 :adjustable t :fill-pointer t)
(make-hash-table)
function
(function identity)
structure-object.
wouldwork::problem-state
(wouldwork::make-problem-state)
fixnum
0
(or null wouldwork::node list)
Timing breakdown for parallel search phases.
structure-object.
fixnum
0
fixnum
0
fixnum
0
fixnum
0
A planning state including the current propositional database.
structure-object.
symbol
list
list
common-lisp.
real
0.0
real
0.0
real
0.0
hash-table
(make-hash-table)
hash-table
(make-hash-table)
(or null fixnum)
The record of a solution.
structure-object.
fixnum
0
common-lisp.
real
0.0
real
0.0
list
wouldwork::problem-state
(wouldwork::make-problem-state)
Thread-safe task queue with blocking pop capability.
structure-object.
simple-vector
(make-array wouldwork::+initial-task-queue-size+ :initial-element nil)
fixnum
0
fixnum
0
common-lisp.
fixnum
0
(sb-thread:make-mutex :name "task-queue-mutex")
(sb-thread:make-waitqueue :name "task-queue-waitqueue")
boolean
fixnum
0
Saved state for goal-chaining undo.
Db updates resulting from a successful action instantiation.
Per-worker statistics accumulated during search.
structure-object.
fixnum
0
fixnum
0
fixnum
0
fixnum
0
fixnum
0
fixnum
0
fixnum
0
fixnum
0
fixnum
0
| Jump to: | $
%
(
?
A B C D E F G H I K L M N O P R S T U V W |
|---|
| Jump to: | $
%
(
?
A B C D E F G H I K L M N O P R S T U V W |
|---|
| Jump to: | *
+
A B C D E F G H I K L M N P R S T V W |
|---|
| Jump to: | *
+
A B C D E F G H I K L M N P R S T V W |
|---|
| Jump to: | A C F H M N P S T U W |
|---|
| Jump to: | A C F H M N P S T U W |
|---|