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

05/13/2023
by   Ashish Mishra, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/13/2020

A Verified Packrat Parser Interpreter for Parsing Expression Grammars

Parsing expression grammars (PEGs) offer a natural opportunity for build...
research
03/04/2021

Natural Hoare Logic: Towards formal verification of programs from logical forms of natural language specifications

Formal verification provides strong guarantees of correctness of softwar...
research
01/28/2015

Survey:Natural Language Parsing For Indian Languages

Syntactic parsing is a necessary task which is required for NLP applicat...
research
03/04/2019

Dijkstra Monads for All

This paper proposes a general semantic framework for verifying programs ...
research
07/05/2016

Global Neural CCG Parsing with Optimality Guarantees

We introduce the first global recursive neural parsing model with optima...
research
04/22/2022

Out-of-Domain Evaluation of Finnish Dependency Parsing

The prevailing practice in the academia is to evaluate the model perform...
research
05/08/2023

Idris TyRE: a dependently typed regex parser

Regular expressions – regexes – are widely used not only for validating,...

Please sign up or login with your details

Forgot password? Click here to reset