Giter Club home page Giter Club logo

htt's Introduction

Hoare Type Theory

Docker CI

Hoare Type Theory (HTT) is a verification system for reasoning about sequential heap-manipulating programs based on Separation logic.

HTT incorporates Hoare-style specifications via preconditions and postconditions into types. A Hoare type ST P (fun x : A => Q) denotes computations with a precondition P and postcondition Q, returning a value x of type A. Hoare types are a dependently typed version of monads, as used in the programming language Haskell. Monads hygienically combine the language features for pure functional programming, with those for imperative programming, such as state or exceptions. In this sense, HTT establishes a formal connection in the style of Curry-Howard isomorphism between monads and (functional programming variant of) Separation logic. Every effectful command in HTT has a type that corresponds to the appropriate non-structural inference rule in Separation logic, and vice versa, every non-structural inference rule corresponds to a command in HTT that has that rule as the type. The type for monadic bind is the Hoare rule for sequential composition, and the type for monadic unit combines the Hoare rules for the idle program (in a small-footprint variant) and for variable assignment (adapted for functional variables). The connection reconciles dependent types with effects of state and exceptions and establishes Separation logic as a type theory for such effects. In implementation terms, it means that HTT implements Separation logic as a shallow embedding in Coq.

Meta

Building and installation instructions

The easiest way to install the latest released version of Hoare Type Theory is via OPAM:

opam repo add coq-released https://coq.inria.fr/opam/released
opam install coq-htt

To instead build and install manually, do:

git clone https://github.com/imdea-software/htt.git
cd htt
dune build
dune install htt

If you also want to build the examples, run make instead of dune.

History

The original version of HTT can be found here.

References

htt's People

Contributors

aleksnanevski avatar clayrat avatar germand avatar ilyasergey avatar yasunariw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

htt's Issues

Separate packaging of htt and examples

I think most projects that use HTT can be expected to only use the framework parts (htt directory), as opposed to the examples. And while compiling htt takes a few seconds, examples seems to take around 3 minutes on a reasonably modern machine.

So to make it easier to depend on htt in a lightweight way, how about splitting off the examples into a separate coq-htt-examples package? Each package would be served from the same archive/release, but users can choose whether they want examples or not.

As one example, I split up the library and the tactic in Stalmarck with Dune.

gh_ex only accepts a single argument

This forces us to bundle logical variables into one, so that they can be passed to gh_ex in a proof. model.gE from FCSL can accept multiple arguments by packaging them in a nested existential.

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.