For faster navigation, this Iframe is preloading the Wikiwand page for 参考实现.

参考实现

此条目翻译自英语维基百科,需要相关领域的编者协助校对翻译。如果您精通本领域,又能清楚地将英语翻译为中文,欢迎您协助校订翻译。原文参见en:Reference implementation

软件开发过程中,参考实现(英语:Reference implementation,中国大陆作参考实现,台湾作参考实作)是实现对应规范中所有要求的一种电脑程序,也偶尔被称作引用实装示例实现(sample implementation)或模型实现(model implementation)。参考实现通常伴随技术标准,演示了其他任何实现应做到的被视为“正确”的行为。

特征和例子

[编辑]

算法的参考实现(例如密码算法)通常来自标准化流程。在密码学领域,通常会将原始码作为公有领域软件发布。例如CERN httpd[1]Serpent密码、base64变种[2]、以及SHA-3[3]Openwall项目英语Openwall Project维护了一个包含多种算法的在公有领域下发布的参考实现原始码名单。[4]

参考实现可能达到或者未达到生产级质量。例如,弗劳恩霍夫协会MP3标准的参考实现通常无法与其他常见的实现(如LAME)在音质测试中相媲美[来源请求]。与之相反,Python编程语言的参考实现CPython则在生产中使用最为广泛[5]

测试

[编辑]

对参考实现进行软件测试可以提高规范的生产效率:

参考实现通常作为最终解释一个规范的实现(此定义有些大胆,但一般如此)。在一致性测试包的开发中,每个接口需要至少一个相对受信任的实现,以做到:(1) 发现规范中的错误和歧义,以及(2) 验证测试包的功能正确。[6]

参考实现的特征有:

  1. 与规范和测试包一同开发;
  2. 验证规范是可实现的;
  3. 确认测试包正常工作;
  4. 作为衡量其他实现的金标准;
  5. 一致性测试英语Conformance testing不充分时,有助于阐明规范的意图[7]

参考文献

[编辑]
  1. ^ The birth of the web Licensing the web on cern.ch (2014)
  2. ^ libb64页面存档备份,存于互联网档案馆) on sourceforge
  3. ^ 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[永久失效链接] 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/"存档副本. [2021-01-09]. 原始内容存档于2013-06-26. 
  4. ^ Source code snippets and frameworks placed in the public domain页面存档备份,存于互联网档案馆) on openwall.info
  5. ^ Snow, Eric. PEP 421 -- Adding sys.implementation. Python.org. Python Software Foundation. 2012-01-26 [2017-01-06]. (原始内容存档于2017-01-07). For a number of years now, the distinction between Python-the-language and CPython (the reference implementation) has been growing. 
  6. ^ 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 Requirements for GSC-IS Reference Implementations]
  7. ^ Curran, Patrick (2003). Conformance Testing: An Industry Perspective. Sun Microsystems. [1]
{{bottomLinkPreText}} {{bottomLinkText}}
参考实现
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?