An Extensible Compiler for Implementing Software Design Patterns as Concise Language Constructs

被引:1
|
作者
Ghaleb, Taher Ahmed [1 ]
Aljasser, Khalid [2 ]
Alturki, Musab A. [3 ,4 ]
机构
[1] Queens Univ, Sch Comp, Kingston, ON, Canada
[2] King Fahd Univ Petr & Minerals, Informat & Comp Sci Dept, Dhahran 31261, Saudi Arabia
[3] Runtime Verificat Inc, Urbana, IL 61801 USA
[4] King Fahd Univ Petr & Minerals, Dhahran 31261, Saudi Arabia
关键词
Design patterns; singleton; observer; decorator; aspect-oriented programming; extensible compiler; Polyglot; abc; CODE GENERATION;
D O I
10.1142/S0218194021500327
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Design patterns are generic solutions to common programming problems. Design patterns represent a typical example of design reuse. However, implementing design patterns can lead to several problems, such as programming overhead and traceability. Existing research introduced several approaches to alleviate the implementation issues of design patterns. Nevertheless, existing approaches pose different implementation restrictions and require programmers to be aware of how design patterns should be implemented. Such approaches make the source code more prone to faults and defects. In addition, existing design pattern implementation approaches limit programmers to apply specific scenarios of design patterns (e.g. class-level), while other approaches require scattering implementation code snippets throughout the program. Such restrictions negatively impact understanding, tracing, or reusing design patterns. In this paper, we propose a novel approach to support the implementation of software design patterns as an extensible Java compiler. Our approach allows developers to use concise, easy-to-use language constructs to apply design patterns in their code. In addition, our approach allows the application of design patterns in different scenarios. We illustrate our approach using three commonly used design patterns, namely Singleton, Observer and Decorator. We show, through illustrative examples, how our design pattern constructs can significantly simplify implementing design patterns in a flexible, reusable and traceable manner. Moreover, our design pattern constructs allow class-level and instance-level implementations of design patterns.
引用
收藏
页码:1043 / 1067
页数:25
相关论文
共 50 条
  • [31] Design of Spacecraft Control Oriented Special Language and Compiler
    Yang, Yongan
    Yu, Peijun
    Zhang, Wuguang
    Feng, Zuren
    Luo, Yongjin
    Jisuanji Gongcheng/Computer Engineering, 2006, 32 (12): : 247 - 249
  • [32] Patterns in software design
    Peter Vogt
    Landscape Ecology, 2019, 34 : 2083 - 2089
  • [33] Software design patterns
    Stevens, P
    COMPUTING & CONTROL ENGINEERING JOURNAL, 2000, 11 (04): : 160 - 162
  • [34] Patterns in software design
    Vogt, Peter
    LANDSCAPE ECOLOGY, 2019, 34 (09) : 2083 - 2089
  • [35] RDPM: An Extensible Tool for Resilience Design Patterns Modelling
    Kumar, Mohit
    Engelmann, Christian
    EURO-PAR 2021: PARALLEL PROCESSING WORKSHOPS, 2022, 13098 : 283 - 297
  • [36] An object-oriented architecture for extensible structural design software
    Clune, Rory
    Connor, Jerome J.
    Ochsendorf, John A.
    Kelliher, Denis
    COMPUTERS & STRUCTURES, 2012, 100 : 1 - 17
  • [37] Subsystem design guidelines for extensible general-purpose software
    Grefen, Paul
    Wieringa, Roel
    International Software Architecture Workshop, Proceedings, ISAW, 1998, : 49 - 52
  • [38] Extensible Software Design of a Multi-Agent Transport Simulation
    Grether, D.
    Nagel, K.
    4TH INTERNATIONAL CONFERENCE ON AMBIENT SYSTEMS, NETWORKS AND TECHNOLOGIES (ANT 2013), THE 3RD INTERNATIONAL CONFERENCE ON SUSTAINABLE ENERGY INFORMATION TECHNOLOGY (SEIT-2013), 2013, 19 : 380 - 388
  • [39] Design patterns and language design
    Gil, JY
    Lorenz, DH
    COMPUTER, 1998, 31 (03) : 118 - 120
  • [40] Secure Compiler Framework to Design Fault Attack Resistant Software
    Keerthi, K.
    Rebeiro, Chester
    2023 53RD ANNUAL IEEE/IFIP INTERNATIONAL CONFERENCE ON DEPENDABLE SYSTEMS AND NETWORKS - SUPPLEMENTAL VOLUME, DSN-S, 2023, : 206 - 208