Everything2
Near Matches
Ignore Exact
Full Text
Everything2

Precondition

created by Webster 1913

(thing) by macro (20 hr) (print)   ?   (I like it!) Sun Jun 12 2005 at 22:48:20

In software engineering, a explicit logical statement that must evaluate to true on entry of a method or component. (Compare with postcondition and invariant). In the design by contract paradigm, pioneered by the Eiffel language, preconditions are embodied as formal assertions that are tested on method entry. Failure of a precondition usually denotes an error on the part of the caller or "client".

Many preconditions, such as the calling convention or correct data type for input parameters, may be enforced via a software development best practice such as coding to interfaces. In this case, the correctness of the precondition is tested when the calling code is first examined, such as in a compilation step. However, other types of preconditions exist - often, software components are brittle because some simple candidates for preconditions (such as "the password cannot be an empty string") remain implicit, and the behavior of the component following a violation of that precondition is unspecified.

Considerable synergy exists between the development of thorough preconditions and black box testing. A requirement of a test plan is definition of the valid inputs and the corresponding expected output. Preconditions can be used to specify which inputs should be considered as valid, and fail fast when violated.


(definition) by Webster 1913 (print) Wed Dec 22 1999 at 2:11:17

Pre`con*di"tion (?), n.

A previous or antecedent condition; a preliminary condition.

 

© Webster 1913.


printable version
chaos

design by contract invariant Eiffel assertion
How to catch a bat Cannibal Chickens do exist postcondition component
Make Money Fast Hall of Humiliation Aspect Oriented Programming Behavior Oriented Programming output
requirement Black box testing Synergy violation
behavior explicit implicit Brittle
compilation best practice software development argument
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
After stirring Everything, these nodes rose to the top:
Fluke
Do you remember how small your body was when you were five?
Irish Free State
MashiMaro
classroom management
Irish
NFL trick plays
Things you can tell just by looking at her
Draft
Crash
Jerry Falwell
Vaguely valid advice to prospective weight trainers
L. Ron Hubbard
New Writeups
aneurin
Earl of Landaff(person)
Heitah
Pseudocide(idea)
XWiz
Google Knol(lede)
Mythi
July 24, 2008(personal)
locke baron
The fall of Earth(fiction)
BookReader
Fear the Cold(dream)
Pavlovna
Kathleen MacInnes(person)
stainedglass
1(fiction)
kalen
Three "T"s(idea)
octillion369
Undead(idea)
archiewood
Ico(fiction)
Heisenberg
Why I love Everything2(log)
octillion369
Death Knight(person)
XWiz
Are you hoping for a miracle?(review)
santo
The Host(review)
This affordable entertainment brought to you by The Everything Development Company