Skip to main content

Module extract

Module extract 

Source
Expand description

Bottom-up cost extraction (cycle-tolerant).

LogosCost is a static per-op estimate tuned to the VM/JIT tier: shifts, adds and compares are unit ops; multiply is a few; divide/modulo are an order worse. Costs propagate to a per-class fixpoint — cyclic classes (x ≡ x + 0) simply never beat their finite leaf, so extraction always terminates with a finite tree.

Structs§

ExtractTree

Functions§

best_tree
The cheapest finite tree representing root’s class.
best_tree_filtered
The cheapest finite tree whose every node passes admissible, or None when no such tree exists (the caller keeps the original expression).