Skip to content

Statements

Julian Oppermann edited this page Mar 2, 2021 · 10 revisions

General

CoreDSL 2 supports all standard C constructs:

  • Branches: if / else, switch / case / default
  • Loops: for / while / do...while
  • Jumps: continue / break / goto

However, function recursion and irreducible control flow are prohibited.

Spawn keyword

The spawn keyword marks a statement (usually, a compound statement or a function call) for asynchronous execution. Spawn statements are only allowed as the last statement of an instruction's behavior specification (this implies that such statements cannot be nested. Semantically, the execution of the instruction ends at the spawned statement, which itself continues to execute in the background.

Example from the introduction

Multiple spawn statements may overlap at runtime. Hence, the implementation must define an arbitration mechanism to access shared resources such as register files or address spaces.

Clone this wiki locally