Your browser does not fully support modern features. Please upgrade for a smoother experience.
Submitted Successfully!
Thank you for your contribution! You can also upload a video entry or images related to this topic. For video creation, please contact our Academic Video Service.
Version Summary Created by Modification Content Size Created at Operation
1 handwiki Vivi Li -- 2349 2022-10-31 01:42:30

Video Upload Options

We provide professional Academic Video Service to translate complex research into visually appealing presentations. Would you like to try it?
Cite
If you have any further questions, please contact Encyclopedia Editorial Office.
HandWiki. Assertion (Software Development). Encyclopedia. Available online: https://encyclopedia.pub/entry/31978 (accessed on 16 October 2026).
HandWiki. Assertion (Software Development). Encyclopedia. Available at: https://encyclopedia.pub/entry/31978. Accessed October 16, 2026.
HandWiki. "Assertion (Software Development)" Encyclopedia, https://encyclopedia.pub/entry/31978 (accessed October 16, 2026).
HandWiki. (2022, October 31). Assertion (Software Development). In Encyclopedia. https://encyclopedia.pub/entry/31978
HandWiki. "Assertion (Software Development)." Encyclopedia. Web. 31 October, 2022.
Assertion (Software Development)
Edit

In computer programming, specifically when using the imperative programming paradigm, an assertion is a predicate (a Boolean-valued function over the state space, usually expressed as a logical proposition using the variables of a program) connected to a point in the program, that always should evaluate to true at that point in code execution. Assertions can help a programmer read the code, help a compiler compile it, or help the program detect its own defects. For the latter, some programs check assertions by actually evaluating the predicate as they run. Then, if it is not in fact true – an assertion failure – the program considers itself to be broken and typically deliberately crashes or throws an assertion failure exception.

assertion predicate boolean-valued

References

  1. C. A. R. Hoare, An axiomatic basis for computer programming, Communications of the ACM, 1969. http://lambda-the-ultimate.org/node/1912
  2. Programming With Assertions, Enabling and Disabling Assertions http://docs.oracle.com/javase/8/docs/technotes/guides/language/assert.html
  3. Jon Jagger, Compile Time Assertions in C, 1999. http://www.jaggersoft.com/pubs/CVu11_3.html
  4. GNU, "GCC 4.3 Release Series — Changes, New Features, and Fixes" https://gcc.gnu.org/gcc-4.3/changes.html
  5. "Static Assertions". D Language Reference. The D Language Foundation. http://dlang.org/version.html#StaticAssert. Retrieved 2022-03-16. 
  6. Official Python Docs, assert statement https://docs.python.org/3/reference/simple_stmts.html#grammar-token-assert-stmt
  7. "Warning Options (Using the GNU Compiler Collection (GCC))". https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wparentheses-367. 
  8. Goldstine and von Neumann. "Planning and Coding of problems for an Electronic Computing Instrument". Part II, Volume I, 1 April 1947, p. 12. https://library.ias.edu/files/pdfs/ecp/planningcodingof0103inst.pdf
  9. Alan Turing. Checking a Large Routine, 1949; quoted in C. A. R. Hoare, "The Emperor's Old Clothes", 1980 Turing Award lecture. https://turingarchive.kings.cam.ac.uk/publications-lectures-and-talks-amtb/amt-b-8
More
Upload a video for this entry
Information
Subjects: Others
Contributor MDPI registered users' name will be linked to their SciProfiles pages. To register with us, please refer to https://encyclopedia.pub/register :
View Times: 712
Entry Collection: HandWiki
Revision: 1 time (View History)
Update Date: 31 Oct 2022
Notice
You are not a member of the advisory board for this topic. If you want to update advisory board member profile, please contact office@encyclopedia.pub.
OK
Confirm
Only members of the Encyclopedia advisory board for this topic are allowed to note entries. Would you like to become an advisory board member of the Encyclopedia?
Yes
No
${ textCharacter }/${ maxCharacter }
Submit
Cancel
There is no comment~
${ textCharacter }/${ maxCharacter }
Submit
Cancel
${ selectedItem.replyTextCharacter }/${ selectedItem.replyMaxCharacter }
Submit
Cancel
Confirm
Are you sure to Delete?
Yes No
Academic Video Service