120 likes | 256 Views
Heuristics for Improving Model Learning Based Testing. Muhammad Naeem Irfan VASCO-LIG, Computer Science Lab, Grenoble Universities, 38402 Saint Martin d’Hères. Introduction. Component Based Software Engineering. Formal models of such components is missing
E N D
Heuristics for Improving Model Learning Based Testing Muhammad Naeem Irfan VASCO-LIG, Computer Science Lab, Grenoble Universities, 38402 Saint Martin d’Hères
Introduction • Component Based Software Engineering • Formal models of such components is missing • Methods to construct the model from source code are available • Source code for components (black boxes) is most often missing • Construct the model by sending inputs and observing outputs
Introduction • Reverse engineering models Learn model Observe outputs for inputs Learner Black Box Tester Test model Learned Model
Angluin Style Learning Input set I Observe outputs • Complexity O( |I|² nm+ |I| m n²) • I : the size of the input set • n : the number of states in the actual machine • m : the length of the longest counterexample • Method by Shahbaz to process the counterexampleO( |I|² n + |I| m n²) Algorithm Perform test Send inputs “OK” or Counterexample Learnt Model Oracle
Problem Statement Input set I Observe outputs • The length of counterexample m is important parameter for the complexity • Oracle is of low quality • How we can reduce relying on the quality of counterexample • Process the counterexample more efficiently Algorithm Perform test Send inputs “OK” or Counterexample Learnt Model Oracle
Learning Black Box Discriminating Sequences b/y a/x Black Box q0 q2 b/y States b/x a/x a/x Equivalent States q1 Observation Table Conjecture a/x b/y Counterexample: a b a b a a b q0 x y x y x x y Conjecture: x y x y x x x Black Box:
Processing the Counterexample Counterexample: b a b a a b a babaab abaab baab aab ab ab Discriminating Sequences Discriminating Sequences States Eq. States Observation Table (Previous Method) Observation Table (New Method)
Difference between Algorithms Processing the Counterexample a b a b a a b Add suffixes to Discriminating Sequencesuntil new state is identified 21 49 Observation Table after processing counterexample with previous method Observation Table after processing counterexample
Edinburg Concurrency Workbench Results CWB Examples Tests Counterexamples • Gain for number of tests conducted • Lose for the number of counter examples processed
Comparison of two Methods • New method less number of discriminating sequences • Previous method processing all the discriminating sequences • Worst case complexity is same • Gain for processing the Counterexample from Random Walk method
Perspectives • Find efficient heuristics to bring down the average complexity of algorithm • Process the counterexamples • Processing sparse tables • How to deal with the abstractions to be made on actual interactions with black box components • How to perform random walks to get the counterexample