Giter VIP home page Giter VIP logo

join-interpreter-basic's Introduction

Basic Join-Language Interpreter

This module exports a basic interpreter for Join-Language which is an attempt at encoding the join calculus within the Haskell programming language as an embedded DSL.

Usage

  1. Write a join program using Join-Language
  2. Call ‘run’ (from Join.Interpreter.Basic) on the top-level process to execute it as an IO action.

Implementation details

The interpreter is called ‘basic’ because it is a fairly quick and dirty implementation , not fully optimised and not implementing some possible features.

The primary optimisation is that definitions are compiled to bit-patterns making testing a single ‘pattern |> trigger’ a cheap bitwise operation against a status bit-pattern.

Regarding execution, Instructions are executed concurrently with respect to instructions related to separate definition blocks. ‘spawn’ and ‘with’ instructions use ‘forkIO’ and so use lightweight Haskell threads as opposed to OS threads.

Not all invalid programs are caught at compile-time by Join-Language and have undefined behavior. This interpreter behaves in the following manner:

Erroneous action Result
Sending >1 reply Silently dropped
Sending an unexpected reply Runtime error
Sync without reply Possible runtime error “Blocked on MVar”
Overlapping definition block Actions on overlapping patterns are considered on the later definition, in isolation
Channel appears >1 in single definition Will trigger as if only 1 occurrence, probably resulting in “no such message” exceptions

join-interpreter-basic's People

Contributors

syallop avatar

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.