Changes between Version 63 and Version 64 of Orio


Ignore:
Timestamp:
06/13/08 16:46:33 (15 years ago)
Author:
hartono
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Orio

    v63 v64  
    237237With the module name provided in the leader annotation, Orio dynamically loads the corresponding code transformation module and uses it to transform and generate the code in the annotation body block. If the pertinent module cannot be found in the Orio module directory, an error message is produced, and the Orio optimization process is terminated. Such ''name-based dynamic loading'' provides flexibility and easy extensibility without requiring detailed knowledge or modification of the existing Orio system. 
    238238 
    239 Since Orio implementation is all in Python, to construct a new program transformation module therefore requires a Python programming skill. Transformation module writers need to create a new Python module inside `src/module` directory, where the abstract base class of the code transformation modules is located. This abstract class serves as a partial implementation of the source-to-source transformation process that inherits a class constructor and an abstract transformation function, which both need to be implemented in the newly created module subclass. 
    240  
    241 {{{ 
     239Since Orio implementation is all in Python, to construct a new program transformation module therefore requires a Python programming skill. Transformation module writers need to create a new Python module inside `src/module` directory, where the abstract base class of the code transformation modules is located. This abstract class provides a partial implementation of the source-to-source transformation process, leaving it to subclasses to complete the implementation. The program below displays the abstract class code that inherits a class constructor and an abstract transformation function to its subclasses. 
     240 
     241 
     242{{{ 
     243# 
     244# File: src/module/module.py 
    242245#  
    243246# The abstract class of the Orio's code transformation module