File Download
Supplementary

postgraduate thesis: Extensible domain-specific languages in object-oriented programming

TitleExtensible domain-specific languages in object-oriented programming
Authors
Issue Date2017
PublisherThe University of Hong Kong (Pokfulam, Hong Kong)
Citation
Zhang, W. [张炜昕]. (2017). Extensible domain-specific languages in object-oriented programming. (Thesis). University of Hong Kong, Pokfulam, Hong Kong SAR.
AbstractDomain-specific languages (DSLs) are now ubiquitous. New DSLs are needed and existing DSLs are evolving all the time. However, creating and maintaining DSLs is hard! There is a lot of engineering effort involved in the creation and the maintenance of a DSL. One way to address these difficulties is to have language components with high reusability and extensibility. Reusable components reduce the initial effort. Instead of developing everything from scratch, a new DSL is developed through reusing existing components. High extensibility reduces the effort of maintenance, making it easy to customize these components. DSLs, or programming languages in general, share a lot of features. Unfortunately, it is hard to materialize the conceptual reuse into software engineering reuse due to the lack of good modularization techniques. Syntactic modularization techniques based on meta-programming and code generation have been used for code reuse. However, more semantic aspects of modularity, such as the ability to do separate compilation and modular type-checking, are typically missing. Programming languages have been investigated for seeking proper semantic modularization mechanisms. Object-oriented languages seem to be a good choice as they are designed for extensibility and reuse in the first place. The fundamental features of object-oriented programming (OOP), such as inheritance and subtyping, are vital for developing reusable and extensible components. Combining these features with some classic design patterns, namely the Visitor and Interpreter pattern, a certain degree of extensibility can be achieved. However, they are still insufficient to solve the so-called Expression Problem: one dimension of extensibility is traded by the other. New solutions to the Expression Problem have been proposed, making it possible to develop fully extensible components. In this thesis we argue that object-oriented languages, equipped with powerful semantic modularization techniques, are suitable for developing extensible DSLs. In the first part of the thesis we develop EVF, an extensible and expressive Java Visitor frame- work, for facilitating external DSL development. To illustrate the applicability of EVF we conduct a case study, which refactors a large number of non-modular interpreters from the “Types and Programming Languages” book. The resulting interpreters are modular and reusable, sharing large portions of code and features. In the second part of the thesis, we show the close relationship between shallow embeddings and OOP and how OOP improves the modularity of internal DSLs.
DegreeMaster of Philosophy
SubjectDomain-specific programming languages
Object-oriented programming
Dept/ProgramComputer Science
Persistent Identifierhttp://hdl.handle.net/10722/241427
HKU Library Item IDb5864204

 

DC FieldValueLanguage
dc.contributor.authorZhang, Weixin-
dc.contributor.author张炜昕-
dc.date.accessioned2017-06-13T02:07:51Z-
dc.date.available2017-06-13T02:07:51Z-
dc.date.issued2017-
dc.identifier.citationZhang, W. [张炜昕]. (2017). Extensible domain-specific languages in object-oriented programming. (Thesis). University of Hong Kong, Pokfulam, Hong Kong SAR.-
dc.identifier.urihttp://hdl.handle.net/10722/241427-
dc.description.abstractDomain-specific languages (DSLs) are now ubiquitous. New DSLs are needed and existing DSLs are evolving all the time. However, creating and maintaining DSLs is hard! There is a lot of engineering effort involved in the creation and the maintenance of a DSL. One way to address these difficulties is to have language components with high reusability and extensibility. Reusable components reduce the initial effort. Instead of developing everything from scratch, a new DSL is developed through reusing existing components. High extensibility reduces the effort of maintenance, making it easy to customize these components. DSLs, or programming languages in general, share a lot of features. Unfortunately, it is hard to materialize the conceptual reuse into software engineering reuse due to the lack of good modularization techniques. Syntactic modularization techniques based on meta-programming and code generation have been used for code reuse. However, more semantic aspects of modularity, such as the ability to do separate compilation and modular type-checking, are typically missing. Programming languages have been investigated for seeking proper semantic modularization mechanisms. Object-oriented languages seem to be a good choice as they are designed for extensibility and reuse in the first place. The fundamental features of object-oriented programming (OOP), such as inheritance and subtyping, are vital for developing reusable and extensible components. Combining these features with some classic design patterns, namely the Visitor and Interpreter pattern, a certain degree of extensibility can be achieved. However, they are still insufficient to solve the so-called Expression Problem: one dimension of extensibility is traded by the other. New solutions to the Expression Problem have been proposed, making it possible to develop fully extensible components. In this thesis we argue that object-oriented languages, equipped with powerful semantic modularization techniques, are suitable for developing extensible DSLs. In the first part of the thesis we develop EVF, an extensible and expressive Java Visitor frame- work, for facilitating external DSL development. To illustrate the applicability of EVF we conduct a case study, which refactors a large number of non-modular interpreters from the “Types and Programming Languages” book. The resulting interpreters are modular and reusable, sharing large portions of code and features. In the second part of the thesis, we show the close relationship between shallow embeddings and OOP and how OOP improves the modularity of internal DSLs.-
dc.languageeng-
dc.publisherThe University of Hong Kong (Pokfulam, Hong Kong)-
dc.relation.ispartofHKU Theses Online (HKUTO)-
dc.rightsThis work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.-
dc.rightsThe author retains all proprietary rights, (such as patent rights) and the right to use in future works.-
dc.subject.lcshDomain-specific programming languages-
dc.subject.lcshObject-oriented programming-
dc.titleExtensible domain-specific languages in object-oriented programming-
dc.typePG_Thesis-
dc.identifier.hkulb5864204-
dc.description.thesisnameMaster of Philosophy-
dc.description.thesislevelMaster-
dc.description.thesisdisciplineComputer Science-
dc.description.naturepublished_or_final_version-

Export via OAI-PMH Interface in XML Formats


OR


Export to Other Non-XML Formats