Factbites
 Where results make sense
About us   |   Why use us?   |   Reviews   |   PR   |   Contact us  

Topic: Postconditions


Related Topics

  
  JOT: Journal of Object Technology - Supporting Design by Contract in Java
Postconditions are checked before invariants, but invariants are also evaluated in the case of exceptional method termination.
Postconditions can refer to the old object state (this is the state at the time of method invocation) by using the special syntax @@(expr) and to the method’s return value by @@().
The postcondition method cannot be invoked in the finally block because it shall not be executed on exceptional termination.
www.jot.fm /issues/issue_2002_08/article4   (5174 words)

  
 Debugging Lab
Postconditions for this message are that the pointy shape has been drawn, and the robot is standing on the tile furthest from the point on the lower or righthand line, facing away from the point.
Postconditions for this message are that the tree has been drawn, and the robot is standing at the base of the trunk, facing away from the fork.
The message’s postconditions are that the returned value is the number of tiles the robot can reach by moving forward or backward from its initial tile, including that initial tile, and that the robot is standing on the initial tile, facing in its original direction.
www.charlesriver.com /algorithms/lab-debug.html   (1267 words)

  
 Proposal to add Contract Programming to C++ (revision 4)
Postconditions can be made stronger in a derived class as seen in the subcontracting_example.hpp.
postconditions from a function in a base class and the overridden version in a derived class are ANDed together [4].
When postconditions and invariants are disabled, probably a library-build-time decision, the first two functions above are identical, and may be implemented as a single function with two labels.
www.open-std.org /JTC1/SC22/WG21/docs/papers/2006/n1962.html   (2731 words)

  
 Specifications Of Collection And List
Postconditions: P has been called with every element in C. If C is a list: if E1 occurs before E2 in C, then the call P(E1) is made before the call P(E2).
Postconditions: W' is on the first element in L. Storage is allocated as needed.
Postconditions: W' is on the element that follows the element W was on
members.tripod.com /sbge/handout4.html   (712 words)

  
 Dr. Dobb's | Implementing Assertions for Java | July 22, 2001
Postconditions for a method are evaluated at all exit points of the method.
Postcondition statements should have a way to refer both to the return value of the function and to the initial value of any of the function's arguments.
Properly dealing with inheritance requires that when a precondition or postcondition of a polymorphic method is evaluated, the precondition or postcondition in the superclass' corresponding method may also have to be evaluated.
www.ddj.com /dept/java/184410464   (2422 words)

  
 Postcondition - Wikipedia, the free encyclopedia
In computer programming, a postcondition is a condition or predicate that must always be true just after the execution of some section of code or after an operation in a formal specification.
Postconditions are sometimes tested using assertions within the code itself.
Often, postconditions are simply included in the documentation of the affected section of code.
en.wikipedia.org /wiki/Postcondition   (88 words)

  
 BinaryTree   (Site not responding. Last check: 2007-09-02)
Postconditions: If the left child of the current node is invalid, the cursor is invalid.
Postconditions: The reference of the current node is changed.
Preconditions: cb is not null Postconditions: The tree is unchanged.
www.macalester.edu /~shoop/courses/cs124_f03/TSCh7Docs/BinaryTree.html   (940 words)

  
 [No title]
Postconditions of visit_your_office: you have change and you know where everything is (since you can look it up in, say, the phone directory).
Now taking into account the postconditions of visit_secretary, we're in a state in which we are hungry, we have change, a secretary is available, and we know where everything is. This satisfies all the conditions of the visit_vending_machine operator, so we apply it.
The postconditions of one concurrent operator might undo the preconditions for another, for instance, requiring that the operators be done in sequence instead of in parallel.
www.cs.nps.navy.mil /people/faculty/rowe/book/chap11.html   (5468 words)

  
 Checks: Pre- and Postconditions, Assertions, and Warnings
If a postcondition fails it is the fault of this routine, so the author of the code is responsible.
For example, if the intersection of two lines is computed, the postcondition of this routine may state that the intersection point lies on both lines.
Thus we want to check the postcondition that the polygon is indeed convex, which we consider an expensive check.
www.cgal.org /DManual/html/Developers_manual/Chapter_checks.html   (762 words)

  
 [No title]
The reason it's difficult to specify a postcondition is that it can be difficult to describe the underlying data structure.
The real difficulty with describing the postcondition is to use some math terminology, which is precise and short, so that we avoid discussing code, which can be verbose.
The postcondition only applies to the return value, which returns true if size is equal to 0.
www.cs.umd.edu /class/fall2002/cmsc214/Projects/P1/proj1.contract.html   (2067 words)

  
 Validating Pre- and Postconditions
Pre- and postconditions are constraints that define a contract that an implementation of the operation has to fulfill.
All postconditions specified for the operation are evaluated in context of the current system state and the pre-state saved at operation entry time.
The postcondition reflects the inductive case of the definition of the factorial function.
www.db.informatik.uni-bremen.de /projects/USE/prepost.html   (1314 words)

  
 [No title]
POSTCONDITIONS: State of the die is not changed.
If it was already in the set, the number of elements is not changed, otherwise the number of elements in the set has increased by 1.
If the element was removed, the size of the set has been decremented by 1, otherwise the size is unchanged.
condor.depaul.edu /~glancast/224class/docs/lecJun23.html   (1898 words)

  
 jContractor: Crash Course
A postcondition method takes the same arguments as the method that it corresponds to, plus an additional argument of the method's return type (or java.lang.Void for methods that return void).
Postconditions may refer to the state of the object at method entry through the OLD instance variable.
Contracts from interfaces are logical or-ed with the superclass and subclass contracts in the case of preconditions, and logical-anded in the case of postconditions and invariants, just as you would expect.
jcontractor.sourceforge.net /doc/crashcourse.html   (1566 words)

  
 Design by contract
Postconditions are checked immediately after the body of the method has been left (if no exception has been thrown by the method body.
And for postconditions po1 and po2: If a concrete invocation of the method (with a call object of class C2) is admissible according to preconditions pr1 (and therefore, because of 1.
It may then falsely come to the surface as a postcondition violation which is caused by the fact that the ORed preconditions are too weak to actually ensure the intended postcondition.
lavape.sourceforge.net /doc/html/DBC.htm   (1616 words)

  
 Specification of Table   (Site not responding. Last check: 2007-09-02)
Postconditions: the boolean is true if T is empty, false otherwise.
Postconditions: T' is T with all components with key K removed.
Postconditions: if T contains a component with key K, then C is this component and F is true, otherwise F is false (and there is no condition on C).
www.site.uottawa.ca /~holte/T26/handout11   (144 words)

  
 Proof of a Looping Program
The postconditions assert what is true after the code is terminated (assuming of course, that the preconditions were true).
The above is a proof that the postconditions are true upon termination of the loop.
We used the invariant to show that the postconditions were true if the loop terminated.
www.cs.toronto.edu /~biswas/csc148/tut8/loop.html   (1109 words)

  
 darron schall :: The Stack ADT
Instead, document ADTs with"“preconditions" and "postconditions." Preconditions are statements that are assumed to be true before an operation executes.
Postconditions are statements that will be true after an operation has completed.
Whenever possible, try to define the preconditions and postconditions in terms of the parameters of the operation.
www.darronschall.com /weblog/archives/000047.cfm   (945 words)

  
 Lecture 4 - Our Specification Of Collection - Details
All dynamically allocated memory associated with C is returned to the global pool.
As the postconditions state, C2 is undefined after the JOIN operation.
P takes two parameters: the first is of type pointer to `collection element', and the second is D. postconditions: P has been called with every element of C. This is an extremely powerful operation, even though it is very simple.
www.cs.ualberta.ca /~holte/T26/collection-spec-details.html   (1412 words)

  
 JBoss.com - Wiki - DesignByContractAspect
You specify pre-, postconditions, and invariants by simply annotating the method or class.
Postconditions specify conditions that must be true after a method has executed.
As you can see, you specify pre-, postconditions, and invariants by simply annotating the method or class.
wiki.jboss.org /wiki/Wiki.jsp?page=DesignByContractAspect   (1825 words)

  
 Larman: Chapter 13
Postconditions are declarations about the Domain Model objects that are true when the operation has finished
Express postconditions in the past tense, to emphasize they are declarations about a state change in the past.
State postconditions in a declarative, passive past tense form to emphasize the declaration of a state change rather than a design of how it is going to be achieved.
csis.pace.edu /~marchese/CS616/Lec6/se_l6.htm   (1084 words)

  
 Needham-Schroeder key distribution protocol
The proof of A's postconditions (steps 1 through 9 of the protocol) are presented in Table 14, generating the following preconditions for A:
The first three postconditions are symmetric to those of A. The last is used to help prove currency, and requires an additional premise that N
The proof of B's postconditions is shown in Table 15 and generates the following preconditions for B:
dimacs.rutgers.edu /Workshops/Security/program2/alvesfoss/node10.html   (425 words)

  
 JOT: Journal of Object Technology - Evaluation of Assertion Support for the Java Programming Language
Assertions may be specified at the class level (invariants) or on the method level (preconditions and postconditions).
A precondition is associated with a particular method and imposes a correctness condition on the client of the method; i.e., the client must ensure that the precondition is fulfilled; otherwise the method is not executed.
A postcondition is also associated with a particular method, but it imposes a correctness condition on the implementation of the method; a violation of a postcondition indicates an error in the implementation of the method.
www.jot.fm /issues/issue_2002_08/article1   (3811 words)

  
 xTurtle Lab 2
The postconditions of a program are things that are true after the program has been executed.
Include comments in your program that discuss specific preconditions and postconditions for various parts of the program, and explain how they were used -- or could have been used -- in developing the program.
In an xTurtle subroutine, the preconditions and postconditions usually include statements about the position and orientation of the turtle and about what is drawn on the screen.
math.hws.edu /TMCM/java/labs/xTurtleLab2.html   (2155 words)

  
 Script: dbc.r
Blocks of preconditions and postconditions are formed from the series of block conditions.
A shorter variety of 'contract is a 'contr function, which assumes that local words are already defined within the spec: g: contr spec pre body post Alternatively, one may prefer using the 'wrap-dbc' function, which wraps a pre-post contract around any existing regular function 'f, as in: g: wrap-dbc pre :f post.
Suggested tests: execute examples with good and forbidden inputs to test the preconditions, recompile postconditions to something ridiculously incorrect and watch how they kick in, check how the sources of examples look like and play with the help and help' functions.
www.reboltech.com /library/html/dbc.html   (757 words)

  
 iContract: Design by Contract in Java - Java World
Consequently, postconditions are executed after a method completes.
Postconditions involve the old system state, the new system state, the method arguments, and the method's return value.
If a postcondition is violated, the software component has a bug.
www.javaworld.com /javaworld/jw-02-2001/jw-0216-cooltools.html   (643 words)

  
 7.5 Subdomain decomposition for classes
Pre- and postconditions give information on what the state of an object will be after triggering an event, assuming that the initial state (i.e.
Pre- and postconditions are cumulative in a formula, and can be used to determine equalities that hold between arguments, relatively to their storage in places.
Second, pre- and postconditions of methods of the synchronization expression have to be considered as follows:
lglwww.epfl.ch /Team/SB/PhD/html/phd.2f.html   (2261 words)

  
 Postconditions
When the postcondition is checked at the end, each
Result expressions are essentially a way to refer to the return value of a method in a postcondition (the post condition is outside the scope of the routine and hence cannot access variables in the routine).
Result expressions may only appear within the postconditions of methods that have return values and may not appear within
www.gnu.org /software/sather/docs-1.2/tutorial/safety2172.html   (368 words)

  
 COMP 114   (Site not responding. Last check: 2007-09-02)
That is, all procedures and functions will have pre and postconditions; all loops will have pre and postconditions and a loop invariant, and some selects will have pre and postconditions (although most probably will not).
You need not write pre or postconditions nor a loop invariant for the main user interface loop (the loop that reads a user’s commend and executes it).
Write any necessary wrap-up code to establish the postcondition given the loop invariant and the exit condition.
www.cs.unc.edu /~weiss/COMP114/Spring99/Program2.html   (388 words)

  
 Succeeding with Use Cases: Working Smart to Deliver Quality - $35.99   (Site not responding. Last check: 2007-09-02)
Eventually, as the USDP matured, I began to notice that others were starting to mention QFD in conjunction with use cases and discuss operational profiles of use cases.
The goal of this chapter is nothing less than providing you a whole new perspective on use case preconditions and postconditions.
Not only does the model-based specification with its preconditions, postconditions, and invariants provide an integrated basis for use case failure analysis, taken as a unit they are a veritable triple threat test case.
www.informit.com /title/0321316436   (3182 words)

  
 [No title]
Postconditions: the database will be updated will the new information.
Preconditions: it takes as parameters the keywords entered by the user and if applicable the categories they would like to search.
Postconditions: returns item the user was searching for e.g.
cs.furman.edu /~treu/cs95/docs/ccscse/DB_design.doc   (481 words)

  
 Postconditions ( PostCond )   (Site not responding. Last check: 2007-09-02)
An instance P of type PostCond is a postcondition of a module M.
creates an instance P of type PostCond initialized to a postcondition for m output parameters.
Each key set is initialized to the empty set.
www.ads.tuwien.ac.at /AGD/MANUAL/PostCond.html   (72 words)

Try your search on: Qwika (all wikis)

Factbites
  About us   |   Why use us?   |   Reviews   |   Press   |   Contact us  
Copyright © 2005-2007 www.factbites.com Usage implies agreement with terms.