Scalable and Flexible Static Analysis of

Published  . 0 views
↓ Download
Scalable and Flexible Static Analysis of
1 / 1
Scalable and Flexible Static Analysis of - slide 1 of 23 Scalable and Flexible Static Analysis of - slide 2 of 23 Scalable and Flexible Static Analysis of - slide 3 of 23 Scalable and Flexible Static Analysis of - slide 4 of 23 Scalable and Flexible Static Analysis of - slide 5 of 23 Scalable and Flexible Static Analysis of - slide 6 of 23 Scalable and Flexible Static Analysis of - slide 7 of 23 Scalable and Flexible Static Analysis of - slide 8 of 23 Scalable and Flexible Static Analysis of - slide 9 of 23 Scalable and Flexible Static Analysis of - slide 10 of 23 Scalable and Flexible Static Analysis of - slide 11 of 23 Scalable and Flexible Static Analysis of - slide 12 of 23 Scalable and Flexible Static Analysis of - slide 13 of 23 Scalable and Flexible Static Analysis of - slide 14 of 23 Scalable and Flexible Static Analysis of - slide 15 of 23 Scalable and Flexible Static Analysis of - slide 16 of 23 Scalable and Flexible Static Analysis of - slide 17 of 23 Scalable and Flexible Static Analysis of - slide 18 of 23 Scalable and Flexible Static Analysis of - slide 19 of 23 Scalable and Flexible Static Analysis of - slide 20 of 23 Scalable and Flexible Static Analysis of - slide 21 of 23 Scalable and Flexible Static Analysis of - slide 22 of 23 Scalable and Flexible Static Analysis of - slide 23 of 23
Description: Scalable and Flexible Static Analysis of Flight-Critical Software Guillaume P. Brat Arnaud J. Venet guillaume.p.bratnasa.gov arnaud.j.venetnasa.gov Carnegie Mellon University NASA Ames Research Center Roadmap Static analysis for

Related Topics

Download Presentation

"Scalable and Flexible Static Analysis of" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Presentation Transcript

slide1. Scalable and Flexible Static Analysis of Flight-Critical Software Guillaume P. Brat Arnaud J. Venet
guillaume.p.brat@nasa.gov arnaud.j.venet@nasa.gov

Carnegie Mellon University
NASA Ames Research Center<br>
slide2. Roadmap Static analysis for flight-critical systems
Challenges of sound static analysis
IKOS: an open architecture for sound static analyzers
Applications of IKOS<br>
slide3. Roadmap Static analysis for flight-critical systems
Challenges of sound static analysis
IKOS: an open architecture for sound static analyzers
Applications of IKOS<br>
slide4. Static Analysis Code Static Analyzer Defects Certificates of Correctness Properties,
Invariants<br>
slide5. Flight-Critical Code Testing is insufficient
Impossible to explore all execution paths (A330 cockpit display shutdown after 96 hours of operation due to an arithmetic overflow)
Some errors may be hard to detect (memory corruption due to a buffer overflow)
Static analysis brings a new level of assurance
Soundness is important<br>
slide6. Soundness Unsound tools (Coverity, KlocWork, GrammaTech)
False negatives, false positives
Little parameterization required
Sound tools (MathWorks PolySpace, ASTREE)
No false negatives: formal verification
False positives
Parameterization is key to low false positive rate:
Bounds on inputs of the system
Specialization of the analysis algorithms<br>
slide7. Roadmap Static analysis for flight-critical systems
Challenges of sound static analysis
IKOS: an open architecture for sound static analyzers
Applications of IKOS<br>
slide8. The Specialization Conundrum MathWorks PolySpace Verifier:
General purpose tool for embedded C/C++ code
Applicable to codes under 100 KLOC in practice
Manual review of warnings may be effort-intensive
ASTREE:
Scalable, yields zero or few warnings
Specialized for a restricted subset of C (single-threaded, no dynamic memory allocation, no complex pointer structure)<br>
slide9. Building a Custom Static Analyzer C Global Surveyor (developed in the RSE group at NASA Ames Research Center)
Specialized for complex C code developed in the Mars Exploration Program (Mars Pathfinder, MER)
Analyzes the whole MER flight system (550+ KLOC)
One-time exercise
Complete rewrite may be necessary when changing the target code and/or properties analyzed
Significant expertise required<br>
slide10. What do we need? A static analysis tool with an open architecture
Access to the algorithms
Possibility of refining/specializing the way the tool operates
A flexible API
We don’t want to rewrite the core analysis algorithms
But we want to be able to combine them in new ways for a particular application<br>
slide11. Roadmap Static analysis for flight-critical systems
Challenges of sound static analysis
IKOS: an open architecture for sound static analyzers
Applications of IKOS<br>
slide12. IKOS: Flexible Static Analysis Design Inference Kernel for Open Static Analyzers
A development platform for building static analyzers
Library of C++ classes encapsulating high performance static analysis algorithms
A static analyzer is assembled from the building blocks provided by IKOS
An effective buffer overflow analyzer for C programs can be written in a few hundred lines of C++ using IKOS<br>
slide13. Flexible C/C++ Front-End The untold story of using static analysis tools
Getting the code to just parse is a daunting task
The front-end of most static analysis tools expects standard C/C++ code as an input, which is rarely the case for embedded software
Significant changes to the build/code may be required
IKOS is based on the LLVM platform
The GCC compiler can compile just about any existing code with little or no change
GCC can generate LLVM assembly code<br>
slide14. Static Analysis Design with IKOS GCC C/C++
Code LLVM Analyzer Verifier Properties Verification Report Interval Domain Pointer Analysis Decision Procedure Fixpoint Iterator Octagon Domain … … IKOS<br>
slide15. Example The analysis discovers program properties:
0 ≤ i ≤ 7
p points to fourth element of structure S void f(double *p, int n) {
int i;
for (i = 0; i < n; i++) {
p[i] = ...;
}
} ...
f(&S[3], 8);
...<br>
slide16. Example The verification uses the properties discovered:
Array-bound compliance
Check that structure S has at least 11 elements void f(double *p, int n) {
int i;
for (i = 0; i < n; i++) {
p[i] = ...;
}
} ...
f(&S[3], 8);
... Access within bounds?<br>
slide17. Specialization of the Analyzer Specialization consists of finding the right blend of algorithms
To compute strong enough properties for the verifier
And guarantee reasonable analysis times
This is an intrinsically empirical process
IKOS allows the analysis designer to easily swap abstractions and decision procedures
IKOS helps streamline the design of specialized static analyzers<br>
slide18. Roadmap Static analysis for flight-critical systems
Challenges of sound static analysis
IKOS: an open architecture for sound static analyzers
Applications of IKOS<br>
slide19. Verification of UAS Autopilots Certifying the flight software of unmanned aircrafts is critical for NextGen
Complex code bases
Variety of platforms and architectures
No standard development process like DO178
Static analysis can help
Formal verification provides high assurance
Cost-effective, works on the code “as is”<br>
slide20. Experiments with IKOS Verification of array-bound compliance (NASA APG milestone)
Benchmark of realistic UAS autopilots

Juliet is a cyber-security benchmark from NIST and is listed here just to demonstrate the scalability of the analyzer<br>
slide21. MATLAB/Simulink Autocode Auto-generated code from MATLAB/Simulink models is increasingly used in critical flight software
Static analysis can provide formal guarantees that the autocode satisfies critical safety properties
We are currently developing a specialized analyzer for this class of code using IKOS<br>
slide22. Technical Infusion Ongoing activities to transfer the technology into NASA missions<br>
slide23. Conclusion Static analysis is an important tool for the assurance of flight-critical software
There is no silver bullet: static analyzers need to be specialized to be effective
IKOS is a step toward streamlining the design of specialized high-performance static analyzers<br>