E-Code

How E-Code checks every program

By E-Code · updated

E-Code checks its library programs by computing each answer a second way and replaying the case on a virtual calculator, with the inputs typed on its keys. 137 of the 165 programs carry oracle test cases: 778 cases making 4981 checks.

Independent oracles

Before a test case is written, a separate program in Python, the oracle, computes the expected answer. Where it can, the oracle gets there by a different method from the calculator program: equilibrium equations instead of a closed-form formula, a simulation, another algorithm, or published values.

127 programs are checked this way. For the other 10 programs no second method fits, so the oracle recomputes the same cited textbook formula, and their pages say so.

Key-by-key replays on E-Calc

Each case is then replayed on E-Calc, E-Code's virtual calculator. The inputs are typed on its keys, the program runs, and every labelled result on the screen is compared with the oracle's value. The replay also checks that the program ran cleanly and that every screen fits the calculator's display.

Checking the calculator itself

A program check is only as good as the calculator it runs on. E-Calc's screens, menus and results are compared with the examples in Texas Instruments' guidebooks for the TI-84 Plus CE and the TI-89 Titanium.

The numbers

WhatCount
Programs in the library165
Programs with oracle test cases137
Test cases778
Checks those cases make on the calculator4981
Checked against an independent method127
Checked against the textbook formula10

The other 28 programs are checked by separate automated runs on the TI-BASIC interpreter, the engineering suite against its own oracle values. They are not counted in this table.

See for yourself