Willtor / def

The DEF compiler
GNU General Public License v2.0
3 stars 1 forks source link

DEF Engineering Framework (DEF)

Overview

DEF is a low-level programming language designed for transparent compatibility with C for integration with existing C projects, as well as being good at the things C is good at. DEF, however, has a number of language features missing from C, related to concurrency. It includes Cilk-style parallel constructs, native support for transactions, and includes integrated memory reclamation for concurrent data structures.

Additionally, DEF contains modern language features that C is missing (tuples, parallel and concurrency constructs, array slices, and more), and a syntax that exposes features that are difficult to use in C, such as function pointers. A description of the language can be found at the DEF wiki.

This repository contains the source for the def compiler, a suite of unit and regression tests, and additional tools for language support.

Build Instructions

DEF is currently supported only on GNU/Linux. Instructions are for Ubuntu (or Debian-like) systems, but they should be easily generalizable to systems with other package managers.

Packages

OCaml and libraries:

Forkscan:

LLVM:

Compiler Binary

Build the def compiler binary and defghi utility with:

% make
% sudo make install

If you choose not to install it, the built binaries are in the repo at build/bin/.

Extras

A simple def-mode for emacs is provided in the tools directory that will color keywords. To add it to your installation, either leave it in its directory in the repo or copy it to a subdirectory under ~/.emacs.d. Then modify the ~/.emacs file (or whatever your emacs initialization file is) to add the following lines:

(add-to-list 'load-path "/path/to/def-mode-directory/")
(require 'def-mode)

Contributions

Contributions are extremely welcome. Clone the repository and create pull requests.

Comments or bugs: Contact the original author and maintainer, William M. Leiserson, at willtor@mit.edu.