Commit cc36c3e
committed
Release v1.0.0: constant refutation replaces is_leaf_sig
Promotes FunctionProperties to a stable 1.0 public API surface -- `hasbranching`
and `is_leaf` -- and makes constant-propagation-aware analysis the single
mechanism for suppressing value-independent branches.
Analysis change (follow-up to #62): the type recursion is the source of truth;
when it reports a branch inside a call carrying `Core.Const` arguments, the callee
is re-inferred with those constants preserved (no optimizer, so no
library/structural branches are inlined into view) and, only if that folds the
branch, the finding is refuted. This is a strict refinement -- it can only
downgrade a reported branch to branch-free -- so it adds no false positives on
arbitrary code (broadcast, ComponentArrays), unlike a "run const-prop everywhere"
approach. It replaces the `is_leaf_sig` hook, so no per-container override is
needed (e.g. split-mode MTK `getindex(::MTKParameters, ::Int)`).
The refutation uses `Base.Compiler`/`Core.Compiler` internals whose API differs
across versions, so it is functionally gated: a probe folds a constant-decided
branch fixture at first use and only activates if the fold works; otherwise, and
on any inference failure, the analysis is exactly the plain type recursion.
Verified: lts 1.10.11 (gated off), 1.12.6, 1.13.0-rc1 all green; MTK RHS table
correct through the `ODEFunction` with no container-specific overrides; docs build
clean.
Also fixes the docs config: `deploydocs` pointed at MultiScaleArrays.jl, and the
docs environment pinned `FunctionProperties = "0.1.2"`.
BREAKING (1.0.0): removes the exported `is_leaf_sig` (public in 0.1.7).
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>1 parent 1be96a2 commit cc36c3e
6 files changed
Lines changed: 266 additions & 71 deletions
File tree
- docs
- src/assets
- src
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments