TODOs - nus-cs4215/x-slang-t1-xz-jj GitHub Wiki
This document describes the list of future extensions/ work-in-progresses that can be done for SICPy Academy's x-slang.
Table of Contents
Syntax Validation and Analysis
Integrating with other Python implementations
Success vs Errors
For the time being, runInContext() only returns Promises with success flags. This was to simplify our development process (we were not really familiar with web-related frameworks). Hence, the trick was to treat everything as success messages.
For a better SICPy Academy experience, one potential direction would be to rectify this. More can be found under src/index.ts's runInContext function.
Syntax Validation and Analysis
The existing ANTLR4 grammar Python3.g4 is plagued by issues (see here). Currently, this module is disabled, hence we are giving up fine-grained error messaging for the time being.
We foresee that in the future, the syntax validation, syntax analysis/ restriction and AST generation process can be unified as one. A potential alternative would be Ohm.
Predeclared Names
There remains some of the predeclared names/ functions introduced by SICP such as LISTS, MISC and STREAMS are yet to be fully implemented.
Thus, extending them would make SICPy Academy more complete.
Integrating with other Python Implementations
Implementation of MCE-like evaluate/apply interpreter. This enables small-step evaluation, which could allow us to integrate with SICPy Academy's stepper tool with the Python source codes. (Incidentally, this was accomplished by another CS4215 project group, perhaps an opportunity to integrate our work together?) Also allow for better customised error messaging, as we control the execution of the interpreter.
Web Workers
For the time being, Pyodide.js runs on the main thread of the browser. It would block the main thread while executing programs resulting in an unresponsive experience.
Hence, a promising direction would be to wrap Pyodide.js in web workers as a separate thread. By doing this, it frees up the main thread, as well as allowing the termination of programs whenever it exceeds a time limit.