Reference · The Applied Higher-Order Functions catalogue
rainbow.algorithms.proofs.ahof.astar-falsification
AHoF V18 A* for Falsification: search the space of system behaviours for a specification violation using A*, ordering the frontier by the f-cost f = g + h (the cost so far plus an admissible heuristic to a likely violation) and always expanding the lowest-f node: priority g h = g + h prefers-lower? f0 f1 = decide (f0 <= f1) expand-value f0 f1 = if (f0 <= f1) then f0 else f1 (the lower f-cost) over exact rationals. Proved native and axiom-free: the priority sum (1/2 + 1/4 = 3/4 by cross-product equivalence), the min-f frontier selection, and the preference decision. Requires nnrat/add, audit/decide-nnrat-at-most, logic/if-data, nnrat/equivalent (all in the D63 checkpoint). Scope (measured by the kernel): this module has 3 worked instances (statements about specific values). None of its theorems is a guarantee about the algorithm for all inputs; `lein verify rainbow.algorithms.proofs.ahof.astar-falsification` prints this classification.
astar-fal/priority
astar-fal/priority : (x₁ x₂ : ℚ≥0) → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
astar-fal/prefers-lower?
astar-fal/prefers-lower? : (x₁ x₂ : ℚ≥0) → data/Bool
ℚ≥0 = nnrat/NonnegativeRational
astar-fal/expand-value
astar-fal/expand-value : (x₁ x₂ : ℚ≥0) → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
astar-fal/worked-priority
astar-fal/worked-priority : → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
astar-fal/priority-is-three-quarters
astar-fal/priority-is-three-quarters : → astar-fal/worked-priority = 3/4
= = nnrat/equivalent: equality of rational values
astar-fal/expands-lower-f
astar-fal/expands-lower-f : → astar-fal/expand-value 3/4 1 = 3/4
= = equality/Eq
astar-fal/prefers-lower-example
astar-fal/prefers-lower-example : → search/poll-improves 3/4 1 = data/true
= = equality/Eq