Skip to content

carlostome/FunFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Control Flow Analysis

Control flow analysis for a lambda calculus like language with integers, booleans and explicit recursion operator. It is based on the language presented in chapter 5 of Principles of program analysis.

However, the implementation differs from the one in the book as the subeffecting of control-flow annotations is presented as a separate rule which prevents to some extent poisoning.

Installation

  1. Download and install the Haskell platform for your operating system. The Haskell platform can be found in https://www.haskell.org/platform/. The three main platforms, Window, Mac OS X and Linux are supported.

  2. Install the Stack tool from the hackage repository with the next steps. This need to be done from a terminal with the Haskell platform available in the path.

cabal update
cabal install stack
  1. Clone this repository or extract the source code.
git clone https://github.com/carlostome/FunFlow.git
  1. Change directory into the project and build the project with: .
stack build
  1. To install it just type:
stack install

this will copy it to stack binaries folder.

Usage

As a library (prefered)

The easiest way to play with this library is to use it in a live ghci session. In order to do so, just type stack repl in the project folder. The examples are contained in the src/Examples.hs file

The function runExpr defined in src/FunFlow.hs performs parsing and analysis on a string containing the program.

Also src/FunFlow.hs exports the function runFile which reads, parses and executes the analysis of a given file.

As an executable

Once installed, run funflow FILE. File examples can be found under examples/. However is more recomendable the previous methods as all interesting examples are coded as strings in the file src/Examples.hs.

About

Control-flow analysis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published