Font Size: a A A

Research On Object Deputy Programming Language

Posted on:2012-01-17Degree:DoctorType:Dissertation
Country:ChinaCandidate:Z K TangFull Text:PDF
GTID:1118330344452025Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
As the core for software development, programming languages are continuously changing to help developers design more complex and flexible software systems. Although the most popular object oriented programming (OOP) languages have greatly improved modularization of software, their limitations have been paid more and more attention. The limitations mostly result from the reduced flexibility of objects due to data encapsulation. In order to solve these problems, several new programming languages have been developed, such as the role model based programming language, the aspect oriented programming (AOP) language, and the dynamic programming language, etc. These programming languages have their own functional characteristics and infrastructure, which can improve on certain drawbacks of the traditional OOP languages. However, these independent programming models are not convenient for developers. We hope to build a unified model not only to overcome the limitations of OOP languages, but also to be more powerful, flexible and dynamic.The object deputy model (ODM) is a data model which introduces the deputy mechanism into object oriented systems. The diversity and flexibility in object creation, manipulation, and combination make ODM a good base model for the unified functional frame and infrastructure of the expected language. This dissertation gives a thorough study on the design and implementation of the programming language ODPL based on ODM. The main contributions and innovations include:(1) Transfers ODM from database to program designODM originates from the management and use of complex data in object oriented database, which effectively improves the modeling, storing, searching, and expression diversity and flexibility of complex data. By analysis of characteristics of ODM and technical limitations of OOP design, this dissertation transfers the ODM from database field to programming design and designs the language ODPL. In ODPL, different deputy classes can relate with their source classes under different deputy semantics. The class hierarchy based on deputy semantics can express more abundant relationships among classes, provide more efficient solutions, and adapt to more diverse applications. The select deputy class can create deputy objects for the source objects, satisfying certain conditions, with extended or hidden properties or methods. This type of classes can provide very strong dynamics and flexibility in addition to the father-child inheritance mechanism in the traditional OOP model. The union deputy class can provide the same behaviors for several source classes, which is different from the traditional top-down development methodology in the OOP model. The join deputy class is used to join two or more source classes. Its instance can be used to express the association relationship among several source classes. This association between objects can not be directly modeled using corresponding programming entities in the traditional OOP model. The group deputy class provides a unified interface for management and operation. The maintenance and visit to group members can be automatically done through the instance of group deputy class, which simplifies program development. ODPL can also support many functions expected in role model or AOP by using the different types of deputy classes. Therefore, it is possible to see further expansion of the application of ODPL.(2) Strengthens and extends ODM functionsODPL is designed based on the characteristics of ODM. In the process of design and implementation, we also strengthen and extend some functions of ODM to address the requirement of software development. The original ODM only supports automatic creation of deputy objects. The conditions for creating a deputy object are declared in the deputy class. If the conditions are satisfied, a deputy object for the source object will be created; if later, the conditions are not satisfied, the deputy object will be automatically destroyed. This mechanism does not have enough tolerance in practical applications, where deputy objects would exist in an effective condition range. In ODPL, we add the conditions for object destroying. With both creating and destroying conditions, the originally separated manual and automatic creation mechanisms can be unified. The deputy objects created automatically can be deleted manually, and the deputy objects created manually can also be deleted automatically. This makes deputy class more applicable and flexible. Furthermore, we propose a merging mechanism for source class and deputy class to join them more closely. If several direct deputy classes are on the same level, merging operation can allow one of the deputy classes to be more closely related with the source class than any other deputy class. This deputy class will be combined with the source class as a single logical one as if the functions of deputy class are inserted in source class directly.(3) Proposes an ODPL run-time infrastructure based on prepositive object mechanismMany role model based or AOP languages can also support some functions similar to ODPL. The way these languages achieve the support of role or aspect is, however, by changing grammar, based on the traditional OOP model. In ODPL, the run-time infrastructure, based on prepositive object mechanism, can correctly dispatch or forward messages in the complex deputy hierarchy. The biggest advantage of prepositive object mechanism is that new concepts and program structure, as in role model or AOP, may not need to be mandatorily mapped to the available structure in the traditional OOP model. The message responding mechanism based on the prepositive object can directly support the dynamic response process required by ODPL. When deputy class overloads a method in source class, the access and invoke to the source object can be automatically intercepted by the deputy object. If there is no required function logic in the deputy object, the access and invoke to deputy object can be forwarded to the source object. The due-directional switching operation between source object and deputy object makes ODPL more powerful than other role model based languages. Moreover, the deputy class can declare additional function logics executed before or after the method invoking in source class, which makes ODPL have the advice function presented in AOP languages. The prepositive object mechanism also facilitates the merging between source classes and agency classes. By simple pointer operations, not only source classes and deputy classes can be merged, but also be de-merged easily. The whole merging process can be done efficiently without changing any source code and doing complex dynamic recompilation. This improves the dynamics and flexibility of programs.(4) Gives detailed grammar and semantic specification of ODPLThis dissertation also gives detailed grammar and semantic specification of ODPL. ODPL is based on Java grammar and uses the annotation mechanism of Java 5 to express the deputy information of deputy classes. Since the code written in ODPL uses standard Java grammar, it is not necessary to add new keywords or special grammar modules to express new ODPL concepts and structures. The annotation mechanism of Java 5 helps to extend the functions of Java, and simplify the development of compiler of new language. Additionally, since lots of operations in ODPL are based on the due-directional pointers between source objects and deputy objects, we try to give a formal description of the semantics of environment status, object retrieval, message dispatch, type matching, etc. On the other hand, since the operation semantics is independent of grammar structure, ODPL can be transferred to other language platforms following the semantics described in this dissertation. A new grammar structure can even be designed for ODPL.
Keywords/Search Tags:role model, aspect oriented programming, dynamic programming, object deputy, prepositive object
PDF Full Text Request
Related items