Git Product home page Git Product logo

sai's Introduction

Scala CI

This repository is archived; new development see GenSym.

Staged Program Analyzers

Improving the performance of static analysis by meta-programming/multi-stage programming.

Directories

  • dev-clean Current development using LMS-clean
  • oopsla19-code The artifact of the OOPSLA '19 submission

Related Software/Code

  • lms-clean The new version of LMS library
  • immer An immutable data structures library for C++
  • dev-obsolete Outdated development using virtualization-lms-core
  • pldi19-code The code for the PLDI '19 submission (obsoleted)
  • abscomp-racket Abstract Compilation (CC '96) implemented in Racket

Publications

  • Towards Partially Evaluating Symbolic Interpreters for All
    Shangyin Tan, Guannan Wei, Tiark Rompf
    ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation (PEPM), co-located with POPL 2022. Philadelphia, PA, USA
    PDF

  • LLSC: A Parallel Symbolic Execution Compiler for LLVM IR (Demo Paper)
    Guannan Wei, Shangyin Tan, Oliver Bračevac, Tiark Rompf
    Proceedings of The 29th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE 2021)
    PDF (ACM DL)

  • Compiling Symbolic Execution with Staging and Algebraic Effect
    Guannan Wei, Oliver Bračevac, Shangyin Tan, Tiark Rompf
    Proceedings of the ACM on Programming Languages, Volume 4 (OOPSLA 2020). Online
    PDF (ACM DL)

  • Staged Abstract Interpreters: Fast and Modular Whole-Program Analysis via Meta-Programming
    Guannan Wei, Yuxuan Chen, Tiark Rompf
    Proceedings of the ACM on Programming Languages, Volume 3 (OOPSLA 2019). Athens, Greece
    PDF (ACM DL)

sai's People

Contributors

bracevac avatar feiwang3311 avatar gsair avatar jmd1011 avatar kraks avatar kuigesi avatar program52bc avatar shangyint avatar tantalus13a98b5f avatar tiarkrompf avatar yuxuanchen1997 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

Watchers

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

sai's Issues

TODO Implementations

Core language:

  • Core language parser - @yuxuanchen1997
  • Core language concrete interpreters (small-step, refunc., big-step) - @Kraks
  • Core language abstract interpreters (AAM, ADI, path/flow/context-sensitive, store-widening, abstract domains) - @Kraks
  • Core language staged abstract interpreters

Large language:

  • Benchmarks
  • Large language parser - @yuxuanchen1997
  • Large language concrete interpreters - @yuxuanchen1997
  • Large language abstract interpreters (small-step and big-step, as baselines)
  • Large language staged abstract interpreters

For comparisons (on the benchmarks):

  • Small-step AAM with abstract compilation (ICFP13)
  • Fully optimized AAM (ICFP13)
  • ADI with abstract compilation

Impure backend implementation

First commit here.

Basic idea is to use rvalue ref std::move(*this) as a replacement for returning new objects, so that it can (in the future) work with the current user code in the form of SS x123 = x234.some_act(...

Revisions on major data structures are done, but interfaces are still incompatible with some user code, especially when they assumed the use of immer.

Fixpoint iteration stops too early.

Hello Wei,

I just read your OOPSLA paper and looked at your code. First off, great work!

In particular, I looked at the fixpoint algorithm (https://github.com/Kraks/sai/blob/master/dev-clean/src/main/scala/sai/interpreters/Abstract.scala#L144-L170). I believe you stop the fixpoint iteration too early. You have to keep iterating until the fixpoint cache stabilizes:

def run(e: Expr): Result = {
  var newCache = cache0
  do {
    // the start of a new fixpoint iteration

    // oldCache refers to the cache of the previous iteration
    var oldCache = newCache

    // newCache refers to the cache of the current iteration.
    newCache = cache0

    newCache = fix(eval)(e)(ρ0)(σ0).run(oldCache)(newCache).run.getOutCache()
  } while (oldCache < newCache); // check if a fixpoint has been reached
}

This part of the fixpoint algorithm is described in the ADI paper in Figure 8.

You should be able to see the difference by analyzing a program that does not reach its fixpoint in one iteration, e.g., diverge n = if n < 0 then 1 else diverge (n) + 1. When you analyze the interval of diverge, with the current version of the algorithm the result should be diverge([-∞,∞]) = [1,1] ⊔ ⟂ = [1,1], with my proposal the analysis result should be diverge([-∞,∞]) = [1,∞].

Let me know what you think.

Feature Request: Docker Images

Hello,

It would be great if you could provide Docker images for the tools contained in this repo so uses can try them out easily.

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.