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
INLINE FUNCTION Function qualifier INT INLINE FUNCTION f(...) bar.occ #44
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
INT16/INT32/INT64 Extended integer width types cast.occ, casting.occ, commstime.occ #46
tim ? AFTER expr Timer AFTER input (wait until time) bar.occ, demo.occ, sort_inside_2.occ
PRI ALT Prioritised alternation bar.occ
Guarded ALT (&) (condition) & chan ? x boolean pre-conditions bar.occ
Multi-value CASE labels '*n', '*c' comma-separated case values test_bell.occ
[][]TYPE / [][n]TYPE Multi-dimensional array declarations bar.occ, test_utils.occ
Dotted protocol tags bar.blank, bar.terminate in PROTOCOL CASE bar.occ
*" string escape Escaped quote character inside string literals test_utils.occ

occam-pi extensions

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

Error distribution by file

File Root causes
bar.occ INLINE, PRI ALT, ALT replicator, AFTER, SHARED/CLAIM, guarded ALT, multi-dim 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 Multi-dim 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