Abstract the interpreter interface
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mars |
Fix Released
|
Medium
|
Matt Giuca |
Bug Description
Mars currently executes programs using the 'interpret' module, which is written (almost) entirely in Mercury. We wish to add alternative execution engines to mars with --backend (just like marsc has a --backend for alternative outputs). If an alternative engine is selected, it should not only be used for running Mars programs, but also for the execution of interactive statements.
This is difficult to do currently, as the 'mars' and 'interactive' modules are heavily coupled with the 'interpret' module. Make a new module called 'executor' which is an abstract type class with all the necessary interface to a generic interpreter, and recouple mars and interactive to call only methods in this generic executor class. 'interpret' should be an instance of the executor class.
Add a --backend option to mars (even though initially there will only be a single backend, interpret).
Related branches
Changed in mars: | |
status: | Fix Committed → Fix Released |
Fixed in trunk r977 (merge from branch 'executor').