Skip to content

acm-uiuc/sigplan-pl-s26

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SIGPlan Programming Language

A programming language designed and implemented by SIGPlan over the course of Spring 2026.


Table of Contents


Primitives

Type Description
int1 Signed 1-byte integer
int2 Signed 2-byte integer
int4 Signed 4-byte integer
int8 Signed 8-byte integer
intu1 Unsigned 1-byte integer
intu2 Unsigned 2-byte integer
intu4 Unsigned 4-byte integer
intu8 Unsigned 8-byte integer

Variables

Variables are declared with let. Use change to mutate them.

let x be 42
change x to 100

Control Flow

Conditionals

if i is n begin
    ...
end

Loops

loop begin
    ...
    break
end

Functions

Declaration

Functions are declared with funct, specify typed parameters, and optionally return a type.

funct foo takes bar is int4, baz is intu1 returns int4 begin
    ...
end

Named Calls

call foo with bar as 8, baz as 10

Anonymous Functions

let foo be funct that takes bar is int4 returns intu4
    ...
end

Product Types

Creating an Instance

Use arise to construct a product type, supplying values for each field.

product A contains bar is intu1, baz is int4

let a be arise A with bar as 0, baz as -1

Accessing Fields

let f be member bar of a

Sum Types

Creating an Instance

Use arise to construct a sum type variant, supplying values for each field.

sum Shape is Circle contains radius is int4,
             Rect contains width is int4, height is int4,
             Point

let s be arise Circle with radius as 5

Pattern Matching

match s begin
    Circle contains radius begin
        ...
    end
    Rect contains width, height begin
        ...
    end
    Point begin
        ...
    end
end

Examples

Fibonacci

Computes the nth Fibonacci number iteratively.

let n be 0
let a be 0
let b be 1
let i be 0

loop begin
    if i is n begin
        break
    end
    let t be b
    change b to a + b
    change a to t
    call print with s as b
end

About

SIGPlan programming language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors