Skip to content

Extract the analysis layer, centralize defaults, add a panel view#43

Merged
fpedd merged 1 commit into
mainfrom
refactor/analysis-layer
Jul 17, 2026
Merged

Extract the analysis layer, centralize defaults, add a panel view#43
fpedd merged 1 commit into
mainfrom
refactor/analysis-layer

Conversation

@fpedd

@fpedd fpedd commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Move the exact happens-before queries out of primitives/ into a new
analysis/ package on both language sides: conflicts, linearize,
pressure, and the clock helpers in Python; antichain, closure,
linearize, placement, and clock.hpp (ex clock_rows.hpp) in C++.
primitives/ is now strictly the System/Memory/Pool/Allocation
hierarchy, and the conflict kernels leave allocators/first_fit for the
new analysis/conflicts.{hpp,cpp}, gaining budgeted faces
(get_conflicts, get_conflict_degrees) that give up (None) instead of
stalling once a work budget is exceeded.

Make the _cpp boundary default-free: every nanobind parameter is
explicit and Python owns all defaults in common/constants.py
(DEFAULT_TIMEOUT/SEED/WORK_BUDGET/CLOSURE_CAP plus the units absorbed
from common/units.py), so a value can never drift between the
languages. Timeouts follow one None-disables convention end to end —
float | None over std::optional, with make_deadline throwing on
a non-positive or non-finite set value even for raw-binding callers —
via the new common/deadline helpers mirrored in Python and C++.
OmniAllocator gains a validated linearize_budget (None = always
decide); minimalloc rounds its whole-second budget up instead of
truncating; the supermalloc deadline starts after partition setup so
the budget covers greedy + search only.

Rework plot_allocation around explicit views: the new default "panel"
draws each memory once over a happens-before-monotone virtual time
(exact for scalar or linearizable lifetimes, else a sound
clock-component-sum projection annotated with its conflict coverage),
and "lanes" keeps the per-thread projection with an optional max_lanes
top-k cap by definite-occupancy peak.

Move the exact happens-before queries out of primitives/ into a new
analysis/ package on both language sides: conflicts, linearize,
pressure, and the clock helpers in Python; antichain, closure,
linearize, placement, and clock.hpp (ex clock_rows.hpp) in C++.
primitives/ is now strictly the System/Memory/Pool/Allocation
hierarchy, and the conflict kernels leave allocators/first_fit for the
new analysis/conflicts.{hpp,cpp}, gaining budgeted faces
(get_conflicts, get_conflict_degrees) that give up (None) instead of
stalling once a work budget is exceeded.

Make the _cpp boundary default-free: every nanobind parameter is
explicit and Python owns all defaults in common/constants.py
(DEFAULT_TIMEOUT/SEED/WORK_BUDGET/CLOSURE_CAP plus the units absorbed
from common/units.py), so a value can never drift between the
languages. Timeouts follow one None-disables convention end to end —
float | None over std::optional<double>, with make_deadline throwing on
a non-positive or non-finite set value even for raw-binding callers —
via the new common/deadline helpers mirrored in Python and C++.
OmniAllocator gains a validated linearize_budget (None = always
decide); minimalloc rounds its whole-second budget up instead of
truncating; the supermalloc deadline starts after partition setup so
the budget covers greedy + search only.

Rework plot_allocation around explicit views: the new default "panel"
draws each memory once over a happens-before-monotone virtual time
(exact for scalar or linearizable lifetimes, else a sound
clock-component-sum projection annotated with its conflict coverage),
and "lanes" keeps the per-thread projection with an optional max_lanes
top-k cap by definite-occupancy peak.
@fpedd
fpedd merged commit 29ec567 into main Jul 17, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant