WCET optimization strategy based on source code refactoring

被引:0
|
作者
Fanqi Meng
Xiaohong Su
机构
[1] Harbin Institute of Technology,School of Computer Science and Technology
[2] Northeast Electric Power University,School of Information Engineering
来源
Cluster Computing | 2019年 / 22卷
关键词
Cyber-physical system; Software safety; Code refactoring; Performance optimization; Optimization strategy;
D O I
暂无
中图分类号
学科分类号
摘要
For safety-critical real-time software, if worst-case execution time (WCET) violates a time constraint, it is considered having a timeliness defect. To fix the defect early with lower cost, a WCET optimization strategy is proposed based on source code refactoring. The strategy guides programmers to search refactoring opportunities in the correct positions and perform refactorings by a reasonable sequence. To this end, the worst-case execution path (WCEP) of a target program is firstly extracted from its control flow graph. Then the WCEP is mapped onto source code by the back-annotation technique. An abstract syntax tree-based invariant path identification algorithm is developed for recognizing the invariant paths from the source-level WCEP. According to the invariant paths and loop statements, the source code is divided into four optimization regions with different priorities. Thus the searching scopes are reduced, and invalid refactorings are avoided. On the basis, the refactoring which has the lowest cost in the same region is performed first. To support the strategy, a cost model of source code refactoring is designed. It mainly considers adverse effects of refactorings on the maintainability of source code. The experimental results showed that the optimization strategy reduced WCET effectively and maximally kept the maintainability. Therefore it is more suitable for WCET optimization in an early programming phase. It is helpful to fix the defects early and then guarantee the timeliness safety of the software.
引用
收藏
页码:5563 / 5572
页数:9
相关论文
共 50 条
  • [21] An infrastructure to support meta-differencing and refactoring of source code
    Collard, ML
    18TH IEEE INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, PROCEEDINGS, 2003, : 377 - 380
  • [22] An Automated Refactoring Approach to Remove Unnecessary Complexity in Source Code
    Magalhaes, Nathan Manera
    Campos Junior, Heleno de Souza
    Pereira Araujo, Marco Antonio
    Neves, Vania de Oliveira
    II BRAZILIAN SYMPOSIUM ON SYSTEMATIC AND AUTOMATED SOFTWARE TESTING (SAST 2017), 2017,
  • [23] Code Refactoring Based on MapReduce in Cloud Migration
    Zhao, Junfeng
    Wang, Wenmeng
    Yang, Hongji
    2018 IEEE INT CONF ON PARALLEL & DISTRIBUTED PROCESSING WITH APPLICATIONS, UBIQUITOUS COMPUTING & COMMUNICATIONS, BIG DATA & CLOUD COMPUTING, SOCIAL COMPUTING & NETWORKING, SUSTAINABLE COMPUTING & COMMUNICATIONS, 2018, : 1042 - 1043
  • [24] Refactoring support based on code clone analysis
    Higo, Y
    Kamiya, T
    Kusumoto, S
    Inoue, K
    PRODUCT FOCUSED SOFTWARE PROCESS IMPROVEMENT, 2004, 3009 : 220 - 233
  • [25] Refactoring OpenMP Code Based on MapReduce Model
    Zhao, Junfeng
    Zhang, Minjia
    2018 IEEE INT CONF ON PARALLEL & DISTRIBUTED PROCESSING WITH APPLICATIONS, UBIQUITOUS COMPUTING & COMMUNICATIONS, BIG DATA & CLOUD COMPUTING, SOCIAL COMPUTING & NETWORKING, SUSTAINABLE COMPUTING & COMMUNICATIONS, 2018, : 1040 - 1041
  • [26] Comparing Commit Messages and Source Code Metrics for the Prediction Refactoring Activities
    Sagar, Priyadarshni Suresh
    AlOmar, Eman Abdulah
    Mkaouer, Mohamed Wiem
    Ouni, Ali
    Newman, Christian D.
    ALGORITHMS, 2021, 14 (10)
  • [27] Enhancing Source Code Refactoring Detection with Explanations from Commit Messages
    Krasniqi, Rrezarta
    Cleland-Huang, Jane
    PROCEEDINGS OF THE 2020 IEEE 27TH INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER '20), 2020, : 512 - 516
  • [28] Gray code-based optimization strategy for TNAM
    Zheng, Yunping
    Huazhong Keji Daxue Xuebao (Ziran Kexue Ban)/Journal of Huazhong University of Science and Technology (Natural Science Edition), 2010, 38 (06): : 80 - 83
  • [29] Flow Analysis on Intermediate Source Code for WCET Estimation of Compiler-Optimized Programs
    Wang, Zhonglei
    Herkersdorf, Andreas
    2009 15TH IEEE INTERNATIONAL CONFERENCE ON EMBEDDED AND REAL-TIME COMPUTING SYSTEMS AND APPLICATIONS, PROCEEDINGS, 2009, : 22 - 27
  • [30] Practical Experiences of Applying Source-Level WCET Flow Analysis on Industrial Code
    Lisper, Bjorn
    Ermedahl, Andreas
    Schreiner, Dietmar
    Knoop, Jens
    Gliwa, Peter
    LEVERAGING APPLICATIONS OF FORMAL METHODS, VERIFICATION, AND VALIDATION, PT II, 2010, 6416 : 449 - +