Morpheus: Automated Safety Verification of Data-dependent Parser Combinator Programs

Ashish Mishra, S. Jagannathan
{"title":"Morpheus: Automated Safety Verification of Data-dependent Parser Combinator Programs","authors":"Ashish Mishra, S. Jagannathan","doi":"10.48550/arXiv.2305.07901","DOIUrl":null,"url":null,"abstract":"Parser combinators are a well-known mechanism used for the compositional construction of parsers, and have shown to be particularly useful in writing parsers for rich grammars with data-dependencies and global state. Verifying applications written using them, however, has proven to be challenging in large part because of the inherently effectful nature of the parsers being composed and the difficulty in reasoning about the arbitrarily rich data-dependent semantic actions that can be associated with parsing actions. In this paper, we address these challenges by defining a parser combinator framework called Morpheus equipped with abstractions for defining composable effects tailored for parsing and semantic actions and a rich specification language used to define safety properties over the constituent parsers comprising a program. Even though its abstractions yield many of the same expressivity benefits as other parser combinator systems, Morpheus is carefully engineered to yield a substantially more tractable automated verification pathway. We demonstrate its utility in verifying a number of realistic, challenging parsing applications, including several cases that involve non-trivial data-dependent relations.","PeriodicalId":172012,"journal":{"name":"European Conference on Object-Oriented Programming","volume":"180 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-05-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"European Conference on Object-Oriented Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.48550/arXiv.2305.07901","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

Abstract

Parser combinators are a well-known mechanism used for the compositional construction of parsers, and have shown to be particularly useful in writing parsers for rich grammars with data-dependencies and global state. Verifying applications written using them, however, has proven to be challenging in large part because of the inherently effectful nature of the parsers being composed and the difficulty in reasoning about the arbitrarily rich data-dependent semantic actions that can be associated with parsing actions. In this paper, we address these challenges by defining a parser combinator framework called Morpheus equipped with abstractions for defining composable effects tailored for parsing and semantic actions and a rich specification language used to define safety properties over the constituent parsers comprising a program. Even though its abstractions yield many of the same expressivity benefits as other parser combinator systems, Morpheus is carefully engineered to yield a substantially more tractable automated verification pathway. We demonstrate its utility in verifying a number of realistic, challenging parsing applications, including several cases that involve non-trivial data-dependent relations.
Morpheus:数据依赖解析器组合程序的自动安全验证
解析器组合子是一种众所周知的机制,用于解析器的组合构造,并且在为具有数据依赖性和全局状态的富语法编写解析器时特别有用。然而,验证使用它们编写的应用程序已被证明是具有挑战性的,这在很大程度上是因为所组成的解析器具有固有的有效性,而且很难推断出可能与解析操作相关联的任意丰富的数据相关语义操作。在本文中,我们通过定义一个名为Morpheus的解析器组合器框架来解决这些挑战,该框架配备了用于定义为解析和语义操作量身定制的可组合效果的抽象,以及用于定义组成程序的组成解析器的安全属性的丰富规范语言。尽管它的抽象产生了许多与其他解析器组合器系统相同的表达性优势,但Morpheus经过精心设计,产生了实质上更易于处理的自动验证路径。我们将演示它在验证许多实际的、具有挑战性的解析应用程序方面的效用,包括涉及重要数据依赖关系的几个案例。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信