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.
- 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.
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 buildAfter 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.txtOr the program can be entered directly into the terminal after running the tool with no arguments:
cabal runTo run the test suite, use the following command:
cabal testThe tool will parse the program and output the estimated ranges for each variable.