1 / 21

Migrating Embedded Systems from Assembler to C Using the Fermat Transformation System

Migrating Embedded Systems from Assembler to C Using the Fermat Transformation System. Pigs from Sausages?. Extracting the logic and business rules from evolved legacy systems Automatically migrate them to a new High Level Language Re-host them. Why bother?. Increased Speed/Capacity

jason
Download Presentation

Migrating Embedded Systems from Assembler to C Using the Fermat Transformation System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Migrating Embedded Systems from Assembler to C Using the Fermat Transformation System

  2. Pigs from Sausages? • Extracting the logic and business rules from evolved legacy systems • Automatically migrate them to a new High Level Language • Re-host them

  3. Why bother? • Increased Speed/Capacity • Better Price/Performance • Larger, more complex systems • Cost per function point: • Assembler: £48.00 • PL/1: £39.00 • C: £21.00 • Pressure to Migrate to HLL

  4. Case Study – Tenovis Gmbh & Co. • Specialists in Convergent Networking • 200,000 Clients • 6000 Employees • Revenues over 950 million euros

  5. Tenovis Challenge • Private Branch eXchange (PBX) system • Four Hardware Platforms • Installed in 18 countries • 800,000 lines of C • 544,000 lines of 186 assembler in 318 source files • Problems: • Backlog of enhancements • Availability and functionality of the processor

  6. SML’s Challenge • To migrate the assembler to high-level structured, maintainable C code suitable for porting to more modern processor and also suitable for implementing the backlog of enhancements. • The migrated code should meet the coding standards used within the existing C code.

  7. FermaT Transformation System • Nearly 20 years research and development (> 120 man years) • Core technology research @ Oxford and Durham University • Migration projects to validate this research funded by IBM, CAA & DTI • Used extensively in Y2K projects • FermaT Workbench • Transformation System

  8. Fermat Architecture

  9. What is WSL • Wide Spectrum Language • From low-level constructs to high-level abstract specifications • Unique transform capability • Fermat product set is implemented in MetaWSL • WSL is now in the Public Domain under a GUL licence

  10. Case Study – Phase 1 • Migration of a single 3,000 line source file • Develop a 186 to WSL parser • Modify the existing WSL to C parser • Implement 186-specific WSL transformations

  11. Case Study – Phase 2 • Mini Call Control • Self contained subsystem • 67,000 lines of assembler • 41 source files

  12. Phase 2 - Requirements • Use existing C header files where available • Use of the “function parameter table” • Translate selected subroutines directly to HLL code • Translate bitfield operations into C record fields • Eliminate stack usage where possible • Detect jump tables and generate appropriate switch statements • Generate switch statements instead of nested if statements • Can ignore segment addressing for this application

  13. Phase 2 - Process • 5 iterations of the Mini Call Control • Customer feedback on each iteration • Update the parsers or transformations • Regenerate the C code automatically • Final iteration C code was compiled installed and tested

  14. Final Migration • 2.6Ghz PC with 512Mb of RAM • All 318 source files processed in 1.5 hours • 1,436,031 transformations: • 4,500 transformations per source file • 275 transformations per second • Largest source file was 8,348 lines • 73,393 transformations • 370 seconds CPU time • 42Mb RAM • 506,672 lines of C code plus 37,047 lines of header files generated

  15. Results • At least 6 bugs were discovered in the system via the migration process • “Hey, this really looks like C!” • Test environment: “soft switch” between C and Assembler Versions on a PC linked to the hardware.

  16. Cost Savings • Estimate for Manual translation: 67 man months • Actual customer effort for automated translation: • SML’s actual effort 52 man days • Less than 10% of manual effort • Larger systems will achieve even greater savings

  17. Advantages of Automated Reengineering • Scalability • Rapid turnaround of the subsystem • Customisability • Low resource requirements • Low Impact on ongoing development • Enables porting to different hardware and/or software platform • Removes dependence on limited resources

  18. Conclusion • Assembler to C using the FermaT Migration System and Workbench is a practical solution to the high costs and skills shortage in assembler maintenance and to the problem of migrating legacy assembler systems to a more modern platform.

  19. The future for Fermat • Currently assembler to C and COBOL • Pascal to C • Assembler/Pascal to C • Output to Java • Joint 3 year research project with DeMontfort University to extend the use of WSL and Fermat

  20. Further Resources www.artechhouse.com

  21. Further Resources • The Fermat Transformation System is available under GNU GPL (General Public Licence) • www.dur.ac.uk/~dcs0mpw/fermat.html • www.cse.dmu.ac.uk/~mward/fermat.html

More Related