Giter Site home page Giter Site logo

kitty's Introduction

Kitty

An Agda Framework for programming language metatheory based on extrinsic typing, intrinsic scoping and de Bruijn indices.

You write the syntax and typing relation, and the framework derives definitions and lemmas of untyped substitution via reflection, and provide you with an abstraction to prove type preservation of all renaming and substitution operations of all variable sorts with a single lemma.

We build on McBride's kit abstraction, which abstracts over renamings and substitutions, and also abstract over the four compositions between them and over type preservation of renamings and substitutions. In the following, we use the term map to talk about something, which can be either a renaming or a substitution.

Dependencies

The framework requires the following dependencies to be installed:

Comparison to the Simplified Version

We have submitted a paper about our framework to ITP'24. In the paper we describe a simplified version of our framework, which can also be found in the repository in src/Kitty/Examples/SystemF-Simple.

The full framework extends the simple framework as follows:

  • Additional map operations are provided, such as parallel compositions _โˆฅ_.

  • A reflection algorithm is provided to derive all definitions and lemmas about untyped maps.

  • We axiomatize the structure of maps, so you can choose whether you want to represent them as functions, vectors, or syntax trees.

  • We axiomatize the structure of type contexts, so you can choose whether you want to represent them as functions or vectors.

  • We extend the extensional equality for maps to an equivalence that can also compare renamings with substitutions. Intuitively, a renaming is equivalent to a substitution, iff they behave the same when applied to a term.

  • We don't rely on the functional extensionality axiom, and instead prove that our operations preserve map equivalence and provide a lemma that states that applying equivalent maps to a term yields equal terms.

Those changes significantly increase the complexity of our framework, so if you are interested in the internals of our framework, we recommend to start looking at the simplified framework in src/Kitty/Examples/SystemF-Simple.

Documentation

As the library is still changing a lot, we do not provide extensive documentation, yet.

For now, we recommend to check out the examples and case studies in src/Kitty/Examples to get familiar with the framework.

kitty's People

Contributors

m0rphism avatar

Stargazers

 avatar

Watchers

 avatar

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.