NOCC: Guppy Implementation
This page contains some notes about the Guppy implementation within NOCC. There is no formal language documentation, yet. There is some informal documentation here: http://frmb.org/guppy.html.
Guppy adds a couple of extra front-end passes to the compiler, that do much of the work of transforming the Guppy language structure into something that can be code-generated into C (assuming the default CCCSP back-end). All of the front-end transforms are done target-unaware. Back-end transforms are used in one or two places to handle things prior to name-mapping (where most of the target-dependent stuff happens).
par: create process abstractions and instances for parallel processes.
fcndef: create process abstraction of function if needed (result-less processes only).
alt: create temporary to hold selected guard index.
fcndef: parameterise results.
instance: pull apart into temporaries and assignments.
cflow: turn return statements into assignments and return.
io: create temporaries for non-addressable things (typically constants and expressions).
litstring: create temporary.
name: remove lonely names (discarded expressions, particularly from instance fiddling in fetrans1).
assign: from instance, push LHS into result parameters.
io: dismantle complex outputs into sequenced events.
alt: breaks into alt then choice on selection.