Contents 1 Description 2 Relation 2.1 OCL and UML 2.2 OCL and MOF 2.3 OCL and QVT 3 Alternatives 4 Example 4.1 Constraints 4.2 OCL Constraints 5 See also 6 References 7 External links


Description[edit] OCL is a descendant of Syntropy, a second-generation object-oriented analysis and design method. The OCL 1.4 definition specified a constraint language. In OCL 2.0, the definition has been extended to include general object query language definitions. OCL statements are constructed in four parts: a context that defines the limited situation in which the statement is valid a property that represents some characteristics of the context (e.g., if the context is a class, a property might be an attribute) an operation (e.g., arithmetic, set-oriented) that manipulates or qualifies a property, and keywords (e.g., if, then, else, and, or, not, implies) that are used to specify conditional expressions.


Relation[edit] OCL and UML[edit] OCL supplements UML by providing expressions that have neither the ambiguities of natural language nor the inherent difficulty of using complex mathematics. OCL is also a navigation language for graph-based models. OCL and MOF[edit] OCL makes a Meta-Object Facility model more precise by associating assertions with its meta-elements. OCL and QVT[edit] Of particular importance to Model Driven Engineering (MDE) or model-driven architecture is the notion of Model transformation. The OMG has defined a specific standard for model transformation called MOF/QVT or in short QVT. Several model transformation languages like GReAT, VIATRA, or Tefkat are presently available, with different levels of compliance with the QVT standard. Many of these languages are built on top of OCL, which is the main part of the QVT-compliance.


Alternatives[edit] Being a rule-based validation language, Schematron may be considered an alternative to OCL. However Schematron works for Extensible Markup Language (XML) trees while OCL makes it possible to navigate MOF-based models and meta-models (i.e. XML Metadata Interchange (XMI) trees). In other words, OCL relates to UML or MOF similarly to how Schematron relates to XML. (Note that Schematron uses XPath to navigate inside the XML trees.) Being a model specification language permitting designers to decorate a model or a meta-model with side-effect-free annotations, OCL could be replaced by languages like Alloy. Automated OCL generation is possible through Natural Language like NL2OCL.[3]


Example[edit] Constraints[edit] The age of a person is not negative. A person is younger than its parents. After a birthday, a person becomes one year older. A Person has 2 parents at max. After somebody got a child, his/her child-set is not empty, and it is larger than before. Only an adult can be owner of a car. The first registration of a car can not be before it is built. Every Person, that has a car has at least one car which is younger than the Person. Nobody can be his/her own parent. There's at least one Person which owns a car. OCL Constraints[edit] context Person inv: self.age >=0 context Person inv: self.parents->forAll(e|e.age>self.age) context Person::hasBirthday() post: self.age=self.age@pre+1 context Person inv: self.parents->size()<=2 context Person::getsChild() post: self.childs->notEmpty() and self.childs->size() > self.childs@pre->size() context Person inv: self.age<18 implies self.cars->isEmpty() context Auto inv: self.registration>=self.constructionYear context Person inv: self.cars->notEmpty() implies self.cars->exists( a | Calendar.YEAR - a.constructionYear < self.age) context Person inv: self.parents->excludes(self) context Person inv: Person.allInstances()->exists(p | p.cars->size() > 0)


See also[edit] Computer model Data mapping Domain Specific Language (DSL) Domain-specific modelling (DSM) Eclipse GMT Project Gello Expression Language Glossary of Unified Modeling Language terms Intentional Programming (IP) List of UML tools Meta-modeling Meta-modeling technique Meta-Object Facility (MOF) Metadata Model-based testing (MBT) Model-driven architecture (MDA) Model Driven Engineering (MDE) Model Transformation Language (MTL) Modeling language Modeling perspectives MOFM2T Object-oriented analysis and design (OOAD) MOF Queries/Views/Transformations (QVT) Semantic translation Transformation language (TL) UML tool Vocabulary-based transformation XMI XML transformation language (XTL)


References[edit] ^ Object Management Group (OMG); Object Constraint Language Specification, Chapter 7 of OMG Unified Modeling Language Specification, Version 1.3, March 2000 (first edition) ^ Object Management Group (OMG); Object Constraint Language OMG Available Specification Version 2.0, May 2006 ^ Imran Sarwar Bajwa (October 2010). "OCL Constraints Generation from Natural Language Specification, 2010". IEEE. 


External links[edit] OMG OCL specification OCL Portal - The center for OCL related information OCL page of Computer Science Dept. of CSUSB (brief OCL 2.0 syntax) Octopus: OCL Tool for Precise Uml Specifications (OCL checker) Dresden OCL Toolkit (OCL Toolkit, various OCL related publications) HOL-OCL (An interactive theorem proof environment for OCL, various OCL related publications) OCL for Java tutorial on ParlezUML Article on using EMF's OCL in Java code UML link page on cetus-links.org USE (UML-based Specification Environment) (OCL Tool for model validation, various OCL related publications) OCL tutorial NL2OCL (OCL Tool for invariant generation from NL) v t e Query languages In current use .QL ALPHA CQL Cypher D DMX Datalog Gremlin ISBL LDAP LINQ MQL MDX OQL OCL QUEL SMARTS SPARQL SQL XQuery XPath Proprietary YQL Superseded CODASYL v t e ISO standards by standard number List of ISO standards / ISO romanizations / IEC standards 1–9999 1 2 3 4 5 6 7 9 16 31 -0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 128 216 217 226 228 233 259 269 302 306 428 518 519 639 -1 -2 -3 -5 -6 646 690 732 764 843 898 965 1000 1004 1007 1073-1 1413 1538 1745 1989 2014 2015 2022 2047 2108 2145 2146 2240 2281 2709 2711 2788 2848 2852 3029 3103 3166 -1 -2 -3 3297 3307 3602 3864 3901 3977 4031 4157 4217 4909 5218 5428 5775 5776 5800 5964 6166 6344 6346 6385 6425 6429 6438 6523 6709 7001 7002 7098 7185 7200 7498 7736 7810 7811 7812 7813 7816 8000 8178 8217 8571 8583 8601 8632 8652 8691 8807 8820-5 8859 -1 -2 -3 -4 -5 -6 -7 -8 -8-I -9 -10 -11 -12 -13 -14 -15 -16 8879 9000/9001 9075 9126 9293 9241 9362 9407 9506 9529 9564 9594 9660 9897 9899 9945 9984 9985 9995 10000–19999 10005 10006 10007 10116 10118-3 10160 10161 10165 10179 10206 10218 10303 -11 -21 -22 -28 -238 10383 10487 10585 10589 10646 10664 10746 10861 10957 10962 10967 11073 11170 11179 11404 11544 11783 11784 11785 11801 11898 11940 (-2) 11941 11941 (TR) 11992 12006 12182 12207 12234-2 13211 -1 -2 13216 13250 13399 13406-2 13450 13485 13490 13567 13568 13584 13616 14000 14031 14224 14289 14396 14443 14496 -2 -3 -6 -10 -11 -12 -14 -17 -20 14644 14649 14651 14698 14750 14764 14882 14971 15022 15189 15288 15291 15292 15398 15408 15444 -3 15445 15438 15504 15511 15686 15693 15706 -2 15707 15897 15919 15924 15926 15926 WIP 15930 16023 16262 16612-2 16750 16949 (TS) 17024 17025 17100 17203 17369 17442 17799 18000 18004 18014 18245 18629 18916 19005 19011 19092 (-1 -2) 19114 19115 19125 19136 19439 19500 19501 19502 19503 19505 19506 19507 19508 19509 19510 19600:2014 19752 19757 19770 19775-1 19794-5 19831 20000+ 20000 20022 20121 20400 21000 21047 21500 21827:2002 22000 23270 23271 23360 24517 24613 24617 24707 25178 25964 26000 26300 26324 27000 series 27000 27001 27002 27006 27729 28000 29110 29148 29199-2 29500 30170 31000 32000 38500 40500 42010 55000 80000 -1 -2 -3 Category This article is based on material taken from the Free On-line Dictionary of Computing prior to 1 November 2008 and incorporated under the "relicensing" terms of the GFDL, version 1.3 or later. Retrieved from "https://en.wikipedia.org/w/index.php?title=Object_Constraint_Language&oldid=811075135" Categories: Unified Modeling LanguageFormal specification languagesISO standards


Navigation menu Personal tools Not logged inTalkContributionsCreate accountLog in Namespaces ArticleTalk Variants Views ReadEditView history More Search Navigation Main pageContentsFeatured contentCurrent eventsRandom articleDonate to WikipediaWikipedia store Interaction HelpAbout WikipediaCommunity portalRecent changesContact page Tools What links hereRelated changesUpload fileSpecial pagesPermanent linkPage informationWikidata itemCite this page Print/export Create a bookDownload as PDFPrintable version Languages DeutschEspañolFrançaisItalianoLietuvių日本語PolskiPortuguês Edit links This page was last edited on 19 November 2017, at 10:58. Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization. Privacy policy About Wikipedia Disclaimers Contact Wikipedia Developers Cookie statement Mobile view (window.RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgPageParseReport":{"limitreport":{"cputime":"0.152","walltime":"0.194","ppvisitednodes":{"value":345,"limit":1000000},"ppgeneratednodes":{"value":0,"limit":1500000},"postexpandincludesize":{"value":43939,"limit":2097152},"templateargumentsize":{"value":201,"limit":2097152},"expansiondepth":{"value":10,"limit":40},"expensivefunctioncount":{"value":0,"limit":500},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 110.425 1 -total"," 63.49% 70.109 1 Template:Reflist"," 54.59% 60.281 1 Template:Cite_journal"," 30.43% 33.602 2 Template:Navbox"," 21.08% 23.275 1 Template:ISO_standards"," 13.42% 14.822 1 Template:Query_languages"," 6.82% 7.527 1 Template:Icon"," 4.26% 4.700 1 Template:Nobold"," 2.77% 3.056 1 Template:Smaller"," 1.67% 1.839 1 Template:FOLDOC"]},"scribunto":{"limitreport-timeusage":{"value":"0.046","limit":"10.000"},"limitreport-memusage":{"value":1855092,"limit":52428800}},"cachereport":{"origin":"mw1268","timestamp":"20180113142843","ttl":1900800,"transientcontent":false}}});});(window.RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgBackendResponseTime":83,"wgHostname":"mw1322"});});


Object_Constraint_Language - Photos and All Basic Informations

Object_Constraint_Language More Links

Declarative LanguageUnified Modeling LanguageIBMMeta-Object FacilityObject Management GroupMetamodelingQVTSyntropy (Software)Unified Modeling LanguageMeta-Object FacilityModel Driven EngineeringModel-driven ArchitectureModel TransformationObject Management GroupQVTGReATVIATRATefkatQVTSchematronXML TreeMeta-Object FacilityXML Metadata InterchangeUnified Modeling LanguageXMLXPathAlloy LanguageComputer ModelData MappingDomain Specific LanguageDomain-specific ModellingEclipse (software)Gello Expression LanguageGlossary Of Unified Modeling Language TermsIntentional ProgrammingList Of UML ToolsMeta-modelingMeta-modeling TechniqueMeta-Object FacilityMetadataModel-based TestingModel-driven ArchitectureModel Driven EngineeringModel Transformation LanguageModeling LanguageModeling PerspectivesMOFM2TObject-oriented Analysis And DesignQVTSemantic TranslationTransformation LanguageUML ToolVocabulary-based TransformationXML Metadata InterchangeXML Transformation LanguageIEEETemplate:Query LanguagesTemplate Talk:Query LanguagesQuery Language.QLAlpha (programming Language)Contextual Query LanguageCypher Query LanguageD (data Language Specification)Data Mining ExtensionsDatalogGremlin (programming Language)ISBLLightweight Directory Access ProtocolLanguage Integrated QueryMolecular Query LanguageMultiDimensional EXpressionsObject Query LanguageQUEL Query LanguagesSmiles Arbitrary Target SpecificationSPARQLSQLXQueryXPathYahoo! Query LanguageCODASYLTemplate:ISO StandardsTemplate Talk:ISO StandardsInternational Organization For StandardizationList Of International Organization For Standardization StandardsList Of ISO RomanizationsList Of IEC StandardsISO 1ISO 2Preferred NumberISO 4ISO 5ISO 6ISO 7ISO 9A440 (pitch Standard)ISO 31ISO 31-0ISO 31-1ISO 31-2ISO 31-3ISO 31-4ISO 31-5ISO 31-6ISO 31-7ISO 31-8ISO 31-9ISO 31-10ISO 31-11ISO 31-12ISO 31-13ISO 128ISO 216ISO 217ISO 226British Standard Pipe ThreadISO 233ISO 259EnvelopeKappa NumberVicat Softening PointISO 428ISO 518ISO 519ISO 639ISO 639-1ISO 639-2ISO 639-3ISO 639-5ISO 639-6ISO/IEC 646ISO 690ISO 732Antimagnetic WatchISO 843ISO 898ISO 965ISO 1000Magnetic Ink Character Recognition135 FilmOCR-A FontISO 1413ALGOL 60ISO 1745ISO 1989ISO 2014ISO 2015ISO/IEC 2022ISO 2047International Standard Book NumberISO 2145ISO 2146ISO 2240Water Resistant MarkISO 2709ISO 2711ISO 2788ISO 2848ISO 2852126 FilmISO 3103ISO 3166ISO 3166-1ISO 3166-2ISO 3166-3International Standard Serial NumberISO 3307Kunrei-shiki RomanizationISO 3864International Standard Recording CodeISO 3977ISO 4031ISO 4157ISO 4217ISO/IEC 4909ISO/IEC 5218ISO 5428ISO 5775ISO 5776ISO 5800ISO 5964ISO 6166ISO 6344ISO 6346ISO 6385Water Resistant MarkANSI Escape CodeISO 6438ISO 6523ISO 6709ISO 7001ISO 7002PinyinPascal (programming Language)ISO 7200OSI ModelISO 7736ISO/IEC 7810ISO/IEC 7811ISO/IEC 7812ISO/IEC 7813ISO/IEC 7816ISO 8000ISO 8178Fuel OilFTAMISO 8583ISO 8601Computer Graphics MetafileISO/IEC 8652ISO 8691Language Of Temporal Ordering SpecificationISO/IEC 8820-5ISO/IEC 8859ISO/IEC 8859-1ISO/IEC 8859-2ISO/IEC 8859-3ISO/IEC 8859-4ISO/IEC 8859-5ISO/IEC 8859-6ISO/IEC 8859-7ISO/IEC 8859-8ISO-8859-8-IISO/IEC 8859-9ISO/IEC 8859-10ISO/IEC 8859-11ISO/IEC 8859-12ISO/IEC 8859-13ISO/IEC 8859-14ISO/IEC 8859-15ISO/IEC 8859-16Standard Generalized Markup LanguageISO 9000SQLISO/IEC 9126File Allocation TableISO 9241ISO 9362Shoe SizeManufacturing Message SpecificationISO 9529ISO 9564X.500ISO 9660ISO 9897C (programming Language)POSIXISO 9984ISO 9985ISO/IEC 9995ISO 10005ISO 10006ISO 10007ISO/IEC 10116Whirlpool (cryptography)ISO 10160ISO 10161Guidelines For The Definition Of Managed ObjectsDocument Style Semantics And Specification LanguageISO 10206ISO 10218ISO 10303EXPRESS (data Modeling Language)ISO 10303-21ISO 10303-22ISO 10303-28STEP-NCISO 10383ISO 10487ArmSCIIIS-ISUniversal Coded Character SetTorxRM-ODPMultibusInternational Standard Music NumberISO 10962ISO/IEC 10967ISO/IEEE 11073ISO 11170ISO/IEC 11179ISO/IEC 11404JBIGISO 11783ISO 11784 & 11785ISO 11784 & 11785ISO/IEC 11801ISO 11898ISO 11940ISO 11940-2ISO/TR 11941ISO/TR 11941ISO 11992ISO 12006ISO/IEC TR 12182ISO/IEC 12207Tag Image File Format / Electronic PhotographyPrologPrologPrologIsofixTopic MapsISO 13399ISO 13406-2110 FilmISO 13485ISO 13490ISO 13567Z NotationISO 13584International Bank Account NumberISO 14000ISO 14031ISO 14224PDF/UAHorsepowerISO/IEC 14443MPEG-4MPEG-4 Part 2MPEG-4 Part 3Delivery Multimedia Integration FrameworkH.264/MPEG-4 AVCMPEG-4 Part 11MPEG-4 Part 12MPEG-4 Part 14MPEG-4 Part 14MPEG-4 Part 14ISO 14644STEP-NCISO 14651ISO 14698ISO 14750Software MaintenanceC++ISO 14971ISO 15022ISO 15189ISO/IEC 15288Ada Semantic Interface SpecificationISO 15292ISO 15398Common CriteriaJPEG 2000Motion JPEG 2000HTMLPDF417ISO/IEC 15504International Standard Identifier For Libraries And Related OrganizationsISO 15686ISO/IEC 15693International Standard Audiovisual NumberISO 15706-2International Standard Musical Work CodeISO 15897ISO 15919ISO 15924ISO 15926ISO 15926 WIPPDF/XMaxiCodeECMAScriptPDF/VTISO 16750ISO/TS 16949ISO/IEC 17024ISO/IEC 17025ISO 17100:2015Open Virtualization FormatSDMXLegal Entity IdentifierISO/IEC 27002ISO/IEC 18000QR CodeISO/IEC 18014ISO 18245Process Specification LanguagePhotographic Activity TestPDF/AISO 19011ISO 19092-1ISO 19092-2ISO 19114ISO 19115Simple Feature AccessISO 19136ISO 19439Common Object Request Broker ArchitectureUnified Modeling LanguageMeta-Object FacilityXML Metadata InterchangeUnified Modeling LanguageKnowledge Discovery MetamodelMeta-Object FacilityXML Metadata InterchangeBusiness Process Model And NotationISO 19600:2014ISO/IEC 19752RELAX NGISO/IEC 19770X3DISO/IEC 19794-5Cloud Infrastructure Management InterfaceISO/IEC 20000ISO 20022ISO 20121ISO 20400MPEG-21International Standard Text CodeISO 21500ISO/IEC 21827ISO 22000C Sharp (programming Language)Common Language InfrastructureLinux Standard BasePDF/ELexical Markup FrameworkISO-TimeMLCommon LogicISO 25178ISO 25964ISO 26000OpenDocumentDigital Object IdentifierISO/IEC 27000-seriesISO/IEC 27000ISO/IEC 27001ISO/IEC 27002ISO/IEC 27006International Standard Name IdentifierISO 28000ISO 29110Requirements EngineeringJPEG XROffice Open XMLRuby (programming Language)ISO 31000Portable Document FormatISO/IEC 38500Web Content Accessibility GuidelinesISO/IEC 42010ISO 55000ISO/IEC 80000ISO 80000-1ISO 80000-2ISO 80000-3Category:ISO StandardsFree On-line Dictionary Of ComputingGNU Free Documentation LicenseHelp:CategoryCategory:Unified Modeling LanguageCategory:Formal Specification LanguagesCategory:ISO StandardsDiscussion About Edits From This IP Address [n]A List Of Edits Made From This IP Address [y]View The Content Page [c]Discussion About The Content Page [t]Edit This Page [e]Visit The Main Page [z]Guides To Browsing WikipediaFeatured Content – The Best Of WikipediaFind Background Information On Current EventsLoad A Random Article [x]Guidance On How To Use And Edit WikipediaFind Out About WikipediaAbout The Project, What You Can Do, Where To Find ThingsA List Of Recent Changes In The Wiki [r]List Of All English Wikipedia Pages Containing Links To This Page [j]Recent Changes In Pages Linked From This Page [k]Upload Files [u]A List Of All Special Pages [q]Wikipedia:AboutWikipedia:General Disclaimer



view link view link view link view link view link