Skip to content

Gradual-Typing/LambdaIFCStar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

$\lambda_{\mathtt{SEC}}^\star$ is an experimental gradual security-typed programming language. It provides programmers with the freedom of choice between runtime versus compile-time information-flow (IFC) enforcement. The Agda development of $\lambda_{\mathtt{SEC}}^\star$ comes with machine-checked proofs of various meta-theoretical results.

Building and Testing

We compile $\lambda_{\mathtt{SEC}}^\star$ into an intermediate representation ("cast calculus"), namely, $\lambda_{\mathtt{SEC}}^\Rightarrow$. We define an operational semantics for $\lambda_{\mathtt{SEC}}^\star$ that includes blame tracking.

You can check proofs and explore examples by following the steps:

Prerequisites

Software dependencies for checking proofs:

Additional dependencies for running demo:

[Optional] Additional dependencies for drawing simulation diagrams:

  • XeLaTeX and latexmk
  • GraphViz and specifically, dot
  • Dot2TeX
  • Zsh, for running plotting scripts

Building

  • To build everything, simply run make at the top level of this repository.

    • This will build the proofs, the runnable demo, and a simulation explorer.
  • [Optional] To check the proofs only, run make proofs. The type-checker of Agda makes sure everything is correct.

  • [Optional] To build the simulator only, run make sim.

Running Demo

To get a taste of $\lambda_{\mathtt{SEC}}^\star$ running in action, build everything first and then run bin/RunDemo.

Project Code Structure (selected)

All Agda source files are located in the src directory and end with .agda.

There are three top-level modules: one contains all type-check-able proofs; the other two compile to executable binaries:

  • Proofs: sources the proofs of important meta-theoretical results in the following modules:

  • RunDemo: runs the stepper on $\lambda_{\mathtt{SEC}}^\star$ programs in the following modules and pretty-prints their reduction sequences to console:

    • ExamplePrograms.Demo.Example1: shows that $\lambda_{\mathtt{SEC}}^\star$ indeed facilitates both compile-time (static) and runtime (dynamic) information-flow control. If a $\lambda_{\mathtt{SEC}}^\star$ program is fully statically-typed, our type system alone guarantees security. Transition between static and dynamic is controlled by the precision of type annotations given by the programmer.
    • ExamplePrograms.Demo.Example2: establishes the intuition that even if the programmer opts for runtime enforcement, $\lambda_{\mathtt{SEC}}^\star$ still guards against any possible information leakage.
    • ExamplePrograms.Demo.Example3: shows that moving type annotations to be less precise (or more dynamic) does not change the runtime behavior of a program.
  • RunSimulation: simulates between $\lambda_{\mathtt{SEC}}^\Rightarrow$ terms of different precision.

Important technical definitions: