Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Assertion (software development)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|In computer programming, statement that a predicate is always true at that point in code execution}} {{About|the computer programming concept|assertions in the context of the [[Security Assertion Markup Language]] (SAML) open standard|Security Assertion Markup Language#Assertions}} In [[computer programming]], specifically when using the [[imperative programming]] paradigm, an '''assertion''' is a [[Predicate (mathematical logic)|predicate]] (a [[Boolean-valued function]] over the [[state space]], usually expressed as a [[logical proposition]] using the [[variable (programming)|variable]]s 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 [[Crash (computing)|crashes]] or throws an assertion failure [[exception handling|exception]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)