fizzbee-io / fizzbee

Easiest-ever formal methods language! Designed for developers crafting distributed systems, microservices, and cloud applications
https://fizzbee.io
Apache License 2.0
118 stars 6 forks source link

2pc example doesn't parse on macOS #60

Closed sriram-srinivasan closed 1 month ago

sriram-srinivasan commented 1 month ago

> fizz ./examples/fizz/two_phase_commit.fizz

line 5:4 mismatched input '' expecting {'None', 'lambda', 'not', 'await', 'print', 'exec', 'True', 'False', 'any', '...', '+', '-', '~', STRING, DECIMAL_INTEGER, OCT_INTEGER, HEX_INTEGER, BIN_INTEGER, IMAG_NUMBER, FLOAT_NUMBER, '(', '{', '[', NAME}
line 5:4 extraneous input '' expecting {DEDENT, 'def', 'return', 'raise', 'from', 'import', 'nonlocal', 'global', 'assert', 'if', 'while', 'for', 'try', 'None', 'with', 'lambda', 'not', 'class', 'yield', 'del', 'pass', 'continue', 'break', 'async', 'await', 'print', 'exec', 'True', 'False', 'atomic', 'serial', 'parallel', 'oneof', 'any', 'action', 'func', 'fair', 'require', 'init', 'role', 'symmetric', 'invariants', 'always', 'eventually', '...', '*', '+', '-', '~', '@', STRING, LABEL, DECIMAL_INTEGER, OCT_INTEGER, HEX_INTEGER, BIN_INTEGER, IMAG_NUMBER, FLOAT_NUMBER, '(', '{', '[', NAME}
line 9:4 mismatched input '' expecting {'None', 'lambda', 'not', 'await', 'print', 'exec', 'True', 'False', 'any', '...', '+', '-', '~', STRING, DECIMAL_INTEGER, OCT_INTEGER, HEX_INTEGER, BIN_INTEGER, IMAG_NUMBER, FLOAT_NUMBER, '(', '{', '[', NAME}
line 9:4 mismatched input '' expecting <EOF>
Error: Compilation failed
sriram-srinivasan commented 1 month ago

Turns out many of the higher numbered tutorials don't work either.

(Built on Mac M2)

jayaprabhakar commented 1 month ago

Thanks for filing the issue. Yes, the examples in fizz directory may not work. They were created well before the actual implementation started as PoC for the language. I'll remove these files shortly.

The tutorials with higher numbered ones are expected to work, let my check that again. Do you have a specific example and what error it says.

sriram-srinivasan commented 1 month ago

I discovered the problem. It was picking an earlier version of python (3.9) instead of 3.12.

The model checker successfully parses the tutorials now, and most run successfully, but there were some failures that I will document as a separate issue.

As for the parsing issue, the 2PC examples still have trouble parsing, exactly as documented earlier.

jp-fizzbee commented 1 month ago

Thanks. I am removing these old files.

https://github.com/fizzbee-io/fizzbee/pull/63