Tetra is a high-level programming language that is designed to make parallel programming easier to teach and learn.


# simple Python-like syntax
def findMax(values [int]) int:
    # static type inference
    max = 0

    # built in parallelism
    parallel for v in values:
        if v > max:
            # easy synchronization
                max = v
    return max


There are going to be big changes coming to the language this summer, so we are officially calling the current state 0.1. Read more news on the news page.


Check out the tutorial for a quick introduction to the language, or the language or library reference pages for more complete information.


Report any bugs in Tetra or contribute ideas to our issue tracker, and contribute code on our GitHub page.

Why Tetra?

Easy Parallelism

Tetra includes built-in syntax for writing parallel programs. Launching tasks in the background, executing multiple statements in parallel, parallelizing for loop iterations, and specifying critical sections can all be done with a single line of code. This makes writing correct parallel code easier and less error-prone than in most languages.

Simple Syntax

The syntax of Tetra is based off of Python which makes it easy to read, and familiar to many students, as Python is the most popular language for teaching computer science in the United States. Tetra inherits most of its structured and procedural programming concepts from Python, though the language is different in several ways too.

Strong Type System

Tetra has a strong, static type system. All types in Tetra programs are known at compile time, though the compiler does most of the work for you. Tetra uses type inference for variables, so the only types you need to manually declare are function parameter and return types. All other variables types are inferred by the compiler giving you the safety of a static type system with most of the convenience of a dynamic one.

Bundled IDE

Tetra includes an IDE which can be used to write, execute and test Tetra programs. The IDE includes syntax highlighting, marking of errors, and other common features.

Copyright © 2018 Tetra | Licensed under the MIT License