Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout1.

Similar presentations


Presentation on theme: "CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout1."— Presentation transcript:

1 CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout1 Report On Portable Graphical User Interface (GUI) In Ada and GtkAda (pgag)

2 CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout2 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

3 CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout3 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

4 CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout4 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: RUNRESETDEFAULTS CLEARHELPEXIT

5 CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout5 System Design Approach Three Ada “Tasks” Nine Encapsulated Packages “Application” is only a simulation call status startup Setting & Controls status control GUI pgag application User Main Window Question Window Status Window Help Window Browser Window

6 CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout6 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

7 CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout7 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

8 CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout8 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)

9 CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout9 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;

10 CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout10 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)

11 CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout11 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

12 CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout12 pgag on a PC

13 CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout13 pgag on a SUN SunOS (Solaris) 5.8

14 CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout14 pgag on a PC with Status Window

15 CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout15 pgag on a PC with Status Window and Question Window user selected “EXIT”

16 CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout16 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


Download ppt "CS699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and GtkAda 2005 March 12Keith Armentrout1."

Similar presentations


Ads by Google