Git Product home page Git Product logo

mulligan's Introduction

mulligan

mulligan is an interpreter-style debugger for the Standard ML language, aiming to implement the semantics of SML at a fine granularity for inspection purposes.

Has rudimentary support for SML/NJ CM files, allowing analysis of entire SML/NJ projects.

Usage

To use mulligan, you must first build it by running make. Then, you can pass in the desired file for evaluation via the commandline.

$ make
$ ./mulligan test.sml

This will take you into the mulligan interactive loop.

mulligan may accept both .sml, .sig, .fun files, and .cm files, upon which it will traverse the sources, exporting the correct bindings on conclusion. mulligan does not currently support computing a dependency graph for CM dependencies, and thus always evaluates the source files in order of listing.

Features

Upon evaluating a particular program, mulligan takes the user into an interactive loop, in which the user can take a variety of actions to manipulate the program state.

image

The commands step and prev allow the user to step through execution, until the next "significant event". Significant events include stepping of a sub-expression, function application, and binding to an identifier, among others. Some of these may be adjusted in the loop.

By default, while stepping mulligan will display the surrounding context until the nearest declaration site. This can make it confusing which expression is currently being focused, so the reveal <i> command allows one to see the surrounding context for the currently evaluated expresison, up to <i> layers deep.

mulligan also allows you to print the value bound to a particular identifier, via the command print <id>.

There are some internal settings which control the pretty-printer, primarily, which can be changed via set <name> = <v>. These are explained in more detail via mulligan --help.

Breakpoints

mulligan allows one to set breakpoints, which are particular events that should be skipped to, instead of needing to be stepped to manually.

The command break <id> sets a breakpoint on the function value bound to the identifier <id>, which will be triggered upon entering that function's body. It is worth noting that this is truly a breakpoint on that function value, as even if it is bound to another identifier and invoked, execution will be stopped.

The command break bind <id> sets a breakpoint on binding values to the identifier <id>. This will be triggered upon encountering a val declaration to that identifier.

The command run allows one to skip to the end of program execution, or to the first breakpoint. The command last allows one to skip to the beginning of program execution, or to the last breakpoint that was tripped.

The command clear clears all breakpoints.

Naming

Naming has followed the same spirit as another SML project, millet.

mulligan has the letters "m" and "l" in it, in that order. So does "Standard ML".

Also, this debugger allows you to rewind and redo evaluation of a program, and a mulligan is a term for redoing an action in a game.

License

The included LICENSE file is the license for this project.

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.