Who Tests the Simulator? Metamorphic and Differential Testing of Analog Circuit Simulators, with Electrical Metamorphic Relations, Tolerance-Aware Oracles, Circuit Generators and Automatic Reduction of Failing Netlists
Every analog sign-off rests on a circuit simulator, yet simulators themselves are tested mainly with regression suites of known circuits and comparisons against reference results that someone once accepted. A wrong answer on a new circuit, a new option combination or a new device model has no oracle: nobody knows the correct waveform. Software testing addresses missing oracles with metamorphic testing, which checks relations between the outputs of related inputs, and compilers and digital hardware simulators have been tested successfully with generated programs and equivalence-preserving transformations. Analog simulators have not. This paper proposes metamorphic and differential testing for analog circuit simulators. A catalogue of electrical metamorphic relations derived from circuit theory—Thevenin–Norton exchange, series and parallel splitting, impedance scaling, node renaming and element reordering, superposition for linear circuits, reciprocity, and option invariance—defines pairs of circuits whose results must agree in a known way. Tolerance-aware oracles compare results using the simulator's own error controls, so that legitimate numerical differences are not reported as bugs. Circuit generators produce valid netlists that exercise device models, analyses and options, and automatic reduction shrinks a failing netlist to a minimal reproducer. Differential mode applies the same relations across simulators. The approach brings a systematic test oracle to the tools on which every analog result depends.
Authors
- I-Wei Tseng
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-01
- DOI
- https://doi.org/10.5281/zenodo.24722338
- Primary Topic
- Software Testing and Debugging Techniques
- Type
- preprint