introduction to ada

20
Introduction to Introduction to Ada Ada Solo Project Solo Project Robert Rostkowski Robert Rostkowski CS 460 Computer Security CS 460 Computer Security Fall 2008 Fall 2008

Upload: anilkumar18

Post on 30-May-2017

219 views

Category:

Documents


0 download

TRANSCRIPT

Introduction to AdaIntroduction to AdaSolo ProjectSolo Project

Robert RostkowskiRobert RostkowskiCS 460 Computer SecurityCS 460 Computer Security

Fall 2008Fall 2008

Ada Lovelace (1815-1852)Ada Lovelace (1815-1852) Math & Science GeniusMath & Science Genius

Childhood steered towards math & scienceChildhood steered towards math & science Designed airplane in 1828Designed airplane in 1828 Tutored by Augustus DeMorgan in 1840Tutored by Augustus DeMorgan in 1840 Translated & appended Charles Translated & appended Charles

Babbage’s Analytical Machine into Babbage’s Analytical Machine into meticulous notesmeticulous notes

Ada Lovelace (1815-1852)Ada Lovelace (1815-1852)

First ProgrammerFirst Programmer Explained how Analytical Engine could Explained how Analytical Engine could

calculate Bernoulli Numberscalculate Bernoulli Numbers Wrote (first) program for the never built Wrote (first) program for the never built

Analytical Engine Analytical Engine

Ada HistoryAda History US Department of Defense (DoD) Pre-1980US Department of Defense (DoD) Pre-1980

Too Many Programming Languages (450+)Too Many Programming Languages (450+)• Hardware dependentHardware dependent• Unsafe modular programmingUnsafe modular programming• Outdated programming languagesOutdated programming languages• By 1977, it was time for a changeBy 1977, it was time for a change• In 1979, Jean Ichbiah won the DoD’s In 1979, Jean Ichbiah won the DoD’s

programming language contest, with a programming language contest, with a Pascal like dialectPascal like dialect

Ada & WWII Ada & WWII Cryptography ChallengeCryptography Challenge

Joachim Schweth used Ada to crack the Joachim Schweth used Ada to crack the Lorenz S242 Encryptor (16 million million Lorenz S242 Encryptor (16 million million million permutations), in just 46 seconds. million permutations), in just 46 seconds. Overall, the cryptography challenge took a Overall, the cryptography challenge took a little less than two hours.little less than two hours.

Ada StandardsAda Standards Ada 83 (1983)Ada 83 (1983)

ANSI/MIL-STD 1815 AANSI/MIL-STD 1815 A Ada 87 (1987)Ada 87 (1987)

ISO-8652: 1987ISO-8652: 1987 Ada 95 (1995)Ada 95 (1995)

ISO-8652: 1995ISO-8652: 1995• Interfaces with C, C++, FORTRAN, Interfaces with C, C++, FORTRAN,

COBOL & Java source codeCOBOL & Java source code

Ada StandardsAda Standards

The DoD, ANSI & ISO standards are The DoD, ANSI & ISO standards are adhered worldwide. Thus, it’s easy to write adhered worldwide. Thus, it’s easy to write and revise Ada code. More importantly, and revise Ada code. More importantly, safety and security are more reliable with safety and security are more reliable with a global, structured, standardized, a global, structured, standardized, hardware & operating system independent hardware & operating system independent programming language. Ada supports programming language. Ada supports OOP too.OOP too.

Ada CompilersAda Compilers

GNAT, the GNU/NYU Ada 95 GNAT, the GNU/NYU Ada 95 FreeFree Unix flavorsUnix flavors Windows 95 & aboveWindows 95 & above

Object Ada Object Ada Developed by AonixDeveloped by Aonix X WindowsX Windows Windows 95 & aboveWindows 95 & above

Ada CompilersAda Compilers Compile-time errorsCompile-time errors Run-time errorsRun-time errors

Unallocated memoryUnallocated memory Buffer overflowBuffer overflow Off by oneOff by one Fully checks array access handlingFully checks array access handling VerificationVerification

Exception handlingException handling Supports software engineering standardsSupports software engineering standards

Ada Program StructureAda Program Structure

with with Package_Name; Package_Name; useuse Package; Package; procedureprocedure Program_Name Program_Name isis

Variable : Some_Type;Variable : Some_Type; beginbegin Statement_1; Statement_2;Statement_1; Statement_2; endend

Ada Hello Word ProgramAda Hello Word Program

with with Ada.Text_IO; Ada.Text_IO; use use Ada.Text_IO; Ada.Text_IO; procedureprocedure Hello_World Hello_World isis beginbegin

Put (“Hello world!”)Put (“Hello world!”) end end Hello_World;Hello_World;

Ada Get Name ProgramAda Get Name Program with with Ada.Text_IO; Ada.Text_IO; use use Ada.Text_IO; Ada.Text_IO; procedureprocedure Get_Name Get_Name isis

Name : String (1..80);Name : String (1..80); Length : Integer;Length : Integer;

beginbegin Put (“Enter your first name>”);Put (“Enter your first name>”); Get_Line (Name, Length);Get_Line (Name, Length); New_Line;New_Line; Put (“Hello”);Put (“Hello”);

Ada Get Name ProgramAda Get Name Program Put (Name (1..Length));Put (Name (1..Length)); Put (“, we hope that you enjoy learning Put (“, we hope that you enjoy learning

Ada!”);Ada!”); end end Get_Name;Get_Name;

Ada UsageAda Usage US Department of Defense (DoD)US Department of Defense (DoD) Air TravelAir Travel

Boeing 777’s fly by wire systemBoeing 777’s fly by wire system Boeing 787 DreamlinerBoeing 787 Dreamliner Canadian Automated Air Traffic SystemCanadian Automated Air Traffic System

• 1 million lines of Ada code1 million lines of Ada code• Distributed processingDistributed processing• Ada databaseAda database• Object Oriented DesignObject Oriented Design

Global air traffic controlGlobal air traffic control iFACTS, new UK air traffic controliFACTS, new UK air traffic control

• Written from ground upWritten from ground up

Ada UsageAda Usage

French TGV high speed trainFrench TGV high speed train Other industriesOther industries

Financial SystemsFinancial Systems Power GenerationPower Generation HealthcareHealthcare CommunicationCommunication Safety CriticalSafety Critical

Ada UsageAda Usage

Designed for large critical programsDesigned for large critical programs Real Time & Embedded SystemsReal Time & Embedded Systems NumericalNumerical FinancialFinancial

SourcesSources

Introducing AdaIntroducing Ada http://www.adahome.com/articles/1998-01/ar_

intro.html Choose Ada, The Most Trusted Name in Choose Ada, The Most Trusted Name in

SoftwareSoftware http://www.adaic.org/whyada/choose.html

Ada: The Enchantress of NumbersAda: The Enchantress of Numbers http://www.well.com/~adatoole/bio.htmlhttp://www.well.com/~adatoole/bio.html

SourcesSources

Ada LovelaceAda Lovelace http://en.wilkipedia.org/wiki/Ada_Lovelacehttp://en.wilkipedia.org/wiki/Ada_Lovelace

Ada (programming language)Ada (programming language) http://en.wilkipedia.org/wiki/Ada_http://en.wilkipedia.org/wiki/Ada_ (programming_language)(programming_language)

Ada helps win WWII Cyrptography Ada helps win WWII Cyrptography ChallengeChallenge http://www.adiac.org/news/crypto.htmlhttp://www.adiac.org/news/crypto.html

SourcesSources

What is Ada?What is Ada? http://www.dwheeler.com/lovelace/s1s1.htmhttp://www.dwheeler.com/lovelace/s1s1.htm

Why Ada?Why Ada? http://www.adiac.org/whyada/WhyAda.htmlhttp://www.adiac.org/whyada/WhyAda.html

Ada matters!Ada matters! http://www.mil-embedded.com/articles/id/?http://www.mil-embedded.com/articles/id/?

32773277

AcknowledgementsAcknowledgements

For their guidance, special thanks toFor their guidance, special thanks to Dr. Netiva Caftori (NEIU)Dr. Netiva Caftori (NEIU) Dr. Tzilla Elrad (IIT)Dr. Tzilla Elrad (IIT)