Giter Site home page Giter Site logo

polyvariant's Introduction

Polyvariant Flow Analysis with Higher-ranked Polymorphic Types and Higher-order Effect Operators

This is an implementation of the analysis named Polyvariant Flow Analysis with Higher-ranked Polymorphic Types and Higher-order Effect Operators created by Jurriaan Hage and Stefan Holdermans. A demo of this implementation is hosted at: https://polyvariant-5bd4c.web.app/.

Instructions

This program requires https://github.com/ghcjs/ghcjs since only a web user interface is supported. The program can still be compiled with GHC and loaded via GHCI. The reconstruction algorithm can be invoked with the examples of the package Analysis.Examples. When building using GHCJS, node.js is required and the build process only works in unix based system (sorry, but copyFile from System.Directory is not supported by GHCJS).

The package can be installed by invoking:

cabal install

in the source directory. This will create a folder inside the binary directory of your cabal directory named "Experimentation-Project.jsexe". Inside this folder there is a file called "index.html". This file can be opened in a modern web browser and will load the complete user interface to use the program.

The user interface contains a text field, buttons for examples, a button to compile the input and a checkbox to decide wether the expression should be reduced to its normal form or not. Note that one should only check this box if the expression has a normal form. Otherwise the browser will get stuck in an infinite loop.

After entering an expression (sample expressions can be written by clicking one of the example buttons), the expression can be compiled. The result will be a list of error messages (if the expression is invalid or does not typecheck) or the type of the expression, the effects that the expression contains, the pretty print of the expression, the reduced expression (if the option was ticked) and two logs of the result. Both logs contain the same information, the double pane is added so it's easier to browse the logs. Be patient because typesetting long expressions (and their logs) can take a lot of time.

The test suite can be run with GHC. It requires test-framework and test-framework-quickcheck2 to be installed.

polyvariant's People

Contributors

netogallo avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

kmels

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.