Program Transformations to Fix C Integers

被引:0
|
作者
Coker, Zack [1 ]
Hafiz, Munawar [1 ]
机构
[1] Auburn Univ, Auburn, AL 36849 USA
关键词
Program Transformation; Integer Problem;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
C makes it easy to misuse integer types; even mature programs harbor many badly-written integer code. Traditional approaches at best detect these problems; they cannot guide developers to write correct code. We describe three program transformations that fix integer problems-one explicitly introduces casts to disambiguate type mismatch, another adds runtime checks to arithmetic operations, and the third one changes the type of a wrongly-declared integer. Together, these transformations fixed all variants of integer problems featured in 7,147 programs of NIST's SAMATE reference dataset, making the changes automatically on over 15 million lines of code. We also applied the transformations automatically on 5 open source software. The transformations made hundreds of changes on over 700,000 lines of code, but did not break the programs. Being integrated with source code and development process, these program transformations can fix integer problems, along with developers' misconceptions about integer usage.
引用
收藏
页码:792 / 801
页数:10
相关论文
共 50 条
  • [21] FRACTIONAL-BINARY PROGRAM CREATES PSEUDORANDOM INTEGERS
    HARDING, RL
    ELECTRONICS, 1979, 52 (06): : 129 - 131
  • [22] The Impact of Program Transformations on Static Program Analysis
    Namjoshi, Kedar S.
    Pavlinovic, Zvonimir
    STATIC ANALYSIS (SAS 2018), 2018, 11002 : 306 - 325
  • [23] THEOREMS ON INTEGERS OF C(I) BODIES
    XIROUDAK.G
    TENSOR, 1972, 25 : 262 - 266
  • [24] Secure coding in C and C++ - Of strings and integers
    Seacord, R
    IEEE SECURITY & PRIVACY, 2006, 4 (01) : 74 - 76
  • [25] To Fix the Hospital Readmissions Program, Prioritize What Matters
    Jha, Ashish K.
    JAMA-JOURNAL OF THE AMERICAN MEDICAL ASSOCIATION, 2018, 319 (05): : 431 - 433
  • [26] Expanding Fix Patterns to Enable Automatic Program Repair
    Nowack, Vesna
    Bowes, David
    Counsell, Steve
    Hall, Tracy
    Haraldsson, Saemundur
    Winter, Emily
    Woodward, John
    2021 IEEE 32ND INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING (ISSRE 2021), 2021, : 12 - 23
  • [27] Break-It-Fix-It: Unsupervised Learning for Program Repair
    Yasunaga, Michihiro
    Liang, Percy
    INTERNATIONAL CONFERENCE ON MACHINE LEARNING, VOL 139, 2021, 139
  • [28] SDI PROGRAM BUGS - WHO WILL FIX THEM - REPLY
    SCHINDLER, M
    ELECTRONIC DESIGN, 1986, 34 (23) : 61 - 61
  • [29] A SYNTACTIC APPROACH TO PROGRAM TRANSFORMATIONS
    ARIOLA, ZM
    ARVIND
    SIGPLAN NOTICES, 1991, 26 (09): : 116 - 129
  • [30] Program Transformations in the POLCA Project
    Kuper, Jan
    Schubert, Lutz
    Kempf, Kilian
    Glass, Colin
    Bonilla, Daniel Rubio
    Carro, Manuel
    PROCEEDINGS OF THE 2016 DESIGN, AUTOMATION & TEST IN EUROPE CONFERENCE & EXHIBITION (DATE), 2016, : 882 - 887