Giter Club home page Giter Club logo

parsing-parses's Introduction

Parsing Parses โˆ’ Proven Correct Dependently Typed Parser

This repository holds the source code of a dependently-typed parser written in Coq, which proves its own correctness by parsing parse trees.

Dependencies:

  • To build the library: Coq 8.4
  • To step through the examples: GNU Emacs 23.4.1, Proof General 4.3

Compiling and running the code

  • To build the library: make

Connection with the Parsing Parses paper

All file names are relative to src/Parsers/

  • BooleanRecognizer.v - parser returning bools, written before the dependently typed one (section 1.2, section 7.1)
  • ContextFreeGrammar.v - definition of a context free grammar (section 2.1), and of parse trees (section 2.2)
  • Grammars/ABStar.v - definition of the grammar for the regular expression (ab)* (section 2.1.1)
  • BooleanRecognizer.v - soundness and completeness of parser returning bools (section 2.3)
  • MinimalParse.v - definition of "minimal" parse trees (section 4)
  • DependentlyTyped.v - declaration of the interface and implementation of the parser (section 5, figures 1 and 2)
  • DependentlyTypedMinimalOfParseFactored.v - instantiation of the parser that parses parse trees and returns minimal parse trees (section 5; the deloop of the 5.1 is deloop_once in this file
  • DependentlyTypedMinimal.v - instantiation of parser returning MinParseTreeOf nt s + (MinParseTreeOf nt s -> False); a slightly different factoring of the components from what appears in section 5.4
  • MinimalParseOfParse.v - construction of ParseTreeOf from MinParseTreeOf (not needed in paper due to slightly different factoring from what appears in 5.4), also a direct construction of MinParseOf from ParseTreeOf, superseded by the construction of DependentlyTypedMinimalOfParseFactored.v and the paper
  • DependentlyTypedMinimalOfParseFactoredFull.v - single definition to construct MinParseTreeOf from ParseTreeOf: minimal_parse_nonterminal__of__parse corresponds to min_parse of section 5.4
  • DependentlyTypedSum.v - helper for DependentlyTypedMinimalOfParseFactored.v; the extra 300 lines of code mentioned in 7.2

parsing-parses's People

Contributors

achlipala avatar andersk avatar cpitclaudel avatar jasongross avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

eternaleye

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.