CS 699 Professional Seminar in CS Professor V

  • Slides: 16
Download presentation
CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3

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

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and Gtk. Ada Executive Summary: • Portability is the “holy grail” of computer science • a GUI is the Most Difficult Area to Make Portable • Windows (Win 32) -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 2005 March 12 Keith Armentrout 2

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3

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

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and Gtk. Ada 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: 2005 March 12 RUN RESET DEFAULTS CLEAR HELP EXIT Keith Armentrout 4

control CS 699: Professional Seminar in CS / Professor V. Riabov call Keith Armentrout

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

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and Gtk. Ada Object-Oriented Design Issues • The Application (Old - Non OO) • Re-hosted Fortran to Ada, Line-by-Line • Retains Original Functionality, Structure, & Behavior • Gtk. Ada (New - OO) • Nearly All Object-Oriented in its Design • Thick Binding to X-Windows and Win 32 • pgag (A Mixture of the Old and the New) • Object-Oriented at its Highest Levels (the Ada Tasks) • Windows & Widgets Inherit from Gtk. Ada Parents • Some Old-Time Functional Design Internally 2005 March 12 Keith Armentrout 6

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3

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

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and Gtk. Ada Code Implementation • Ada • The World’s First Standardized OO Programming Language • Gtk. Ada (Free Software) • A Graphical Toolkit which uses OO Features of Ada • A “Thick” Binding to X-Windows & Win 32 • Ada. GIDE (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) 2005 March 12 Keith Armentrout 8

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and Gtk. Ada Code Implementation (example) with Ada. Dynamic_Priorities; with pgag_Data; with pgag_GUI; use Ada. Dynamic_Priorities; use pgag_Data; use pgag_GUI; procedure pgag is begin -- pgag main Task Body Set_Priority( Task_Priority_Main ); GUI. Start. Up; end pgag; 2005 March 12 Keith Armentrout 9

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and Gtk. Ada Problems Solved • Balancing the Tasks • Selection of Task Priority • Delay Statements • Problem Solved by Gtk. Ada • 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) 2005 March 12 Keith Armentrout 10

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3

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

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3

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

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3 : Portable GUI in Ada and Gtk. Ada pgag on a SUN • Sun. OS (Solaris) 5. 8 2005 March 12 Keith Armentrout 13

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3

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

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3

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

CS 699: Professional Seminar in CS / Professor V. Riabov Keith Armentrout Presentation #3

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