Anirban%20De - PowerPoint PPT Presentation

About This Presentation
Title:

Anirban%20De

Description:

Anirban De Jeffrey Harry Yves Lepouchard Peixin Li Pinchao Lu Why we should care about exceptions Ariane 5 Maiden Flight Computer automation is everywhere: in your ... – PowerPoint PPT presentation

Number of Views:95
Avg rating:3.0/5.0
Slides: 10
Provided by: Yves137
Category:

less

Transcript and Presenter's Notes

Title: Anirban%20De


1
Exception Mechanisms
  • Anirban De
  • Jeffrey Harry
  • Yves Lepouchard
  • Peixin Li
  • Pinchao Lu

2
Why we should care about exceptions
  • Ariane 5 Maiden Flight
  • Computer automation is everywhere
  • in your daily life
  • in critical systems
  • Exception handling
  • Our project deals with
  • Java
  • THE HOT programming language

HOT
3
Java Exception Handling
  • Exceptions are objects
  • Multilevel Model
  • Termination Model

STOP!
Server
END
Try Workers Finally Cleaners Catch
Handlers
Check
Receive
4
Exception Handling Enhancements
RESCUE-RETRY CONSTRUCT
/ Attempt to transmit a message 100 times and
set tx_successful / Public void
transmit_message(String message) if
(tx_failures lt 100) attempt_transmission(messag
e) tx_successful true else tx_successful
false / rescue tx_failures
tx_failures 1 retry /
5
Exception Handling Enhancements
  • Rescue-Retry added using JJTree and JavaCC
  • JJTree is a bottom-up Parse Tree Builder
  • JavaCC uses the output of JJTree to generate the
    Lexer/Parser
  • Generates a top-down, recursive descent parser
  • Partial EBNF Notation for Rescue-Retry
  • void MethodBodyBlock( )
  • RequireClause( ) ( BlockStatement( ) )
    EnsureClause( ) RescueClause( )
  • void RescueClause( )
  • ltRESCUEgt (RescueCatch( ) )
    ltASSRN_ENDgt
  • void RescueCatch( )
  • ( "catch" "(" FormalParameter() ")" )? "" (
    BlockStatement() RetryStatement() )

6
Evaluation
  • Things we sort of already knew...
  • Java is slow, more Java is slower.
  • Given a Java program, adding more Java is going
    to make it larger.

We didnt know how much slower/larger...
7
Evaluation
How much slower is Jass?
How much larger?
8
Conclusion
Its a hog, its slow, its big...
Value inside (Safe, reusable error-free code.)
BUT...
9
Java Exception Handling
Write a Comment
User Comments (0)
About PowerShow.com