Exploring-Ada Programming Language and its concepts

IlhamHasib2 61 views 17 slides Sep 27, 2024
Slide 1
Slide 1 of 17
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17

About This Presentation

Presentation on Programming Language Concepts, Demonstrating Ada PL and Its Real-World Applications


Slide Content

Exploring Ada
Programming
Language
A Comprehensive Overview
Presented By:
Mohammed Hasib Junayed
Ilham –2013729042
Shahriar Sakib –2013631042
Meher Afroz –2013173042

Introduction
Ada is a powerful and reliable high-level
programming language, emerged from the
United States Department of Defense's
quest for a standardized language to
enhance software development for critical
systems. Named after Ada Lovelace, the
language was designed to address the
unique challenges of the defense sector
while prioritizing readability,
maintainability, and efficiency.

Background
In the late 1970s, the Department of Defense
recognized the need for a common programming
language across its diverse projects. The High
Order Language Working Group (HOLWG) was
established to find or create a language that
would serve as a standardized solution, fostering
compatibility and reducing maintenance costs.
This initiative led to the development of Ada, with
its roots deeply embedded in the principles of
software engineering.

History
Ada's development commenced in 1979
under the leadership of Jean Ichbiah and his
team at CII Honeywell Bull. The language,
formalized as Ada 83, became the first
standardized language for defense-related
software projects. Over the years, Ada
underwent revisions, introducing
enhancements and features such as object-
oriented programming support in Ada 95.
Subsequent versions, including Ada 2005 and
Ada 2012, continued to refine and extend the
language, showcasing Ada's adaptability and
enduring legacy in diverse industries beyond
its defense origins.

Evaluation Of
ADA
In terms of:
•Readability
•Writability
•Reliability
•Cost

Readability
•Ada prioritizes readability with a clear and
structured syntax.
•Strong typing enhances code clarity and
reduces potential errors.
•Support for meaningful identifiers and
comments contributes to easy
comprehension.
Strengths:
•Learning curve may be steeper for
beginners due to the language's rich
feature set.
Considerations:

Writability
•Ada promotes writability through
concise syntax and high-level
abstractions.
Modular programming features facilitate
code organization and development.
The language supports rapid prototyping
and efficient development practices.
Strengths:
•Novice developers might find some
features initially complex.
Considerations:

Reliability
Strengths:
•Ada is renowned for its emphasis on
reliability in safety-critical systems.
•Strong type-checking reduces the
likelihood of runtime errors.
•Built-in exception handling enhances
fault tolerance and robustness.
Considerations:
•Rigorous compile-time checks may lead
to longer development cycles.

Cost
Strengths:
•Ada's focus on reliability can lead to
reduced costs associated with bug fixing
and maintenance.
•Early error detection during compilation
minimizes the impact of defects in
production.
Considerations:
•Initial development costs may be higher
due to a potential learning curve and
stringent requirements.

Advantages
STRONG TYPING
MODULAR DESIGN
OBJECT–ORIENTED
PROGRAMMING
REAL-TIME CAPABILITIES
EXCEPTION HANDLING

Disadvantages
Learning Curve
Limited
Community
and Resources
Perception as
Niche
Less Flexibility
and
Expressiveness
Cost of Tools
and Compilers
Perceived
Verbosity

Special Features
•Strong Typing: Ensures data type consistency and catches errors early
•Explicit Concurrency: Built-in support for parallel processing with
tasks, synchronous messaging, and protected objects,
•Run-time Checking: Extensive checks performed during execution to
catch runtime errors and unexpected behavior.
•Design by Contract (DbC): Allows preconditions, postconditions, and
invariants to be specified.
•Generics: Reusability and maintainability are enhanced by the ability
to write code that works with different data types without modification.
•Object-Oriented Programming (OOP): Supports encapsulation,
inheritance, and polymorphism.
•Formal Specification: Encourages detailed documentation and
precise program specification.

Application Domains
Aerospace and
Defense: Ada is widely
used in critical systems
like avionics, flight
control, and military
applications.
Space Systems: From
satellites to spacecraft,
Ada helps build
reliable and fault-
tolerant software for
harsh environments.
Telecommunications:
Real-time data
processing and
control systems in
telecom networks
benefit from Ada's
concurrency features.
RailwaySystems:
Safety-critical systems
like signaling and train
control utilize Ada's
robust features.
MedicalDevices:
Reliable and accurate
control software for
life-saving equipment
relies on Ada's
stringent checks and
error handling.
FinancialSystems:
High-frequency
trading platforms and
secure transaction
processing systems
leverage Ada's
performance and
safety.

Installation Of ADA
•GNAT Compiler Suite: The most popular
option is the GNAT Compiler Suite from
AdaCore. It includes the GNAT compiler,
GNAT debugger, and GNATmake build tool.
You can download the binaries or installers for
your platform from AdaCore's website:
https://www.adacore.com/get-started.
•Alire Toolchain: For a simple and quick setup,
consider Alire. It's a command-line tool that
installs and manages GNAT and GPRBuild (a
build tool) for you. Download the binaries or
use the provided Windows installer:
https://alire.ada.dev/transition_from_gnat_co
mmunity.html.

Popular IDEs
•GNAT Programming Studio (GPS)
•Visual Studio Code with Ada
Extension
•Eclipse GNAT Bench
•Text Editor + GPRBuild

Program Example:
withAda.Text_IO; useAda.Text_IO;
withAda.Integer_Text_IO; useAda.Integer_Text_IO;
procedureFactorialis
num: Integer;
fact: Integer:= 1;
begin
Put("Enter a non-negative integer: ");
Get(num);
fori in 1 .. numloop
fact:= fact* i;
endloop;
Put_Line("The factorial of " &num'Image & " is " &fact'Image);
end Factorial;

Conclusion
In conclusion, Ada emerges as a powerful and reliable programming
language, particularly suited for safety-critical systems. Its emphasis
on readability, reliability, and efficiency positions it as a valuable
assetin industries where robust software is paramount. While
facing a learning curve, Ada's long-term benefits in reduced
maintenance costs and enhanced system dependability make it a
compelling choice for critical applications.