Deploy Data-flow Model Simulate Engineer Executable

Slides:



Advertisements
Similar presentations
Jeremy S. Bradbury, James R. Cordy, Juergen Dingel, Michel Wermelinger
Advertisements

Zhiguo Ge, Weng-Fai Wong, and Hock-Beng Lim Proceedings of the Design, Automation, and Test in Europe Conference, 2007 (DATE’07) April /4/17.
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
Using Programmer-Written Compiler Extensions to Catch Security Holes Authors: Ken Ashcraft and Dawson Engler Presented by : Hong Chen CS590F 2/7/2007.
Online Performance Auditing Using Hot Optimizations Without Getting Burned Jeremy Lau (UCSD, IBM) Matthew Arnold (IBM) Michael Hind (IBM) Brad Calder (UCSD)
Usability Inspection n Usability inspection is a generic name for a set of methods based on having evaluators inspect or examine usability-related issues.
SE 450 Software Processes & Product Metrics 1 Defect Removal.
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
Workflow API and workflow services A case study of biodiversity analysis using Windows Workflow Foundation Boris Milašinović Faculty of Electrical Engineering.
Query Processing Presented by Aung S. Win.
Struts 2.0 an Overview ( )
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
Secure Embedded Processing through Hardware-assisted Run-time Monitoring Zubin Kumar.
System/Software Testing
CMSC 345 Fall 2000 Unit Testing. The testing process.
Software Engineering Prof. Dr. Bertrand Meyer March 2007 – June 2007 Chair of Software Engineering Static program checking and verification Slides: Based.
Department of Computer Science A Static Program Analyzer to increase software reuse Ramakrishnan Venkitaraman and Gopal Gupta.
Per Møldrup-Dalum State and University Library SCAPE Information Day State and University Library, Denmark, SCAPE Scalable Preservation Environments.
Inferring Specifications to Detect Errors in Code Mana Taghdiri Presented by: Robert Seater MIT Computer Science & AI Lab.
Performance Prediction for Random Write Reductions: A Case Study in Modelling Shared Memory Programs Ruoming Jin Gagan Agrawal Department of Computer and.
Introduction to Exception Handling and Defensive Programming.
Massive Stochastic Testing of SQL Don Slutz Microsoft Research Presented By Manan Shah.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
Making Good Code AKA: So, You Wrote Some Code. Now What? Ray Haggerty July 23, 2015.
Computer Science Automated Software Engineering Research ( Mining Exception-Handling Rules as Conditional Association.
Static Program Analysis of Embedded Software Ramakrishnan Venkitaraman Graduate Student, Computer Science Advisor: Dr. Gopal Gupta
Callista Enterprise Test Driven ESB Development Sofia Jonsson
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Reasoning about the Behavior of Semantic Web Services with Concurrent Transaction Logic Presented By Dumitru Roman, Michael Kifer University of Innsbruk,
CrossCheckSimulation Results Conclusions References Model Instrumentation Modeling with CUTS Property Specification SPRUCE Challenge Problem Checking Model.
Checking Model Specifications with CrossCheck™ Jonathan Springer James Ezick U.S. Air Force AFRL-SBIR FA C-0049 Unclassified, DISTRIBUTION STATEMENT.
Modelling the Process and Life Cycle. The Meaning of Process A process: a series of steps involving activities, constrains, and resources that produce.
EGR 115 Introduction to Computing for Engineers Branching & Program Design – Part 3 Friday 03 Oct 2014 EGR 115 Introduction to Computing for Engineers.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
CS 5150 Software Engineering Lecture 21 Reliability 2.
Reducing Structural Bias in Technology Mapping
Experience Report: System Log Analysis for Anomaly Detection
Compiler Design (40-414) Main Text Book:
Efficient Evaluation of XQuery over Streaming Data
The architecture of the P416 compiler
User-Written Functions
Software Testing.
Abstract Major Cloud computing companies have started to integrate frameworks for parallel data processing in their product portfolio, making it easy for.
Building a Whole-Program Type Analysis in Eclipse
CyFuzz: A Differential Testing Framework
UNIT-4 BLACKBOX AND WHITEBOX TESTING
CS 3304 Comparative Languages
Practical Rootkit Detection with RAI
CSCI1600: Embedded and Real Time Software
Designing and Debugging Batch and Interactive COBOL Programs
Unit# 9: Computer Program Development
Introduction to Systems Analysis and Design
AdaCore Technologies for Cyber Security
CIS16 Application Development – Programming with Visual Basic
Chapter 6 Intermediate-Code Generation
All You Ever Wanted to Know About Dynamic Taint Analysis & Forward Symbolic Execution (but might have been afraid to ask) Edward J. Schwartz, Thanassis.
Subject: Language Processor
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Paper by D.L Parnas And D.P.Siewiorek Prepared by Xi Chen May 16,2003
An Introduction to Debugging
Data Structures & Algorithms
M. Kezunovic (P.I.) S. S. Luo D. Ristanovic Texas A&M University
Overview Activities from additional UP disciplines are needed to bring a system into being Implementation Testing Deployment Configuration and change management.
This material is based upon work supported by the National Science Foundation under Grant #XXXXXX. Any opinions, findings, and conclusions or recommendations.
CSCI1600: Embedded and Real Time Software
CS 325: Software Engineering
CHAPTER 6 Testing and Debugging.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Programming Logic and Design Eighth Edition
Presentation transcript:

Deploy Data-flow Model Simulate Engineer Executable Image of the Simulink model: available: https://commons.wikimedia.org/wiki/File:Simulink_lept.png

Tool Improvement Approaches Formally verifying components [-] Currently Not feasible Large codebase Formal Spec. [-] No complete and/or updated formal specifications Rapid release cycle of products Ideally, we should formally verify that there are no bugs. Unfortunately, this not feasible to formally verify the entire CPS tool chain -- due to the large code base And also, commercial CPS tool chains have rapid release cycle. So it’s hard to get complete and/or updated formal specifications.

Automatically Finding Bugs in a Commercial Cyber-Physical System Development Tool Chain with SLforge Shafiul Azam Chowdhury Soumik Mohian Sidharth Mehra Siddhant Gawsane Dr. Taylor T. Johnson Dr. Christoph Csallner The University of Texas at Arlington Vanderbilt University github.com/verivital/slsf_randgen This material is based upon work supported by the National Science Foundation under Grants No. 1117369, 1464311, and 1527398. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation. This material is based upon work supported by the Air Force Office of Scientific Research (AFOSR) contract numbers FA9550-15-1-0258 and FA9550-16-1-0246, and by Air Force Research Lab (AFRL) contract number FA8750-15-1-0105. Any opinions, findings, and conclusions or recommendations expressed in this publication are those of the authors and do not necessarily reflect the views of AFRL or AFOSR. Welcome to the talk on automatic bug finding -- in Cyber-Physical System tool chains -- with our scheme SLforge

Overview Eliminating bugs from Cyber-Physical System (CPS) tool chain is crucial Existing CPS tool chain testing scheme is inefficient in finding new bugs Addressing its limitations, we present SLforge Systematic and efficient model generator Found 10+ confirmed bugs in MathWorks’ Simulink Large-scale study on public Simulink models Drives model generation and evaluation Existing CPS tool chain testing scheme is inefficient in finding bugs. In this paper we identify its limitation and address them, presenting a systematic model generator which has already found 11 confirmed bugs in Simulink. We also did a large-scale study on public Simulink models To gain insigtht on how engineers model in the real world. So we can guide the model geneator to create models which are similar to the realistic pubic models. And also evaluate the model generation power.

Background: Differential Testing with CyFuzz Model Generator [+] Don’t need full formal language specs to find bugs [+] No false warnings if undefined behaviors are avoided generate CPS Model CPS Tool Chain -o0 -o1 compile Executable 1 Executable 2 execute compare Output 1 ? Output 2 In prior work we presented the first known differential testing framework for CPS tool chain called CyFuzz. Quick background on differential testing: Say the CPS tool chain we want to test offers two modes: one with no compiler optimization, and other enables optimization Now, CyFuzz has a test generator which automatically creates a random CPS model

Background: CPS Model Block: Node, basic component of CPS model, represents a formula / code Connection: Edge between blocks Block library: Similar to a standard library of traditional programming language Custom Blocks: Native (e.g., C) code Hierarchy: block representing a child model A CPS model contains of blocks, which accepts data using input port, performs calculations, and sends outputs to other blocks. We can choose vendor provided built-in blocks from libraries Or even define custom block behavior using procedural code. Instead of flat models, we can create them in hierarchies, where a block in a “parent” model is actually a placeholder for an ENTIRE “child” model.

Background: CyFuzz Phases Random Model Generator Comparison Framework CyFuzz is organized in 5 phases: The first 3 phases create a random model And the following two takes the model, executes it in different configurations, and compare them. In the first phase it selects which blocks should be in the model Next, it randomly connects the blocks The model is likely invalid, so it has a Fix Error phase, Where it repeatedly compiles the model, figures out what went wrong and tries to fix it – so that the compiler would accept it as a valid model. Next we run the model and *log* output in different modes And compare them for discrepancy

Background: CyFuzz Fix Errors Compile model: error The core is the Fix Error phase, so we give an example. Say this is a randomly generated model. The FE phase compiles it and sees error

Background: CyFuzz Fix Errors Parse error message(s) Identify problematic components

Background: CyFuzz Fix Errors Add a new block to fix the data-type incompatibility [+] Easy to implement No knowledge of type rules needed [+] Worked well for small, simple models (<100 blocks)

Background: Equivalent Modulo Input (EMI) Testing Model 1 Model 2 change Models have fixed input compile Executable 1 Executable 2 execute compare Output 1 ? Output 2

CyFuzz Shortcomings Fix Error heuristics: inefficient, may not terminate Did not leverage modeling specifications Models are simple: Can’t create large hierarchical models No support for conditional execution (If Else) and loops Found no new bugs

Challenge: Evaluating CyFuzz-generated Models No large-scale study of publicly available Simulink models! which could… [+] Give insight on how researchers design models [+] Guide the generator to create realistic models [+] Evaluate the model-generation power [+] Benefits model-based empirical research in general It was hard to evaluate the models generated by CyFuzz – are they powerful and realistic?

Contributions Improved CyFuzz’s model generation scheme (Slforge) Parsing public specifications and leverage them in model generation Formalization of the specifications Intermediate model representation and analysis Experimental evaluation: Efficiency Model-generation capability Found 10 confirmed bugs (8 new)

Largest Study of Public Simulink Models Collected and studied 391 Simulink models: MathWorks-provided tutorial models Popular public repositories MathWorks’ FileExchange and GitHub Academic and search engine results

Largest Study of Public Simulink Models Collected and studied 391 public Simulink models: Classified into groups: M: # of Models C: # of models which compiled H: # of models having hierarchy

Blocks Connections Hierarchy Depth

Blocks Hierarchy Depth Connections Hierarchy Depth

Participation of Libraries

SLforge Extending CyFuzz codebase, open-source Parses publicly-available specifications

Checks which connections are invalid by the specifications SLforge Checks which connections are invalid by the specifications

Graph search detects type inconsistencies and removes algebraic loops Slforge New Phases Graph search detects type inconsistencies and removes algebraic loops

Statically creates EMI-variants EMI-based Testing Statically creates EMI-variants SLforge creates EMI variants from the generated models Uses Simulink’s Dead-block optimization API

RQ: SLforge Generates Models Efficiently Blocks per Model Blocks per Model Figure: Runtime Analysis Figure: Number of “Fix Error” Iterations Dotted: CyFuzz Dashed: SLforge (except the analysis phase) Solid: SLforge

RQ: Generating Realistic Models Generate models up to hierarchical depth 7 2,152 blocks/model (average) 2,544 connections/model (average) Supports new frequently-used libraries: Subsystems and Model referencing, Math Operations, Logic and Bitwise operations, S-functions

RQ: Bug-Finding Capability Continuously generated models for five months Reported 12 issues Confirmed bugs: 10 New: 8

Example Bugs Bug TSC-02472993: The Model block (top) refers to the child model (bottom). Simulink fails to handle rate transition automatically for the First-Order Hold block.

Example Bugs Found Bug TSC-02614088: In spite of supporting double data-type in its d port, block VID issued a data-type inconsistency as it prefers integer type.

Example Bugs Found EMI Bug TSC-02476742: The Top Model’s (in bottom right corner) Model block is a placeholder for the child model (top and left), where all blocks except bl11 and bl12 are dead, however, were not removed in the Accelerator mode.

Thank You!