This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

What is Object Constraint Language (OCL)?

 
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I am correct, OCL is a subset of UML.How and why is it used?
Thanks in advance,
Sandeep
 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And I quote: (Fowler, p.62):
"The UML allows you to use anything to describe constraints. The only rule is that you put them inside braces ({}). I like using an informal English, emphasizing readability. The UML also provides a formal Object Constraint Language (OCL); see Warmer and Kleppe (1998)".
Also, from the abstract of the Warmer and Kleppe book (at the end of the Fowler book):
"The OCL is a new notational language, a subset of the UML, that allows developers to express a set of rules that govern very specific aspects of an object in OO apps. With the OCL, developers are able to more easily express unique limitations and write the fine print that is often necessary in complex software designs."
What would be interesting to know is what is the extent of use of OCL is the real world. (or is it just an academic/quasi-academic thing). I wonder if there are any case studies of projects where OCL has been used and its use was necessary. What fields/domains would it be that require such formality in expressing constraints that plain English would not be sufficient?
Panagiotis.
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also any specific sites devoted to OCL and why this language is deemed important.Can someone give an example on what can't be done by UML, but is possible only using OCL
Thanks,
Sandeep
 
Author
Posts: 6049
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This sounds similar to asserts. At MIT there was a group called "Theory of Distributed Systems Group." They looked at real-time and/or mission critical systems which needed to have provable properties. One porject they had involved a computer run monorail system for a small town. They needed to prove things, e.g. two tranport units would never collide. I suspect constraints are used, just only by a small percentage of mission critical software. (I'll bet NASA uses it, too.)
--Mark
hershey@vaultus.com
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark, Do you see OCL being used more than UML?
-- Sandeep
 
Can you shoot lasers out of your eyes? Don't look at this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic