All Projects → caterinaurban → Lyra

caterinaurban / Lyra

Licence: MPL-2.0 license
No description or website provided.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Lyra

SixtyPical
A 6502-oriented low-level programming language supporting advanced static analysis
Stars: ✭ 25 (+8.7%)
Mutual labels:  static-analysis, abstract-interpretation
OCCAM
OCCAM: Object Culling and Concretization for Assurance Maximization
Stars: ✭ 20 (-13.04%)
Mutual labels:  static-analysis, abstract-interpretation
Pyre Check
Performant type-checking for python.
Stars: ✭ 5,716 (+24752.17%)
Mutual labels:  static-analysis, abstract-interpretation
clam
Static Analyzer for LLVM bitcode based on Abstract Interpretation
Stars: ✭ 180 (+682.61%)
Mutual labels:  static-analysis, abstract-interpretation
monadic-cfa
Generic implementation of different CFA families based on monadic decomposition
Stars: ✭ 16 (-30.43%)
Mutual labels:  static-analysis, abstract-interpretation
progge.rs
Program analysis playground for a simple, imperative language
Stars: ✭ 29 (+26.09%)
Mutual labels:  static-analysis, abstract-interpretation
sturdy
Sturdy is a library for developing sound static analyses in Haskell.
Stars: ✭ 49 (+113.04%)
Mutual labels:  static-analysis, abstract-interpretation
code-review
Automated static analysis & linting bot for Mozilla repositories
Stars: ✭ 51 (+121.74%)
Mutual labels:  static-analysis
soap
🎯 soap - Structural Optimisation of Arithmetic Programs
Stars: ✭ 21 (-8.7%)
Mutual labels:  abstract-interpretation
tryceratops
A linter to prevent exception handling antipatterns in Python (limited only for those who like dinosaurs).
Stars: ✭ 381 (+1556.52%)
Mutual labels:  static-analysis
Qulice
Quality Police for Java projects
Stars: ✭ 250 (+986.96%)
Mutual labels:  static-analysis
duplex
Duplicate code finder for Elixir
Stars: ✭ 20 (-13.04%)
Mutual labels:  static-analysis
iec-checker
Static analysis of IEC 61131-3 programs
Stars: ✭ 36 (+56.52%)
Mutual labels:  static-analysis
go-recipes
🦩 Tools for Go projects
Stars: ✭ 2,490 (+10726.09%)
Mutual labels:  static-analysis
binary-auditing-solutions
Learn the fundamentals of Binary Auditing. Know how HLL mapping works, get more inner file understanding than ever.
Stars: ✭ 61 (+165.22%)
Mutual labels:  static-analysis
Rubycritic
A Ruby code quality reporter
Stars: ✭ 2,841 (+12252.17%)
Mutual labels:  static-analysis
luli
A static analysis and linter tool for Lua
Stars: ✭ 45 (+95.65%)
Mutual labels:  static-analysis
checkup
A health checkup for your project.
Stars: ✭ 76 (+230.43%)
Mutual labels:  static-analysis
UTBotCpp
Tool that generates unit test by C/C++ source code, trying to reach all branches and maximize code coverage
Stars: ✭ 59 (+156.52%)
Mutual labels:  static-analysis
SPDS
Efficient and Precise Pointer-Tracking Data-Flow Framework
Stars: ✭ 38 (+65.22%)
Mutual labels:  static-analysis

Lyra - Static Analyzer for Data Science Applications

Build Status

Lyra is a prototype static analyzer for data science applications written in Python. The purpose of Lyra is to provide confidence in the behavior of these applications, which nowadays play an increasingly important role in critical decision making in our social, economic, and civic lives.

At the moment, Lyra includes the following static program analyses:

Input Data Usage Analysis

Lyra automatically detects unused input data. For example, consider this program:

english: bool = bool(input())
math: bool = bool(input())
science: bool = bool(input())
bonus: bool = bool(input())
passing: bool = True
if not english:
    english: bool = False         # error: *english* should be *passing*
if not math:
    passing: bool = False or bonus
if not math:
    passing: bool = False or bonus   # error: *math* should be *science*
print(passing)

Due to the indicated errors, the input data stored in the variables english and science remains unused.

Lyra automatically detects these problems using an input data usage analysis based on syntactic dependencies between variables. Lyra additionally supports a less precise input data usage analysis based on the strongly live variant of live variable analysis. Both analyses use summarization to reason about input data stored in compound data structures such as lists. A more precise input data usage analysis detects unused chunks of lists containing input data by partitioning.

Interval Analysis

Lyra automatically computes the range of possible value of the program variables. For example:

a: int = int(input())
if 1 <= a <= 9:
    b: int = a
else:
    b: int = 0
print(b)

The range of possible values printed by the program is [0, 9].

Getting Started

Prerequisites

  • Install Git

  • Install Python 3.6

  • Install virtualenv:

    Linux or Mac OS X
    python3.6 -m pip install virtualenv

Installation

  • Create a virtual Python environment:

    Linux or Mac OS X
    virtualenv --python=python3.6 <env>
  • Install Lyra in the virtual environment:

    Linux or Mac OS X
    ./<env>/bin/pip install git+https://github.com/caterinaurban/Lyra.git

Command Line Usage

To analyze a specific Python program run:

Linux or Mac OS X
./<env>/bin/lyra [OPTIONS] path-to-file.py

The following command line options are recognized:

--analysis [ANALYSIS]   

            Sets the static analysis to be performed. Possible analysis options are:
            * ``usage`` (input data usage analysis based on syntactic variable dependencies)
            * ``liveness`` (input data usage analysis based on strongly live variable analysis)
            * ``interval`` (interval analysis)
            Default: ``usage``.

After the analysis, Lyra generates a PDF file showing the control flow graph of the program annotated with the result of the analysis before and after each statement in the program.

Documentation

Lyra's documentation is available online: http://caterinaurban.github.io/Lyra/

Authors

  • Caterina Urban, ETH Zurich, Switzerland

Contributors

  • Simon Wehrli, ETH Zurich, Switzerland
  • Madelin Schumacher, ETH Zurich, Switzerland
  • Jérôme Dohrau, ETH Zurich, Switzerland
  • Lowis Engel, ETH Zurich, Switzerland
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].