1 / 16

Report On Portable Graphical User Interface (GUI) In Ada and GtkAda (pgag)

Report On Portable Graphical User Interface (GUI) In Ada and GtkAda (pgag). Executive Summary: Portability is the “holy grail” of computer science a GUI is the Most Difficult Area to Make Portable Windows (Win32) -vs- Unix/Linux (X-Windows) Ada is not a dead language

talor
Download Presentation

Report On Portable Graphical User Interface (GUI) In Ada and GtkAda (pgag)

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. Report On Portable Graphical User Interface (GUI) In Ada and GtkAda (pgag) Keith Armentrout

  2. Executive Summary: • Portability is the “holy grail” of computer science • a GUI is the Most Difficult Area to Make Portable • Windows (Win32) -vs- Unix/Linux (X-Windows) • Ada is not a dead language • Still Widely Used Throughout the World • A large, old, Application re-hosted from a Unisys Computer • Fortran Converted Line-by-Line to Ada • Remains Command Line Driven (difficult for non-programmers) • Needs a GUI Keith Armentrout

  3. Introduction • Project Justification: • Old Command Line Driven Application • Input Formerly Specified via “JCL” • Inputs Now Edited into a Text Input File • Needs a GUI • Project Software Components: • Three Ada “Tasks” • Nine Encapsulated Packages Keith Armentrout

  4. Functional Specification • Provide a GUI for the “Application” • Input of Path/File names • Directory Structure Browser Function • Selection of Input/Processing Options • Selection of Output Options • Display of Status/Error Messages • Control Buttons: • RUN RESET DEFAULTS • CLEAR HELP EXIT Keith Armentrout

  5. call status status Setting & Controls GUI pgag startup control Status Window Help Window Question Window Main Window application User • System Design Approach • Three Ada “Tasks” • Nine Encapsulated Packages • “Application” is only a simulation Browser Window Keith Armentrout

  6. Object-Oriented Design Issues • The Application (Old - Non OO) • Re-hosted Fortran to Ada, Line-by-Line • Retains Original Functionality, Structure, & Behavior • GtkAda (New - OO) • Nearly All Object-Oriented in its Design • Thick Binding to X-Windows and Win32 • pgag (A Mixture of the Old and the New) • Object-Oriented at its Highest Levels (the Ada Tasks) • Windows & Widgets Inherit from GtkAda Parents • Some Old-Time Functional Design Internally Keith Armentrout

  7. Test Plan • Unit Test Not Possible • Programs Would Not Compile Without Type Definitions • No Visible Results Until Nearly All Pieces Assembled • The Plan: • Formally Test Only the Final Product • Follow Pre-Written Checklist • Record Screen Captures Keith Armentrout

  8. Code Implementation • Ada • The World’s First Standardized OO Programming Language • GtkAda (Free Software) • A Graphical Toolkit which uses OO Features of Ada • A “Thick” Binding to X-Windows & Win32 • AdaGIDE (Free Software) • An Integrated Development Environment (IDE) for Ada • Developed by Faculty Members at US Air Force Academy • GNAT (Free Ada Compiler for Both PC and Sun) Keith Armentrout

  9. Code Implementation (example) with Ada.Dynamic_Priorities; use Ada.Dynamic_Priorities; with pgag_Data; use pgag_Data; with pgag_GUI; use pgag_GUI; procedure pgag is begin -- pgag main Task Body Set_Priority( Task_Priority_Main ); GUI.StartUp; end pgag; Keith Armentrout

  10. Problems Solved • Balancing the Tasks • Selection of Task Priority • Delay Statements • Problem Solved by GtkAda • 500 Millisecond Master Monitor • Dynamically Linked Libraries (DLL) on PC • Self-extracting Installation Program (future) • Libraries on Sun Solaris • Installation Procedure (search path setup) (future) Keith Armentrout

  11. Issues For Future Study • Installation Problems (noted above) • Porting to Other Platforms (Linux, Mac) • The application May be Ported Soon • Status Reporting Between pgag and Application • Currently Implemented as a Simple/Limited Boolean Flag • Doesn’t Distinguish Between Minor and Severe Errors • Requires Significant Modifications to Application • Application is Changing • GUI Must Expand Keith Armentrout

  12. pgag on a PC Keith Armentrout

  13. pgag on a SUN • SunOS (Solaris) 5.8 Keith Armentrout

  14. pgag on a PC • with Status Window Keith Armentrout

  15. pgag on a PC • with Status Window • and Question Window • user selected “EXIT” Keith Armentrout

  16. Conclusion • 1776 Lines of Code (3874 counting comments) • Meets Existing Requirements of the Real Application • Would Be Easy to Integrate with the Real Application • Could be Easily Upgraded to Meet New Requirements • Its Been Fun Keith Armentrout

More Related