Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions artifacts/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1669,6 +1669,29 @@ artifacts:
status: implemented
tags: [network, wctt, rta, coupling, v092]

- id: REQ-NETWORK-014
type: requirement
title: PMOO/LUDB bound for tree-shaped multiplexing
description: >
v0.9.3 adds an opt-in Pay-Multiplexing-Only-Once / Bisti-LUDB
("Linear Upper Delay Bound") path in `spar-network::pmoo` that
the `WcttAnalysis` pass invokes when (a) the stream's tandem is
composed entirely of FIFO/Priority switches, (b) every other
stream that crosses any hop on the tandem does so on a contiguous
sub-path (PMOO precondition), and (c) ≥ 2 such competing flows
exist (otherwise PMOO ≡ SFA). The LP is set up via `good_lp` with
the HiGHS backend already vendored for the deployment solver;
on infeasibility (`Σ ρ ≥ R_h` at any hop) we silently fall back
to per-hop SFA. New `WcttPmooBound` Info diagnostic reports the
method (=ludb), the PMOO delay, the SFA delay for comparison,
the percentage tightening, and the LP solve time. Closes the
external reviewer's NC top-5 #2 (credibility gap with RTaW-Pegase):
typical 30-60% tightening on automotive zonal aggregations,
observed 23-27% on the in-tree fixtures. CLI `--pmoo` flag opts
in; default off → byte-identical to v0.9.2.
status: implemented
tags: [network, wctt, pmoo, ludb, lp, v093]

# ── Track G: spar-insight discrepancy assistant (v0.9.0) ──────────

- id: REQ-INSIGHT-001
Expand Down
31 changes: 31 additions & 0 deletions artifacts/verification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2200,6 +2200,37 @@ artifacts:
- type: satisfies
target: REQ-NETWORK-011

- id: TEST-NC-PMOO
type: feature
title: PMOO/LUDB bound is tighter than SFA for tree-shaped multiplexing
description: >
Ten unit tests in `spar-network/src/pmoo.rs` plus two CLI-flag
round-trip tests in `spar-analysis/src/wctt.rs` exercise the
v0.9.3 PMOO/LUDB path. The PMOO unit tests cover: (a) single-hop
no-competing baseline (PMOO ≡ SFA), (b) 2-hop tandem 1 competing
flow joining at hop 2 (PMOO ≤ SFA, strictly tighter on the
fixture), (c) 3-hop / 3-competing convergent fixture (PMOO ≪ SFA,
≥ 5 % tightening asserted; observed 27.4 %), (d) LP infeasibility
surfaces as `Err(LpError::Infeasible)` for SFA fallback,
(e) empty-path / out-of-range / non-contiguous validation, (f) LP
model size and solve-time reporting, (g) single-flow tandem
reduces to "pay-burst-once" closed form, (h) the canonical
automotive-zonal 5-source pattern (observed 23.7 % tightening).
CLI round-trip tests confirm `WcttPmooBound` only fires with the
`--pmoo` flag (`pmoo_flag_off_emits_no_pmoo_diagnostic` and
`pmoo_flag_on_emits_pmoo_diagnostic_for_eligible_streams`),
preserving v0.9.2 byte-identical default output.
fields:
method: automated-test
steps:
- run: cargo test -p spar-network --lib -- pmoo
- run: cargo test -p spar-analysis --lib -- pmoo_flag
status: passing
tags: [v0.9.3, network, wctt, pmoo, ludb, lp]
links:
- type: satisfies
target: REQ-NETWORK-014

- id: TEST-INSIGHT-DISCREPANCY
type: feature
title: spar-insight CTF parser + 5-kind discrepancy detection
Expand Down
72 changes: 71 additions & 1 deletion crates/spar-analysis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,77 @@
self.register(Box::new(WeightPowerAnalysis));
self.register(Box::new(BusBandwidthAnalysis));
self.register(Box::new(FeatureGroupCheckAnalysis));
self.register(Box::new(WcttAnalysis));
self.register(Box::new(WcttAnalysis::default()));
}

/// Register all instance-level analyses **except** [`wctt::WcttAnalysis`].
///
/// Used by the CLI's `--pmoo` flag path to register a custom-
/// configured `WcttAnalysis` (with PMOO/LUDB enabled) without
/// duplicating the v0.9.2 SFA pass. See
/// `spar-cli/src/main.rs::run_all_analyses_with_pmoo`.
pub fn register_all_except_wctt(&mut self) {
use ai_ml::AiMlAnalysis;
use arinc653::Arinc653Analysis;
use binding_check::BindingCheckAnalysis;
use binding_rules::BindingRuleAnalysis;
use bus_bandwidth::BusBandwidthAnalysis;
use classifier_match::ClassifierMatchAnalysis;
use completeness::CompletenessAnalysis;
use connection_rules::ConnectionRuleAnalysis;
use connectivity::ConnectivityAnalysis;
use direction_rules::DirectionRuleAnalysis;
use emv2_analysis::Emv2Analysis;
use emv2_stpa_bridge::Emv2StpaBridgeAnalysis;
use feature_group_check::FeatureGroupCheckAnalysis;
use flow_check::FlowCheckAnalysis;
use flow_rules::FlowRuleAnalysis;
use hierarchy::HierarchyAnalysis;
use latency::LatencyAnalysis;
use memory_budget::MemoryBudgetAnalysis;
use modal_rules::ModalRuleAnalysis;
use mode_check::ModeCheckAnalysis;
use mode_reachability::ModeReachabilityAnalysis;
use mode_rules::ModeRuleAnalysis;
use property_rules::PropertyRuleAnalysis;
use resource_budget::ResourceBudgetAnalysis;
use rta::RtaAnalysis;
use scheduling::SchedulingAnalysis;
use subcomponent_rules::SubcomponentRuleAnalysis;
use weight_power::WeightPowerAnalysis;
use wrpc_binding::WrpcBindingAnalysis;

self.register(Box::new(AiMlAnalysis));
self.register(Box::new(ConnectivityAnalysis));
self.register(Box::new(HierarchyAnalysis));
self.register(Box::new(CompletenessAnalysis));
self.register(Box::new(DirectionRuleAnalysis));
self.register(Box::new(ClassifierMatchAnalysis));
self.register(Box::new(BindingCheckAnalysis));
self.register(Box::new(BindingRuleAnalysis));
self.register(Box::new(FlowCheckAnalysis));
self.register(Box::new(FlowRuleAnalysis));
self.register(Box::new(ModeCheckAnalysis));
self.register(Box::new(ModeRuleAnalysis));
self.register(Box::new(ModalRuleAnalysis));
self.register(Box::new(PropertyRuleAnalysis));
self.register(Box::new(ConnectionRuleAnalysis));
self.register(Box::new(SubcomponentRuleAnalysis));
self.register(Box::new(SchedulingAnalysis));
self.register(Box::new(RtaAnalysis));
self.register(Box::new(LatencyAnalysis));
self.register(Box::new(MemoryBudgetAnalysis));
self.register(Box::new(ResourceBudgetAnalysis));
self.register(Box::new(Emv2Analysis));
self.register(Box::new(Emv2StpaBridgeAnalysis));
self.register(Box::new(Arinc653Analysis));
self.register(Box::new(WrpcBindingAnalysis));
self.register(Box::new(ModeReachabilityAnalysis));
self.register(Box::new(WeightPowerAnalysis));
self.register(Box::new(BusBandwidthAnalysis));
self.register(Box::new(FeatureGroupCheckAnalysis));

Check warning on line 266 in crates/spar-analysis/src/lib.rs

View workflow job for this annotation

GitHub Actions / Mutation Testing

Missed mutant

replace AnalysisRunner::register_all_except_wctt with ()
// WcttAnalysis intentionally omitted — caller registers a
// PMOO-configured variant.
}

/// Return the number of registered analyses.
Expand Down
Loading
Loading