Extract the analysis layer, centralize defaults, add a panel view#43
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.