As a standard modeling language of software architecture design, UML lacks formal semantics on account of its informal graphical notation. To further provide refined description of UML, OCL is primarily and widely employed. Generally, OCL constraints are written manually, which may cause incorrectness and extra overhead. Therefore, generating OCL constraints template for UML models is a superior solution. The OCL constraints template automatically generated can be used as a reference for software designers. First of all, the significance of automatic generation of OCL constraints was emphasized, and then the application domain of OCL was shown, followed by a lexical analysis of how to extract the target objects in UML models where OCL constraints were needed to build and an algorithm of extraction. Eventually, this extraction algorithm was implemented by Perl. In our way, the overall quality and efficiency of software design is enhanced and thus contributions are made for the automation of Software Engineering.
[1]
Robert Richards,et al.
Document Object Model (DOM)
,
2006
.
[2]
Pierre Nugues.
An Introduction to Language Processing with Perl and Prolog: An Outline of Theories, Implementation, and Application with Special Consideration of English, French, and German
,
2006,
Cognitive Technologies.
[3]
Roger Frost,et al.
International Organization for Standardization (ISO)
,
2004
.
[4]
John D. Poole.
Model-Driven Architecture: Vision, Standards And Emerging Technologies
,
2001
.
[5]
Fang Yu,et al.
Automated size analysis for OCL
,
2007,
ESEC-FSE '07.
[6]
Martin Gogolla,et al.
OCL Extended with Temporal Logic
,
2003,
Ershov Memorial Conference.
[7]
Ernest Teniente,et al.
Reasoning on UML Class Diagrams with OCL Constraints
,
2006,
ER.
[8]
Martin Gogolla,et al.
On Formalizing the UML Object Constraint Language OCL
,
1998,
ER.