Reconstruction of Function Block Logic using Metaheuristic Algorithm: Initial Explorations INDIN ’15, Cambridge, UK, July 23, 2015 Daniil Chivilikhin PhD.

Slides:



Advertisements
Similar presentations
How SAS implements structured programming constructs
Advertisements

Creation of Automaton Classes from Graphical Models and Automatic Solution for Inverse Problem Yuri A. Gubin student of SPb SU ITMO supervised by Anatoly.
Delta Debugging and Model Checkers for fault localization
Introduction to Programming in C++ John Galletly.
50.530: Software Engineering Sun Jun SUTD. Week 10: Invariant Generation.
Control Flow Analysis (Chapter 7) Mooly Sagiv (with Contributions by Hanne Riis Nielson)
Mathematics for Computing Lecture 4: Algorithms and flowcharts Dr Andrew Purkiss-Trew Cancer Research UK
Automated creation of verification models for C-programs Yury Yusupov Saint-Petersburg State Polytechnic University The Second Spring Young Researchers.
The Programming Discipline Professor Stephen K. Kwan 2010 Things you need to know (learn) for developing large computer programs.
Using a Genetic Algorithm for Approximate String Matching on Genetic Code Carrie Mantsch December 5, 2003.
The C++ Tracing Tutor: Visualizing Computer Program Behavior for Beginning Programming Courses Rika Yoshii Alastair Milne Computer Science Department California.
Chapter 3 Planning Your Solution
TIBCO Designer TIBCO BusinessWorks is a scalable, extensible, and easy to use integration platform that allows you to develop, deploy, and run integration.
WorkPlace Pro Utilities.
Combining Exact and Metaheuristic Techniques For Learning Extended Finite-State Machines From Test Scenarios and Temporal Properties ICMLA ’14 December.
I. Pribela, M. Ivanović Neum, Content Automated assessment Testovid system Test generator Module generators Conclusion.
Advanced Excel for Finance Professionals A self study material from South Asian Management Technologies Foundation.
Advanced e-Learning techniques for teaching C-programming and selected features of Java and C++ Proposed by Dr. Chittaranjan Mandal, Associate Professor,
1 A Static Analysis Approach for Automatically Generating Test Cases for Web Applications Presented by: Beverly Leung Fahim Rahman.
Introduction. 2COMPSCI Computer Science Fundamentals.
Chapter 10 Strings, Searches, Sorts, and Modifications Midterm Review By Ben Razon AP Computer Science Period 3.
Inferring Temporal Properties of Finite-State Machines with Genetic Programming GECCO’15 Student Workshop July 11, 2015 Daniil Chivilikhin PhD student.
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
CONDITIONAL STATEMENTS OVERVIEW.  Many times we want programs to make decisions  What drink should we dispense from the vending machine?  Should we.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
Predictive Design Space Exploration Using Genetically Programmed Response Surfaces Henry Cook Department of Electrical Engineering and Computer Science.
University of Paderborn Software Engineering Group Prof. Dr. Wilhelm Schäfer Towards Verified Model Transformations Holger Giese 1, Sabine Glesner 2, Johannes.
Fuzzy Genetic Algorithm
Copyright © 2010 Certification Partners, LLC -- All Rights Reserved Perl Specialist.
Inferring Automation Logic from Manual Control Scenarios: Implementation in Function Blocks ’15, Helsinki, Finland, August 21, 2015 Daniil Chivilikhin.
Chapter 2: General Problem Solving Concepts
CMP-MX21: Lecture 4 Selections Steve Hordley. Overview 1. The if-else selection in JAVA 2. More useful JAVA operators 4. Other selection constructs in.
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.
“Isolating Failure Causes through Test Case Generation “ Jeremias Rößler Gordon Fraser Andreas Zeller Alessandro Orso Presented by John-Paul Ore.
Project 2: Classification Using Genetic Programming Kim, MinHyeok Biointelligence laboratory Artificial.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
Coevolutionary Automated Software Correction Josh Wilkerson PhD Candidate in Computer Science Missouri S&T.
Automated discovery in math Machine learning techniques (GP, ILP, etc.) have been successfully applied in science Machine learning techniques (GP, ILP,
Solving Function Optimization Problems with Genetic Algorithms September 26, 2001 Cho, Dong-Yeon , Tel:
Improving Support Vector Machine through Parameter Optimized Rujiang Bai, Junhua Liao Shandong University of Technology Library Zibo , China { brj,
Evolving RBF Networks via GP for Estimating Fitness Values using Surrogate Models Ahmed Kattan Edgar Galvan.
Higher Computing Science 2016 Prelim Revision. Topics to revise Computational Constructs parameter passing (value and reference, formal and actual) sub-programs/routines,
CS1010: Programming Methodology
Overview of Compilation Prepared by Manuel E. Bermúdez, Ph.D. Associate Professor University of Florida Programming Language Principles Lecture 2.
Model Transformation By Demonstration Yu Sun, Jules White, Jeff Gray This work funded in part by NSF CAREER award CCF CIS Dept. – University of.
Saint-Petersburg State University ITMO Automata-based Algorithms Visualization Framework Georgiy Korneev Computer Technology Department,
Random Test Generation of Unit Tests: Randoop Experience
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
Dynamic SQL Writing Efficient Queries on the Fly ED POLLACK AUTOTASK CORPORATION DATABASE OPTIMIZATION ENGINEER.
Lecture 1 Gunjeet kaur Dronacharya group of institutions.
Genetic Algorithm(GA)
Code Optimization Code produced by compilation algorithms can often be improved (ideally optimized) in terms of run-time speed and the amount of memory.
Algorithms and Problem Solving
CS239-Lecture 4 FlumeJava Madan Musuvathi Visiting Professor, UCLA
Sandeep Patil, Sayantan Bhadra, Valeriy Vyatkin
Topics Modeling with hardware description languages (HDLs).
Daniil Chivilikhin and Vladimir Ulyantsev
Learning Software Behavior for Automated Diagnosis
MultiRefactor: Automated Refactoring To Improve Software Quality
VLSI Testing Lecture 6: Fault Simulation
Artificial Intelligence Project 2 Genetic Algorithms
VLSI Testing Lecture 6: Fault Simulation
Topics Modeling with hardware description languages (HDLs).
*current controlled assessment plans are unknown
اختر أي شخصية واجعلها تطير!
Daniil Chivilikhin, Igor Buzhinsky, Vladimir Ulyantsev,
Algorithms and Problem Solving
Seating “chart” Front Back 4 rows 5 rows 5 rows 4 rows 2 rows 2 rows
Presentation transcript:

Reconstruction of Function Block Logic using Metaheuristic Algorithm: Initial Explorations INDIN ’15, Cambridge, UK, July 23, 2015 Daniil Chivilikhin PhD student ITMO University Sandeep Patil PhD student Luleå University of Technology Anatoly Shalyto Dr. Sci., professor ITMO University Valeriy Vyatkin Dr. Eng., professor Luleå University of Technology, Aalto University, ITMO University

Presentation given by Igor Buzhinsky PhD student ITMO University 2/34 Igor Buzhinsky PhD student ITMO University

Motivation Migration from legacy code to IEC Existing approaches assume that source code is available What if source code is lost? there are no engineers that could quickly understand the code? 3/34

Problem statement Reconstruct Function Block Logic without using code Inputs FB Outputs Reconstruction algorithm Reconstructed FB 4/34

IEC function blocks Execution Control Chart (ECC)Function block interface 5/34

IEC Execution Control Chart 6/34 states

IEC Execution Control Chart Guard conditions Boolean formulas input/output variables internal variables constants 7/34

IEC Execution Control Chart Algorithms Change output variables 8/34

Simplifications No input/output events (only REQ and CNF) Only Boolean input/output variables Guard conditions only input variables 9/34

Proposed approach 10/34

Execution scenario List of scenario elements Scenario element = Scenario example ; ; 11/34

Recording execution scenarios Automated refactoring Target function block 12/34

ECC construction algorithm (1) Parallel MuACO algorithm [Chivilikhin et al, 2014] Metaheuristic Search-based optimization Explore search space in a randomized way 13/34

ECC construction algorithm (2) 1.Start with random solution 2.Build new solutions with mutation operators 3.Evaluate new solutions with fitness function 14/34

ECC construction algorithm (3) Parameterized by Solution representation (model) Mutation operators Fitness function 15/34

ECC model Set of states Each state – set of transition groups Each group Variable significance mask Reduced transition table Does not include algoritms 16/34

ECC model Set of states Each state – set of transition groups Each group Variable significance mask Reduced transition table Algorithms are not included 17/34

Algorithm representation Algorithms are strings over {‘0’, ‘1’, ‘x’} a i =‘0’: set z i =0 a i =‘1’: set z i =1 a i =‘x’: preserve value of z i 18/34

Mutation operators Operator #1: Change transition end state Pick a random transition Change the state it points to Operator #2: Add/delete transitions Add random transition to a state Delete random transition 19/34

Mutation operator #3: Add significant variable 20/34

Mutation operator #4: Delete significant variable 21/34

Candidate model evaluation Candidate model Scenarios State labeling Model + algorithms Fitness function 22/34

State labeling: determine appropriate algorithms Run scenarios through ECC For each state and each output variable a i =‘0’ 23/34 ChangeAlgorithmFrequency 0 → 1‘1’37 1 → 0‘0’58 0 → 0‘0’0 1 → 1‘1’0

Fitness function Run scenarios through ECC F = 0.9 F ed F fe F sc F ed – edit distance between scenario outputs and candidate solution outputs F fe – position of first error in outputs F sc – number of times the ECC changed to a new state 24/34

Experiments: Pick-n-Place manipulator 25/34

Target ECC: CentralizedControl 9 states 14 transitions 26/34

Experiment setup 10 tests: order of work piece deployment 1, 1-2, 2-3, 3-2-1, … Models allowed to have 10 states 4 transition groups in each state 27/34

Experiment protocol Reconstruct ECC Convert to XML Simulate in FBDK Convert to Java & compile 28/34

Results Used 16 cores of 64-core AMD Opteron™ 2.4 Ghz Experiment was repeated 20 times Average of 4.5 hours to infer perfect ECC from 30 minutes to 10 hours All ECCs work correctly in simulation On longer test cases: OK 29/34

Inferred ECC example 30/34

Conclusion Proposed an approach for reconstructing FB logic that does not require source code Performed sanity-check experiments of the proposed approach – it works 31/34

Future work Augment model with input/output events Handle other types of variables (int, real, string, …) Switch to inferring ECCs from expert data Preliminary ISPA’15 in August 32/34

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

Thank you for your attention! Daniil Chivilikhin Sandeep Patil Anatoly Shalyto Valeriy Vyatkin

ECC model: representing guard conditions Issue: large number of input variables Solution: reduced tables approach [Polikarpova et al, 2010] variable significance mask Only supports simple formulas x 1 ∧ ¬x 2 ∧ x 3 35

ECC model: representing guard conditions Need to support general-form formulas For example: x 1 ∧ (¬x 2 ∨ ¬x 3 ) Represent in DNF (x 1 ∧ ¬x 2 ) ∨ (x 1 ∧ ¬x 3 ) Use several reduced tables per state significant x 1 and x 2 significant x 1 and x 3 36

Model simplification Data should be explained by the simplest possible model Remove unused transitions Simplify guard conditions 6 -> 5 ["REQ [c1Home & !c1End & vcEnd & !pp2]"]; 6 -> 5 ["REQ [c1Home & !c1End & vcEnd & pp2] "]; 7 -> 0 ["REQ [vcHome & !vac]"]; 7 -> 3 ["REQ [vcHome & vac]"]; 8 -> 7 ["REQ [!c1End & c2End]"]; 8 -> 7 [“REQ [c1End & !c2End]"]; 8 -> 7 ["REQ [c1End & c2End]"]; 9 -> 1 [“REQ [c2End & vcHome & !vac]"]; 6 -> 5 ["REQ [vcEnd]"]; 7 -> 0 ["REQ [vcHome & !vac]"]; 7 -> 3 ["REQ [vcHome & vac]"]; 8 -> 7 ["REQ [!c2End]"]; 8 -> 7 ["REQ [c2End]"]; 9 -> 1 ["REQ [c2End]"]; 37