Font Size: a A A

Research On OCL-JML Mapping Mechanisms And Its Application In Software Development Process

Posted on:2008-01-07Degree:MasterType:Thesis
Country:ChinaCandidate:B ChaFull Text:PDF
GTID:2178360212990712Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
UML is a kind of unified modeling languages based on many object oriented modeling methods, and now is widely used in the software system analysis and design. However, UML has little support for the low level implementation. In the coding phase of the software development life cycle, though there are many UML modeling tools which support automated generation of the codes, using some object-oriented languages to replace class diagrams as real codes, such as Java codes. But these codes are just some empty classes or method prototypes, which has little direct for the following coding. In the testing phase, testing can be done according to the UML diagrams. Different testing team s use different UML diagrams: class diagrams and specifications are used in unit test, component and collaborate diagrams are used in integration tests, and use cases are used in system tests. However, it is not a way for exact direct, but just a documentation reference for the testers.UML is widely used for the middle or low level software design, and is being used as a software architccture description language recently. The advantages are: strongly aligned with object- oriented style and all associated patterns; strong at representing components and connections in most diagrams; as a set of defined languages, its syntaxes can be easily automated; extensible for domain- specific vises. However, compared with the standard ADLs, UML has some disadvantages: UML notations is less formal than ADL is; encourages an Object connection architecture rather than interface connection architecture: lack of support for some specific patterns; automatic generation of test cases are not possible, and lack of directing the test; difficult to describe a high performance/security system.Object Constraint Language is a sub specification of UML specification, which is used to describe constraints of objects and the relations among them. Standard UML models describe model properties using natural languages, including imprecise and ambiguity, which is not a big problem for system design. However, eliminating the ambiguity is needed when converting UML models to runnable programs. OCL language can accurately describe constraints of UML models and relations among them, which is very suitable for model-driven development. Now there have been many UML model tools supporting OCL.In this paper, a new software development process is presented, which integrates the high level UML design with the low level implementation and testing. It is based on OCL-JML mapping: When describing software architecture with UML, if the OCL constraints are added, we can translate them into Java skeleton code annotated by JML by a special tool, so that test can be done automatically using the JML supporting tools. At the same time, one disadvantage of UML as ADL is solved: automatic generation of test cases are not possible, and lack of directing the test.The detailed mapping mechanism for OCL-JML is defined in this paper, and the mapping rules are given for OCL basic data types, property expression, collection operation, iterative operation, precondition/postcondition, invariant and other important OCL structures. Based on the OCL-JML mapping mechanism, the implementation of a special translation tool called JML-AddIn is presented, which is an add-In for Rational Rose. JML-AddIn tool helps users to add OCL constraints to UML class diagrams, and translates the added OCL constraints into JML specifications based on JML-OCL mapping mechanism, which are inserted into corresponding Java class skeleton codes.
Keywords/Search Tags:Software Architecture Language, ADL, UML, JML, OCL, Mapping Mechanisms
PDF Full Text Request
Related items