In the software development process, a reference implementation (or, less frequently, sample implementation or model implementation) is a program that implements all requirements from a corresponding specification. The reference implementation often accompanies a technical standard, and demonstrates what should be considered the "correct" behavior of any other implementation of it.
A reference implementation may or may not be production quality. For example, the Fraunhofer reference implementation of the MP3 standard usually does not compare favorably to other common implementations, such as LAME, in listening tests that determine sound quality.[5] In contrast, CPython, the reference implementation of the Python programming language,[6] is also the implementation most widely used in production.
Testing
Testing the implementation-vs-specification relationship further enhances the production's inter-process efficiencies:
A reference implementation is, in general, an implementation of a specification to be used as a definitive interpretation for that specification. During the development of the ... conformance test suite, at least one relatively trusted implementation of each interface is necessary to (1) discover errors or ambiguities in the specification, and (2) validate the correct functioning of the test suite.[7]
Characteristics of a Reference Implementation:
Developed concurrently with the specification and test suite;
Verifies that specification is implementable;
Enables the test suite to be tested;
Serves as a Gold Standard against which other implementations can be measured;
Helps to clarify the intent of the specification in situations where conformance tests are inadequate[8]
^Bertoni, Guido; Daemen, Joan; Peeters, Michaël; Van Assche, Gilles (2013-02-27). "KeccakReferenceAndOptimized-3.2.zip"(ZIP). keccak.noekeon.org. /KeccakReferenceAndOptimized/Sources/mainReference.c. Archived from the original(ZIP) on 2013-09-30. Retrieved 2016-02-06. The Keccak sponge function, designed by: Bertoni, Guido; Daemen, Joan; Peeters, Michaël; Van Assche, Gilles. For more information, feedback or questions, please refer to our website: keccak.noekeon.org/ / Implementation by the designers, hereby denoted as "the implementer". / To the extent possible under law, the implementer has waived all copyright and related or neighboring rights to the source code in this file. creativecommons.org/publicdomain/zero/1.0/
^Snow, Eric (2012-04-26). "PEP 421 – Adding sys.implementation". peps.python.org. Python Software Foundation (which owns "python.org"). Motivation. Archived from the original on 2022-04-11. Retrieved 2017-01-06. For a number of years now, the distinction between Python-the-language and CPython (the reference implementation) has been growing. Most of this change is due to the emergence of Jython, IronPython, and PyPy as viable alternate implementations of Python.