SPLASH 2023: Cutting-Edge Programming Language Research and Development

Table of Contents

1. SPLASH 2023

1.1. Is Wasm Becoming Garbage? (Keynote)   sun

1.1.1. Preparation Notes

  • Familiarize yourself with WebAssembly basics
  • Read up on garbage collection in programming languages
  • Understand the current memory management in Wasm
  • Consider implications of adding GC to Wasm

1.1.2. Example Wasm Code (WAT format)

(module
  (func $allocate (param $size i32) (result i32)
    ;; Simple bump allocator, not garbage collected
    (local $ptr i32)
    (local.set $ptr (global.get $heap_top))
    (global.set $heap_top 
      (i32.add (local.get $ptr) (local.get $size)))
    (local.get $ptr)
  )
  (global $heap_top (mut i32) (i32.const 0))
)

1.7. Periodic and Aperiodic Task Description Mechanisms in an FRP Language for Small-Scale Embedded Systems   mon

1.7.1. Preparation Notes

  • Review Functional Reactive Programming (FRP) concepts
  • Look into embedded systems programming challenges
  • Understand the differences between periodic and aperiodic tasks
  • Consider how FRP can be adapted for resource-constrained environments

1.7.2. Example FRP-style Code (Haskell)

import FRP.Yampa

-- Periodic task: blink an LED every second
blink :: SF () Bool
blink = proc _ -> do
  time <- localTime -< ()
  returnA -< (floor time `mod` 2 == 0)

-- Aperiodic task: respond to a button press
buttonResponse :: SF Bool String
buttonResponse = arr (\pressed -> if pressed then "Pressed!" else "")

-- Combine tasks
main = reactimate (return ())
                  (\_ -> getButtonState)
                  (\_ (led, msg) -> updateOutput led msg)
                  (blink &&& buttonResponse)

1.20. CellPond: Spatial programming without escape   mon

1.20.1. Preparation Notes

  • Research cellular automata and spatial programming
  • Look into dataflow programming models
  • Understand the concept of "escape" in programming languages
  • Consider how spatial programming can be applied to various domains

1.20.2. Example Cellular Automata-like Code (Python)

import numpy as np

def cell_pond_step(grid):
    rows, cols = grid.shape
    new_grid = np.zeros((rows, cols))
    
    for i in range(rows):
        for j in range(cols):
            neighbors = np.sum(grid[max(0,i-1):min(i+2,rows), max(0,j-1):min(j+2,cols)]) - grid[i,j]
            if grid[i,j] == 1:
                new_grid[i,j] = 1 if 2 <= neighbors <= 3 else 0
            else:
                new_grid[i,j] = 1 if neighbors == 3 else 0
    
    return new_grid

# Initialize grid
grid = np.random.choice([0, 1], size=(10, 10))

# Run simulation
for _ in range(10):
    grid = cell_pond_step(grid)
    print(grid)

2. Notes

2.1. Examples

  (define (dec1 x) (- x 1))