GithubHelp home page GithubHelp logo

jez / flac-post-tag Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 7 KB

Generate "post tag system" traces

Home Page: http://www.cs.cmu.edu/~flac/PDFs/hw05.pdf

License: MIT License

Haskell 100.00%
plt programming-languages

flac-post-tag's Introduction

Post Tag System Simulator

This is a simple Haskell program to trace through the steps of a Post Tag System, a powerful form of rewrite systems. It's useful for gaining intuition about how these rewrite systems work, especially when asked to prove things about them.

Usage

This usage information may become out of date. Run the program with no arguments or check the source for more up-to-date information if something doesn't seem to work.

Usage:
  post [options] (small|big) <iterations> <word>

Options:
  --intersperse  Intersperse <word> with 0's (because only evens will be read)

Note that the tag system can only be configured by editing the code, so you'll have to compile it yourself if you really want to play around.

Step Semantics

There are two forms of step semantics; "small" steps or "big" steps. Small steps perform one deletion+append combo at a time, and big steps replace the entire string in one step, deleting many characters at a time. I'm not sure which flavor helps to think about the problem best.

Installation

Installation instructions should be standard Haskell instructions, but this is my first Haskell project so I might have done something wrong.

git clone https://github.com/jez/flac-post-tag
cabal sandbox init
cabal install
cabal build

You can also check the Releases for binaries.

Example

# Run 7 big-step iterations on the initial word "1010"
./post-darwin-0.1.0.0 big 7 1010
1010
100100
10011
001100
11001
001100
11001

License

MIT License

flac-post-tag's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.