Giter Site home page Giter Site logo

ocaml-abt's Introduction

Abstract Binding Trees

This is an implementation of abstract binding trees (ABT) in Ocaml. A user of the library defines two modules defined by the interfaces SORT and OPERATOR, and the library will from this give:

  • A module implementing multi-sorted abstract binding trees with variables (subject to substitution) and symbols (subject to renameing). Terms are considered equal up to renaming of bound variables and symbols.
  • A pretty printer and a parser.

Building

The library depends on menhirLib. Build by executing jbuilder build. Run tests by executing jbuilder runtest.

Credits

Based on ABT's as described in Robert Harper's Practical Foundations of Programming Languages and Jon Sterling's implementation in SML.

ocaml-abt's People

Contributors

peterbb avatar

Watchers

 avatar  avatar

ocaml-abt's Issues

Syntactic sugar when parsing.

In addition to parsing ABT's in their standard form, the parser also supports special syntax for binary operators. One can write for instance write {t0 -> t1} instead of ->(t0; t1).

Question: Should the library have more support for syntactic sugar?

Add support for augmenting ABTs with extra information.

It should be possible to augment ABTs with different kinds of information. For instance, it should be possible to annotate an ABT with debugging information (line, column and filename).

The target can either be to only support such simple annotation, or maybe one could add more
complicated information. E.g. add information about the type of each sub-expression.

One potential source of problems, is if someone stores ABT's as annotations inside ABT's, and expect abstraction to work. It will not work, if annotations are implemented naively.

Improve error reporting

Currently, the different functions implemented in Language.Make(_) will throw different
exceptions when the user does something wrong. Figuring out exactly how to propagate errors to the user of the library must be sorted out.

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.