The usual way (not necessarily the best way) is to attach a note to the
class and document the invariant there in OCL. It is perhaps telling that
Rose provides no special place for putting these constraints.

If you look at the book "Precise UML Modeling with The Object Constraint
Language" you'll see some suggestions on how to best achieve this. Tools
like Modelrun require that you write OCL constraints in certian places in
certian formats in order for the tool to work. I refer (like many) to
capture constraints in separate files (one for each class) so they can be
easily parsed. I also have a spreadsheet for every class which I use to
build Response Matrices and tests derived from action constraints. It's
extra work, but well worth it if you believe in up-front testing (XP).

There are 5 tutorials on Design by Contract on my site, which also cover the
generation of Response Matrices (a kind of decision table) directly from pre
and post-conditions, as well as using logical equivalence to build semantics
from invariants.

Cheers

Jason Gorman
http://www.xml-objects.com

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Chris Gardner
Sent: 22 January 2001 21:02
To: '[EMAIL PROTECTED]'
Subject: (ROSE) Invariants



Besides the class documentation itself, any recommendations on documenting
class invariants in Rose a la the pre- and postcondition tabs on the class
spec?
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************


************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages: 
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************

Reply via email to