SlideShare una empresa de Scribd logo
1 de 26
Descargar para leer sin conexión
Interface-Implementation Contract Checking:
A Case Study on NASA’s OSAL

Dharmalingam Ganesan, Mikael Lindvall
Fraunhofer Center for Experimental Software Engineering
College Park
Maryland

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

1
Agenda
• Context: NASA OSAL
• Static equivalence analysis
• Static contract checking
• Conclusion

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

2
Context: NASA OSAL
• Operating System Abstraction Layer
• Isolates flight software from real time operating
systems and hardware.
• Implementation for the real time systems RTEMS
and vxWorks and posix compliant non-real time
systems.
• Provides “Write once, run everywhere
(somewhere)” at compile level
• Used for mission critical embedded systems
• Provides support for file-system, tasks, queues,
semaphores, interrupts, hardware abstraction, I/O
ports and exception handling
© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

3
NASA OSAL
• Why is it important that OSAL is bug free?
– flight software is mission critical and needs to
be of very high quality
– OSAL is the foundation of the CFE which CFS
runs on top of
– OSAL is used in many NASA missions, e.g.
the Lunar Renaissance Orbit
– If OSAL has issues, it might result in
catastrophic failure
© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

4
NASA OSAL in CFS

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

5
NASA OSAL – Architecture

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

6
Agenda
• Context: NASA OSAL
• Static equivalence analysis
• Static contract checking
• Conclusion

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

7
Static equivalence analysis
• Currently OSAL has implementations for
Rtems, vxWorks and Posix operating
systems
• All implementations should work the same
– Perform same operation regardless of OS
– Return same error-codes when errors occur

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

8
Static equivalence analysis
• Used to find differences between
implementations of OSAL
– Posix, RTEMS, vxWorks

• Extracts return codes from function bodies
• Return codes of each implementation
compared to find differences

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

9
Static equivalence analysis
• Enables us to easily find otherwise subtle and hard to
find errors

Posix implementation

Rtems implementation

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

10
Static equivalence analysis - example

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

11
Which defects can be found in OSAL when analyzing function pairs for functional
equivalence?

Runtime Issues

# Issues

Minor Issues

# Issues

Precondition Checking Diffs.

13

Configuration Issues

9*

Return Code Diffs.

24

Output Differences

18*

Global Variable Writing Diffs.

15

Parameter Writing Diffs.

3

Parameter Checking

2
Σ

Σ

27

57

Acknowledged and/or Fixed

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

12
Agenda
• Context: NASA OSAL
• Static equivalence analysis
• Static contract checking
• Conclusion

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

13
Static contract checking without a formal contract
• API‘s are supposed to fulfill a “contract”
• A contract is:
– Specification of what each function does and
– How it responds to errors and what the
function should return

• Programmers program to a API using the
contract as a guide.
• A function not written according to the
contract can cause hard to find errors
© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

14
Static contract checking without a formal contract
Example of function fulfilling contract
Contract

Implementation

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

15
Static contract checking without a formal contract
Example of function fulfilling contract

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

16
Static contract checking without a formal contract
Example of function fulfilling contract

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

17
Static contract checking without a formal contract
Example of function not fulfilling contract

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

18
Static contract checking without a formal contract
• Regular expressions to create simple and fast perl
programs
• Compatible with C and C++
• Extracts return codes from function bodies and contract
comments
• Compares the return codes of contract comments and
function bodies to find mismatches

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

19
Static contract checking without a formal contract

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

20
Static contract checking without a formal contract
...and the other way around.

• To find if functions implement more than the contracts
implies
• To identify an uncomplete contract that could result in
implementation mismatches between wrappers
• Extract return codes from the function bodies, instead
of the contract comments
• Compare the extracted returns to the contract
comments to find undocumented behavior

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

21
Static contract checking without a formal contract

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

22
static contract checking without a formal contract
A part of the 61 issues found in the Posix
implementation.
All issues reported and taken care now.

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

23
Summary
Static equivalence analysis:
• A lightweight technique
• powerful for detecting inconsistencies between
wrappers
• Found several inconsistencies (addressed in OSAL)
Static contract checking without a formal contract:
• A lightweight technique
• Found a lot of inconsistencies between documentation
and code (addressed in OSAL)
• Does not need any modeling or rigor
– (but neither sound nor complete)

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

24
Thank you!
dganesan@fc-md.umd.edu
mlindvall@fc-md.umd.edu

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

25
Acknowledgement
• Gunnar Cortes
• Henning Femmer
• Dave McComas
• Alan Cudmore
• Wesley Deadrick

© 2013 Fraunhofer USA, Inc.
Center for Experimental Software Engineering

26

Más contenido relacionado

La actualidad más candente

Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.Wolfgang Grieskamp
 
Verification challenges and methodologies - SoC and ASICs
Verification challenges and methodologies - SoC and ASICsVerification challenges and methodologies - SoC and ASICs
Verification challenges and methodologies - SoC and ASICsDr. Shivananda Koteshwar
 
Formal Verification
Formal VerificationFormal Verification
Formal VerificationIlia Levin
 
SOC Verification using SystemVerilog
SOC Verification using SystemVerilog SOC Verification using SystemVerilog
SOC Verification using SystemVerilog Ramdas Mozhikunnath
 
Bristol 2009 q1_blackmore_tim
Bristol 2009 q1_blackmore_timBristol 2009 q1_blackmore_tim
Bristol 2009 q1_blackmore_timObsidian Software
 
Automated Traceability for Software Engineering Tasks
Automated Traceability for Software Engineering TasksAutomated Traceability for Software Engineering Tasks
Automated Traceability for Software Engineering TasksDharmalingam Ganesan
 
Software Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled DatasetsSoftware Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled DatasetsSung Kim
 
System verilog important
System verilog importantSystem verilog important
System verilog importantelumalai7
 
The Impact of Test Ownership and Team Structure on the Reliability and Effect...
The Impact of Test Ownership and Team Structure on the Reliability and Effect...The Impact of Test Ownership and Team Structure on the Reliability and Effect...
The Impact of Test Ownership and Team Structure on the Reliability and Effect...Kim Herzig
 
Introduction to Software Testing
Introduction to Software TestingIntroduction to Software Testing
Introduction to Software TestingHenry Muccini
 
Hands-on Experience Model based testing with spec explorer
Hands-on Experience Model based testing with spec explorer Hands-on Experience Model based testing with spec explorer
Hands-on Experience Model based testing with spec explorer Rachid Kherrazi
 
Verification Engineer - Opportunities and Career Path
Verification Engineer - Opportunities and Career PathVerification Engineer - Opportunities and Career Path
Verification Engineer - Opportunities and Career PathRamdas Mozhikunnath
 
Functional verification techniques EW16 session
Functional verification techniques  EW16 sessionFunctional verification techniques  EW16 session
Functional verification techniques EW16 sessionSameh El-Ashry
 
SE2018_Lec 20_ Test-Driven Development (TDD)
SE2018_Lec 20_ Test-Driven Development (TDD)SE2018_Lec 20_ Test-Driven Development (TDD)
SE2018_Lec 20_ Test-Driven Development (TDD)Amr E. Mohamed
 
It's Not a Bug, It's a Feature — How Misclassification Impacts Bug Prediction
It's Not a Bug, It's a Feature — How Misclassification Impacts Bug PredictionIt's Not a Bug, It's a Feature — How Misclassification Impacts Bug Prediction
It's Not a Bug, It's a Feature — How Misclassification Impacts Bug Predictionsjust
 
Issre2014 test defectprediction
Issre2014 test defectpredictionIssre2014 test defectprediction
Issre2014 test defectpredictionKim Herzig
 
System verilog verification building blocks
System verilog verification building blocksSystem verilog verification building blocks
System verilog verification building blocksNirav Desai
 

La actualidad más candente (20)

Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
 
system verilog
system verilogsystem verilog
system verilog
 
Rv11
Rv11Rv11
Rv11
 
Verification challenges and methodologies - SoC and ASICs
Verification challenges and methodologies - SoC and ASICsVerification challenges and methodologies - SoC and ASICs
Verification challenges and methodologies - SoC and ASICs
 
Formal Verification
Formal VerificationFormal Verification
Formal Verification
 
SOC Verification using SystemVerilog
SOC Verification using SystemVerilog SOC Verification using SystemVerilog
SOC Verification using SystemVerilog
 
Bangalore march07
Bangalore march07Bangalore march07
Bangalore march07
 
Bristol 2009 q1_blackmore_tim
Bristol 2009 q1_blackmore_timBristol 2009 q1_blackmore_tim
Bristol 2009 q1_blackmore_tim
 
Automated Traceability for Software Engineering Tasks
Automated Traceability for Software Engineering TasksAutomated Traceability for Software Engineering Tasks
Automated Traceability for Software Engineering Tasks
 
Software Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled DatasetsSoftware Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled Datasets
 
System verilog important
System verilog importantSystem verilog important
System verilog important
 
The Impact of Test Ownership and Team Structure on the Reliability and Effect...
The Impact of Test Ownership and Team Structure on the Reliability and Effect...The Impact of Test Ownership and Team Structure on the Reliability and Effect...
The Impact of Test Ownership and Team Structure on the Reliability and Effect...
 
Introduction to Software Testing
Introduction to Software TestingIntroduction to Software Testing
Introduction to Software Testing
 
Hands-on Experience Model based testing with spec explorer
Hands-on Experience Model based testing with spec explorer Hands-on Experience Model based testing with spec explorer
Hands-on Experience Model based testing with spec explorer
 
Verification Engineer - Opportunities and Career Path
Verification Engineer - Opportunities and Career PathVerification Engineer - Opportunities and Career Path
Verification Engineer - Opportunities and Career Path
 
Functional verification techniques EW16 session
Functional verification techniques  EW16 sessionFunctional verification techniques  EW16 session
Functional verification techniques EW16 session
 
SE2018_Lec 20_ Test-Driven Development (TDD)
SE2018_Lec 20_ Test-Driven Development (TDD)SE2018_Lec 20_ Test-Driven Development (TDD)
SE2018_Lec 20_ Test-Driven Development (TDD)
 
It's Not a Bug, It's a Feature — How Misclassification Impacts Bug Prediction
It's Not a Bug, It's a Feature — How Misclassification Impacts Bug PredictionIt's Not a Bug, It's a Feature — How Misclassification Impacts Bug Prediction
It's Not a Bug, It's a Feature — How Misclassification Impacts Bug Prediction
 
Issre2014 test defectprediction
Issre2014 test defectpredictionIssre2014 test defectprediction
Issre2014 test defectprediction
 
System verilog verification building blocks
System verilog verification building blocksSystem verilog verification building blocks
System verilog verification building blocks
 

Destacado

Testing of C software components using Models
Testing of C software components using ModelsTesting of C software components using Models
Testing of C software components using ModelsDharmalingam Ganesan
 
Exploiting Cryptographic Misuse - An Example
Exploiting Cryptographic Misuse - An ExampleExploiting Cryptographic Misuse - An Example
Exploiting Cryptographic Misuse - An ExampleDharmalingam Ganesan
 
Load-time Hacking using LD_PRELOAD
Load-time Hacking using LD_PRELOADLoad-time Hacking using LD_PRELOAD
Load-time Hacking using LD_PRELOADDharmalingam Ganesan
 
Linux binary analysis and exploitation
Linux binary analysis and exploitationLinux binary analysis and exploitation
Linux binary analysis and exploitationDharmalingam Ganesan
 
Reverse Architecting of a Medical Device Software
Reverse Architecting of a Medical Device SoftwareReverse Architecting of a Medical Device Software
Reverse Architecting of a Medical Device SoftwareDharmalingam Ganesan
 
Explaining my Phd Thesis to layman
Explaining my Phd Thesis to laymanExplaining my Phd Thesis to layman
Explaining my Phd Thesis to laymanDharmalingam Ganesan
 
Architecture Analysis of Systems based on Publish-Subscribe Systems
Architecture Analysis of Systems based on Publish-Subscribe SystemsArchitecture Analysis of Systems based on Publish-Subscribe Systems
Architecture Analysis of Systems based on Publish-Subscribe SystemsDharmalingam Ganesan
 
Automated testing of NASA Software - part 2
Automated testing of NASA Software - part 2Automated testing of NASA Software - part 2
Automated testing of NASA Software - part 2Dharmalingam Ganesan
 
Automated Test Case Generation and Execution from Models
Automated Test Case Generation and Execution from ModelsAutomated Test Case Generation and Execution from Models
Automated Test Case Generation and Execution from ModelsDharmalingam Ganesan
 

Destacado (9)

Testing of C software components using Models
Testing of C software components using ModelsTesting of C software components using Models
Testing of C software components using Models
 
Exploiting Cryptographic Misuse - An Example
Exploiting Cryptographic Misuse - An ExampleExploiting Cryptographic Misuse - An Example
Exploiting Cryptographic Misuse - An Example
 
Load-time Hacking using LD_PRELOAD
Load-time Hacking using LD_PRELOADLoad-time Hacking using LD_PRELOAD
Load-time Hacking using LD_PRELOAD
 
Linux binary analysis and exploitation
Linux binary analysis and exploitationLinux binary analysis and exploitation
Linux binary analysis and exploitation
 
Reverse Architecting of a Medical Device Software
Reverse Architecting of a Medical Device SoftwareReverse Architecting of a Medical Device Software
Reverse Architecting of a Medical Device Software
 
Explaining my Phd Thesis to layman
Explaining my Phd Thesis to laymanExplaining my Phd Thesis to layman
Explaining my Phd Thesis to layman
 
Architecture Analysis of Systems based on Publish-Subscribe Systems
Architecture Analysis of Systems based on Publish-Subscribe SystemsArchitecture Analysis of Systems based on Publish-Subscribe Systems
Architecture Analysis of Systems based on Publish-Subscribe Systems
 
Automated testing of NASA Software - part 2
Automated testing of NASA Software - part 2Automated testing of NASA Software - part 2
Automated testing of NASA Software - part 2
 
Automated Test Case Generation and Execution from Models
Automated Test Case Generation and Execution from ModelsAutomated Test Case Generation and Execution from Models
Automated Test Case Generation and Execution from Models
 

Similar a Interface-Implementation Contract Checking

Lean Model-Driven Development through Model-Interpretation: the CPAL design ...
Lean Model-Driven Development through  Model-Interpretation: the CPAL design ...Lean Model-Driven Development through  Model-Interpretation: the CPAL design ...
Lean Model-Driven Development through Model-Interpretation: the CPAL design ...Nicolas Navet
 
Discover DoDAF problems early in the lifecycle with model execution
Discover DoDAF problems early in the lifecycle with model executionDiscover DoDAF problems early in the lifecycle with model execution
Discover DoDAF problems early in the lifecycle with model executionGraham Bleakley
 
How Virtual Compilation Transforms Static Code Analysis
How Virtual Compilation Transforms Static Code AnalysisHow Virtual Compilation Transforms Static Code Analysis
How Virtual Compilation Transforms Static Code AnalysisCheckmarx
 
Onos overview meetup sdn paris - redux
Onos overview  meetup sdn paris - reduxOnos overview  meetup sdn paris - redux
Onos overview meetup sdn paris - reduxSDN_Paris
 
How to Do Code Reviews at Massive Scale For DevOps
How to Do Code Reviews at Massive Scale For DevOpsHow to Do Code Reviews at Massive Scale For DevOps
How to Do Code Reviews at Massive Scale For DevOpsPerforce
 
Tech trends 2018 2019
Tech trends 2018 2019Tech trends 2018 2019
Tech trends 2018 2019Johan Norm
 
Planning and Control Algorithms Model-Based Approach (State-Space)
Planning and Control Algorithms Model-Based Approach (State-Space)Planning and Control Algorithms Model-Based Approach (State-Space)
Planning and Control Algorithms Model-Based Approach (State-Space)M Reza Rahmati
 
Learn more about the tremendous value Open Data Plane brings to NFV
Learn more about the tremendous value Open Data Plane brings to NFVLearn more about the tremendous value Open Data Plane brings to NFV
Learn more about the tremendous value Open Data Plane brings to NFVGhodhbane Mohamed Amine
 
Critical Preflight Checks for Your EPM Applications
Critical Preflight Checks for Your EPM ApplicationsCritical Preflight Checks for Your EPM Applications
Critical Preflight Checks for Your EPM ApplicationsDatavail
 
Rhapsody Software
Rhapsody SoftwareRhapsody Software
Rhapsody SoftwareBill Duncan
 
Real World Java Compatibility
Real World Java CompatibilityReal World Java Compatibility
Real World Java CompatibilityTim Ellison
 
Throwing Laravel into your Legacy App™
Throwing Laravel into your Legacy App™Throwing Laravel into your Legacy App™
Throwing Laravel into your Legacy App™Joe Ferguson
 
5 Ways to Accelerate Standards Compliance with Static Code Analysis
5 Ways to Accelerate Standards Compliance with Static Code Analysis 5 Ways to Accelerate Standards Compliance with Static Code Analysis
5 Ways to Accelerate Standards Compliance with Static Code Analysis Perforce
 
Automate and customise application services and deployment
Automate and customise application services and deploymentAutomate and customise application services and deployment
Automate and customise application services and deploymentChristina Hoh
 
Automate and customise application services and deployment
Automate and customise application services and deploymentAutomate and customise application services and deployment
Automate and customise application services and deploymentF5NetworksAPJ
 
Software Testing includes Performance testing with Load Runner and the JMeter
Software Testing includes Performance testing with Load Runner and the JMeter Software Testing includes Performance testing with Load Runner and the JMeter
Software Testing includes Performance testing with Load Runner and the JMeter Hima Bindu Kosuru
 
Rapid software testing and conformance with static code analysis
Rapid software testing and conformance with static code analysisRapid software testing and conformance with static code analysis
Rapid software testing and conformance with static code analysisRogue Wave Software
 
Laravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and ToolsLaravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and ToolsMuhammad Shehata
 

Similar a Interface-Implementation Contract Checking (20)

Lean Model-Driven Development through Model-Interpretation: the CPAL design ...
Lean Model-Driven Development through  Model-Interpretation: the CPAL design ...Lean Model-Driven Development through  Model-Interpretation: the CPAL design ...
Lean Model-Driven Development through Model-Interpretation: the CPAL design ...
 
NVMe Conformance Tool for SSD Testing
NVMe Conformance Tool for SSD TestingNVMe Conformance Tool for SSD Testing
NVMe Conformance Tool for SSD Testing
 
Discover DoDAF problems early in the lifecycle with model execution
Discover DoDAF problems early in the lifecycle with model executionDiscover DoDAF problems early in the lifecycle with model execution
Discover DoDAF problems early in the lifecycle with model execution
 
How Virtual Compilation Transforms Static Code Analysis
How Virtual Compilation Transforms Static Code AnalysisHow Virtual Compilation Transforms Static Code Analysis
How Virtual Compilation Transforms Static Code Analysis
 
Onos overview meetup sdn paris - redux
Onos overview  meetup sdn paris - reduxOnos overview  meetup sdn paris - redux
Onos overview meetup sdn paris - redux
 
How to Do Code Reviews at Massive Scale For DevOps
How to Do Code Reviews at Massive Scale For DevOpsHow to Do Code Reviews at Massive Scale For DevOps
How to Do Code Reviews at Massive Scale For DevOps
 
Tech trends 2018 2019
Tech trends 2018 2019Tech trends 2018 2019
Tech trends 2018 2019
 
Planning and Control Algorithms Model-Based Approach (State-Space)
Planning and Control Algorithms Model-Based Approach (State-Space)Planning and Control Algorithms Model-Based Approach (State-Space)
Planning and Control Algorithms Model-Based Approach (State-Space)
 
Oracle sun studio
Oracle sun studioOracle sun studio
Oracle sun studio
 
Learn more about the tremendous value Open Data Plane brings to NFV
Learn more about the tremendous value Open Data Plane brings to NFVLearn more about the tremendous value Open Data Plane brings to NFV
Learn more about the tremendous value Open Data Plane brings to NFV
 
Critical Preflight Checks for Your EPM Applications
Critical Preflight Checks for Your EPM ApplicationsCritical Preflight Checks for Your EPM Applications
Critical Preflight Checks for Your EPM Applications
 
Rhapsody Software
Rhapsody SoftwareRhapsody Software
Rhapsody Software
 
Real World Java Compatibility
Real World Java CompatibilityReal World Java Compatibility
Real World Java Compatibility
 
Throwing Laravel into your Legacy App™
Throwing Laravel into your Legacy App™Throwing Laravel into your Legacy App™
Throwing Laravel into your Legacy App™
 
5 Ways to Accelerate Standards Compliance with Static Code Analysis
5 Ways to Accelerate Standards Compliance with Static Code Analysis 5 Ways to Accelerate Standards Compliance with Static Code Analysis
5 Ways to Accelerate Standards Compliance with Static Code Analysis
 
Automate and customise application services and deployment
Automate and customise application services and deploymentAutomate and customise application services and deployment
Automate and customise application services and deployment
 
Automate and customise application services and deployment
Automate and customise application services and deploymentAutomate and customise application services and deployment
Automate and customise application services and deployment
 
Software Testing includes Performance testing with Load Runner and the JMeter
Software Testing includes Performance testing with Load Runner and the JMeter Software Testing includes Performance testing with Load Runner and the JMeter
Software Testing includes Performance testing with Load Runner and the JMeter
 
Rapid software testing and conformance with static code analysis
Rapid software testing and conformance with static code analysisRapid software testing and conformance with static code analysis
Rapid software testing and conformance with static code analysis
 
Laravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and ToolsLaravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and Tools
 

Más de Dharmalingam Ganesan

Reverse Architecting using Relation Algebra.pdf
Reverse Architecting using Relation Algebra.pdfReverse Architecting using Relation Algebra.pdf
Reverse Architecting using Relation Algebra.pdfDharmalingam Ganesan
 
Cyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor FunctionCyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor FunctionDharmalingam Ganesan
 
An Analysis of RSA Public Exponent e
An Analysis of RSA Public Exponent eAn Analysis of RSA Public Exponent e
An Analysis of RSA Public Exponent eDharmalingam Ganesan
 
An Analysis of Secure Remote Password (SRP)
An Analysis of Secure Remote Password (SRP)An Analysis of Secure Remote Password (SRP)
An Analysis of Secure Remote Password (SRP)Dharmalingam Ganesan
 
How do computers exchange secrets using Math?
How do computers exchange secrets using Math?How do computers exchange secrets using Math?
How do computers exchange secrets using Math?Dharmalingam Ganesan
 
On the Secrecy of RSA Private Keys
On the Secrecy of RSA Private KeysOn the Secrecy of RSA Private Keys
On the Secrecy of RSA Private KeysDharmalingam Ganesan
 
Computing the Square Roots of Unity to break RSA using Quantum Algorithms
Computing the Square Roots of Unity to break RSA using Quantum AlgorithmsComputing the Square Roots of Unity to break RSA using Quantum Algorithms
Computing the Square Roots of Unity to break RSA using Quantum AlgorithmsDharmalingam Ganesan
 
Analysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent dAnalysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent dDharmalingam Ganesan
 
Dependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private VariablesDependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private VariablesDharmalingam Ganesan
 
Solutions to online rsa factoring challenges
Solutions to online rsa factoring challengesSolutions to online rsa factoring challenges
Solutions to online rsa factoring challengesDharmalingam Ganesan
 

Más de Dharmalingam Ganesan (20)

.NET Deserialization Attacks
.NET Deserialization Attacks.NET Deserialization Attacks
.NET Deserialization Attacks
 
Reverse Architecting using Relation Algebra.pdf
Reverse Architecting using Relation Algebra.pdfReverse Architecting using Relation Algebra.pdf
Reverse Architecting using Relation Algebra.pdf
 
How to exploit rand()?
How to exploit rand()?How to exploit rand()?
How to exploit rand()?
 
Cyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor FunctionCyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor Function
 
An Analysis of RSA Public Exponent e
An Analysis of RSA Public Exponent eAn Analysis of RSA Public Exponent e
An Analysis of RSA Public Exponent e
 
An Analysis of Secure Remote Password (SRP)
An Analysis of Secure Remote Password (SRP)An Analysis of Secure Remote Password (SRP)
An Analysis of Secure Remote Password (SRP)
 
Thank-a-Gram
Thank-a-GramThank-a-Gram
Thank-a-Gram
 
Active Attacks on DH Key Exchange
Active Attacks on DH Key ExchangeActive Attacks on DH Key Exchange
Active Attacks on DH Key Exchange
 
Can I write to a read only file ?
Can I write to a read only file ?Can I write to a read only file ?
Can I write to a read only file ?
 
How do computers exchange secrets using Math?
How do computers exchange secrets using Math?How do computers exchange secrets using Math?
How do computers exchange secrets using Math?
 
On the Secrecy of RSA Private Keys
On the Secrecy of RSA Private KeysOn the Secrecy of RSA Private Keys
On the Secrecy of RSA Private Keys
 
Computing the Square Roots of Unity to break RSA using Quantum Algorithms
Computing the Square Roots of Unity to break RSA using Quantum AlgorithmsComputing the Square Roots of Unity to break RSA using Quantum Algorithms
Computing the Square Roots of Unity to break RSA using Quantum Algorithms
 
Analysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent dAnalysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent d
 
Dependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private VariablesDependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private Variables
 
Analysis of Shared RSA Modulus
Analysis of Shared RSA ModulusAnalysis of Shared RSA Modulus
Analysis of Shared RSA Modulus
 
RSA Game using an Oracle
RSA Game using an OracleRSA Game using an Oracle
RSA Game using an Oracle
 
RSA Two Person Game
RSA Two Person GameRSA Two Person Game
RSA Two Person Game
 
RSA without Integrity Checks
RSA without Integrity ChecksRSA without Integrity Checks
RSA without Integrity Checks
 
RSA without Padding
RSA without PaddingRSA without Padding
RSA without Padding
 
Solutions to online rsa factoring challenges
Solutions to online rsa factoring challengesSolutions to online rsa factoring challenges
Solutions to online rsa factoring challenges
 

Último

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Último (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Interface-Implementation Contract Checking

  • 1. Interface-Implementation Contract Checking: A Case Study on NASA’s OSAL Dharmalingam Ganesan, Mikael Lindvall Fraunhofer Center for Experimental Software Engineering College Park Maryland © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 1
  • 2. Agenda • Context: NASA OSAL • Static equivalence analysis • Static contract checking • Conclusion © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 2
  • 3. Context: NASA OSAL • Operating System Abstraction Layer • Isolates flight software from real time operating systems and hardware. • Implementation for the real time systems RTEMS and vxWorks and posix compliant non-real time systems. • Provides “Write once, run everywhere (somewhere)” at compile level • Used for mission critical embedded systems • Provides support for file-system, tasks, queues, semaphores, interrupts, hardware abstraction, I/O ports and exception handling © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 3
  • 4. NASA OSAL • Why is it important that OSAL is bug free? – flight software is mission critical and needs to be of very high quality – OSAL is the foundation of the CFE which CFS runs on top of – OSAL is used in many NASA missions, e.g. the Lunar Renaissance Orbit – If OSAL has issues, it might result in catastrophic failure © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 4
  • 5. NASA OSAL in CFS © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 5
  • 6. NASA OSAL – Architecture © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 6
  • 7. Agenda • Context: NASA OSAL • Static equivalence analysis • Static contract checking • Conclusion © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 7
  • 8. Static equivalence analysis • Currently OSAL has implementations for Rtems, vxWorks and Posix operating systems • All implementations should work the same – Perform same operation regardless of OS – Return same error-codes when errors occur © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 8
  • 9. Static equivalence analysis • Used to find differences between implementations of OSAL – Posix, RTEMS, vxWorks • Extracts return codes from function bodies • Return codes of each implementation compared to find differences © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 9
  • 10. Static equivalence analysis • Enables us to easily find otherwise subtle and hard to find errors Posix implementation Rtems implementation © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 10
  • 11. Static equivalence analysis - example © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 11
  • 12. Which defects can be found in OSAL when analyzing function pairs for functional equivalence? Runtime Issues # Issues Minor Issues # Issues Precondition Checking Diffs. 13 Configuration Issues 9* Return Code Diffs. 24 Output Differences 18* Global Variable Writing Diffs. 15 Parameter Writing Diffs. 3 Parameter Checking 2 Σ Σ 27 57 Acknowledged and/or Fixed © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 12
  • 13. Agenda • Context: NASA OSAL • Static equivalence analysis • Static contract checking • Conclusion © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 13
  • 14. Static contract checking without a formal contract • API‘s are supposed to fulfill a “contract” • A contract is: – Specification of what each function does and – How it responds to errors and what the function should return • Programmers program to a API using the contract as a guide. • A function not written according to the contract can cause hard to find errors © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 14
  • 15. Static contract checking without a formal contract Example of function fulfilling contract Contract Implementation © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 15
  • 16. Static contract checking without a formal contract Example of function fulfilling contract © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 16
  • 17. Static contract checking without a formal contract Example of function fulfilling contract © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 17
  • 18. Static contract checking without a formal contract Example of function not fulfilling contract © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 18
  • 19. Static contract checking without a formal contract • Regular expressions to create simple and fast perl programs • Compatible with C and C++ • Extracts return codes from function bodies and contract comments • Compares the return codes of contract comments and function bodies to find mismatches © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 19
  • 20. Static contract checking without a formal contract © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 20
  • 21. Static contract checking without a formal contract ...and the other way around. • To find if functions implement more than the contracts implies • To identify an uncomplete contract that could result in implementation mismatches between wrappers • Extract return codes from the function bodies, instead of the contract comments • Compare the extracted returns to the contract comments to find undocumented behavior © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 21
  • 22. Static contract checking without a formal contract © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 22
  • 23. static contract checking without a formal contract A part of the 61 issues found in the Posix implementation. All issues reported and taken care now. © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 23
  • 24. Summary Static equivalence analysis: • A lightweight technique • powerful for detecting inconsistencies between wrappers • Found several inconsistencies (addressed in OSAL) Static contract checking without a formal contract: • A lightweight technique • Found a lot of inconsistencies between documentation and code (addressed in OSAL) • Does not need any modeling or rigor – (but neither sound nor complete) © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 24
  • 25. Thank you! dganesan@fc-md.umd.edu mlindvall@fc-md.umd.edu © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 25
  • 26. Acknowledgement • Gunnar Cortes • Henning Femmer • Dave McComas • Alan Cudmore • Wesley Deadrick © 2013 Fraunhofer USA, Inc. Center for Experimental Software Engineering 26