Explore methodology sections

Learning & application · 2 of 3

One need, two specifications, two decisions

A correct total can conceal a deficit in a particular period.

Synthetic teaching example. The arithmetic below illustrates requirements conformity and adequacy to a hypothetical use. Its acceptance is limited to the declared didactic ConOps and fixtures. It is not validation of an agronomic model or an assessment performed with external developers.

The need and intended use

A hypothetical analyst needs to identify every deficit period in a twelve-period horizon, so those periods can be investigated. Demand and supply use the same illustrative unit. There is no storage, carryover or compensation between periods. This last condition is a stipulation of the exercise; applying it to a real system would require domain justification.

The code can implement this stipulated rule. It cannot decide whether a real system has carryover, whether the observations are representative, or whether a proposed intervention is scientifically justified.

The input contract

C-INPUT-1 requires exactly twelve ordered periods, P01–P12; supply and demand arrays of twelve integers in the range 0–10000; and the unit demo_units_per_period. All four fields are required. Extra fields, invalid types, duplicate/reordered periods and missing observations are rejected. A recorded zero is valid; a missing value is not silently converted to zero.

The fixture is declared before execution.
PeriodSupplyDemandDirect arithmetic
P011010No deficit
P021410Surplus of 4
P03610Deficit of 4
P04–P12, each1010No deficit in each period
Horizon total120120Aggregate balance is zero

Two identified specifications

SRS-AGGREGATE v1

Validate the input, calculate total supply and total demand, and report their difference. This specification does not promise a list of deficit periods.

SRS-PERIOD v1

Validate the input and report every period in which demand exceeds supply, with its deficit. Preserve period identity and order. Equality is not a deficit.

The first specification is deliberately insufficient for the stated per-period need. An aggregate routine may pass verification against SRS-AGGREGATE, but it fails verification against SRS-PERIOD and is rejected for this ConOps. It has not passed the same requirement that it violates.

A small implementation

The downloadable Python module validates the shared contract before either function. The essential computations are shown below; the kit contains the complete validation code, fixtures, tests and runner.

# After C-INPUT-1 has been checked:
balance = sum(supply) - sum(demand)

deficits = [
    {"period": p, "deficit": d - s}
    for p, s, d in zip(periods, supply, demand)
    if s < d
]

Criteria before results

The need, assumptions, both specifications, contract, fixtures and direct expected outputs were recorded and hashed before running the example. The expectations were hand-tabulated; neither candidate generated its own reference answers.

AssessmentProspective criterion
VerificationMatch explicit expected outputs for six valid fixtures; reject sixteen invalid fixtures with the declared contract error; leave inputs unchanged.
Intended-use adequacy in the exerciseIdentify P03 with deficit 4 under the no-carryover condition. A zero aggregate balance alone is insufficient.
LimitsWithhold claims about real-world model validity, intervention effectiveness and external developer comprehension.
Show the observed result and scoped decisions

44 of 44 function–fixture comparisons passed in the recorded preparation run. Each of the six valid and sixteen invalid fixtures was exercised against both functions. The receipt records Python version, time, source hashes, expectations, observations and preservation of inputs.

CandidateVerification reference and resultDecision for the declared use
Aggregate routineSRS-AGGREGATE: PASS; output totals 120/120, balance 0.
SRS-PERIOD: FAIL; missing period-level output.
Rejected. Does not identify P03's deficit.
Period routineSRS-PERIOD: PASS; output P03, deficit 4.Accepted for this didactic ConOps and fixtures only.

A domain validation claim would require evidence connecting a real need, domain assumptions, observations and model behavior to the real decision. This finite synthetic example supplies no such empirical evidence.

Trace the decision back to its basis

Need or constraintImplementation / evidenceEffect on decision
Locate every deficit periodSRS-PERIOD; period_deficits; offset-surplus and multiple-deficit fixturesPeriod identities and deficits are required; totals alone are insufficient.
No inter-period compensationDeclared ConOps; direct comparison of supply and demand in each periodP02 surplus cannot erase the P03 deficit.
Preserve meaning of missing dataC-INPUT-1; null, type, unit, ordering and length rejection casesInvalid data cannot produce an apparently complete result.
Prevent retrospective acceptancePre-execution freeze and independent expected valuesThe observed output is assessed against a previously declared reference.

Related Manual records include DM-0021 and DM-0022 (rationale and assumptions), DM-0023 (traceability), DM-0028 (units and temporal semantics), DM-0029 (prospective criteria), and DM-0108 (requirement-linked tests). These are explanatory relationships; no certified record is changed.

Inspect or run the example

Download the learning and fresh-reader kit

Extract the ZIP, read README.md, then run python run_demo.py with Python 3.10 or newer. On Windows, py -3 run_demo.py is also suitable. Only the standard library is used. The command writes a new receipt and preserves the preparation evidence.

Kit contents include the complete example, both specifications, predeclared fixtures and results, the conceptual diagram source, the transfer task, assessor guide, blank observation template and checksums.