Skip to content

itsfernn/static_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Analysis Tool for Toy Language

Description

This static analysis tool is designed to parse a toy programming language and estimate the range of values that each variable can take. It leverages predefined abstractions to perform static analysis, making it a useful tool for understanding variable behavior in simple programs.

Features

  • Parses a toy language with basic constructs such as assignments, conditionals, and loops.
  • Estimates variable ranges using static analysis techniques.
  • Pretty prints the parsed program for better readability.
  • Written in Haskell, showcasing functional programming principles.

Installation

To install the tool, ensure you have GHC and Cabal installed. Then, clone the repository and build the project:

git clone <repository-url>
cd <repository-directory>
cabal build

Usage

After building the project, you can run the tool with a toy program as input. Example test programs can be found in the test-programs directory. For example:

cabal run -- test-programs/program.txt

Or the program can be entered directly into the terminal after running the tool with no arguments:

cabal run

Testing

To run the test suite, use the following command:

cabal test

The tool will parse the program and output the estimated ranges for each variable.

About

A static Program analysis Tool written in Haskell

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors