B.1.5.RS - Evaluate a Method Replacement in Its Encompassing Uses
Type: Method pattern Status: Stable
B.1.5.RS:1 - Problem frame
Use this pattern when a constituent Method could be replaced, simplified or implemented differently and you need to know which encompassing uses remain possible. A faster check returns the same answer on familiar inputs but no longer exposes information another part needs. An error bound can preserve the order of well-separated options while leaving a value near a decision threshold unresolved. The same bound can settle a threshold when the entire interval falls on one side of it.
Start with the direction of replacement and the practical gain sought. Ask: “What do the receiving wholes rely on, and does this candidate still supply it under their conditions?”
An assessment identifies the uses preserved, uses needing adaptation or restriction, and uses for which the replacement is incompatible or unresolved. This can finish a request for a compatibility judgement. Choosing and introducing a replacement can be a further assignment. One decisive comparison may be enough. Use an available argument or counterexample when it decides compatibility. A trial commissioned as a separate deliverable remains due on its agreed terms.
Use B.1.5.EW first if the constituent and its encompassing uses are unclear. If only the wording or diagram changes and the performed Method remains unchanged, check that representation’s correspondence instead. If the replacement supplies an entire standalone Method, use the relevant fit and choice Methods; this pattern contributes only the constituent-in-whole question.
B.1.5.RS:2 - Problem
Local adequacy does not establish substitutability. The whole can depend on output meaning, intermediate interactions, order, timing, recoverability or resource demand that a local comparison omitted. A shared constituent can satisfy one whole and fail another.
The opposite failure is to demand that every internal detail remain identical. This prevents useful replacement even when the receiving work does not depend on that detail. The preservation question must come from the use.
B.1.5.RS:3 - Forces
- A local gain can remove a contribution needed elsewhere.
- Several uses may require different guarantees from the same constituent.
- Simplification saves effort when its lost detail is irrelevant to the receiving action.
- Strong evidence can be expensive; a bounded argument or counterexample may already settle the next move.
- A common replacement can reduce maintenance, while separate variants can preserve otherwise incompatible uses.
- Method identity, description correspondence and performance evidence answer different questions.
B.1.5.RS:4 - Solution
Compare the candidate against what the encompassing work needs, then carry the changed contribution through that work. State the direction and conditions of the result.
B.1.5.RS:4.1 - Name the proposed change
Identify the constituent, its candidate replacement and the gain: for example, reduced delay, effort or dependence on a scarce specialist. State what changes in the operation, its inputs, outputs, interactions or realization.
Keep a proposed replacement separate from one already performed. Use A.3.1 to settle any needed identity claim: exposing a hidden step, changing an implementation within an admitted variation and proposing another Method need not have the same answer.
B.1.5.RS:4.2 - Recover the receiving wholes
Follow the proposed change to each receiving use covered by the decision. An indirect use can matter even if an intermediate whole returns the same value, for instance when its timing or explanation changes. For a change restricted to one use, establish any consequences for others through resources, commitments or interfaces shared with it. For a wider adoption claim, establish which uses are covered and why the argument applies throughout that scope.
Bound the search by the proposed adoption and its conditions. An interface rule that guarantees every required contribution can cover a class of unnamed users. If an uncovered use could alter the decision, restrict the adoption to the supported scope or obtain the missing condition.
For each whole, recover:
- what it supplies or assumes at the constituent’s entry;
- what result or interaction it needs from the constituent;
- timing, ordering, coordination and resource conditions that affect this use;
- what variation or loss it can tolerate.
Plain statements are sufficient when they make the comparison executable. Use an existing interface or formal contract when it already states these conditions.
B.1.5.RS:4.3 - Compare the contribution under those conditions
Apply the proposed constituent to the receiving conditions. Follow what it supplies through the affected part of the whole, including an interaction before final output when the whole relies on it.
Choose an argument, available observations, calculation or trial that can discriminate the decision at proportionate cost. A known violation can reject a general replacement without testing every input. A successful example can reveal a usable construction but does not automatically support all inputs.
When an approximation is proposed, state the property preserved for the receiving use: a bound, ordering, feasible action, specified error or other needed consequence. Equal rounded answers on one example do not establish preservation of a different property.
When one replacement must support several uses, follow their permitted combinations over the relevant period. Two uses can exhaust the same finite supply even in succession. A single configuration may work for all of them, or a choice by the authorized participant may depend on information available before the commitment. Establish that the proposed arrangement meets the shared and individual requirements under those conditions. If only one specified use is commissioned, test the dependencies needed for that use.
B.1.5.RS:4.4 - Classify the replacement by use
| Comparison result | What can follow |
|---|---|
| The needed contribution and conditions are preserved. | Report that the replacement is compatible with that use under the established conditions. |
| Preservation holds only under a narrower condition. | Identify the condition of compatibility and the uses requiring another solution. |
| An adapter or changed combination can restore the needed contribution. | Treat that adaptation as part of the candidate and check its burden and behavior. |
| A required contribution is lost. | Reject the replacement for that whole, change the requirement through the relevant decision, or choose another candidate. |
| Information does not distinguish compatibility from failure. | State what the supplied evidence establishes and which condition would decide compatibility. Seek further evidence when the decision warrants that inquiry or when obtaining the evidence is itself commissioned. |
This is a directed conclusion. Replacing A by B in one use does not show that A can replace B, that they are the same Method, or that B is preferable in all uses.
B.1.5.RS:4.5 - Adopt or retain alternatives
If you are commissioned to recommend or choose an alternative, compare the compatible options at the supported scope, including adaptation, learning, operation and maintenance costs. Separate variants can be worthwhile when their different strengths justify their cost. Return a commissioned recommendation to its intended recipient. For adoption, establish who may decide and whether an existing authorization already covers the replacement. A service acting under that authorization can introduce the change when its conditions hold.
For an ongoing operation, use its ordinary rules for introducing change and retaining continuity. State the condition that would require reconsideration: changed inputs, another receiving whole, a tighter timing limit, lost support or a newly relevant result property.
Return the decision in the form its receiver needs. Where the conclusion is only recognition of a plausible substitute, say so. A claim of guaranteed preservation needs an argument appropriate to that claim. Use B.3 when a named assurance claim about its support is current; a local decision under uncertainty uses C.11 and C.11.DUA.
B.1.5.RS:5 - Archetypal Grounding
B.1.5.RS:5.1 - Faster ordering in two encompassing uses
A team proposes replacing a stable sorting Method with a faster one that need not preserve the input order of equal keys.
One whole prepares a table showing how many records occur at each key. Internal order among equal keys does not affect those counts. Subject to the remaining input and performance conditions, the candidate can supply that contribution.
Another whole schedules requests by priority while retaining arrival order among requests of equal priority. Its method first orders records by arrival and then stably orders them by priority. Replacing the second sort with the candidate can reverse equal-priority requests. The earlier arrival ordering no longer survives the composition.
An allowed reversal of two equal-priority records with different arrival times exposes the incompatibility with the required guarantee. This is a counterexample to unrestricted replacement, not a prediction that this implementation reverses every such pair; repeated random benchmarks cannot restore the missing guarantee.
Options include retaining the stable Method or sorting by a compound key of priority and arrival. The compound-key candidate has changed the operation; compare its behavior and cost before using it. The same “sorted by priority” description concealed different requirements of the two wholes.
B.1.5.RS:5.2 - A bounded estimate and a threshold decision
A constituent estimates a quantity with absolute error at most 2. A receiving whole can establish a strict ordering between two alternatives when their estimated values differ by more than 4 and both estimates satisfy that bound.
Another whole must decide whether the quantity exceeds 100. At an estimate of 99 the error bound alone gives the enclosing interval [97, 101]. It leaves the decision open. A separate bound on admissible values may settle the threshold even without a more accurate estimate. At an estimate of 95, the same error bound puts the whole interval below 100 and can settle that decision.
The change from “estimate the quantity” to “support this decision” makes the scope of replacement explicit. The threshold is stipulated in this constructed example; the pattern does not supply a rule for choosing it.
B.1.5.RS:5.3 - A quicker observation during coordinated work
A group performs a movement sequence in response to a leader. A proposed observation Method uses occasional snapshots rather than continuous observation. It can suffice for an exercise in holding a static pose, but miss the cue that starts a coordinated transition.
Recover the timing needed by the encompassing sequence. If an allowed cue can arrive and its response window can close between successive snapshots, the snapshots alone cannot guarantee a timely response. Known synchronization or another timely source may still guarantee it. Keep more frequent observation, redesign the cue so it remains available, or change the coordinated sequence. Each proposal has a different burden and requires its bounded comparison.
B.1.5.RS:6 - Bias-Annotation
The participant proposing a replacement often sees its local saving more clearly than the costs borne by other users. Recover the receiving requirements before choosing. A demand to preserve everything can conceal the opposite bias: treating familiar implementation detail as necessary even when no receiving use depends on it.
B.1.5.RS:7 - Conformance Checklist
- Are the constituent, candidate, replacement direction and intended gain clear?
- Does the comparison cover the receiving uses claimed, by their individual conditions or by a rule that applies throughout the proposed scope?
- Does the comparison carry the changed contribution through each affected use?
- When one realization must serve several uses, does the design cover their permitted combinations and shared constraints over the promised interval?
- Does the conclusion preserve its conditions and evidence reach?
- Are adaptation costs and a reconsideration condition included where they change adoption?
B.1.5.RS:8 - Common Anti-Patterns and How to Avoid Them
| Failure | Repair |
|---|---|
| One matching output stands in for preserved behavior. | Recover the timing, interaction or property used by the whole and test that contribution. |
| Compatibility in one whole is exported to every user. | Separate receiving uses and restrict the conclusion accordingly. |
| Every implementation detail must remain unchanged. | Preserve what the declared use relies on; permit changes outside that dependence. |
| An adapter is omitted from the candidate’s cost or failure analysis. | Include the adapter in the candidate arrangement and follow the combined behavior. |
| A successful trial becomes an unconditional guarantee. | State its supported scope and establish stronger claims only when required. |
B.1.5.RS:9 - Consequences
Useful replacements can be adopted where they work without silently breaking other wholes. An incompatibility can also expose a better architecture: different variants, an explicit interface or a changed combination.
The method requires knowledge of receiving uses. Its cost grows with meaningful differences among them, not necessarily with the number of documents or callers. A common argument may cover differing conditions and contributions when its bounds establish each required result.
B.1.5.RS:10 - Architectural Rationale
Substitution is a relation to a receiving use. A constituent’s attractive property does not establish that relation. Recovering the whole’s dependence avoids both unrestricted replacement and unnecessary preservation of detail.
When the receiving uses are already understood, the practitioner can begin with their requirements and compare the replacement. The result is a directed substitution decision across one or several uses, including a candidate that changes the whole to accommodate the new constituent.
B.1.5.RS:11 - SoTA-Echoing
Mazo, Compton, Cohen and Ames formulate compositional contracts for layered control systems. Their contribution supports checking what adjacent functions assume and supply, including their different signal and timing models. This pattern uses that conditional-composition idea beyond the paper’s system class; its formal guarantees are not generalized.
The stable-sort case illustrates contextual preservation by an elementary algorithmic counterexample. The bounded-estimate case applies ordinary interval reasoning. These are constructed cases of the common Method, not evidence that every constituent requires a formal contract or a numerical error bound.
For the practical question of substituting a constituent, a local performance benchmark is an alternative: it can reveal speed, cost and errors on its tested inputs. It does not establish that a replacement preserving totals also preserves arrival order, or that its error bound supports the required threshold decision.
Sections 4.2–4.4 therefore select receiving-use conditions first, then derive or test only the preservation those uses need. The worked counterexample or an available bound can settle the stated question at less effort than an additional benchmark; an unresolved performance question can still justify a targeted trial.
Formal compositional contracts offer a stronger alternative where the constituent, interfaces and encompassing system fit their mathematical assumptions. The cited control theory makes those assumptions and guarantees explicit.
This Method adapts that conditional comparison into ordinary statements of inputs, interactions, results and permitted losses; it keeps the formal proof when its additional assurance is useful and attainable. It does not treat every professional practice as a control-system instance.
Reopen the selected comparison when an unmodeled interaction, shared realization, changed receiver or unsupported adaptation defeats the preservation claim. If one constituent cannot satisfy the uses together, retain different variants or change the encompassing arrangement instead of declaring one universally better Method.
B.1.5.RS:12 - Relations
- B.1.5 and A.3.1 define Method composition, identity and replacement-claim distinctions.
- B.1.5.EW recovers constituent and encompassing work when those connections are not yet understood.
- B.5.RA and B.5.RR reconstruct and revise the argument on which preservation depends.
- Use C.29 when a separate question about mathematical representation, result transfer or unsupported reliance remains in the comparison.
- C.30.LCA supplies control-specific conditions; C.30.ILC addresses resulting cross-scope architecture conflicts.
- C.11 and C.11.DUA govern the local decision and whether further investigation is useful.