All Projects → melsman → Mlkit

melsman / Mlkit

Standard ML Compiler and Toolkit

Projects that are alternatives of or similar to Mlkit

Clio
Clio is a functional, parallel, distributed programming language.
Stars: ✭ 555 (+203.28%)
Mutual labels:  compiler, functional-programming
Cfl
a Compileable statically typed Functional programming Language
Stars: ✭ 7 (-96.17%)
Mutual labels:  compiler, functional-programming
Mlton
The MLton repository
Stars: ✭ 683 (+273.22%)
Mutual labels:  compiler, functional-programming
Potigol
Linguagem Potigol - Linguagem de programação funcional moderna para iniciantes - A Functional Programming Language for Beginners
Stars: ✭ 179 (-2.19%)
Mutual labels:  compiler, functional-programming
Bqn
An APL-like programming language. Self-hosted!
Stars: ✭ 100 (-45.36%)
Mutual labels:  compiler, functional-programming
Groovy
Apache Groovy: A powerful multi-faceted programming language for the JVM platform
Stars: ✭ 4,359 (+2281.97%)
Mutual labels:  compiler, functional-programming
Grin
GRIN is a compiler back-end for lazy and strict functional languages with whole program optimization support.
Stars: ✭ 834 (+355.74%)
Mutual labels:  compiler, functional-programming
Silt
An in-progress fast, dependently typed, functional programming language implemented in Swift.
Stars: ✭ 217 (+18.58%)
Mutual labels:  compiler, functional-programming
Faust
Functional programming language for signal processing and sound synthesis
Stars: ✭ 1,360 (+643.17%)
Mutual labels:  compiler, functional-programming
Idiolisp
A statically typed functional programming language
Stars: ✭ 78 (-57.38%)
Mutual labels:  compiler, functional-programming
Write You A Haskell
Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)
Stars: ✭ 3,064 (+1574.32%)
Mutual labels:  compiler, functional-programming
Grain
The Grain compiler toolchain and CLI. Home of the modern web staple. 🌾
Stars: ✭ 2,199 (+1101.64%)
Mutual labels:  compiler, functional-programming
Never
Never: statically typed, embeddable functional programming language.
Stars: ✭ 248 (+35.52%)
Mutual labels:  compiler, functional-programming
Felix
The Felix Programming Language
Stars: ✭ 609 (+232.79%)
Mutual labels:  compiler, functional-programming
Fsharp
The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
Stars: ✭ 2,966 (+1520.77%)
Mutual labels:  compiler, functional-programming
Ring
Innovative and practical general-purpose multi-paradigm language
Stars: ✭ 716 (+291.26%)
Mutual labels:  compiler, functional-programming
Jhc Components
JHC Haskell compiler split into reusable components
Stars: ✭ 55 (-69.95%)
Mutual labels:  compiler, functional-programming
Ghc Grin
GRIN backend for GHC
Stars: ✭ 123 (-32.79%)
Mutual labels:  compiler, functional-programming
Typelang
🌳 A tiny language interpreter implemented purely in TypeScript's type-system
Stars: ✭ 149 (-18.58%)
Mutual labels:  compiler, functional-programming
Varjo
Lisp to GLSL Language Translator
Stars: ✭ 181 (-1.09%)
Mutual labels:  compiler

MLKit

The MLKit is a compiler for the programming language Standard ML. The MLKit covers all of Standard ML, as defined in the 1997 edition of the Definition of Standard ML and supports most of the Standard ML Basis Library.

Test Statistics and Benchmarking

CI Benchmarking

Installation

Under macOS, MLKit is available through Homebrew: Just execute brew install mlkit. Under Linux, you may install a binary version of MLKit using an mlkit PPA from Launchpad.

MLKit Features

  • Covers all of Standard ML. The MLKit compiles all of Standard ML, including Modules, as specified by the Definition of Standard ML. The MLKit also supports large parts of the Standard ML Basis Library.

  • Supports ML Basis Files: The MLKit compiles large programs, including itself, around 80.000 lines of Standard ML plus the Standard ML Basis Library. The support for ML Basis Files makes it easy to compile a program with different Standard ML compilers. Currently, both MLton and the MLKit supports the concept of ML Basis Files. The MLKit works well together with smlpkg, a generic package manager for Standard ML libraries and programs.

  • Region-Based Memory Management: Memory allocation directives (both allocation and deallocation) are inferred by the compiler, which uses a number of program analyses concerning lifetimes and storage layout. The MLKit compiler is unique among ML implementations in this respect.

  • Reference-tracing Garbage Collection: The MLKit supports reference-tracing garbage collection in combination with region-based memory management.

  • Native backend for the x64 architecture (under Linux and macOS).

  • Documentation. A comprehensive guide on programming with the MLKit is available. Documentation is also available in man-pages and from the MLKit home page.

MLKit Cousins

This repository also includes the sources for the following tools, which are built on top of MLKit:

  • SMLToJs. A compiler that compiles all of Standard ML into JavaScript.

  • SMLserver. A compiler and Apache module that allow for Standard ML to be efficiently executed in a web-server context.

  • Barry. A Standard ML source-to-source compiler that will eliminate modules, using static interpretation and generate optimised Core-language Standard ML code.

License and Copyright

The MLKit compiler is distributed under the GNU Public License, version 2. See the file MLKit-LICENSE for details. The runtime system (/src/Runtime/) and libraries (basis/) is distributed under the more liberal MIT License.

Compilation Requirements

To compile, install, and use the MLKit, a Linux box running Ubuntu Linux, Debian, gentoo, or similar is needed. The MLKit also works on macOS and has also earlier been reported to run on the FreeBSD/x86 platform, with a little tweaking.

To compile the MLKit, a Standard ML compiler is needed, which needs to be one of the following:

MLton >= 20051202:

$ mlton
MLton 20051202 (built Sat Dec 03 04:20:11 2005 on pavilion)

If a version prior to 20201023 is used, you may need to adjust the mlton-flags setup in the file Makefiledefault.

A working MLKit compiler >= 4.3.0:

$ mlkit -V
MLKit version 4.3.0, Jan 25, 2006 [X86 Backend]

Moreover, gcc is needed for compiling the runtime system and related tools.

Compilation

After having checked out the sources from Github, execute the command:

$ ./autobuild

Now, cd to the toplevel directory of the repository and execute the appropriate set of commands:

Compile with MLton alone (Tested with 3Gb RAM):

$ ./configure
$ make mlkit

Compile with existing MLKit (Tested with 1Gb RAM):

$ ./configure --with-compiler=mlkit
$ make mlkit

If you later want to install the MLKit in your own home directory, you should also pass the option --prefix=$HOME/mlkit to ./configure above.

For binary packages, we use

$ ./configure --sysconfdir=/etc --prefix=/usr

Bootstrapping (optional - works with 1Gb RAM)

This step is optional. If you want the resulting executable compiler to be bootstrapped (compiled with itself), execute the command:

$ make bootstrap

Be aware that this step takes some time.

Pre-compile Basis Library and Kit-Library

Execute the following command:

$ make mlkit_libs

Installation after Compilation

For a system wide installation of the MLKit, installation including man-pages and tools, execute the command:

$ sudo make install

For a personal installation, with --prefix=$HOME/mlkit given to ./configure, execute the following command:

$ make install

Making a Binary Package

To build a binary package, execute the command

$ make mlkit_x64_tgz

This command leaves a package mlkit-X.Y.Z-x64.tgz in the dist/ directory. For building a binary package, the installation step above is not needed and the bootstrapping step is optional.

For building packages containing both MLKit and SMLtoJs, consult the Makefile.

Try It

To test the installation, copy the directory /usr/share/mlkit/kitdemo to somewhere in your own directory, say $HOME/kitdemo:

$ cp -a /usr/share/mlkit/kitdemo $HOME/kitdemo
$ cd $HOME/kitdemo
$ mlkit helloworld.sml

The MLKit should produce an executable file run:

$ ./run
hello world

Trying Without Installing

You can run mlkit without installing it, but you should then point the environment variable SML_LIB at the build directory (which contains the basis and the lib directories) whenever you run mlkit. E.g:

$ SML_LIB=$PWD bin/mlkit

More Information

See the MLKit home page.

Documentation for the MLKit is located in the directories doc/mlkit and man/man1. License information is located in the file doc/license/MLKit-LICENSE.

Comments and Bug Reports

The MLKit has a number of known bugs and limitations. To file a bug-report, create an issue at the Github page.

Appendix A: Directory Structure of the Sources

kit/
   README
   configure
   Makefile.in
   src/
   basis/
   doc/mlkit.pdf
      /license/MLKit-LICENSE
   man/man1/rp2ps.1
   kitdemo/
   test/

Appendix B: Quick Compilation and Installation Guide

We assume that MLton >= 20051202 is installed on the system as described above.

After having checked out the sources from Github, execute the command:

$ ./autobuild

To compile the MLKit, execute the following commands:

$ ./configure
$ make mlkit
$ make bootstrap
$ make mlkit_libs

The make bootstrap command is optional.

To install the MLKit and related tools, execute:

$ sudo make install

See the section "Try It" above to test the installation.

Appendix C: Displaying Region Flow Graphs with VCG

The VCG tool can be used to show region flow graphs.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].