Giter VIP home page Giter VIP logo

seloc's Introduction

SeLoC: Relational separation logic for non-interference

This is the Coq development for SeLoC: a relational separation logic for proving non-interference of concurrent stateful programs.

See the paper for more details.

Installation instructions

This version is known to compile with:

If you use opam, then you can install all the dependencies by running the following commands from the root directory:

opam repo add coq-released https://coq.inria.fr/opam/released
opam repo add iris-dev https://gitlab.mpi-sws.org/iris/opam.git
opam update
opam install .

Otherwise you can manually install all the dependencies and run make && make install.

Directory structure

All the Coq modules are in the subfolders of the theories folder:

  • program_logic: the definition of double weakest preconditions and the core logic rules, as well as the soundness proof.
  • proofmode: tactics that ease symbolic execution proofs.
  • logrel: the type system and its interpretation.
  • examples: examples studied in the paper.
  • heap_lang: operational semantics for HeapLang with deterministic allocation and its adequacy result (see more on that below).

Material from the paper

There are some additional examples that did not make the paper. See, in particular, examples/calendar.v for an example of how to handle delimited information release.

Differences with the paper

There are some differences between the Coq formalization and the presentation in the paper.

First of all, to be compatible with the existing version of HeapLang in Iris, we define double weakest preconditions on top of a language with non-deterministic allocation semantics. However, to have well-defined probabilistic semantics of thread-pools, we require the allocation to be deterministic. We formalize HeapLang with deterministic allocation in heap_lang/lang_det.v (the language is parameterized by an allocation oracle). We prove the following adequacy statement: if we have a double weakest precondition for a program under the standard non-deterministic semantics, we can also have adouble weakest precondition for the same program under the deterministic semantics with an allocator.

Secondly, our type system (and its interpretation) is parameterized by an attacker level ΞΎ, and you can see that throughout the code. In our type system we also have an option type for integers. It is denoted as toption il l where il is the sensitivity label of the underlying integer, and l is the label for the option type (whether it is SOME or NONE); thus it roughly corresponds to option^l (int^il). In the future work we would like to extend the typing rules to arbitrary sum types.

Lastly, In Coq, we do not use the AWP proposition for atomic weakest preconditions we used in the paper. Rather, in the rule dwp-awp (in the formalization: dwp_atomic_lift_wp) we require the expressions e1 and e2 to be atomic and produce no forked off threads. Then, we fall back onto the total weakest precondition from Iris. This allows us to reuse a lot of lemmas and tactics about total weakest preconditions from Iris.

seloc's People

Contributors

co-dan avatar robbertkrebbers avatar wdeweijer avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

seloc's Issues

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.