Reference implementation: Difference between revisions

Content deleted Content added
A to the
Tags: Visual edit Mobile edit Mobile web edit
fixed dead link, added reference, updated short description, used cite web in place of webarchive
 
(19 intermediate revisions by 16 users not shown)
Line 1:
{{Short description|Implementation of a specification which serves as an example}}
{{wiktionary}}
 
{{Wiktionary}}
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.
 
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.
==Characteristics and examples==
Reference implementations of algorithms, for instance [[cryptographic algorithm]]s, are often the result or the input of [[standardization]] processes. In this function they are often dedicated to the [[public ___domain]] with their [[source code]] as [[public ___domain software]]. Examples are the first [[CERN HTTPd|CERN's httpd]],<ref>[https://web.archive.org/web/20140817185526/http://home.web.cern.ch/topics/birth-web/licensing-web The birth of the web Licensing the web] on cern.ch (2014)</ref> [[Serpent (cipher)|Serpent]] cipher, [[base64]] variants,<ref>[http://libb64.sourceforge.net/ libb64] on sourceforge</ref> and [[SHA-3]].<ref>[https://web.archive.org/web/20170630041850/http://keccak.noekeon.org/KeccakReferenceAndOptimized-3.2.zip KeccakReferenceAndOptimized-3.2.zip] mainReference.c ''"The Keccak sponge function, designed by Guido Bertoni, Joan Daemen, Michaël Peeters and Gilles Van Assche. For more information, feedback or questions, please refer to our website: http://keccak.noekeon.org/Implementation{{dead link|date=April 2018 |bot=InternetArchiveBot |fix-attempted=yes }} 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. https://creativecommons.org/publicdomain/zero/1.0/"''</ref> The [[Openwall Project]] maintains a list of several algorithms with their reference [[source code]] in the public ___domain.<ref>[http://openwall.info/wiki/people/solar/software/public-___domain-source-code Source code snippets and frameworks placed in the public ___domain] on [[Openwall Project|openwall.info]]</ref>
 
== Characteristics and examples ==
A reference implementation may or may not be production quality. For example, the [[Fraunhofer Society|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.{{citation needed|date=January 2012}} In contrast, [[CPython]], the reference implementation of the [[Python programming language]],<ref>{{cite web |last1=Snow |first1=Eric |title=PEP 421 -- Adding sys.implementation |url=https://www.python.org/dev/peps/pep-0421/#motivation |website=Python.org |publisher=Python Software Foundation |access-date=6 January 2017 |date=2012-01-26 |quote=For a number of years now, the distinction between Python-the-language and CPython (the reference implementation) has been growing. |archive-url=https://web.archive.org/web/20170107095832/https://www.python.org/dev/peps/pep-0421/#motivation |archive-date=7 January 2017 |url-status=dead |df=dmy-all }}</ref> is also the implementation most widely used in production.
Reference implementations of algorithms, for instance [[cryptographic algorithm]]s, are often the result or the input of [[standardization]] processes. In this function they are often dedicated to the [[public ___domain]] with their [[source code]] as [[public ___domain software]]. Examples are the first [[CERN HTTPd|CERN's httpd]],<ref>{{Cite web |url=https://home.web.cern.ch/science/computing/birth-web/licensing-web |title=Licensing the Web: For everyone |access-date=2014-08-17 |website=[[CERN]] |last=Smith |first=Tim |archive-url=https://web.archive.org/web/2014081718552620211210174700/httphttps://home.web.cern.ch/topicsscience/computing/birth-web/licensing-web The|archive-date=2021-12-10 birth|url-status=live of|last2=Flückiger the web Licensing the web] on cern.ch (2014)|first2=François}}</ref> [[Serpent (cipher)|Serpent]] cipher, [[base64]] variants,<ref>[http{{Cite web |url=https://libb64.sourceforge.net/ |title=libb64: Base64 Encoding/Decoding Routines |date=2005-11-20 |access-date=2016-02-06 |website=[[SourceForge]] on|last=Devolve |first=Chris |archive-url=https://web.archive.org/web/20100730214031/http://libb64.sourceforge.net:80/ |archive-date=2010-07-30 |url-status=live}}</ref> and [[SHA-3]].<ref>[{{Cite web |url=http://keccak.noekeon.org/KeccakReferenceAndOptimized-3.2.zip |title=KeccakReferenceAndOptimized-3.2.zip |date=2013-02-27 |access-date=2016-02-06 |website=keccak.noekeon.org |last=Bertoni |first=Guido |archive-url=https://web.archive.org/web/2017063004185020130930182136id_/http://keccak.noekeon.org/KeccakReferenceAndOptimized-3.2.zip KeccakReferenceAndOptimized|archive-3.2.zip]date=2013-09-30 |url-status=dead |last2=Daemen |first2=Joan |at=/KeccakReferenceAndOptimized/Sources/mainReference.c ''"|format=ZIP |archive-format=ZIP |quote=The Keccak sponge function, designed by Guido: Bertoni, JoanGuido; Daemen, MichaëlJoan; Peeters, and GillesMichaël; Van Assche, Gilles. For more information, feedback or questions, please refer to our website: http://keccak.noekeon.org/Implementation{{deadcbignore}} link|date=April/ 2018 |bot=InternetArchiveBot |fix-attempted=yes }}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. https://creativecommons.org/publicdomain/zero/1.0/"''{{cbignore}} |last3=Peeters |first3=Michaël |last4=Van Assche |first4=Gilles}}</ref> The [[Openwall Project]] maintains a list of several algorithms with their reference [[source code]] in the public ___domain.<ref>[http{{Cite web |url=https://openwall.info/wiki/people/solar/software/public-___domain-source-code |title=Source code snippets and frameworks placed in the public ___domain] on|date=2009-11-05 |access-date=2017-11-16 |website=[[Openwall Project|Openwall Community Wiki]] |author1=solar |archive-url=https://web.archive.org/web/20190126164336/https://openwall.info]]/wiki/people/solar/software/public-___domain-source-code |archive-date=2019-01-26 |url-status=live}}</ref>
 
A reference implementation may or may not be production quality. For example, the [[Fraunhofer Society|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.<ref>{{citationCite web |url=https://forum.audacityteam.org/t/media-info-doesnt-match-format-options-selected-for-exported-mp3s/53082 |title=Media Info doesn't match Format Options selected for Exported MP3's - #6 by steve - Windows needed|date=January2019-06-11 2012|access-date=2024-09-05 |website=Audacity Forum |last=Daulton |first=Steve |archive-url=https://web.archive.org/web/20231202212500/https://forum.audacityteam.org/t/media-info-doesnt-match-format-options-selected-for-exported-mp3s/53082 |archive-date=2023-12-02 |url-status=live}}</ref> In contrast, [[CPython]], the reference implementation of the [[Python programming language]],<ref>{{citeCite web |last1url=Snow |first1=Erichttps://peps.python.org/pep-0421/#motivation |title=PEP 421 --{{ndash}} Adding sys.implementation |date=2012-04-26 |access-date=2017-01-06 |website=[[Python (programming language)|peps.python.org]] |last=Snow |first=Eric |archive-url=https://wwwweb.pythonarchive.org/devweb/20220411231443/https://peps.python.org/pep-0421/#motivation |websitearchive-date=Python.org2022-04-11 |url-status=live |publisher=[[Python Software Foundation]] |access-date=6(which Januaryowns 2017"python.org") |dateat=2012-01-26Motivation |quote=For a number of years now, the distinction between Python-the-language and CPython (the reference implementation) has been growing. |archive-url=https://web.archive.org/web/20170107095832/https://www.python.org/dev/peps/pep-0421/#motivationMost |archive-date=7of Januarythis 2017change |url-status=deadis |df=dmy-alldue to the emergence of Jython, IronPython, and PyPy as viable alternate implementations of Python.}}</ref> is also the implementation most widely used in production.
==Testing==
[[Software testing|Testing]] the implementation-vs.-specification relationship further enhances the [[Product family engineering|production]]'s inter-process efficiencies:
 
== Testing ==
{{quote|A reference implementation is, in general, an implementation of a specification to be used as a definitive interpretation for that specification (This definition is a bit grandiloquent but works). During the development of the&nbsp;... 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.<ref>Dalci, Eric; Fong, Elizabeth; Goldfine, Alan (2003). ''Requirements for GSC-IS Reference Implementations''. National Institute of Standards and Technology, Information Technology Laboratory. [https://web.archive.org/web/20060928231404/http://xw2k.sdct.itl.nist.gov/smartcard/document/ref-imp51.pdf
[[Software testing|Testing]] the implementation-vs.-specification relationship further enhances the [[Product family engineering|production]]'s inter-process efficiencies:
Requirements for GSC-IS Reference Implementations]</ref>}}
 
{{quoteblockquote|A reference implementation is, in general, an implementation of a specification to be used as a definitive interpretation for that specification (This definition is a bit grandiloquent but works). During the development of the&nbsp;... 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.<ref>Dalci,{{Cite Eric;web Fong, Elizabeth; Goldfine, Alan (2003)|url=http://xw2k.sdct.itl.nist.gov/smartcard/document/ref-imp51.pdf ''|title=Requirements for GSC-IS Reference Implementations''. |date=2003-03-26 |access-date=2006-07-22 |website=[[National Institute of Standards and Technology#Organization|National Institute of Standards and Technology, Information Technology Laboratory.]] |last=Dalci [|first=Eric |archive-url=https://web.archive.org/web/2006092823140420060928231404id_/http://xw2k.sdct.itl.nist.gov/smartcard/document/ref-imp51.pdf |archive-date=2006-09-28 |url-status=dead |last2=Fong |first2=Elizabeth |last3=Goldfine |first3=Alan}}</ref>}}
{{quote|Characteristics of a Reference Implementation:
 
{{quoteblockquote|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 testing|conformance tests]] are inadequate<ref>Curran,{{Cite Patrickweb (2003)|url=http://vote.nist.gov:80/speeches/1%20-%20Specification%20Panel/6%20-%20Curran.pdf ''|title=Conformance Testing: An Industry Perspective''. |date=2003-12-10 Sun|access-date=2006-07-22 Microsystems.|website=[[National Institute [of Standards and Technology]] |last=Curran |first=Patrick |archive-url=https://web.archive.org/web/2012030300005120031219120934id_/http://vote.nist.gov:80/speeches/1%20-%20Specification%20Panel/6%20-%20Curran.pdf |archive-date=2003-12-19 |url-status=dead |publisher=[[Sun Microsystems]]}}</ref>}}
 
== References ==
{{Reflist}}
 
[[Category:Reference standards]]
[[Category:Test items]]
[[Category:Software engineering terminology]]