GithubHelp home page GithubHelp logo

majjoha / sloth Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 173 KB

A lazy, functional programming language.

Home Page: https://github.com/majjoha/sloth

License: GNU General Public License v3.0

Shell 9.73% Makefile 5.64% OCaml 30.65% C 52.77% C++ 1.21%
c functional-programming lazy ocaml programming-language

sloth's Introduction

Dogcow
Moof!

sloth's People

Contributors

engesgaard avatar majjoha avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sloth's Issues

Implementing mark 5 features in G-machine

The features described for the mark 5 G-machine in "Implementing Functional Languages: a tutorial" needs to be implemented. This means implementing an E compilation scheme which exploits the knowledge that a particular expression will be needed in WHNF to optimize the compiled bytecode.

As an aside, we also need to implement logical AND and OR.

Finish the implementation of Mark-and-Sweep Garbage Collection for the G-machine

Note: Changes related to this issue is located on the "gc_mark2" branch.

Sub-issues

  • Avoiding the accumulation of orphans. This can be a result of application nodes being converted into indirection nodes of size 1. This can be remedied by making indirection nodes of size 2. However, this also requires us to make integer nodes of size 2, thus wasting more space on the heap.
  • Avoiding that the garbage collector ends up in an infinite loop where there will never be freed enough space to finish the computation. This might be connected with the fact that the heap gets segmented. Then we need functionality to reorganize the heap to free larger blocks.

Avoid reducing expressions in WHNF more than once

Currently, in the case where we have an expression which is already in WHNF, we attempt to reduce it more than once. By using a tag to indicate whether it has already been reduced to WHNF, we could avoid this.

Introduce base value stack

We never had the time to introduce a base value stack before handing in the thesis. This may prevent optimizations of environment representations as well as complicate garbage collection, since we mix base values, and pointers in the stack.

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.