ICAP 2002 Abstracts and Posters

The COSY Language Independent Architecture: Porting COSY Source Files


Abstract

As part of the project of porting the code COSY INFINITY to a language independent architecture, a tool is being developed that translates COSY language to C++ language. The tool will allow the use of C++ classes for all elementary operations of COSY, which represent a wrapper around high-performance COSY C source. The converter program reads the individual lines of the COSY source program and places them in an array. The array is then processed and various changes are made to each line, and the order is changed in accordance with C++ standard syntax. As an example of this first type of change, a Cosy loop construct "LOOP I 1 TWOND 2 ; " would be changed to the C++ equivalent "for ( I = 1 ; I <= TWOND ; I+=2) { ". The second type of change includes the unnesting of COSY functions and returning of corresponding C++ functions in the appropriate order. The modified contents of that array are then outputed to a new C++ file, which can then be read through and even modified. The resulting C++ source is fully compilable and, at execution time, exactly duplicates the performance of the original COSY source.


Laura Chapin, Jens Hoefkens, Martin Berz, Michigan State University


Go Back to the ICAP02 Talks Schedule page.
Go Back to the ICAP02 Posters page.
Go Back to the ICAP02 home.


This page is maintained by Kyoko Makino.