Research Heaven, West Virginia 1 Static Analysis of Software for Autonomous Spacecrafts Supratik Mukhopadhyay Research Heaven, West.

Slides:



Advertisements
Similar presentations
Configuration management
Advertisements

Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Verification of Hybrid Systems An Assessment of Current Techniques Holly Bowen.
1 Formal Methods in SE Qaisar Javaid Assistant Professor Lecture 05.
Automated creation of verification models for C-programs Yury Yusupov Saint-Petersburg State Polytechnic University The Second Spring Young Researchers.
Software Quality Assurance Inspection by Ross Simmerman Software developers follow a method of software quality assurance and try to eliminate bugs prior.
Requirements and Design
May 11, ACL2 Panel: What is the Future of Theorem Proving? Arvind Computer Science & Artificial Intelligence Laboratory.
Programming Languages Language Design Issues Why study programming languages Language development Software architectures Design goals Attributes of a good.
Reasons to study concepts of PL
Chapter 1 Principles of Programming and Software Engineering.
1 Software, Programmings. 2 Types of Software Figure 9.1 Shakeel Ahmad.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Formal verification Marco A. Peña Universitat Politècnica de Catalunya.
Dr. Kalpakis CMSC 461, Database Management Systems Introduction.
Introduction to Software Testing
Database Management Systems (DBMS)
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
Data Structures and Programming.  John Edgar2.
CS527: (Advanced) Topics in Software Engineering Overview of Software Quality Assurance Tao Xie ©D. Marinov, T. Xie.
PROGRAMMING LANGUAGES The Study of Programming Languages.
CS 355 – Programming Languages
Katanosh Morovat.   This concept is a formal approach for identifying the rules that encapsulate the structure, constraint, and control of the operation.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
© 2012 IBM Corporation Rational Insight | Back to Basis Series Chao Zhang Unit Testing.
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
ECE 720T5 Winter 2014 Cyber-Physical Systems Rodolfo Pellizzoni.
Parser-Driven Games Tool programming © Allan C. Milne Abertay University v
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Ranga Rodrigo. The purpose of software engineering is to find ways of building quality software.
Software Engineering Research paper presentation Ali Ahmad Formal Approaches to Software Testing Hierarchal GUI Test Case Generation Using Automated Planning.
Chapter 1 : Introduction §Purpose of Database Systems §View of Data §Data Models §Data Definition Language §Data Manipulation Language §Transaction Management.
1 A Spectrum of IV&V Modeling Techniques Mats Heimdahl (Co-PI) Jimin Gao (RA) University of Minnesota Tim Menzies (Co-PI) David Owen (RA) West Virginia.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Formal Verification Lecture 9. Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
The Software Development Process
1 CSEP590 – Model Checking and Automated Verification Lecture outline for August 6, 2003.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Chapter 5: Software Re-Engineering Omar Meqdadi SE 3860 Lecture 5 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
1 Model Checking of Robotic Control Systems Presenting: Sebastian Scherer Authors: Sebastian Scherer, Flavio Lerda, and Edmund M. Clarke.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Software Engineering. Acknowledgement Charles Moen Sharon White Bun Yue.
ISBN Prentice-Hall, 2006 Chapter 8 Testing the Programs Copyright 2006 Pearson/Prentice Hall. All rights reserved.
May08-21 Model-Based Software Development Kevin Korslund Daniel De Graaf Cory Kleinheksel Benjamin Miller Client – Rockwell Collins Faculty Advisor – Dr.
CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles.
Winter 2007SEG2101 Chapter 121 Chapter 12 Verification and Validation.
Research Heaven, West Virginia 1 Translation Validation of Compilers for Model-based Programming Supratik Mukhopadhyay Research Heaven,
CSCI 161 Lecture 3 Martin van Bommel. Operating System Program that acts as interface to other software and the underlying hardware Operating System Utilities.
Principles of Programming & Software Engineering
The language focusses on ease of use
Chapter 1 Introduction.
Software Testing.
Types for Programs and Proofs
The Development Process of Web Applications
The Software Development Cycle
Principles of Programming and Software Engineering
Chapter 1 Introduction.
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Introduction to Computer Programming
Principles of Programming Languages
System Reengineering Restructuring or rewriting part or all of a system without changing its functionality Applicable when some (but not all) subsystems.
The Software Development Cycle
Presentation transcript:

Research Heaven, West Virginia 1 Static Analysis of Software for Autonomous Spacecrafts Supratik Mukhopadhyay Research Heaven, West Virginia

2 Why Autonomous Software? Great distances from earth of the next generation missions (e.g., Mars) make autonomous software the only option Systems must operate severely limited human intervention to control complex, real time, and mission-critical processes over many months in poorly understood environments Any control from earth takes at least 8 minutes to get actuated on Mars Promises improved capabilities at a reduced operational cost

Research Heaven, West Virginia 3 The Challenges… Complexity of software for autonomous systems tremendous Validation poses a formidable challenge Traditional testing fails due to the explosion in the number of possible situations.

Research Heaven, West Virginia 4 Current Solutions… Model-based programming for robust development and early validation Introduce and enforce disciplined coding conventions to make debugging and testing easier ( e.g., in flight code no dynamic allocation, always check for array bounds, use standard programming language exception handling mechanism and apply Purify ) Formal Methods: Model Checking (e.g., translate models to SMV, Java Pathfinder) or Theorem Proving (PVS); able to uncover many concurrency bugs

Research Heaven, West Virginia 5 Still… Current Status… “I don’t know if it’s the candidate manager, Stanley or the engine, but it really seems to hog my machine. I have to shut it down to use other applications” “the first release was announced but failed with some environment variable not being set properly …” Bugs from the GNATS Database

Research Heaven, West Virginia 6 Current Status needs to improve. But… Formal verification suffers from state explosion Need to extract models from code; in many cases such extraction is manually aided Formal verification acts on models, not on actual code Simple coding errors are the cause of many crashes (remember Ariane); Formal verification bypasses them

Research Heaven, West Virginia 7 Need of the hour… New techniques that can work not only on the models but also on actual code Techniques should require minimum amount of human support Should be able to detect not only logical design errors but also programming errors Should be able to integrate itself with the model-based development paradigm followed at NASA

Research Heaven, West Virginia 8 New Technique: Static Analysis a set of techniques used to infer program properties at compile-time immensely successful for general purpose programming languages autonomous systems developed using special-purpose languages; such languages typically at a higher level of abstraction and typically more constrained than general purpose programming languages. features of the language to be included in a compiled instance specified by the user; typically only a few features are included. such criteria make static analysis easier to apply to such software

Research Heaven, West Virginia 9 Autonomous Software in NASA Much publicized use of Remote Agent autonomy architecture used in Deep Space Mode Identification and Recovery (MIR) component uses Lisp-based Livingstone (L1) Integrated Vehicle Health Management (IVHM) system Accepts models of components of system; infers overall behavior of system Being used in the next generation shuttles

Research Heaven, West Virginia 10 Where does Static Analysis fit in? Model in JMPL JMPL Compiler Model in XMPL Livingstone (L2) Source in C++ C++ Compiler Livingstone Executable System Behavior Is it the correct model? Is the model built correctly? Does the system crash?

Research Heaven, West Virginia 11 Why is the autonomous landscape is so special? Procedural (Livingstone C++) Object-oriented (source of L2).Declarative (JMPL). Involves Concurrency and Components embedded and real-time aspects More high- level than traditional programs

Research Heaven, West Virginia 12 Static Analysis Technology Slice the code automatically to prune portions irrelevant to the property (use Codesurfer from grammatech) Automatic translation of source code (C++, JMPL) to Constraint Query Language (CQL) Programs Properties to be inferred or validated to be incorporated as program transformations on constraint query language programs Computing models of CQL programs provides the analysis Widenings used to accelerate or terminate the computation; comes up with a ‘yes’ or ‘don’t know’ answer

Research Heaven, West Virginia 13 Properties to check Array bound violation Code reachability Constraints on variable values at program locations (memory content) Deadlocks and concurrency errors

Research Heaven, West Virginia 14 Translation of Source Code to CQL programs … 10:x=y+10; 11:while(x<=z){ … } p(10,X,Y,Z) p(11,X1,Y,Z),{X=Y+10} p(11,X,Y,Z) p(12,X,Y,Z),{X=<Z}

Research Heaven, West Virginia 15 Incorporating properties … 10:x=y+10; 11:while(x<=z){ … } p(10,X,Y,Z) p(11,X1,Y,Z),{X=Y+10} p(11,X,Y,Z) p(12,X,Y,Z),{X=<Z} Line 12 is reachable p(10,X,Y,Z) p(11,X1,Y,Z),{X=Y+10} p(11,X,Y,Z) p(12,X,Y,Z),{X=<Z} p(12,X,Y,Z). Property

Research Heaven, West Virginia 16 Tool for Automatic Translation Built with Lex, Yacc and 400 lines of awk code Translates C++ source code to CQL clauses Able to handle lines of code in a matter of seconds Used the tool to translate some Livingstone methods to CQL programs Tool for translating JMPL source code currently underway r(p(10,X,Y,Z),p(11,X1,Y,Z),{X1=Y+10}). Tool generated translation

Research Heaven, West Virginia 17 Computing Models of CQLs Both forward and backward chaining methods Forward chaining method wasteful Backward chaining: Tabled Resolution; table each constrained atom as it is called; on subsequent calls use the information on the table Tabled resolution: goal-directed p(x) p(x). p(x) {x=0}. p(x) {x=1} p(x) {x=0} {x=1} p(x) p(x): x=0,x=1 Table

Research Heaven, West Virginia 18 Tool for Computing Models Written in Sicstus Prolog with 3000 lines of code Has a GUI written in Tcl/Tk Uses CLP(R) library of Sicstus Prolog for constraint solving Have checked array bounds automatically for several Livingstone methods; generated interface conditions for array bound violation Handles 1000 lines of source code in < 30 seconds

Research Heaven, West Virginia 19 Widenings A series of widenings being developed for both accelerating and enforcing termination Most of them are based on syntax for efficient implementation M M

Research Heaven, West Virginia 20 Implementing Widenings Have implemented many of the widenings already in Sicstus Prolog Implementation of more widenings underway Some of the widenings lose information resulting in ‘don’t know’ answers Accuracy of widenings to be studied

Research Heaven, West Virginia 21 Current Status Implemented tool for translating C++ source code to CQL clauses Developed tool for computing models of CQL programs Implemented many of the widenings Conducted preliminary case studies To do in the next quarter Implement translator from JMPL to CQL Implement more widenings Study new techniques to make the analysis faster e.g., randomized techniques Conduct more rigorous case studies

Research Heaven, West Virginia 22 Related Work Bandera: Conduct finite models from Java source code SLAM: Constructs finite models from C source code JavaPathfinder: Model Checks Java programs BANE: Infers constraints from C programs and solves them

Research Heaven, West Virginia 23 Lessons learnt Adherence to disciplined coding practices like no dynamic allocation in flight code makes static analysis easier Techniques needed to make static analysis faster Can be used to generate interface specification for modules Preliminary experiments providing encouraging results