Here's my analysis of the blocking language features for issue #70:
Blocking Features for mandelbrot.occ
1. DATA TYPE ... RECORD (lines 27-30)
DATA TYPE COMPLEX64
RECORD
REAL64 real, imag:
:
The transpiler supports RECORD but not DATA TYPE name RECORD — the named data type form with multi-line field declarations. This is the foundation for COMPLEX64 used throughout the file.
2. User-defined types in parameters and declarations (lines 59, 70, 73)
REAL64 INLINE FUNCTION COMPLEX64ABSSQ (VAL COMPLEX64 x) IS ...
INT FUNCTION calc (VAL COMPLEX64 a)
INITIAL COMPLEX64 iter IS [0.0, 0.0]:
The parser doesn't recognize COMPLEX64 as a type in parameter lists, INITIAL declarations, or function return types. Currently only built-in types are accepted.
3. Array types in protocol fields (lines 45-46)
PROTOCOL P.JOB.IN IS INT; INT; [4]REAL64:
PROTOCOL P.JOB.OUT IS INT; INT; [IMAGE.WIDTH * 2]BYTE:
Protocol field types can't be arrays ([4]REAL64, [expr]BYTE). The parser only expects simple type names.
4. Multi-dimensional array declarations (line 161)
[MAX.FRAMES][IMAGE.HEIGHT][IMAGE.WIDTH * 2]BYTE framebuffer:
Only 1D arrays are supported; multi-dimensional [n][m][k]TYPE is not.
5. Multi-dimensional array indexing (lines 179, 199, 207)
framebuffer[frame \ MAX.FRAMES][id]
framebuffer[lbuf][j][i*2]
Chained [][] index access isn't parsed.
6. CHAN TYPE / MOBILE RECORD / SHARED / CLAIM / MOBILE allocation (lines 48-57, 83, 93-94, 111, 227-233)
CHAN TYPE CT.WORK.IN
MOBILE RECORD
CHAN INT notify?: ...
SHARED CT.WORK.IN! mwcli.in:
CLAIM link.in
mwsvr.in, mwcli.in := MOBILE CT.WORK.IN
Mobile channel types, shared channel ends, CLAIM blocks, and MOBILE allocation are all unimplemented. This is the biggest feature gap — it's the concurrency abstraction used for the worker pool.
7. Operator overloading (lines 62-67)
COMPLEX64 INLINE FUNCTION "+" (VAL COMPLEX64 x, y) IS ...
COMPLEX64 INLINE FUNCTION "**" (VAL COMPLEX64 x, y) IS ...
Functions with string-literal names that overload operators for user-defined types.
8. Array-valued abbreviations with VAL [][n]TYPE (line 43)
VAL [][5]BYTE ansicolours IS ["*#1B[31m", ...]:
2D open array abbreviation (array of fixed-size arrays).
9. Typed array literal constructor [x,y](TYPE) (line 106)
val := calc ([x,y](COMPLEX64)) \ 16
Array literal with an explicit type cast suffix (COMPLEX64).
10. Array comprehension [i = 0 FOR n | expr] (line 153)
INITIAL [4]REAL64 wpacket IS [i = 0 FOR 4 | 0.0]:
Replicator-based array construction.
11. INITIAL with array types (line 153)
INITIAL [4]REAL64 wpacket IS [i = 0 FOR 4 | 0.0]:
INITIAL currently only accepts simple types, not [n]TYPE.
12. RESCHEDULE() intrinsic (line 109)
Minor — maps to runtime.Gosched().
13. tim ? AFTER t in ALT guards (line 187)
tim ? AFTER t
Timer-with-AFTER as an ALT input guard. Regular AFTER in timer reads may work, but not in ALT cases.
14. REAL64 floating-point literals with many decimal places (lines 119-120)
VAL REAL64 x.target IS 1.16000014859:
VAL REAL64 y.target IS -0.27140215303:
These trigger ILLEGAL token errors, suggesting the lexer isn't handling longer float literals correctly.
15. Guarded ALT with boolean pre-condition (line 218)
(hframe <= (lframe + 4)) & tick ? hframe
Boolean expression as an ALT pre-condition guard. The parser seems to not handle parenthesized boolean guards.
Summary by impact
| Priority | Feature | Lines affected |
|---|---|---|
| Critical | CHAN TYPE / MOBILE / SHARED / CLAIM |
48-57, 83, 93, 111, 227-233 |
| Critical | DATA TYPE RECORD + user-defined types in params |
27-30, 59, 62-67, 70, 73, 106 |
| High | Multi-dimensional arrays (decl + indexing) | 43, 161, 179, 199, 207 |
| High | Array types in protocol fields | 45-46 |
| Medium | Operator overloading (string function names) | 62-67 |
| Medium | INITIAL with array types |
153 |
| Medium | Array comprehensions [i = 0 FOR n \| expr] |
153 |
| Medium | Typed array constructor [x,y](TYPE) |
106 |
| Low | tim ? AFTER t in ALT |
187 |
| Low | Boolean ALT pre-condition guards | 218 |
| Low | RESCHEDULE() |
109 |
| Low | REAL64 long float literal lexing | 116-120, 143, 148-149 |
The CHAN TYPE/MOBILE/SHARED/CLAIM family is the single biggest blocker — it's fundamental to this program's architecture. DATA TYPE RECORD with user-defined types is the second largest, as COMPLEX64 pervades the computation. Want me to post this to the issue?