首页> 外文期刊>ACM SIGPLAN Notices: A Monthly Publication of the Special Interest Group on Programming Languages >Variability-aware parsing in the presence of lexical macros and conditional compilation
【24h】

Variability-aware parsing in the presence of lexical macros and conditional compilation

机译:在存在词法宏和条件编译的情况下进行变量感知分析

获取原文
获取原文并翻译 | 示例
获取外文期刊封面目录资料

摘要

In many projects, lexical preprocessors are used to manage different variants of the project (using conditional compilation) and to define compile-time code transformations (using macros). Unfortunately, while being a simple way to implement variability, conditional compilation and lexical macros hinder automatic analysis, even though such analysis is urgently needed to combat variability-induced complexity. To analyze code with its variability, we need to parse it without preprocessing it. However, current parsing solutions use unsound heuristics, support only a subset of the language, or suffer from exponential explosion. As part of the TypeChef project, we contribute a novel variability-aware parser that can parse almost all unpreprocessed code without heuristics in practicable time. Beyond the obvious task of detecting syntax errors, our parser paves the road for further analysis, such as variability-aware type checking. We implement variability-aware parsers for Java and GNU C and demonstrate practicability by parsing the product line MobileMedia and the entire X86 architecture of the Linux kernel with 6065 variable features.
机译:在许多项目中,词法预处理器用于管理项目的不同变体(使用条件编译)并定义编译时代码转换(使用宏)。不幸的是,尽管作为实现可变性的简单方法,条件编译和词法宏阻碍了自动分析,即使迫切需要进行这种分析来消除由可变性引起的复杂性。为了分析代码的可变性,我们需要对其进行分析而不进行预处理。但是,当前的解析解决方案使用了不合理的启发式方法,仅支持该语言的一部分,或者遭受了指数级爆炸。作为TypeChef项目的一部分,我们提供了一种新颖的可变性感知解析器,该解析器可以在可行的时间内解析几乎所有未经预处理的代码而无需进行启发式处理。除了检测语法错误这一显而易见的任务之外,我们的解析器还为进一步的分析铺平了道路,例如可变性感知类型检查。我们为Java和GNU C实现了感知可变性的解析器,并通过解析产品线MobileMedia和具有6065个可变功能的Linux内核的整个X86体系结构来证明实用性。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号