Skip to content

Course examples: unimplemented features preventing transpilation #43

@associate-1

Description

@associate-1

Summary

Transpiling the 16 example programs in kroc/modules/course/examples/ reveals that 11 out of 16 fail to parse due to unimplemented language features. Only hello_world.occ, hello_seq_world.occ, hello_raw_world.occ, echoing.occ, and double_echo.occ transpile successfully.

This is a tracking issue for the full set of missing features discovered. Some have their own dedicated issues.

Unimplemented Features

Standard occam features

Feature Description Affected files Issue Status
INLINE FUNCTION Function qualifier INT INLINE FUNCTION f(...) bar.occ #44 Done
ALT replicators ALT i = 0 FOR n (like SEQ/PAR/IF replicators) sort_pump.occ, sort_pump_2.occ, sort_inside.occ, sort_inside_2.occ, bar.occ #45 Done
INT16/INT32/INT64 Extended integer width types cast.occ, casting.occ, commstime.occ #46 Done
tim ? AFTER expr Timer AFTER input (wait until time) bar.occ, demo.occ, sort_inside_2.occ #60 Done
PRI ALT Prioritised alternation bar.occ #84 Parsed (no true priority semantics)
Guarded ALT (&) (condition) & chan ? x boolean pre-conditions bar.occ #67 Done
Multi-value CASE labels '*n', '*c' comma-separated case values test_bell.occ #61 Done
[][]TYPE / [][n]TYPE Multi-dimensional array declarations bar.occ, test_utils.occ #64 [n][m] and [][] done; [][n] remaining
Expression-sized arrays [expr]TYPE with non-literal sizes various #62 Done
Dotted protocol tags bar.blank, bar.terminate in PROTOCOL CASE bar.occ Done
*" string escape Escaped quote character inside string literals test_utils.occ #65 Open

occam-pi extensions

Feature Description Affected files Issue Status
SHARED CHAN / CLAIM Shared channels and exclusive access blocks bar.occ #40 Deferred
MOBILE types Dynamically allocated mobile data demo.occ #40 Deferred

Error distribution by file

File Root causes
bar.occ INLINE, PRI ALT, ALT replicator, AFTER, SHARED/CLAIM, guarded ALT, [][n] arrays, dotted protocol tags
cast.occ INT16/INT32/INT64
casting.occ INT16/INT32/INT64
commstime.occ INT64
demo.occ AFTER, MOBILE
sort_inside.occ ALT replicator, multi-dim arrays
sort_inside_2.occ ALT replicator, AFTER
sort_pump.occ ALT replicator
sort_pump_2.occ ALT replicator
test_bell.occ Multi-value CASE labels
test_utils.occ [][n] arrays, string escape

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions