Giter VIP home page Giter VIP logo

val's Introduction

Val

Val is a research programming language to explore the concepts of mutable value semantics and generic programming for high-level systems programming.

This repository contains the sources of the reference implementation of Val. Please visit our website to get more information about the language itself.

Supported platforms

The compiler is currently developed on Unix-like operating systems. While Windows is currently not supported, we would enthusiastically receive any contributions along these lines. See #45 if you'd like to pitch in.

Installation

This project is written in Swift and distributed in the form of a package, built with Swift Package Manager. You will need Swift 5.6 or higher to build the compiler from sources.

You may compile Val's compiler with the following commands:

swift build -c release

That command will create an executable named valc in .build/release. That's Val compiler!

Implementation status

This project is under active development; expect things to break and APIs to change.

The compiler pipeline is organized as below. Incidentally, early stages of this pipeline are more stable than later ones. (Note: completion percentages are very rough estimations.)

  1. Parsing (100%)
  2. Type checking (50%)
  3. IR lowering (30%)
  4. IR analysis and transformations (30%)
  5. Machine code generation (20%)

You can select how deep the compiler should go through the pipeline with the following options:

  • --emit raw-ast: Only parse the input files and output an untyped AST as a JSON file.
  • --typecheck: Run the type checker on the input.
  • --emit raw-ir: Lower the typed AST into Val IR and output the result in a file.
  • --emit ir: Run mandatory IR passes and output the result in a file.
  • --emit cpp: Produce a C++ source file.
  • --emit binary (default): Produce an executable.

For example, valc --emit raw-ast -o main.json main.val will parse main.val, write the untyped AST in main.json, and exit the pipeline.

A more detailed description of the current implementation status is available on our roadmap page.

Contributing

We welcome contributions to Val. Please read through CONTRIBUTING.md for details on how to get started.

License

Val is distributed under the terms of the Apache-2.0 license. See LICENSE for details.

val's People

Contributors

camio avatar compnerd avatar dabrahams avatar dan-zheng avatar kyouko-taiga avatar lucteo avatar mtk-cognex avatar nickpdemarco 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.