branchproof 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +53 -0
  3. data/README.md +255 -21
  4. data/doc/Branchproof/Analyzer.md +2 -2
  5. data/doc/Branchproof/CLI.md +4 -0
  6. data/doc/Branchproof/ComparisonReport.md +4 -0
  7. data/doc/Branchproof/Constraints/Solver.md +21 -0
  8. data/doc/Branchproof/Constraints.md +98 -0
  9. data/doc/Branchproof/CoverageIndex.md +3 -0
  10. data/doc/Branchproof/DecisionSyntax.md +6 -4
  11. data/doc/Branchproof/DecisionTable.md +153 -0
  12. data/doc/Branchproof/DefaultInstrumentation.md +13 -0
  13. data/doc/Branchproof/DefaultRuntime.md +11 -0
  14. data/doc/Branchproof/DefaultSyntax.md +7 -0
  15. data/doc/Branchproof/ExceptionInstrumentation.md +9 -0
  16. data/doc/Branchproof/ExceptionRuntime.md +27 -0
  17. data/doc/Branchproof/ExceptionSyntax.md +9 -0
  18. data/doc/Branchproof/ExtendedAlternativeRuntime.md +19 -0
  19. data/doc/Branchproof/FocusedReport.md +5 -2
  20. data/doc/Branchproof/Instrumenter.md +1 -1
  21. data/doc/Branchproof/IterationInstrumentation.md +7 -0
  22. data/doc/Branchproof/IterationRuntime.md +21 -0
  23. data/doc/Branchproof/IterationSyntax.md +11 -0
  24. data/doc/Branchproof/Loader.md +0 -4
  25. data/doc/Branchproof/MinitestAdapter.md +0 -3
  26. data/doc/Branchproof/Report.md +18 -0
  27. data/doc/Branchproof/Runtime.md +60 -1
  28. data/doc/Branchproof/SavedReport.md +15 -0
  29. data/doc/Branchproof/Source.md +7 -1
  30. data/doc/Branchproof/ValueInstrumentation.md +7 -0
  31. data/doc/Branchproof/ValueRuntime.md +26 -0
  32. data/doc/Branchproof/ValueSyntax.md +26 -0
  33. data/doc/Branchproof.md +20 -3
  34. data/doc/CHANGELOG.md +53 -0
  35. data/doc/README.md +255 -21
  36. data/lib/branchproof/analyzer.rb +80 -44
  37. data/lib/branchproof/cli.rb +28 -19
  38. data/lib/branchproof/comparison.rb +207 -19
  39. data/lib/branchproof/comparison_report.rb +49 -1
  40. data/lib/branchproof/constraints.rb +363 -0
  41. data/lib/branchproof/coverage_index.rb +30 -1
  42. data/lib/branchproof/decision_syntax.rb +50 -24
  43. data/lib/branchproof/decision_table.rb +377 -0
  44. data/lib/branchproof/default_instrumentation.rb +140 -0
  45. data/lib/branchproof/default_runtime.rb +16 -0
  46. data/lib/branchproof/default_syntax.rb +94 -0
  47. data/lib/branchproof/evidence.rb +133 -31
  48. data/lib/branchproof/exception_instrumentation.rb +96 -0
  49. data/lib/branchproof/exception_runtime.rb +41 -0
  50. data/lib/branchproof/exception_syntax.rb +157 -0
  51. data/lib/branchproof/extended_alternative_runtime.rb +23 -0
  52. data/lib/branchproof/flow_instrumentation.rb +52 -23
  53. data/lib/branchproof/focused_report.rb +77 -9
  54. data/lib/branchproof/instrumenter.rb +93 -37
  55. data/lib/branchproof/iteration_instrumentation.rb +66 -0
  56. data/lib/branchproof/iteration_runtime.rb +79 -0
  57. data/lib/branchproof/iteration_syntax.rb +75 -0
  58. data/lib/branchproof/limits.rb +4 -1
  59. data/lib/branchproof/loader.rb +24 -7
  60. data/lib/branchproof/minimizer.rb +18 -13
  61. data/lib/branchproof/minitest_adapter.rb +11 -16
  62. data/lib/branchproof/records.rb +2 -0
  63. data/lib/branchproof/report.rb +301 -68
  64. data/lib/branchproof/runtime.rb +32 -30
  65. data/lib/branchproof/saved_report.rb +200 -14
  66. data/lib/branchproof/source.rb +140 -71
  67. data/lib/branchproof/value_instrumentation.rb +35 -0
  68. data/lib/branchproof/value_runtime.rb +73 -0
  69. data/lib/branchproof/value_syntax.rb +116 -0
  70. data/lib/branchproof/version.rb +1 -1
  71. data/lib/branchproof/worker.rb +1 -4
  72. data/lib/branchproof.rb +2 -0
  73. data/llms.txt +20 -3
  74. data/sig/branchproof.rbs +64 -1
  75. metadata +32 -1
@@ -0,0 +1,153 @@
1
+ # Module Branchproof::DecisionTable <a id="module-Branchproof-DecisionTable"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/decision_table.rb |
6
+
7
+ Derives the executable logical rules of a supported Boolean decision and
8
+ overlays the runtime evidence that the existing Branchproof run captured.
9
+
10
+ Rules come from the Boolean tree itself rather than from an exhaustive
11
+ Cartesian expansion, so Ruby's short-circuit semantics are preserved: a
12
+ condition the interpreter would skip becomes an explicit `dont_care` value
13
+ instead of two separate rules.
14
+
15
+ Nothing here executes application code, and no additional test run is
16
+ required: overlay consumes the vectors already recorded for the decision.
17
+
18
+ ## Constants
19
+ ### `CONDITION_VALUES` <a id="constant-CONDITION_VALUES"></a> <a id="CONDITION_VALUES-constant"></a>
20
+ Not documented.
21
+
22
+ ### `CONSTRAINT_ANALYSIS_VERSION` <a id="constant-CONSTRAINT_ANALYSIS_VERSION"></a> <a id="CONSTRAINT_ANALYSIS_VERSION-constant"></a>
23
+ Not documented.
24
+
25
+ ### `COVERAGE_STATUSES` <a id="constant-COVERAGE_STATUSES"></a> <a id="COVERAGE_STATUSES-constant"></a>
26
+ Not documented.
27
+
28
+ ### `COVERAGE_SUMMARY_STATUSES` <a id="constant-COVERAGE_SUMMARY_STATUSES"></a> <a id="COVERAGE_SUMMARY_STATUSES-constant"></a>
29
+ Not documented.
30
+
31
+ ### `DEFAULT_MAX_CONDITIONS` <a id="constant-DEFAULT_MAX_CONDITIONS"></a> <a id="DEFAULT_MAX_CONDITIONS-constant"></a>
32
+ Not documented.
33
+
34
+ ### `DEFAULT_MAX_RULES` <a id="constant-DEFAULT_MAX_RULES"></a> <a id="DEFAULT_MAX_RULES-constant"></a>
35
+ Not documented.
36
+
37
+ ### `DONT_CARE` <a id="constant-DONT_CARE"></a> <a id="DONT_CARE-constant"></a>
38
+ Not documented.
39
+
40
+ ### `FALSE_VALUE` <a id="constant-FALSE_VALUE"></a> <a id="FALSE_VALUE-constant"></a>
41
+ Not documented.
42
+
43
+ ### `NOT_CALCULATED_REASONS` <a id="constant-NOT_CALCULATED_REASONS"></a> <a id="NOT_CALCULATED_REASONS-constant"></a>
44
+ Not documented.
45
+
46
+ ### `REACHABILITY_STATUSES` <a id="constant-REACHABILITY_STATUSES"></a> <a id="REACHABILITY_STATUSES-constant"></a>
47
+ Not documented.
48
+
49
+ ### `SCHEMA_VERSION` <a id="constant-SCHEMA_VERSION"></a> <a id="SCHEMA_VERSION-constant"></a>
50
+ Not documented.
51
+
52
+ ### `TABLE_STATUSES` <a id="constant-TABLE_STATUSES"></a> <a id="TABLE_STATUSES-constant"></a>
53
+ Not documented.
54
+
55
+ ### `TRUE_VALUE` <a id="constant-TRUE_VALUE"></a> <a id="TRUE_VALUE-constant"></a>
56
+ Not documented.
57
+
58
+ ### `VALUE_LABELS` <a id="constant-VALUE_LABELS"></a> <a id="VALUE_LABELS-constant"></a>
59
+ Not documented.
60
+
61
+ ## Public Class Methods
62
+ ### `build(decision:, vectors: = [], limits: = {}, reachability: = true)` <a id="method-c-build"></a> <a id="build-class_method"></a>
63
+ Builds the reduced, runtime-overlaid table for one Boolean decision.
64
+ - **@raise** [ArgumentError]
65
+
66
+ ### `classify_vectors(rules, vectors)` <a id="method-c-classify_vectors"></a> <a id="classify_vectors-class_method"></a>
67
+ Generated traces have nil in every skipped condition position. Their
68
+ normalized vector is therefore an exact table key and can be classified
69
+ without scanning every rule. Malformed or hand-built observations retain the
70
+ historical matcher as a bounded compatibility fallback.
71
+
72
+ ### `combine(node, type, budget)` <a id="method-c-combine"></a> <a id="combine-class_method"></a>
73
+ Not documented.
74
+
75
+ ### `coverage_entry(table)` <a id="method-c-coverage_entry"></a> <a id="coverage_entry-class_method"></a>
76
+ The per-decision row the coverage ladder renders.
77
+
78
+ ### `coverage_status(covered, required, generated)` <a id="method-c-coverage_status"></a> <a id="coverage_status-class_method"></a>
79
+ Not documented.
80
+
81
+ ### `enumerate(node, prefer, budget)` <a id="method-c-enumerate"></a> <a id="enumerate-class_method"></a>
82
+ Enumerates every short-circuit evaluation path of the Boolean tree.
83
+
84
+ `prefer` orders the paths deterministically: a conjunction lists its
85
+ short-circuiting false path first, a disjunction its true path first, and a
86
+ negation inverts the preference it inherits. Returns nil once the path count
87
+ would exceed `budget`.
88
+
89
+ ### `fast_match_positions(vector, by_signature, condition_count)` <a id="method-c-fast_match_positions"></a> <a id="fast_match_positions-class_method"></a>
90
+ Not documented.
91
+
92
+ ### `fetch(record, key)` <a id="method-c-fetch"></a> <a id="fetch-class_method"></a>
93
+ Not documented.
94
+
95
+ ### `generic_matches(rules, vectors)` <a id="method-c-generic_matches"></a> <a id="generic_matches-class_method"></a>
96
+ Not documented.
97
+
98
+ ### `limit(limits, key, fallback)` <a id="method-c-limit"></a> <a id="limit-class_method"></a>
99
+ Not documented.
100
+
101
+ ### `matches?(rule, vector)` <a id="method-c-matches-3F"></a> <a id="matches?-class_method"></a>
102
+ A runtime observation matches a rule when every required condition value
103
+ matches and the decision outcome matches. Conditions Ruby skipped may only
104
+ line up with don't-care positions.
105
+ - **@return** [Boolean]
106
+
107
+ ### `not_calculated(decision_id, reason)` <a id="method-c-not_calculated"></a> <a id="not_calculated-class_method"></a>
108
+ Not documented.
109
+
110
+ ### `overlay(decision_id:, rules:, vectors:, reachability: = true, indexed: = false)` <a id="method-c-overlay"></a> <a id="overlay-class_method"></a>
111
+ Not documented.
112
+
113
+ ### `overlay_rule(decision_id, rule, vectors, diagnostics)` <a id="method-c-overlay_rule"></a> <a id="overlay_rule-class_method"></a>
114
+ Public compatibility wrapper: callers historically passed all vectors, so
115
+ retain matcher filtering for direct calls.
116
+
117
+ ### `overlay_rule_matches(decision_id, rule, matched, diagnostics)` <a id="method-c-overlay_rule_matches"></a> <a id="overlay_rule_matches-class_method"></a>
118
+ Not documented.
119
+
120
+ ### `percentage(covered, required)` <a id="method-c-percentage"></a> <a id="percentage-class_method"></a>
121
+ Not documented.
122
+
123
+ ### `representable?(node, condition_count)` <a id="method-c-representable-3F"></a> <a id="representable?-class_method"></a>
124
+ Only AND, OR, NOT, and atoms within the decision's own condition range are
125
+ representable; anything else leaves the table uncalculated rather than
126
+ producing a table that does not describe the decision.
127
+ - **@return** [Boolean]
128
+
129
+ ### `rule(decision_id, conditions, path, index, reachability: = true, prepared_constraints: = nil)` <a id="method-c-rule"></a> <a id="rule-class_method"></a>
130
+ rubocop:disable-next Metrics/ParameterLists
131
+
132
+ ### `rule_id(decision_id, values, outcome)` <a id="method-c-rule_id"></a> <a id="rule_id-class_method"></a>
133
+ Rule identity depends only on the decision, the normalized condition vector,
134
+ the expected outcome, and the table schema version. It never depends on a test
135
+ name, a runtime observation, or the Minitest seed.
136
+
137
+ ### `signature(values, outcome)` <a id="method-c-signature"></a> <a id="signature-class_method"></a>
138
+ Not documented.
139
+
140
+ ### `static_reachability(conditions, values, prepared_constraints: = nil)` <a id="method-c-static_reachability"></a> <a id="static_reachability-class_method"></a>
141
+ Conservative static reachability: prove impossibility, or answer unknown.
142
+
143
+ ### `summary(decision_id:, rules:, diagnostics:, reachability_analyzed: = true)` <a id="method-c-summary"></a> <a id="summary-class_method"></a>
144
+ Not documented.
145
+
146
+ ### `unavailable_reason(decision, limits)` <a id="method-c-unavailable_reason"></a> <a id="unavailable_reason-class_method"></a>
147
+ Names why a decision carries no Boolean table, or nil when it carries one.
148
+
149
+ ### `unique_atom_indices?(node, seen = {})` <a id="method-c-unique_atom_indices-3F"></a> <a id="unique_atom_indices?-class_method"></a>
150
+ - **@return** [Boolean]
151
+
152
+ ### `unsupported_coverage_entry()` <a id="method-c-unsupported_coverage_entry"></a> <a id="unsupported_coverage_entry-class_method"></a>
153
+ Not documented.
@@ -0,0 +1,13 @@
1
+ # Module Branchproof::DefaultInstrumentation <a id="module-Branchproof-DefaultInstrumentation"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/default_instrumentation.rb |
6
+
7
+ Defaults stay inline in their original lexical scope. The owner decision makes
8
+ body entry edits part of the same original AST edit tree as the parameter
9
+ expression edits.
10
+
11
+ ## Public Instance Methods
12
+ ### `rewrite(unit:)` <a id="method-i-rewrite"></a> <a id="rewrite-instance_method"></a>
13
+ Not documented.
@@ -0,0 +1,11 @@
1
+ # Module Branchproof::DefaultRuntime <a id="module-Branchproof-DefaultRuntime"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/default_runtime.rb |
6
+
7
+ Binding events are immediate; no pending state survives a failed default.
8
+
9
+ ## Public Instance Methods
10
+ ### `default_binding(decision_id, index)` <a id="method-i-default_binding"></a> <a id="default_binding-instance_method"></a>
11
+ Not documented.
@@ -0,0 +1,7 @@
1
+ # Module Branchproof::DefaultSyntax <a id="module-Branchproof-DefaultSyntax"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/default_syntax.rb |
6
+
7
+ Each optional parameter has an independent supplied/defaulted obligation.
@@ -0,0 +1,9 @@
1
+ # Module Branchproof::ExceptionInstrumentation <a id="module-Branchproof-ExceptionInstrumentation"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/exception_instrumentation.rb |
6
+
7
+ Textual edits for native rescue control flow. The edits only add calls at
8
+ Ruby's own protected-region and handler boundaries; exception matching, `$!`,
9
+ retry, ensure ordering, and nonlocal transfers remain Ruby-owned.
@@ -0,0 +1,27 @@
1
+ # Module Branchproof::ExceptionRuntime <a id="module-Branchproof-ExceptionRuntime"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/exception_runtime.rb |
6
+
7
+ Record native clause selection and escaping exceptions. Generated wrappers
8
+ re-raise the same exception; nonlocal transfers remain aborted observations.
9
+
10
+ ## Public Instance Methods
11
+ ### `exception_enter(decision_id, unhandled_index)` <a id="method-i-exception_enter"></a> <a id="exception_enter-instance_method"></a>
12
+ Not documented.
13
+
14
+ ### `exception_finish(decision_id, value)` <a id="method-i-exception_finish"></a> <a id="exception_finish-instance_method"></a>
15
+ Not documented.
16
+
17
+ ### `exception_leave(decision_id)` <a id="method-i-exception_leave"></a> <a id="exception_leave-instance_method"></a>
18
+ Not documented.
19
+
20
+ ### `exception_path(decision_id, index)` <a id="method-i-exception_path"></a> <a id="exception_path-instance_method"></a>
21
+ Not documented.
22
+
23
+ ### `exception_unhandled(decision_id)` <a id="method-i-exception_unhandled"></a> <a id="exception_unhandled-instance_method"></a>
24
+ Not documented.
25
+
26
+ ### `exception_value(decision_id, value, index)` <a id="method-i-exception_value"></a> <a id="exception_value-instance_method"></a>
27
+ Not documented.
@@ -0,0 +1,9 @@
1
+ # Module Branchproof::ExceptionSyntax <a id="module-Branchproof-ExceptionSyntax"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/exception_syntax.rb |
6
+
7
+ Replaces unsupported standalone rescue-clause records with decisions for
8
+ Ruby's enclosing protected region. Ruby chooses a rescue clause as part of
9
+ executing BeginNode; a RescueNode by itself is not executable syntax.
@@ -0,0 +1,19 @@
1
+ # Module Branchproof::ExtendedAlternativeRuntime <a id="module-Branchproof-ExtendedAlternativeRuntime"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/extended_alternative_runtime.rb |
6
+
7
+ Runtime hooks for decisions whose native evaluation has a third path. Runtime
8
+ includes this module explicitly; it is kept separate so the ordinary two-path
9
+ helpers remain unchanged.
10
+
11
+ ## Public Instance Methods
12
+ ### `flow_assignment_finish(decision_id, value, default_path = nil)` <a id="method-i-flow_assignment_finish"></a> <a id="flow_assignment_finish-instance_method"></a>
13
+ Not documented.
14
+
15
+ ### `flow_assignment_path(decision_id, index)` <a id="method-i-flow_assignment_path"></a> <a id="flow_assignment_path-instance_method"></a>
16
+ Not documented.
17
+
18
+ ### `flow_assignment_receiver(decision_id, receiver)` <a id="method-i-flow_assignment_receiver"></a> <a id="flow_assignment_receiver-instance_method"></a>
19
+ Not documented.
@@ -7,9 +7,12 @@
7
7
 
8
8
  Terminal renderings grouped around conditions or tests.
9
9
 
10
+ ## Constants
11
+ ### `DECISION_TABLE_LABELS` <a id="constant-DECISION_TABLE_LABELS"></a> <a id="DECISION_TABLE_LABELS-constant"></a>
12
+ Not documented.
13
+
10
14
  ## Public Instance Methods
11
- ### `initialize(document:, view:, level:, missing_only: = false)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
12
- - **@raise** [ArgumentError]
15
+ ### `initialize(document:, view:, level:, missing_only: = false, coordinator: = nil)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
13
16
  - **@return** [FocusedReport] a new instance of FocusedReport
14
17
 
15
18
  ### `render()` <a id="method-i-render"></a> <a id="render-instance_method"></a>
@@ -3,7 +3,7 @@
3
3
  | | |
4
4
  | --- | --- |
5
5
  | **Inherits** | Object |
6
- | **Includes** | [Branchproof::FlowInstrumentation](FlowInstrumentation.md) |
6
+ | **Includes** | [Branchproof::DefaultInstrumentation](DefaultInstrumentation.md), [Branchproof::ExceptionInstrumentation](ExceptionInstrumentation.md), [Branchproof::FlowInstrumentation](FlowInstrumentation.md), [Branchproof::IterationInstrumentation](IterationInstrumentation.md), [Branchproof::ValueInstrumentation](ValueInstrumentation.md) |
7
7
  | **Defined in** | lib/branchproof/instrumenter.rb |
8
8
 
9
9
  Applies the smallest possible source edits around inventoried expressions. The
@@ -0,0 +1,7 @@
1
+ # Module Branchproof::IterationInstrumentation <a id="module-Branchproof-IterationInstrumentation"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/iteration_instrumentation.rb |
6
+
7
+ Keep matching and iteration in the original lexical scope.
@@ -0,0 +1,21 @@
1
+ # Module Branchproof::IterationRuntime <a id="module-Branchproof-IterationRuntime"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/iteration_runtime.rb |
6
+
7
+ Runtime support for callback based iteration, including lazy receivers whose
8
+ callbacks execute after the constructing call has returned.
9
+
10
+ ## Public Instance Methods
11
+ ### `flow_iteration_begin(decision_id, receiver, alternative_count = 2)` <a id="method-i-flow_iteration_begin"></a> <a id="flow_iteration_begin-instance_method"></a>
12
+ Not documented.
13
+
14
+ ### `flow_iteration_callback(decision_id, alternative_count = 2)` <a id="method-i-flow_iteration_callback"></a> <a id="flow_iteration_callback-instance_method"></a>
15
+ rubocop:disable-next Metrics/MethodLength
16
+
17
+ ### `flow_iteration_finish(decision_id, value, default_path = nil)` <a id="method-i-flow_iteration_finish"></a> <a id="flow_iteration_finish-instance_method"></a>
18
+ Not documented.
19
+
20
+ ### `flow_iteration_leave(decision_id)` <a id="method-i-flow_iteration_leave"></a> <a id="flow_iteration_leave-instance_method"></a>
21
+ Not documented.
@@ -0,0 +1,11 @@
1
+ # Module Branchproof::IterationSyntax <a id="module-Branchproof-IterationSyntax"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/iteration_syntax.rb |
6
+
7
+ Observe entry into source-visible callback bodies, not library internals.
8
+
9
+ ## Constants
10
+ ### `ITERATORS` <a id="constant-ITERATORS"></a> <a id="ITERATORS-constant"></a>
11
+ Not documented.
@@ -7,10 +7,6 @@
7
7
 
8
8
  Owns the process-local CRuby compilation hook when the VM exposes it.
9
9
 
10
- ## Constants
11
- ### `STATUS_KEYS` <a id="constant-STATUS_KEYS"></a> <a id="STATUS_KEYS-constant"></a>
12
- Not documented.
13
-
14
10
  ## Public Instance Methods
15
11
  ### `diagnostics()` <a id="method-i-diagnostics"></a> <a id="diagnostics-instance_method"></a>
16
12
  Not documented.
@@ -15,9 +15,6 @@ Returns the value of attribute active_adapter.
15
15
  Returns the value of attribute tests.
16
16
 
17
17
  ## Public Instance Methods
18
- ### `capabilities()` <a id="method-i-capabilities"></a> <a id="capabilities-instance_method"></a>
19
- Not documented.
20
-
21
18
  ### `initialize(runtime:)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
22
19
  - **@return** [MinitestAdapter] a new instance of MinitestAdapter
23
20
 
@@ -11,9 +11,18 @@ Renders versioned terminal and JSON analysis reports.
11
11
  ### `CRITERION_VERSION` <a id="constant-CRITERION_VERSION"></a> <a id="CRITERION_VERSION-constant"></a>
12
12
  Not documented.
13
13
 
14
+ ### `DECISION_TABLE_LABELS` <a id="constant-DECISION_TABLE_LABELS"></a> <a id="DECISION_TABLE_LABELS-constant"></a>
15
+ Not documented.
16
+
17
+ ### `DECISION_TABLE_STATUS_LABELS` <a id="constant-DECISION_TABLE_STATUS_LABELS"></a> <a id="DECISION_TABLE_STATUS_LABELS-constant"></a>
18
+ Not documented.
19
+
14
20
  ### `SCHEMA_VERSION` <a id="constant-SCHEMA_VERSION"></a> <a id="SCHEMA_VERSION-constant"></a>
15
21
  Not documented.
16
22
 
23
+ ### `VIEWS` <a id="constant-VIEWS"></a> <a id="VIEWS-constant"></a>
24
+ Not documented.
25
+
17
26
  ## Public Class Methods
18
27
  ### `from_document(document:, level: = nil, view: = :decisions, missing_only: = false)` <a id="method-c-from_document"></a> <a id="from_document-class_method"></a>
19
28
  Not documented.
@@ -32,6 +41,15 @@ Render the shared ladder in every terminal view.
32
41
  ### `coverage_status_label(status)` <a id="method-i-coverage_status_label"></a> <a id="coverage_status_label-instance_method"></a>
33
42
  Not documented.
34
43
 
44
+ ### `decision_table_expected_heading(decision)` <a id="method-i-decision_table_expected_heading"></a> <a id="decision_table_expected_heading-instance_method"></a>
45
+ Not documented.
46
+
47
+ ### `decision_table_reachability(rule)` <a id="method-i-decision_table_reachability"></a> <a id="decision_table_reachability-instance_method"></a>
48
+ Not documented.
49
+
50
+ ### `decision_table_requirement(value)` <a id="method-i-decision_table_requirement"></a> <a id="decision_table_requirement-instance_method"></a>
51
+ Not documented.
52
+
35
53
  ### `diagnostic_message(diagnostic)` <a id="method-i-diagnostic_message"></a> <a id="diagnostic_message-instance_method"></a>
36
54
  Formats source context consistently in live and saved terminal views.
37
55
 
@@ -2,13 +2,17 @@
2
2
 
3
3
  | | |
4
4
  | --- | --- |
5
- | **Extended by** | [Branchproof::RuntimeFlow](RuntimeFlow.md) |
5
+ | **Extended by** | [Branchproof::DefaultRuntime](DefaultRuntime.md), [Branchproof::ExceptionRuntime](ExceptionRuntime.md), [Branchproof::ExtendedAlternativeRuntime](ExtendedAlternativeRuntime.md), [Branchproof::IterationRuntime](IterationRuntime.md), [Branchproof::RuntimeFlow](RuntimeFlow.md), [Branchproof::ValueRuntime](ValueRuntime.md) |
6
6
  | **Defined in** | lib/branchproof/runtime.rb |
7
7
 
8
8
  Process-local execution recorder. It deliberately never coerces or stores
9
9
  application values: Ruby's conditional expression is used for truthiness.
10
10
  Captures condition evaluations while preserving application values.
11
11
 
12
+ ## Constants
13
+ ### `FRAME_STATE_KEY` <a id="constant-FRAME_STATE_KEY"></a> <a id="FRAME_STATE_KEY-constant"></a>
14
+ Not documented.
15
+
12
16
  ## Public Class Methods
13
17
  ### `boot(evidence:)` <a id="method-c-boot"></a> <a id="boot-class_method"></a>
14
18
  Not documented.
@@ -19,21 +23,66 @@ Not documented.
19
23
  ### `context(test_id:, phase:)` <a id="method-c-context"></a> <a id="context-class_method"></a>
20
24
  Not documented.
21
25
 
26
+ ### `default_binding(decision_id, index)` <a id="method-c-default_binding"></a> <a id="default_binding-class_method"></a>
27
+ Not documented.
28
+
22
29
  ### `diagnostics()` <a id="method-c-diagnostics"></a> <a id="diagnostics-class_method"></a>
23
30
  Not documented.
24
31
 
32
+ ### `dispatch_path(decision_id, value, raised)` <a id="method-c-dispatch_path"></a> <a id="dispatch_path-class_method"></a>
33
+ Not documented.
34
+
25
35
  ### `enter(decision_id)` <a id="method-c-enter"></a> <a id="enter-class_method"></a>
26
36
  Not documented.
27
37
 
38
+ ### `exception_enter(decision_id, unhandled_index)` <a id="method-c-exception_enter"></a> <a id="exception_enter-class_method"></a>
39
+ Not documented.
40
+
41
+ ### `exception_finish(decision_id, value)` <a id="method-c-exception_finish"></a> <a id="exception_finish-class_method"></a>
42
+ Not documented.
43
+
44
+ ### `exception_leave(decision_id)` <a id="method-c-exception_leave"></a> <a id="exception_leave-class_method"></a>
45
+ Not documented.
46
+
47
+ ### `exception_path(decision_id, index)` <a id="method-c-exception_path"></a> <a id="exception_path-class_method"></a>
48
+ Not documented.
49
+
50
+ ### `exception_unhandled(decision_id)` <a id="method-c-exception_unhandled"></a> <a id="exception_unhandled-class_method"></a>
51
+ Not documented.
52
+
53
+ ### `exception_value(decision_id, value, index)` <a id="method-c-exception_value"></a> <a id="exception_value-class_method"></a>
54
+ Not documented.
55
+
28
56
  ### `finish(decision_id, value)` <a id="method-c-finish"></a> <a id="finish-class_method"></a>
29
57
  Not documented.
30
58
 
59
+ ### `flow_assignment_finish(decision_id, value, default_path = nil)` <a id="method-c-flow_assignment_finish"></a> <a id="flow_assignment_finish-class_method"></a>
60
+ Not documented.
61
+
62
+ ### `flow_assignment_path(decision_id, index)` <a id="method-c-flow_assignment_path"></a> <a id="flow_assignment_path-class_method"></a>
63
+ Not documented.
64
+
65
+ ### `flow_assignment_receiver(decision_id, receiver)` <a id="method-c-flow_assignment_receiver"></a> <a id="flow_assignment_receiver-class_method"></a>
66
+ Not documented.
67
+
31
68
  ### `flow_candidate(decision_id, index)` <a id="method-c-flow_candidate"></a> <a id="flow_candidate-class_method"></a>
32
69
  Not documented.
33
70
 
34
71
  ### `flow_finish(decision_id, value, default_path = nil)` <a id="method-c-flow_finish"></a> <a id="flow_finish-class_method"></a>
35
72
  Not documented.
36
73
 
74
+ ### `flow_iteration_begin(decision_id, receiver, alternative_count = 2)` <a id="method-c-flow_iteration_begin"></a> <a id="flow_iteration_begin-class_method"></a>
75
+ Not documented.
76
+
77
+ ### `flow_iteration_callback(decision_id, alternative_count = 2)` <a id="method-c-flow_iteration_callback"></a> <a id="flow_iteration_callback-class_method"></a>
78
+ rubocop:disable-next Metrics/MethodLength
79
+
80
+ ### `flow_iteration_finish(decision_id, value, default_path = nil)` <a id="method-c-flow_iteration_finish"></a> <a id="flow_iteration_finish-class_method"></a>
81
+ Not documented.
82
+
83
+ ### `flow_iteration_leave(decision_id)` <a id="method-c-flow_iteration_leave"></a> <a id="flow_iteration_leave-class_method"></a>
84
+ Not documented.
85
+
37
86
  ### `flow_path(decision_id, index)` <a id="method-c-flow_path"></a> <a id="flow_path-class_method"></a>
38
87
  Not documented.
39
88
 
@@ -52,5 +101,15 @@ Not documented.
52
101
  ### `register_test(test:)` <a id="method-c-register_test"></a> <a id="register_test-class_method"></a>
53
102
  Not documented.
54
103
 
104
+ ### `set_alternative_count(decision_id, count)` <a id="method-c-set_alternative_count"></a> <a id="set_alternative_count-class_method"></a>
105
+ rubocop:enable Style/CaseEquality, Metrics/CyclomaticComplexity,
106
+ Metrics/PerceivedComplexity
107
+
55
108
  ### `snapshot()` <a id="method-c-snapshot"></a> <a id="snapshot-class_method"></a>
56
109
  Not documented.
110
+
111
+ ### `value_path(decision_id, value, domain)` <a id="method-c-value_path"></a> <a id="value_path-class_method"></a>
112
+ rubocop:disable-next Metrics/MethodLength -- trace state branches are
113
+ explicit. rubocop:disable-next Metrics/AbcSize, Metrics/CyclomaticComplexity,
114
+ Metrics/PerceivedComplexity -- domain dispatch mirrors the observable value
115
+ contract.
@@ -17,12 +17,27 @@ Not documented.
17
17
  ### `DECISION_KINDS` <a id="constant-DECISION_KINDS"></a> <a id="DECISION_KINDS-constant"></a>
18
18
  Not documented.
19
19
 
20
+ ### `DECISION_TABLE_STATUSES` <a id="constant-DECISION_TABLE_STATUSES"></a> <a id="DECISION_TABLE_STATUSES-constant"></a>
21
+ Not documented.
22
+
20
23
  ### `NONBOOLEAN_KINDS` <a id="constant-NONBOOLEAN_KINDS"></a> <a id="NONBOOLEAN_KINDS-constant"></a>
21
24
  Not documented.
22
25
 
23
26
  ### `REQUIRED_FIELDS` <a id="constant-REQUIRED_FIELDS"></a> <a id="REQUIRED_FIELDS-constant"></a>
24
27
  Not documented.
25
28
 
29
+ ### `RULE_CONDITION_VALUES` <a id="constant-RULE_CONDITION_VALUES"></a> <a id="RULE_CONDITION_VALUES-constant"></a>
30
+ Not documented.
31
+
32
+ ### `RULE_COVERAGE_STATUSES` <a id="constant-RULE_COVERAGE_STATUSES"></a> <a id="RULE_COVERAGE_STATUSES-constant"></a>
33
+ Not documented.
34
+
35
+ ### `RULE_REACHABILITY_STATUSES` <a id="constant-RULE_REACHABILITY_STATUSES"></a> <a id="RULE_REACHABILITY_STATUSES-constant"></a>
36
+ Not documented.
37
+
38
+ ### `STRICT_FLOW_SCHEMAS` <a id="constant-STRICT_FLOW_SCHEMAS"></a> <a id="STRICT_FLOW_SCHEMAS-constant"></a>
39
+ Not documented.
40
+
26
41
  ### `SUPPORTED_SCHEMAS` <a id="constant-SUPPORTED_SCHEMAS"></a> <a id="SUPPORTED_SCHEMAS-constant"></a>
27
42
  Not documented.
28
43
 
@@ -3,7 +3,7 @@
3
3
  | | |
4
4
  | --- | --- |
5
5
  | **Inherits** | Object |
6
- | **Includes** | [Branchproof::DecisionSyntax](DecisionSyntax.md) |
6
+ | **Includes** | [Branchproof::DecisionSyntax](DecisionSyntax.md), [Branchproof::DefaultSyntax](DefaultSyntax.md), [Branchproof::ExceptionSyntax](ExceptionSyntax.md), [Branchproof::IterationSyntax](IterationSyntax.md), [Branchproof::ValueSyntax](ValueSyntax.md) |
7
7
  | **Defined in** | lib/branchproof/source.rb |
8
8
 
9
9
  Inventories supported condition and decision occurrences from Ruby files.
@@ -22,3 +22,9 @@ Returns the value of attribute root.
22
22
 
23
23
  ### `inventory(paths:)` <a id="method-i-inventory"></a> <a id="inventory-instance_method"></a>
24
24
  - **@raise** [ArgumentError]
25
+
26
+ ### `value_decisions_for(program, bytes, source_id, nodes: = nil, occupied_ranges: = {}, file_reasons: = [], encoding: = "UTF-8")` <a id="method-i-value_decisions_for"></a> <a id="value_decisions_for-instance_method"></a>
27
+ <code>nodes:</code> is supplied by Source's fused AST walk. It remains
28
+ optional for the standalone discovery API used by focused syntax tests.
29
+ rubocop:disable-next Metrics/MethodLength, Metrics/ParameterLists -- source
30
+ seam mirrors Source#decisions_for.
@@ -0,0 +1,7 @@
1
+ # Module Branchproof::ValueInstrumentation <a id="module-Branchproof-ValueInstrumentation"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/value_instrumentation.rb |
6
+
7
+ Source rewrite for value observations; it preserves the wrapped value.
@@ -0,0 +1,26 @@
1
+ # Module Branchproof::ValueRuntime <a id="module-Branchproof-ValueRuntime"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/value_runtime.rb |
6
+
7
+ Runtime mapping for value observations.
8
+
9
+ ## Public Class Methods
10
+ ### `comparison_index(value)` <a id="method-c-comparison_index"></a> <a id="comparison_index-class_method"></a>
11
+ rubocop:disable Style/CaseEquality, Metrics/CyclomaticComplexity,
12
+ Metrics/PerceivedComplexity
13
+
14
+ ## Public Instance Methods
15
+ ### `dispatch_path(decision_id, value, raised)` <a id="method-i-dispatch_path"></a> <a id="dispatch_path-instance_method"></a>
16
+ Not documented.
17
+
18
+ ### `set_alternative_count(decision_id, count)` <a id="method-i-set_alternative_count"></a> <a id="set_alternative_count-instance_method"></a>
19
+ rubocop:enable Style/CaseEquality, Metrics/CyclomaticComplexity,
20
+ Metrics/PerceivedComplexity
21
+
22
+ ### `value_path(decision_id, value, domain)` <a id="method-i-value_path"></a> <a id="value_path-instance_method"></a>
23
+ rubocop:disable-next Metrics/MethodLength -- trace state branches are
24
+ explicit. rubocop:disable-next Metrics/AbcSize, Metrics/CyclomaticComplexity,
25
+ Metrics/PerceivedComplexity -- domain dispatch mirrors the observable value
26
+ contract.
@@ -0,0 +1,26 @@
1
+ # Module Branchproof::ValueSyntax <a id="module-Branchproof-ValueSyntax"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Defined in** | lib/branchproof/value_syntax.rb |
6
+
7
+ Inventory for expressions whose result is itself the observable value. This
8
+ deliberately excludes control-flow predicates already owned by Source.
9
+
10
+ ## Constants
11
+ ### `BOOLEAN_OPERATORS` <a id="constant-BOOLEAN_OPERATORS"></a> <a id="BOOLEAN_OPERATORS-constant"></a>
12
+ Not documented.
13
+
14
+ ### `DISPATCH_METHODS` <a id="constant-DISPATCH_METHODS"></a> <a id="DISPATCH_METHODS-constant"></a>
15
+ Not documented.
16
+
17
+ ## Public Instance Methods
18
+ ### `additional_decisions_for(program, bytes, source_id, file_reasons, encoding, decisions:, collected:)` <a id="method-i-additional_decisions_for"></a> <a id="additional_decisions_for-instance_method"></a>
19
+ rubocop:disable-next Metrics/ParameterLists -- source seam mirrors
20
+ Source#decisions_for.
21
+
22
+ ### `value_decisions_for(program, bytes, source_id, nodes: = nil, occupied_ranges: = {}, file_reasons: = [], encoding: = "UTF-8")` <a id="method-i-value_decisions_for"></a> <a id="value_decisions_for-instance_method"></a>
23
+ <code>nodes:</code> is supplied by Source's fused AST walk. It remains
24
+ optional for the standalone discovery API used by focused syntax tests.
25
+ rubocop:disable-next Metrics/MethodLength, Metrics/ParameterLists -- source
26
+ seam mirrors Source#decisions_for.