Git Product home page Git Product logo

flrc's Introduction

The Functional Language Research Compiler Build Status

The Functional Language Research Compiler (FLRC) was designed to be a general compiler framework for functional languages. The only supported compiler that is being released is a Haskell Research Compiler (HRC). The overall compilation pipeline is pictured in the following diagram:

HRC and FLRC Compilation Pipeline

Installation

FLRC requires FLRC-LIB to be installed prior to its installation. Other software required are autoconf/automake, pkg-config, the MLton compiler, and a C/C++ compiler.

All released code has only been tested to work on x86 64-bit Linux distros, although they were originally written for x86 32-bit Windows. At least 4GB of free memory is advised for compiling FLRC.

To install:

sh bootstrap.sh
./configure --prefix=${PREFIX}
make && make install

If you had flrc-lib installed at a non-standard location, there may be a pkgconfig error. This can be easily fixed by setting the correct PKG_CONFIG_PATH as follows (before running the bootstrap.sh and configure commands again):

# With PREFIX already set to where flrc-lib is installed, do:
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig:$PKG_CONFIG_PATH

In the process, it will also automatically download a version of MLton compiler's source to extract some SML libraries. Once the installation is finished, a binary command hrc and some runtime headers and libraries can be found under the given ${PREFIX} path.

Usage

To actually compile a Haskell program, we'll also need a patched version of GHC. See Building and Using GHC with HRC for more information, including how to compile and run flrc-benchmarks.

To get a list of compiler options, call the compiler with any invalid option (e.g. -help).

For example, to list the flrc options:

hrc -help

To list the flrc expert options:

hrc -expert -help

One can also pass runtime options to the executable compiled by HRC. Options are passed in the form:

./[executable] @PPiler [opts]* -- [normal arguments]

These options must come before any program options, and only one @PPiler section is supported. A list of options can be obtained by passing any invalid option (e.g. -help). Currently, there are options for the number of threads to run in the futures back end, and to set the initial and max heap size for the conservative GC.

Questions

FLRC is open sourced as is. We at Intel Labs are no longer actively working on this compiler. Please use the issue tracker if you have questions.

Related Publication

Neal Glew, Tim Sweeney, and Leaf Petersen. 2013. A multivalued language with a dependent type system. In Proceedings of the 2013 ACM SIGPLAN workshop on Dependently-typed programming (DTP '13). ACM, New York, NY, USA, 25-36.

Hai Liu, Neal Glew, Leaf Petersen, and Todd A. Anderson. 2013. The Intel labs Haskell research compiler. In Proceedings of the 2013 ACM SIGPLAN symposium on Haskell (Haskell '13). ACM, New York, NY, USA, 105-116.

Leaf Petersen, Todd A. Anderson, Hai Liu, and Neal Glew. 2013. Measuring the Haskell Gap. In Proceedings of the 25th symposium on Implementation and Application of Functional Languages (IFL '13). ACM, New York, NY, USA, , Pages 61 , 12 pages.

Leaf Petersen, Dominic Orchard, and Neal Glew. 2013. Automatic SIMD vectorization for Haskell. In Proceedings of the 18th ACM SIGPLAN international conference on Functional programming (ICFP '13). ACM, New York, NY, USA, 25-36.

Neal Glew and Leaf Petersen. 2012. Type-Preserving Flow Analysis and Interprocedural Unboxing (Extended Version). Tech Report.

Leaf Petersen and Neal Glew. 2012. GC-Safe interprocedural unboxing. In Proceedings of the 21st international conference on Compiler Construction (CC'12), Michael O'Boyle (Ed.). Springer-Verlag, Berlin, Heidelberg, 165-184.

License

This software carries a BSD style license. See LICENSE_INFO for more information.

flrc's People

Contributors

btlewis avatar drtodd13 avatar master-q avatar ninegua avatar

Watchers

 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.