arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1105.2576cs.LOcs.FLcs.PL
收藏

TRX:一个经过形式验证的解析器解释器

TRX: A Formally Verified Parser Interpreter

Adam Koprowski, Henri Binsztok

摘要:

语法分析是计算机科学中的一个重要问题,然而令人惊讶的是,很少有人关注它的形式化验证。在本文中,我们提出了TRX:解析器解释器正式开发的证明助手Coq,能够产生正式正确的解析器。我们正在使用解析表达式语法(PEG),一种形式主义,基本上代表递归下降解析,我们认为这是一个有吸引力的替代上下文无关文法(CFG)。从这种形式化中,我们可以提取出一个任意PEG语法的解析器,保证完全正确,即,所得到的解析器在其语法和PEG的语义方面是终止的和正确的;这两个属性在Coq中被正式证明。

英文摘要:

Parsing is an important problem in computer science and yet surprisingly little attention has been devoted to its formal verification. In this paper, we present TRX: a parser interpreter formally developed in the proof assistant Coq, capable of producing formally correct parsers. We are using parsing expression grammars (PEGs), a formalism essentially representing recursive descent parsing, which we consider an attractive alternative to context-free grammars (CFGs). From this formalization we can extract a parser for an arbitrary PEG grammar with the warranty of total correctness, i.e., the resulting parser is terminating and correct with respect to its grammar and the semantics of PEGs; both properties formally proven in Coq.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑