Embracing the C preprocessor during refactoring

作者
Alejandra Garrido,Ralph E. Johnson
出处
期刊:Journal of software [Wiley]
卷期号:25 (12): 1285-1304 被引量:12
标识
DOI:10.1002/smr.1603
摘要

ABSTRACT C preprocessor directives are heavily used in C programs because they provide useful and even necessary additions to the C language. However, they are usually executed and discarded before any analysis is applied on C programs. In refactoring, preprocessor directives must be preserved through the whole process of parsing, analysis and transformation to retain editable yet correct source code. We propose a new preprocessing approach and special program representations that allow a program to be analyzed and transformed without losing its preprocessor directives, but treating them as first‐class program entities. These representations are essential for a correct refactoring tool. We also describe the challenges that preprocessor directives bring to refactoring and how the program representations that we propose solve those challenges. Finally, we give details of two refactorings and present some case studies with our successfully applied solution. Copyright © 2013 John Wiley & Sons, Ltd.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
斯文若血完成签到,获得积分10
1秒前
Yann的应助被YANGZIX采纳,获得30
1秒前
难过的静槐的应助被YANGZIX采纳,获得10
1秒前
2秒前
Dean的应助被He采纳,获得50
2秒前
3秒前
Hannahhhhh发布了新的文献求助10
3秒前
火星上的菲鹰的应助被Aourp采纳,获得10
4秒前
李爱国的应助被chentian采纳,获得10
4秒前
可乐的应助被读者采纳,获得10
5秒前
xiaolong完成签到,获得积分10
5秒前
ys完成签到,获得积分10
5秒前
可靠慕凝完成签到,获得积分10
6秒前
6秒前
6秒前
SJH发布了新的文献求助10
7秒前
7秒前
愉快靖易发布了新的文献求助10
7秒前
小巧雪碧发布了新的文献求助10
8秒前
8秒前
8秒前
8秒前
skhuang关注了科研通微信公众号
8秒前
9秒前
Hannahhhhh完成签到,获得积分20
11秒前
隐形曼青的应助被hh采纳,获得10
11秒前
12秒前
12秒前
Vian完成签到,获得积分10
12秒前
郑郑宝贝发布了新的文献求助20
13秒前
14秒前
cloudup233完成签到,获得积分10
14秒前
erfc发布了新的文献求助10
14秒前
14秒前
i97发布了新的文献求助10
15秒前
闹闹吃皮球完成签到 ,获得积分10
15秒前
俊逸的代曼完成签到,获得积分10
15秒前
ddd发布了新的文献求助10
15秒前
16秒前
受伤雨南发布了新的文献求助10
16秒前
高分求助中
(应助此贴封号)通过应助OA文献获取积分 10000
Rosenblum, Global Change Biology 800
Organizational Behavior 510
Arbitrage Theory in Discrete and Continuous Time 500
Fortepian Chopina 400
A Silent Apostrophe:The Fayum Portraits 310
四川大学学位论文.郭瑞昂. 基于高压热扩散的n型磷掺杂金刚石半导体制备研究 300
热门求助领域 (近24小时)
化学 材料科学 医学 生物 计算机科学 工程类 纳米技术 有机化学 化学工程 内科学 物理 生物化学 复合材料 催化作用 细胞生物学 人工智能 心理学 无机化学 基因 遗传学
热门帖子
关注 科研通微信公众号,转发送积分 7831286
求助须知:如何正确求助?哪些是违规求助? 9355707
关于积分的说明 20584810
捐赠科研通 7424025
什么是DOI,文献DOI怎么找? 3336669
关于科研通互助平台的介绍 2481212
邀请新用户注册赠送积分活动 2357315