喵ID:Xy4Lri免责声明

Analyzing Source Code Across Static Conditionals

跨静态条件分析源代码

基本信息

DOI:
--
发表时间:
2015
期刊:
影响因子:
--
通讯作者:
Paul Gazzillo
中科院分区:
文献类型:
--
作者: Paul Gazzillo研究方向: -- MeSH主题词: --
关键词: --
来源链接:pubmed详情页地址

文献摘要

We need better tools for C, such as source browsers, bug finders, and automated refactorings. The problem is that large C systems such as Linux are software product lines, containing thousands of configuration variables controlling every aspect of the software from architecture features to file systems and drivers. The challenge of such configurability is how do software tools accurately analyze all configurations of the source without the exponential explosion of trying them all separately. To this end, we focus on two key subproblems, parsing and the build system. The contributions of this thesis are the following: (1) a configuration-preserving preprocessor and parser called SuperC that preserves configurations in its output syntax tree; (2) a configuration-preserving Makefile evaluator called Kmax that collects Linux’s compilation units and their configurations; and (3) a framework for configuration-aware analyses of source code using these tools. C tools need to process two languages: C itself and the preprocessor. The latter improves expressivity through file includes, macros, and static conditionals. But it operates only on tokens, making it hard to even parse both languages. SuperC is a complete, performant solution to parsing all of C. First, a configuration-preserving preprocessor resolves includes and macros yet leaves static conditionals intact, thus preserving a program’s variability. To ensure completeness, we analyze all interactions between preprocessor features and identify techniques for correctly handling them. Second, a configurationpreserving parser generates a well-formed AST with static choice nodes for conditionals. It forks new subparsers when encountering static conditionals and merges them again after the conditionals. To ensure performance, we present a simple algorithm for table-driven Fork-Merge LR parsing and four novel optimizations. We demonstrate SuperC’s effectiveness on the x86 Linux kernel. Large-scale C codebases like Linux are software product families, with complex build systems that
我们需要更好的C语言工具,比如源代码浏览器、bug查找器和自动重构。问题在于,大型C系统(如Linux)是软件产品线,包含数千个配置变量,控制软件的各个方面,从体系结构特性到文件系统和驱动程序。这种可配置性的挑战在于,软件工具如何准确地分析源的所有配置,而不会出现单独尝试所有配置的指数爆炸。为此,我们专注于两个关键的子问题,解析和构建系统。本论文的贡献如下:(1)一个配置保持的预处理器和解析器SuperC,它在输出语法树中保留配置;(2)一个配置保持的Makefile求值器Kmax,它收集Linux的编译单元及其配置;(3)一个使用这些工具的源代码配置感知分析框架。C工具需要处理两种语言:C本身和预处理器。后者通过文件包含、宏和静态条件来提高表达能力。但它只对标记进行操作,这使得解析这两种语言都很困难。SuperC是一个完整的,高性能的解决方案来解析所有的C。首先,配置保持预处理器解析包含和宏,但保持静态条件不变,从而保持程序的可变性。为了确保完整性,我们分析了预处理器功能之间的所有交互,并确定了正确处理它们的技术。其次,配置保持解析器生成一个格式良好的AST,其中包含条件的静态选择节点。它在遇到静态条件时分叉新的子解析器,并在条件之后再次合并它们。为了确保性能,我们提出了一个简单的算法表驱动的Fork-Merge LR解析和四个新的优化。我们证明了SuperC的x86 Linux内核上的有效性。像Linux这样的大规模C代码库是软件产品家族,具有复杂的构建系统,
参考文献
被引文献
A Classification and Survey of Analysis Strategies for Software Product Lines
DOI:
10.1145/2580950
发表时间:
2014-07-01
期刊:
ACM COMPUTING SURVEYS
影响因子:
16.6
作者:
Thuem, Thomas;Apel, Sven;Saake, Gunter
通讯作者:
Saake, Gunter
Scalable analysis of variable software
DOI:
10.1145/2491411.2491437
发表时间:
2013-08
期刊:
影响因子:
0
作者:
Jörg Liebig;Alexander von Rhein;Christian Kästner;S. Apel;Jens Dörre;C. Lengauer
通讯作者:
Jörg Liebig;Alexander von Rhein;Christian Kästner;S. Apel;Jens Dörre;C. Lengauer

数据更新时间:{{ references.updateTime }}

Paul Gazzillo
通讯地址:
--
所属机构:
--
电子邮件地址:
--
免责声明免责声明
1、猫眼课题宝专注于为科研工作者提供省时、高效的文献资源检索和预览服务;
2、网站中的文献信息均来自公开、合规、透明的互联网文献查询网站,可以通过页面中的“来源链接”跳转数据网站。
3、在猫眼课题宝点击“求助全文”按钮,发布文献应助需求时求助者需要支付50喵币作为应助成功后的答谢给应助者,发送到用助者账户中。若文献求助失败支付的50喵币将退还至求助者账户中。所支付的喵币仅作为答谢,而不是作为文献的“购买”费用,平台也不从中收取任何费用,
4、特别提醒用户通过求助获得的文献原文仅用户个人学习使用,不得用于商业用途,否则一切风险由用户本人承担;
5、本平台尊重知识产权,如果权利所有者认为平台内容侵犯了其合法权益,可以通过本平台提供的版权投诉渠道提出投诉。一经核实,我们将立即采取措施删除/下架/断链等措施。
我已知晓