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 |
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. Onlyhello_world.occ,hello_seq_world.occ,hello_raw_world.occ,echoing.occ, anddouble_echo.occtranspile 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
INLINE FUNCTIONINT INLINE FUNCTION f(...)bar.occALTreplicatorsALT i = 0 FOR n(like SEQ/PAR/IF replicators)sort_pump.occ,sort_pump_2.occ,sort_inside.occ,sort_inside_2.occ,bar.occINT16/INT32/INT64cast.occ,casting.occ,commstime.occtim ? AFTER exprbar.occ,demo.occ,sort_inside_2.occPRI ALTbar.occ&)(condition) & chan ? xboolean pre-conditionsbar.occCASElabels'*n', '*c'comma-separated case valuestest_bell.occ[][]TYPE/[][n]TYPEbar.occ,test_utils.occ[n][m]and[][]done;[][n]remaining[expr]TYPEwith non-literal sizesbar.blank,bar.terminatein PROTOCOL CASEbar.occ*"string escapetest_utils.occoccam-pi extensions
SHARED CHAN/CLAIMbar.occMOBILEtypesdemo.occError distribution by file
bar.occINLINE,PRI ALT,ALT replicator,AFTER, SHARED/CLAIM,guarded ALT, [][n] arrays,dotted protocol tagscast.occINT16/INT32/INT64casting.occINT16/INT32/INT64commstime.occINT64demo.occAFTER, MOBILEsort_inside.occALT replicator,multi-dim arrayssort_inside_2.occALT replicator,AFTERsort_pump.occALT replicatorsort_pump_2.occALT replicatortest_bell.occMulti-value CASE labelstest_utils.occ