Title
Program transformations to fix C integers
Abstract
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.
Year
DOI
Venue
2013
10.1109/ICSE.2013.6606625
ICSE
Keywords
Field
DocType
digital arithmetic,integer programming,programming,arithmetic operations,fix C integers,integer code,integer problems,integer types,integer usage,program transformations,source code,Integer Problem,Program Transformation
Integer overflow,Programming language,Source code,Computer science,Integer (computer science),Integer literal,Branch and price,Integer programming,Trial division,Source lines of code
Conference
Volume
ISBN
Citations 
2
978-1-4673-3076-3
30
PageRank 
References 
Authors
0.81
17
2
Name
Order
Citations
PageRank
Zack Coker1300.81
Munawar Hafiz222415.40