Inferring Temporal Properties of Finite-State Machines with Genetic Programming GECCO’15 Student Workshop July 11, 2015 Daniil Chivilikhin PhD student.

Slides:



Advertisements
Similar presentations
Auto-Generation of Test Cases for Infinite States Reactive Systems Based on Symbolic Execution and Formula Rewriting Donghuo Chen School of Computer Science.
Advertisements

Algorithmic Software Verification VII. Computation tree logic and bisimulations.
1 Steps towards State assignment Slides of Mark Schulz used.
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Biased Random Key Genetic Algorithm with Hybrid Decoding for Multi-objective Optimization Panwadee Tangpattanakul, Nicolas Jozefowiez, Pierre Lopez LAAS-CNRS.
ECE Synthesis & Verification - L271 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Model Checking basics.
CS6133 Software Specification and Verification
Model Checking Genetic Regulatory Networks with Parameter Uncertainty Grégory Batt, Calin Belta, Ron Weiss HSCC 2007 Presented by Spring Berman ESE :
Model Checking Inputs: A design (in some HDL) and a property (in some temporal logic) Outputs: Decision about whether or not the property always holds.
/ PSWLAB Efficient Decentralized Monitoring of Safety in Distributed System K Sen, A Vardhan, G Agha, G Rosu 20 th July 2007 Presented by.
Model Checking I What are LTL and CTL?. and or dreq q0 dack q0bar D D.
Digitaalsüsteemide verifitseerimise kursus1 Formal verification: Property checking Property checking.
SAT and Model Checking. Bounded Model Checking (BMC) A.I. Planning problems: can we reach a desired state in k steps? Verification of safety properties:
An Approach to Evaluate Data Trustworthiness Based on Data Provenance Department of Computer Science Purdue University.
Date:2011/06/08 吳昕澧 BOA: The Bayesian Optimization Algorithm.
Spring 07, Feb 6 ELEC 7770: Advanced VLSI Design (Agrawal) 1 ELEC 7770 Advanced VLSI Design Spring 2007 Verification Vishwani D. Agrawal James J. Danaher.
Lecture 4&5: Model Checking: A quick introduction Professor Aditya Ghose Director, Decision Systems Lab School of IT and Computer Science University of.
ECE Synthesis & Verification1 ECE 667 Spring 2011 Synthesis and Verification of Digital Systems Verification Introduction.
25/06/2015Marius Mikucionis, AAU SSE1/22 Principles and Methods of Testing Finite State Machines – A Survey David Lee, Senior Member, IEEE and Mihalis.
Review of the automata-theoretic approach to model-checking.
1 Coverage Metrics in Formal Verification Hana Chockler Hebrew University.
Contemporary Logic Design FSM Optimization © R.H. Katz Transparency No Chapter #9: Finite State Machine 9.4 Choosing Flip-Flops 9.5 Machine Partitioning.
Stochastic greedy local search Chapter 7 ICS-275 Spring 2007.
ECE 301 – Digital Electronics Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #17)
System Design Research Laboratory Specification-based Testing with Linear Temporal Logic Li Tan Oleg Sokolsky Insup Lee University of Pennsylvania.
ECE 331 – Digital Systems Design Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #19)
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
Flavio Lerda 1 LTL Model Checking Flavio Lerda. 2 LTL Model Checking LTL –Subset of CTL* of the form: A f where f is a path formula LTL model checking.
15-820A 1 LTL to Büchi Automata Flavio Lerda A 2 LTL to Büchi Automata LTL Formulas Subset of CTL* –Distinct from CTL AFG p  LTL  f  CTL. f.
Introduction to Software Testing Chapter 9.4 Model-Based Grammars Paul Ammann & Jeff Offutt
Genetic Algorithm.
Combining Exact and Metaheuristic Techniques For Learning Extended Finite-State Machines From Test Scenarios and Temporal Properties ICMLA ’14 December.
On the Formal Specification of Automata- based Programs via Specification Patterns Spring/Summer Young Researchers' Colloquium on Software Engineering.
Institute for Applied Information Processing and Communications 1 Karin Greimel Semmering, Open Implication.
Design Space Exploration
On comparison of different approaches to the stability radius calculation Olga Karelkina Department of Mathematics University of Turku MCDM 2011.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Reconstruction of Function Block Logic using Metaheuristic Algorithm: Initial Explorations INDIN ’15, Cambridge, UK, July 23, 2015 Daniil Chivilikhin PhD.
CS6133 Software Specification and Verification
Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!
Automatic Verification of Finite-State Concurrent Systems Using Temporal Logic Specifications 1.
Applying Genetic Algorithm to the Knapsack Problem Qi Su ECE 539 Spring 2001 Course Project.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Inferring Automation Logic from Manual Control Scenarios: Implementation in Function Blocks ’15, Helsinki, Finland, August 21, 2015 Daniil Chivilikhin.
Exact and heuristics algorithms
Extended Finite-State Machine Inference with Parallel Ant Colony Based Algorithms PPSN’14 September 13, 2014 Daniil Chivilikhin PhD student ITMO.
Extended Finite-State Machine Induction using SAT-Solver Vladimir Ulyantsev, Fedor Tsarev St. Petersburg National.
Kanpur Genetic Algorithms Laboratory IIT Kanpur 25, July 2006 (11:00 AM) Multi-Objective Dynamic Optimization using Evolutionary Algorithms by Udaya Bhaskara.
Advanced Computer Architecture & Processing Systems Research Lab Framework for Automatic Design Space Exploration.
CSE Winter 2008 Introduction to Program Verification January 15 tautology checking.
Verification & Validation By: Amir Masoud Gharehbaghi
VIS Technology Transfer Course Session 7 Fairness Constraints and Monitors Serdar Tasiran.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Tamaki Okuda ● Tomoyuki Hiroyasu   Mitsunori Miki   Shinya Watanabe  
Custom Computing Machines for the Set Covering Problem Paper Written By: Christian Plessl and Marco Platzner Swiss Federal Institute of Technology, 2002.
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
Variants of LTL Query Checking Hana ChocklerArie Gurfinkel Ofer Strichman IBM Research SEI Technion Technion - Israel Institute of Technology.
From Natural Language to LTL: Difficulties Capturing Natural Language Specification in Formal Languages for Automatic Analysis Elsa L Gunter NJIT.
Evolutionary multi-objective algorithm design issues Karthik Sindhya, PhD Postdoctoral Researcher Industrial Optimization Group Department of Mathematical.
Application of the GA-PSO with the Fuzzy controller to the robot soccer Department of Electrical Engineering, Southern Taiwan University, Tainan, R.O.C.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Introduction to Software Testing (2nd edition) Chapter 5 Criteria-Based Test Design Paul Ammann & Jeff Offutt
A Review of Software Testing - P. David Coward
CIS 842: Specification and Verification of Reactive Systems
Daniil Chivilikhin and Vladimir Ulyantsev
Daniil Chivilikhin, Igor Buzhinsky, Vladimir Ulyantsev,
Formal Methods in software development
Dichotomies in CSP Karl Lieberherr inspired by the paper:
Presentation transcript:

Inferring Temporal Properties of Finite-State Machines with Genetic Programming GECCO’15 Student Workshop July 11, 2015 Daniil Chivilikhin PhD student ITMO University Ilya Ivanov Undergrad student ITMO University Anatoly Shalyto Dr. Sci., professor ITMO University

Introduction Software models Not always created If created, not always kept up to date 2

Model inference Executable program Test cases Program model Model inference algorithm Finite-state machine Quite a few good algorithms 3

Temporal logics Used to express time-related propositions In software verification: state requirements for software systems Example statement “If a request is received, an answer is eventually generated” 4

Linear temporal logics Propositional variables: elementary statements Boolean logic operators: ∨, ∧, ¬, → Temporal operators X(f) – f has to hold in the next state F(f) – f has to hold in some state in the future G(f) – f has to hold for all states U(f, g) – f has to hold until g holds … 5

Specification inference Executable program Test cases Temporal properties Specification inference algorithm Only very simple properties 6

Finite-State Machines 7 e 1 / z 0, z 1 event output actions

LTL for FSMs Propositional variables wasEvent(e) for all events e wasAction(z) for all output actions z G (wasEvent(e 2 ) → wasAction(z 2 )) 8

Problem statement Find some non-trivial “interesting” LTL properties (formulas) of a given FSM All formulas must hold for input FSM Short formulas are better than long ones Should not hold for FSMs similar to the input FSM 9

Proposed approach Use Genetic Programming (GP) Evolve a population of LTL formulas Express constraints using several fitness functions Multiobjective optimization 10

Main challenge Design a set of fitness functions that result in proper LTL properties 11

FF #1: Formula must hold for input FSM Main search objective Use model checker to check formula f against FSM a 12

FF #2: Minimal formula weight Measure structural complexity of a formula Operators O = { ∨, ∧, ¬, →, X, F, U, R} Propositional variables S = {wasEvent(e) for all e ∈ E} U {wasAction(z) for all z ∈ Z} 13

FF #2: Minimal formula weight (continued) Each operator and variable are assigned weight W W(s)= w s for s ∈ S W(o(arg 1, [arg 2 ])) = w o + W(arg 1 ) [+W(arg 2 )] 14

FF #3: Random FSMs Idea: if a large number of randomly generated FSMs satisfy an LTL formula, it is meaningless Generate a number of random FSMs with the same interface as the input FSM a 1,..., a Nsample 15

FF #4: Mutants of input FSM Idea: if a formula is not violated by a small change in the FSM, it is not so “interesting” Generate random mutants of the input FSM m 1,..., m Nsample Mutation operators Change transition end state Add/delete transitions 16

FF #5: FSM constructed from scenarios A scenario is a finite path in an FSM Example: 17

FF #5: FSM constructed from scenarios (continued) Derive random scenarios of fixed length from input FSM a Use fast exact algorithm to construct an FSM a* from scenarios Note: a* probably differs from a Note: not all formulas that are true for a are true for a* 18

FF #6: Mutants of FSM constructed from scenarios Same as FF #4, but mutants are generated from the FSM constructed from scenarios 19

Implementation ECJ library used for EA implementation Multiobjective EAs: NSGA-II and SPEA2 Standard GP operators 20

Experiments Case study: Elevator doors control FSM Input events: A, B, C,D, E Output actions: z 1, z 2, z 3 17 manually created LTL formulas 21

Original LTL properties 22

Experiments goal Goal: infer formulas similar to manually created ones But how do we measure the quality of inferred formulas? Introduced two empirical metrics Coverage metric Mutants metric 23

Coverage metric {f old } – original manually created formulas {f new } – inferred formulas 1.Derive scenarios from original FSM a 2.Model inference: build FSM a’ from scenarios and {f new } 3.Metric: how many formulas from {f old } does a’ satisfy? 24

Mutants metric {f old } – original manually created formulas {f new } – inferred formulas 1.Generate M’ ≤ 1000 different mutants of original FSM a 2.Ratio of mutants that violate at least one formula from {f old } 3.Metric: 25

Experimental setup Tried both NSGA-II and SPEA2 EAs run for 50 generations Population size = 500 Result of experiment: all formulas in Pareto front Each experiment repeated 20 times FF 1 and FF 2 in all experiments, all combinations of the rest 26

Experimental data 27

Experimental results NSGA-II and SPEA2 yield similar formula quality SPEA2 is much faster than NSGA-II Config #8 = {all but FF 3 } is best for NSGA-II Config #15 = {all but FF 6 } is best for SPEA2 Significance validated using Wilcoxon signed-rank test 28

Varying other parameters Use SPEA2 with config #15 Varied population size from 100 to 1000 Change number of generations from 25 to 200 No significant changes Pop size ∙ c learn, % ∙ c mut, %

Larger example ATM control FSM 12 states 14 events 13 output actions 30 LTL formulas Mutants metric: 100 ∙ c mut = 65 % Coverage metric: infeasible 30

Results Proposed GP-based approach for inferring LTL properties of FSMs Feasibility demonstrated on two examples using two empirical quality metrics Approach is able to infer up to 100 % of human- written LTL formulas 31

Future work Couple with existing model inference algorithms

Acknowledgements This work was financially supported by the Government of Russian Federation, Grant 074-U01. 33

Thank you for your attention! Daniil Chivilikhin Ilya Ivanov Anatoly Shalyto 34