Abstract the interpreter interface

Bug #550708 reported by Matt Giuca
6
This bug affects 1 person
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

Revision history for this message
Matt Giuca (mgiuca) wrote :

Fixed in trunk r977 (merge from branch 'executor').

Changed in mars:
status: In Progress → Fix Committed
Matt Giuca (mgiuca)
Changed in mars:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.