Generic Modelling with Graph Rewriting Systems
Total Page:16
File Type:pdf, Size:1020Kb
Generic Modelling with Graph Rewriting Systems Von der Fakultät für Mathematik, Informatik und Naturwissenschaften der Rheinisch-Westfälischen Technischen Hochschule Aachen zur Erlangung des akademischen Grades eines Doktors der Naturwissenschaften genehmigte Dissertation vorgelegt von Diplom-Informatiker Manfred Münch aus Wachtberg Berichter: Universitätsprofessor Dr.-Ing. M. Nagl Universitätsprofessor Dr. rer. nat. A. Schürr Tag der mündlichen Prüfung: 15. November 2002 Diese Dissertation ist auf den Internetseiten der Hochschulbibliothek online verfügbar. Curriculum Vitae Personal Details: Name: Manfred Münch Address: Hanfu Ya Yuan Hanfu Jie No. 4 Haitang Building 7B Nanjing, 213300 P.R. China Telephone: +86 139 14778816 Email: [email protected] Date of birth: February 7, 1971 Place of birth: Bonn, Germany Nationality: German Marital status: single Education: 1977 – 1981 Gemeinschaftsgrundschule Wachtberg, Germany 1981 – 1990 Gymnasium Aloisiuskolleg, Bonn, Germany 1990 Abitur, mark: 1.8 1990 – 1991 Compulsory Military Service at German Airforce, awarded with an honorary medal “Ehrenmedaille der Bundeswehr” Oct 1991 – Apr 1997 Studies of Computer Science at Aachen University of Technology, Germany Apr 1995 – Aug 1995 Studies of Computer Science at University of Amsterdam, The Netherlands Apr 1997 Diploma in Computer Science, mark: “sehr gut” Aug 1997 – June 1998 Researcher at University of Southampton, UK Jul 1998 – Jul 2002 Scientific Employee at Department of Computer Science III, Aachen University of Technology, Germany Since Mar 2003 Head of Development, Diehl Controls (Nanjing) Co. Ltd., Nanjing, P.R. China (Manfred Münch) Manfred Münch Generic Modelling with Graph Rewriting Systems Parametric Polymorphism and Object-Oriented Modelling with PROGRES Acknowledgements This thesis deals with generic modelling with graph rewriting systems and is based on many research activities at the Department of Computer Science III at Aachen Univer- sity of Technology as well as cooperating partners. I want to thank Prof. Dr.-Ing. Man- fred Nagl very much for giving me the opportunity to work in a professional environ- ment and the discussions about the underlying concepts of this work. My very special thanks go to Prof. Dr. rer. nat. Andy Schürr who has supported me during all phases of this thesis. Without his unparalleled help many ideas, concepts, and implementation issues would not have come into reality. Also, his patience in proof-reading this thesis deserves my gratitude. When speaking about implementation issues, I can never thank Marita Breuer enough for her support. Her advice on how to trick PROGRES’ analyses never failed to impress. Also, her help in realising the Java code generator must be complemented. My comprehension of theoretical computer science and typing systems were mainly trained by Prof. Dr. Pieter Hartel from University of Twente, The Netherlands. Because of his help I was not scared of reading all the papers on typing systems any longer. Also, due to his efforts I was given the great opportunity to study at the University of Amsterdam, The Netherlands, and also to work at the University of Southampton, UK. Thank you very much, Pieter! The PROGRES research team deserves my praise and my gratefulness. The very pleasant ambience gave the motivation to deal with the most difficult problems. My thanks go to Alexander Königs, Thomas Lettow, Dirk Hesse, and Ralf Welter for their effort to help improving PROGRES. Kudos to Alexander for making our office a better place. Not only helpful system administrators but also very good friends: André Marburger and Boris Böhlen. Thank you for your advice and expertise on “how to keep calm although using Linux”, for the fruitful discussions on modelling issues, and for proof- reading several chapters of this thesis. I also want to thank you for giving an “exile researcher” a place to hang around after lunch. I value very much that there was always a chair for me in your office. iii Another very nice place to be was our secretaries’ office. Angelika, Monika, and Klaudia had to listen to my complaints all the time — but afterwards I felt so much better... My parents deserve my gratitude for making my studies possible, especially during my time in England. The support of my activities remains unforgotten. Finally, I want to thank my girl-friend Jiang Ying. Her motivation, encouragement, and constant support during the last years helped me considerably to sustain the bad times and enjoy the good times in life. Thank you. Aachen, July 2002 Manfred Münch Abstract One of the main goals of the software engineering discipline is the provision of ap- propriate tools for the construction of complex and interactive software systems. A large number of tools, languages, and methods exist to cope with the problems of administering the documents, information, and processes of creating large software systems. Specification languages and methods have been developed to describe formal aspects of these complex and interactive systems. At the Department of Computer Science III at Aachen University of Technology, the specification language PROGRES (PROgrammed Graph REwriting System) has been developed in the context of the IPSEN (Interactive/Integrated/Incremental Project Support ENvironment) research project. With PROGRES it is possible to formally describe complex graph-based structures and operations on these structures. Further- more, it is possible to generate rapid prototypes of the specified software systems as stand-alone applications. In this thesis we have used the PROGRES specification system together with the rapid prototyping framework to build tools for editing, analysing, and interpreting visual languages. During a collaborative research with the Department for Process Control Engineering we have built such tools for an IEC-61131/3 compliant language which is widely used in the automation and process control industry. We have detected shortcomings of the PROGRES language for the specification of such large systems. The identified problems of the PROGRES language are mainly dealing with reusabil- ity of specified code. Many modern programming languages offer genericity for mod- elling reusable software units, often together with an object-oriented programming methodology which also gives users support in an easy adaption of real-world prob- lems to formal models. In this thesis we have examined those programming and mod- elling languages and improved the PROGRES language by corresponding concepts. As being a statically typed specification language, PROGRES already has an elaborate two-level typing system. We have extended this typing system to allow for generic modelling of specification units. v The PROGRES graph model revealed another drawback for the specification of visual language systems during our research. It was only possible to specify the structure of a software system as an attributed graph and (graph) transformations on this structure. However, we were not able to define any behaviour of graph elements (nodes). Since a graph-based modelling approach already suggests an object-oriented specification methodology, the lack of transformation methods as part of graph elements became an obstacle for the specification of an extendible and generic visual language program- ming environment. Therefore, we have changed the graph model which PROGRES is based upon such that it is possible to assign a behaviour to graph elements. Further- more, the effects of these changes on the rapid prototyping framework are discussed. The PROGRES language and environment is very often used for rapid prototyping purposes. A very elaborate and flexible rapid prototyping environment UPGRADE was being developed at the Department of Computer Science III. In many collabora- tive research projects, as e. g. the IMPROVE project, we work with PROGRES and UPGRADE. Therefore, it was an important issue to ensure platform independence of the specified software systems. This is the reason why the prototype environment has been implemented in Java. In this thesis we describe the tighter integration of PROGRES specifications and the prototyping environment by the generation of Java code from a specification. The final step for gaining a complete platform indepen- dence is the adaptation of the underlying database system on which PROGRES and UPGRADE are based. This is out of scope of this thesis, though. Zusammenfassung Eines der Hauptziele des Lehrstuhls für Informatik III der RWTH Aachen (Themen- schwerpunkt “Software Engineering”) ist die Bereitstellung von geeigneten Werkzeu- gen für die Konstruktion von komplexen und interaktiven Softwaresystemen. Eine große Anzahl von Werkzeugen, Sprachen und Methoden wurden entwickelt, um den Problemen der Administration von Dokumenten, Informationen und Prozessen Herr zu werden, die bei der Erstellung großer Softwaresysteme auftreten. Es wurden Spezifika- tionssprachen und -methoden entwickelt, die dazu benutzt werden, formale Aspekte dieser komplexen und interaktiven Systeme zu beschreiben. Im Rahmen des IPSEN Projekts (Interactive/Integrated/Incremental Project Support ENvironment) wurde die Spezifikationssprache PROGRES (PROgrammierte GRaph ErsetzungsSysteme) entwickelt. PROGRES wird dazu benutzt, komplexe graphar- tige Strukturen sowie Operationen auf diesen formal zu beschreiben. Weiterhin ist es möglich, Prototypen dieser so spezifizierten Systeme aus PROGRES heraus zu generieren und als eigenständige Anwendung auszuführen. In dieser Arbeit wurde das Spezifikationssystem PROGRES