当前位置: X-MOL 学术arXiv.cs.LO › 论文详情
A Verified Packrat Parser Interpreter for Parsing Expression Grammars
arXiv - CS - Logic in Computer Science Pub Date : 2020-01-13 , DOI: arxiv-2001.04457
Clement Blaudeau; Natarajan Shankar

Parsing expression grammars (PEGs) offer a natural opportunity for building verified parser interpreters based on higher-order parsing combinators. PEGs are expressive, unambiguous, and efficient to parse in a top-down recursive descent style. We use the rich type system of the PVS specification language and verification system to formalize the metatheory of PEGs and define a reference implementation of a recursive parser interpreter for PEGs. In order to ensure termination of parsing, we define a notion of a well-formed grammar. Rather than relying on an inductive definition of parsing, we use abstract syntax trees that represent the computational trace of the parser to provide an effective proof certificate for correct parsing and ensure that parsing properties including soundness and completeness are maintained. The correctness properties are embedded in the types of the operations so that the proofs can be easily constructed from local proof obligations. Building on the reference parser interpreter, we define a packrat parser interpreter as well as an extension that is capable of semantic interpretation. Both these parser interpreters are proved equivalent to the reference one. All of the parsers are executable. The proofs are formalized in mathematical terms so that similar parser interpreters can be defined in any specification language with a type system similar to PVS.
更新日期:2020-01-14

 

全部期刊列表>>
施普林格自然
最近合集,配们化学
欢迎访问IOP中国网站
GIANT
自然职场线上招聘会
ACS ES&T Engineering
ACS ES&T Water
屿渡论文,编辑服务
何川
苏昭铭
陈刚
姜涛
李闯创
复旦大学
刘立明
隐藏1h前已浏览文章
课题组网站
新版X-MOL期刊搜索和高级搜索功能介绍
ACS材料视界
天合科研
x-mol收录
上海纽约大学
曾林
天津大学
何振宇
史大永
吉林大学
卓春祥
张昊
刘冬生
试剂库存
down
wechat
bug