Model-Based Testing: Testing from Finite State Machines

Size: px
Start display at page:

Download "Model-Based Testing: Testing from Finite State Machines"

Transcription

1 Model-Based Testing: Testing from Finite State Machines Mohammad Mousavi University of Leicester, UK IPM Summer School 2017 Mousavi FSM-Based Testing IPM / 64

2 Finite State Machines Outline 1 Finite State Machines 2 Final State Identification 3 Initial State Identification 4 Conformance Testing 5 Machine Identification 6 Reversibility and Testing Mousavi FSM-Based Testing IPM / 64

3 Finite State Machines Context: FSM-Based Conformance Testing Problem Given an FSM spec M and a black-box implementation I, does I conform to M, i.e., does I implement the same output and transfer function as M? Mousavi FSM-Based Testing IPM / 64

4 Finite State Machines Context: Testing Finite-State Machines Problem Given an FSM spec M and a black-box implementation I, does I conform to M, i.e., does I implement the same output and transfer function as M? Solution: Complete Test Suite For each state s and input i in the spec: 1 bring the FSM to s, 2 apply i and observe the expected output o, and 3 check the target state s Mousavi FSM-Based Testing IPM / 64

5 Finite State Machines Context: Testing Finite-State Machines Problem Given an FSM spec M and a black-box implementation I, does I conform to M, i.e., does I implement the same output and transfer function as M? Solution: Complete Test Suite For each state s and input i in the spec: 1 bring the FSM to s, (final state identification) 2 apply i and observe the expected output o, and 3 check the target state s (initial state identification / verification ) Mousavi FSM-Based Testing IPM / 64

6 Finite State Machines Notations I ɛ : empty sequence next : target state after a sequence of inputs (naturally generalized to sets of states:next(s, x)) by definition:next(s, ɛ) = s a/1 b/1 s 1 s 2 b/1 s 3 Mousavi FSM-Based Testing IPM / 64

7 Finite State Machines Notations I ɛ : empty sequence next : target state after a sequence of inputs (naturally generalized to sets of states:next(s, x)) by definition:next(s, ɛ) = s next(s 1, bba) = next(next(s 1, b), ba) = next(s 2, ba) = next(next(s 2, b), a) = next(s 3, a) = s 3 a/1 b/1 b/1 s 1 s 2 s 3 Mousavi FSM-Based Testing IPM / 64

8 Finite State Machines Notations II output : action sequence after a sequence of inputs (generalized to sets of states:output(s, x)) assumption: output(s, ɛ) = ɛ b/1 s 1 a/1 s 2 b/1 s 3 Mousavi FSM-Based Testing IPM / 64

9 Finite State Machines Notations II output : action sequence after a sequence of inputs (generalized to sets of states:output(s, x)) assumption: output(s, ɛ) = ɛ output(s 1, bba) = output(s 1, b) output(next(s 1, b), ba) = 1 output(s 2, ba) = 1 output(s 2, b) output(next(s 2, b), a) = 1 1 output(s 3, a) = a/1 b/1 b/1 s 1 s 2 s 3 Mousavi FSM-Based Testing IPM / 64

10 Final State Identification Outline 1 Finite State Machines 2 Final State Identification 3 Initial State Identification 4 Conformance Testing 5 Machine Identification 6 Reversibility and Testing Mousavi FSM-Based Testing IPM / 64

11 Final State Identification Final State Identification Problem: Given an FSM, we do not know which state it is in Solution: Perform a test (homing sequence), observe output sequence and determine the final state of the machine An FSM is reduced when each two different states can show different output on at least one sequence of inputs Mousavi FSM-Based Testing IPM / 64

12 Final State Identification Final State Identification Problem: Given an FSM, we do not know which state it is in Solution: Perform a test (homing sequence), observe output sequence and determine the final state of the machine An FSM is reduced when each two different states can show different output on at least one sequence of inputs Reduced FSM always has a homing sequence FSM that is not reduced may not have a homing sequence Mousavi FSM-Based Testing IPM / 64

13 Final State Identification Determining a homing sequence Algorithm: (for reduced machine) 1 let x = ɛ, Mousavi FSM-Based Testing IPM / 64

14 Final State Identification Determining a homing sequence Algorithm: (for reduced machine) 1 let x = ɛ, 2 while there exists a set B of states such that next(b, x) > 1 and for each two s, s B, output(s, x) = output(s, x), 1 take two states s, s next(b, x) (with s s ) 2 find a sequence y, separating s and s i.e., output(s, y) output(s, y) 3 x := x y 4 partition B into the subsets with the same output after x Mousavi FSM-Based Testing IPM / 64

15 Final State Identification Example s 1 b/1 s 2 b/1 s 3 a/1 Partition of S: {{s 1, s 2, s 3 }} Take B = {s 1, s 2, s 3 }, next(b, ɛ) = B. Take: s 1 and s 2 Mousavi FSM-Based Testing IPM / 64

16 Final State Identification Example s 1 b/1 s 2 b/1 s 3 a/1 Partition of S: {{s 1, s 2, s 3 }} Take B = {s 1, s 2, s 3 }, next(b, ɛ) = B. Take: s 1 and s 2 Separating sequence: a Output sequences: output(s 1, a) = output(s 3, a) = 0 and output(s 2, a) = 1 New partition: {{s 1, s 3 }, {s 2 }} Mousavi FSM-Based Testing IPM / 64

17 Final State Identification Example s 1 b/1 s 2 b/1 s 3 a/1 Partition of S: {{s 1, s 3 }, {s 2 }} Take B = {s 1, s 3 }, next(b, a) = B. Take: s 1 and s 3. Separating sequence: b Output sequences: output(s 1, b) = 1 and output(s 3, b) = 0 New partition: {{s 1 }, {s 3 }, {s 2 }} Mousavi FSM-Based Testing IPM / 64

18 Final State Identification Example s 1 b/1 s 2 b/1 s 3 a/1 Partition of S: {{s 1 }, {s 3 }, {s 2 }} Homing sequence: a b Mousavi FSM-Based Testing IPM / 64

19 Initial State Identification Outline 1 Finite State Machines 2 Final State Identification 3 Initial State Identification 4 Conformance Testing 5 Machine Identification 6 Reversibility and Testing Mousavi FSM-Based Testing IPM / 64

20 State identification Initial State Identification Problem: Given an FSM, can we determine the initial state of the FSM? An input sequence that solves this problem is a distinguishing sequence. Mousavi FSM-Based Testing IPM / 64

21 Initial State Identification Distinguishing sequence A distinguishing sequence for a machine is a rooted tree T with exactly S leaves such that internal nodes are labeled with input symbols leaves are labeled with states edges are labeled with output symbols for each node, the labels of the outgoing edges are different for each leaf, if x and y are input and output sequence on path from root to the leaf and the leaf is labeled by state s, then output(s, x) = y Mousavi FSM-Based Testing IPM / 64

22 Initial State Identification Example a/1 s 1 s 6 s 2 a/1 s 5 s 3 a/1 s 4 Mousavi FSM-Based Testing IPM / 64

23 Initial State Identification Example a/1 s 1 a 1 a 0 b 1 0 s 6 s 5 a/1 s 4 s 2 s 3 a/1 b a 1 0 s 6 0 b a 0 0 b 1 s 5 a 0 0 s 2 1 s 4 a 0 s 1 1 s 3 Mousavi FSM-Based Testing IPM / 64

24 Initial State Identification Non-existence of distinguishing sequence b/1 s 1 s 2 b/1 s 3 a/1 distinguishing sequence cannot start with a because then s 1 and s 2 are not distinguishable since from both s 1 is reached with output 0 distinguishing sequence cannot start with b because then s 2 and s 3 are not distinguishable since from both s 2 is reached with output 1 Mousavi FSM-Based Testing IPM / 64

25 Initial State Identification Existence of distinguishing sequence An input a is valid for a set C of states if it does not merge any two states s and s from C without distinguishing them, i.e., s,s C output(s, a) output(s, a) next(s, a) next(s, a) a/1 s 1 s 6 s 5 s 2 s 3 a/1 Input symbol b is not valid for set of states S Input symbol a is valid for set of states S a/1 s 4 Mousavi FSM-Based Testing IPM / 64

26 Initial State Identification Algorithm 1 Start with partition π of S with only one block {S}. 2 While there is a block B π with B > 1, 1 Take a valid input symbol a I for B such that two states s, s B (s s ), output(s, a) output(s, a) or move to states in different blocks of π, 2 refine the partition π by replacing block B by a set of new blocks, where two states in B are assigned to the same block in the new partition iff they produce the same output on a and move to the same block in π. Property An FSM has a distinguishing sequence iff the final partition contains singleton sets. Mousavi FSM-Based Testing IPM / 64

27 Initial State Identification Example a/1 s 1 s 6 s 2 Initial partition π = {S} Input symbol b is not valid s 5 s 3 a/1 Input symbol a is valid New partition: π = {{s 1, s 3, s 5 }, {s 2, s 4, s 6 }} a/1 s 4 Mousavi FSM-Based Testing IPM / 64

28 Initial State Identification Example a/1 s 6 s 5 s 1 s 2 s 3 a/1 Initial partition π = {{s 1, s 3, s 5 }, {s 2, s 4, s 6 }} Input symbol b is valid for {s 1, s 3, s 5 } New partition: π = {{s 1 }, {s 3, s 5 }, {s 2, s 4, s 6 }} a/1 s 4 Mousavi FSM-Based Testing IPM / 64

29 Initial State Identification Example a/1 s 6 s 5 s 1 s 2 s 3 a/1 Initial partition π = {{s 1 }, {s 3, s 5 }, {s 2, s 4, s 6 }} Input symbol a is valid for {s 2, s 4, s 6 } New partition: π = {{s 1 }, {s 3, s 5 }, {s 2, s 4 }, {s 6 }} a/1 s 4 Mousavi FSM-Based Testing IPM / 64

30 Initial State Identification Example a/1 s 6 s 5 s 1 s 2 s 3 a/1 Initial partition π = {{s 1 }, {s 3, s 5 }, {s 2, s 4 }, {s 6 }} Input symbol b is valid for {s 3, s 5 } New partition: π = {{s 1 }, {s 3 }, {s 5 }, {s 2, s 4 }, {s 6 }} a/1 s 4 Mousavi FSM-Based Testing IPM / 64

31 Initial State Identification Example s 6 s 5 a/1 s 1 Initial partition π = {{s 1 }, {s 3 }, {s 5 }, {s 2, s 4 }, {s 6 }} a/1 s 4 s 2 s 3 a/1 Input symbol a is valid for {s 2, s 4 } New partition: π = {{s 1 }, {s 3 }, {s 5 }, {s 2 }, {s 4 }, {s 6 }} Thus FSM has a distinguishing sequence Mousavi FSM-Based Testing IPM / 64

32 Initial State Identification Example a/1 s 1 s 6 s 2 a/1 Initial partition π = {{s 1 }, {s 3 }, {s 5 }, {s 2 }, {s 4 }, {s 6 }} Thus FSM has a distinguishing sequence s 5 s 3 a/1 s 4 Mousavi FSM-Based Testing IPM / 64

33 Initial State Identification Finite State Machines (recap) states: abstractions of the past, transitions: reactions to input by producing output and moving to a new state state transition function next: S I S output function output: S I O s 0 t/1 t/0 s 1 Mousavi FSM-Based Testing IPM / 64

34 Initial State Identification Finite State Machines (recap) states: abstractions of the past, transitions: reactions to input by producing output and moving to a new state state transition function next: S I S output function output: S I O next and output are generalized to sets of states and sequences of inputs. s 0 t/1 t/0 s 1 Mousavi FSM-Based Testing IPM / 64

35 Initial State Identification Finite State Machines (recap) states: abstractions of the past, transitions: reactions to input by producing output and moving to a new state state transition function next: S I S output function output: S I O next and output are generalized to sets of states and sequences of inputs. Assumption: FSM s are reduced, deterministic and complete. s 0 t/1 t/0 s 1 Mousavi FSM-Based Testing IPM / 64

36 Essential Notions Initial State Identification 1 Reduced FSM: for all distinct s, s S, there exists an x I such that output(s, x) output(s, x). I.e., x separates s and s. 2 Completeness: For each input a, and state s, there exists a s such that next(s, a) = s. 3 Determinism: For each input a, and state s, there exists at most one s such that next(s, a) = s. Mousavi FSM-Based Testing IPM / 64

37 Initial State Identification Equivalence 1 State equivalence: for s S and s S s s x I output(s, x) = output(s, x) 2 Machine equivalence M M s S s S s s s S s S s s Mousavi FSM-Based Testing IPM / 64

38 Conformance Testing Outline 1 Finite State Machines 2 Final State Identification 3 Initial State Identification 4 Conformance Testing 5 Machine Identification 6 Reversibility and Testing Mousavi FSM-Based Testing IPM / 64

39 Conformance Testing Five Fundamental Testing Problems 1 Determine the final state homing sequence: a testcase to reveal the final state Mousavi FSM-Based Testing IPM / 64

40 Conformance Testing Five Fundamental Testing Problems 1 Determine the final state homing sequence: a testcase to reveal the final state 2 State identification (identify the initial state) adaptive distinguishing sequence Mousavi FSM-Based Testing IPM / 64

41 Conformance Testing Five Fundamental Testing Problems 1 Determine the final state homing sequence: a testcase to reveal the final state 2 State identification (identify the initial state) adaptive distinguishing sequence 3 Conformance testing (is blackbox A equivalent to the FSM?) Mousavi FSM-Based Testing IPM / 64

42 Conformance Testing Five Fundamental Testing Problems 1 Determine the final state homing sequence: a testcase to reveal the final state 2 State identification (identify the initial state) adaptive distinguishing sequence 3 Conformance testing (is blackbox A equivalent to the FSM?) 4 Machine identification (derive the FSM from a blackbox) Mousavi FSM-Based Testing IPM / 64

43 Conformance Testing Basic Idea Specification: FSM A Implementation: A blackbox B, only input-output observable Problem: given the specification determine a testcase (a sequence of inputs) to determine whether A B (Also called: fault detection, machine testing) Mousavi FSM-Based Testing IPM / 64

44 Conformance Testing Basic Idea Specification: FSM A Implementation: A blackbox B, only input-output observable Problem: given the specification determine a testcase (a sequence of inputs) to determine whether A B (Also called: fault detection, machine testing) Challenge: for each testcase t, B can always behave the same as A up to t Mousavi FSM-Based Testing IPM / 64

45 Conformance Testing Example specification: s 0 Mousavi FSM-Based Testing IPM / 64

46 Conformance Testing Example specification: s 0 suppose that sequence a n is the testcase (the answer to the conformance testing problem) Mousavi FSM-Based Testing IPM / 64

47 Conformance Testing Example specification: s 0 suppose that sequence a n is the testcase (the answer to the conformance testing problem) for any n, some incorrect implementation may pass the test: n s 0 s n s n a/1 Mousavi FSM-Based Testing IPM / 64

48 Conformance Testing Simplifying Assumptions Assumptions on A strongly connected: (testcase long enough each state visited) reduced: (equivalence: interesting / efficient on reduced FSMs) s 0 t/1 t/0 s 1 Mousavi FSM-Based Testing IPM / 64

49 Conformance Testing Simplifying Assumptions Assumptions on A strongly connected: (testcase long enough each state visited) reduced: (equivalence: interesting / efficient on reduced FSMs) A has the following transitions set(j)/0: a transition from each state to state j, status/i: a self-loop indicating the current state set(0) /0 set(0)/0 t/0 status/1 s 0 s 1 t/1 status/0 set(1) /0 set(1)/0 Last assumption: only for convenience; to be dropped later. Mousavi FSM-Based Testing IPM / 64

50 Conformance Testing Simplifying Assumptions Assumptions on B constant FSM (should not change; should be finite) at most S A states (an upper bound is needed; here, only transfer and output faults tested no new states due to faults) Mousavi FSM-Based Testing IPM / 64

51 Conformance Testing Fault Model set(0)/0 status/0 set(0)/0 status/0 set(0)/0 status/0 s 0 s 0 s 0 set(0) /0 t/0 t/1 set(1) /0 set(0) /0 t/0 t/1 set(1) /0 status/1 set(0) /0 t/1 t/1 set(1) /0 s 1 s 1 s 1 status/1 set(1)/0 set(1)/0 status/1 set(1)/0 Specification Transfer Fault Output Fault Mousavi FSM-Based Testing IPM / 64

52 Conformance Testing Basic Algorithm For each state s and input a in A: set the state to s, supply input a and check in B whether 1 output is output(s, a), and 2 the target is next(s, a). N.B. all transitions are covered by the algorithm (a transition tour is taken). Mousavi FSM-Based Testing IPM / 64

53 Conformance Testing Basic Algorithm For each state s and input a in A: set the state to s, using set(s) supply input a and check in B whether 1 output is output(s, a) (observe the output), and 2 the target is next(s, a) (supply status and observe the output). N.B. all transitions are covered by the algorithm (a transition tour is taken). Mousavi FSM-Based Testing IPM / 64

54 Conformance Testing Example testcase: set(0), status, status, status, rst, status, t, status, set(1), status, status, status, t, status, set(1), rst, status, set(1), set(0), status set(0)/0 status/0 s 0 set(0) /0 t/0 t/1 set(1) /0 s 1 status/1 set(1)/0 Specification 0,0, 0,0, 0, 0, 1, 1, 0,1, 1,1, 0, 0, 0,0,0, 0,0,0 Mousavi FSM-Based Testing IPM / 64

55 Conformance Testing Example testcase: set(0), status, status, status, rst, status, t, status, set(1), status, status, status, t, status, set(1), rst, status, set(1), set(0), status set(0)/0 status/0 set(0) /0 t/0 s 0 t/1 set(1) /0 set(0)/0 set(0) /0 t/0 s 0 t/1 status/0 set(1) /0 set(0)/0 s 0 status/1 set(0) t/1 /0 t/1 status/0 set(1) /0 s 1 s 1 s 1 status/1 set(1)/0 set(1)/0 status/1 Specification Transfer Fault Output Fault 0,0, 0,0, 0, 0, 1, 1, 0,1, 1,1, 0, 0, 0,0,0, 0,0,0 set(1)/0 Mousavi FSM-Based Testing IPM / 64

56 Conformance Testing Example testcase: set(0), status, status, status, rst, status, t, status, set(1), status, status, status, t, status, set(1), rst, status, set(1), set(0), status set(0)/0 status/0 set(0) /0 t/0 s 0 t/1 set(1) /0 set(0)/0 set(0) /0 t/0 s 0 t/1 status/0 set(1) /0 set(0)/0 s 0 status/1 set(0) t/1 /0 t/1 status/0 set(1) /0 s 1 s 1 s 1 status/1 set(1)/0 set(1)/0 status/1 Specification Transfer Fault Output Fault 0,0, 0,0, 0, 0, 1, 1, 0,1, 0,0, 0, 0, 0, 0, 1,1, 0,1, set(1)/0 1,1, 0, 0, 0,0,0, 0,0,0 1, 0, 1,1, 0,0,0 0,0,0 Mousavi FSM-Based Testing IPM / 64

57 Conformance Testing Example testcase: set(0), status, status, status, rst, status, t, status, set(1), status, status, status, t, status, set(1), rst, status, set(1), set(0), status set(0)/0 status/0 set(0) /0 t/0 s 0 t/1 set(1) /0 set(0)/0 set(0) /0 t/0 s 0 t/1 status/0 set(1) /0 set(0)/0 s 0 status/1 set(0) t/1 /0 t/1 status/0 set(1) /0 s 1 s 1 s 1 status/1 set(1)/0 set(1)/0 status/1 set(1)/0 Specification Transfer Fault Output Fault 0,0, 0,0, 0, 0, 1, 1, 0,1, 0,0, 0, 0, 0, 0, 1,1, 0,1,0,0, 0, 0, 0, 0, 1,1, 0,1, 1,1, 0, 0, 0,0,0, 0,0,0 1, 0, 1,1, 0,0,0 0,0,0 1,1, 1, 0, 0,0,0 0,0,0 Mousavi FSM-Based Testing IPM / 64

58 Conformance Testing Transfer Sequence FSM s usually have no set(j): use homing sequence and transfer sequences A transfer sequence τ(i, j): next(s i, τ(s i, s j )) = s j τ(i, j) need not be unique; the shortest path can be found efficiently Examples: HS = rst τ(0, 1) = t, τ(1, 0) = t or rst. s 0 t/1 t/0 status/1 s 1 status/0 Mousavi FSM-Based Testing IPM / 64

59 Conformance Testing Algorithm with Transfer/Homing Sequences 1 Go to a known final state s 2 For each state s and input a in A: set the state from s (the current known state) to s, supply input a and check in B whether 1 output is output(s, a), and 2 the target is next(s, a) Mousavi FSM-Based Testing IPM / 64

60 Conformance Testing Algorithm with Transfer/Homing Sequences 1 Go to a known final state s (using the homing sequence) 2 For each state s and input a in A: set the state from s (the current known state) to s, using τ(s, s) supply input a and check in B whether 1 output is output(s, a) (observe the output), and 2 the target is next(s, a) (supply status and observe the output, if successful let s = next(s, a)) Mousavi FSM-Based Testing IPM / 64

61 Conformance Testing Example testcase: first supply HS = rst, then supply ts, where: ts = status, status, rst, status, t, status, status, status, rst, status, t, t, status t/0 status/0 s 0 t/1 t/0 s 0 t/1 status/0 status/1 t/1 s 0 t/1 status/0 s 1 s 1 status/1 s 1 status/1 Specification Transfer Fault Output Fault 0, 0,0, 0,0, 1,1, 0, 0,0, 0, 0, 1,1, 0, 0,0, 0,0, 1,1, 1,1, 0,0, 1,0,0 1,0,, 0,0, 1,0,0 1,1, 0,0, 1,1,0 Mousavi FSM-Based Testing IPM / 64

62 Status, Realistic? Conformance Testing Sometimes present: registers in hardware, state dumps (logs) in protocols Usually not: let s do without them and apply state identification (e.g., preset or adaptive distinguishing sequence) Challenge: distinguishing sequences change the state Mousavi FSM-Based Testing IPM / 64

63 Conformance Testing Algorithm with Nuts and Bolts 1 Go to a known final state s 0 (homing sequence) Mousavi FSM-Based Testing IPM / 64

64 Conformance Testing Algorithm with Nuts and Bolts 1 Go to a known final state s 0 (homing sequence) 2 Take a sequence of all states s 0,..., s n+1, where s 0 = s n+1. (state tour or state cover seq.) and let i = 0: 1 supply the DS and check if FSM is in s i, 2 FSM is in t i (due to DS), supply τ(t i, s i+1 ) and repeat for i := i + 1, until i = n + 1 Mousavi FSM-Based Testing IPM / 64

65 Conformance Testing Algorithm with Nuts and Bolts 1 Go to a known final state s 0 (homing sequence) 2 Take a sequence of all states s 0,..., s n+1, where s 0 = s n+1. (state tour or state cover seq.) and let i = 0: 1 supply the DS and check if FSM is in s i, 2 FSM is in t i (due to DS), supply τ(t i, s i+1 ) and repeat for i := i + 1, until i = n For each state s i and input label a, (assuming that current state is s j ) 1 supply τ(s, j s i 1), DS, τ(t i 1, s i ), take yourself back to the safe path, 2 supply the input a, DS and check whether the output is output(s i, a) and FSM is in next(s i, a), the current state is s (due to a, DS) j+1 N.B. In step 3.1, one may apply τ(t i 1, s i ), if s j = t i 1 and skip the step if s j = s i. Mousavi FSM-Based Testing IPM / 64

66 Conformance Testing Example s 0 s 0 t/0 t/1 t/1 t/1 s 1 s 1 Specification Output Fault Mousavi FSM-Based Testing IPM / 64

67 Conformance Testing Example testcase: first supply HS = rst, output = 0 (no other choice!), then supply the state tour: t, t, then start testing t, t, rst, t, t, t, rst, t s 0 s 0 t/0 t/1 t/1 t/1 s 1 s 1 Specification Output Fault 0, 1, 0, 1, 0, 0, 1, 0,1 0, 1 Mousavi FSM-Based Testing IPM / 64

68 Conformance Testing Example testcase: first supply HS = rst, output = 0 (no other choice!), then supply the state tour: t, t, then start testing t, t, rst, t, t, t, rst, t s 0 s 0 t/0 t/1 t/1 t/1 s 1 s 1 Specification Output Fault 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0,1 0, 1 1, 1, 0,1, 1, 1, 0, 1 Mousavi FSM-Based Testing IPM / 64

69 Conformance Testing Example s 0 s 0 b/1 b/1 a/1 a/1 s 1 s 2 s 1 s 2 Specification Transfer Fault Mousavi FSM-Based Testing IPM / 64

70 Conformance Testing Solution Homing sequence: ba observed output target state s 2 s 0 s 2 Adaptive distinguishing sequences: DS(s 0 ) = aa, output(s 0, aa) = 00 DS(s 1 ) = aa, output(s 1, aa) = 01 DS(s 2 ) = a, output(s 2, a) = 1 Mousavi FSM-Based Testing IPM / 64

71 Machine Identification Outline 1 Finite State Machines 2 Final State Identification 3 Initial State Identification 4 Conformance Testing 5 Machine Identification 6 Reversibility and Testing Mousavi FSM-Based Testing IPM / 64

72 Machine Identification Basic Idea Implementation: A blackbox B, only input-output observable Problem: by applying a testcase (a sequence of inputs) determine an FSM A such that A = B Same challenges as in conformance checking: B should be strongly connected, finite and constant. But that is not all... Mousavi FSM-Based Testing IPM / 64

73 Machine Identification Simple solution Construct all different reduced and strongly connected FSM s with n states and I B and O B as inputs and outputs, Use conformance testing: find the one conforming to B! Mousavi FSM-Based Testing IPM / 64

74 Machine Identification Towards Automata Learning State-space explosion: with n states, p inputs and q outputs, (nq) np /n! machines 2 states, 2 inputs, 2 outputs, 256 machines! Possible Solutions: Run all possible machines simultaneously (construct direct sum machines) Use machine learning: have an oracle which provides a test-case for each failure Mousavi FSM-Based Testing IPM / 64

75 Machine Identification Towards Automata Learning Mousavi FSM-Based Testing IPM / 64

76 Reversibility and Testing Outline 1 Finite State Machines 2 Final State Identification 3 Initial State Identification 4 Conformance Testing 5 Machine Identification 6 Reversibility and Testing Mousavi FSM-Based Testing IPM / 64

77 Reversibility and Testing State Verification and Reversibility UIO sequence A UIO sequence for a state s is a walk ρ such that ρ produces different output sequence from s than from any other state s. Mousavi FSM-Based Testing IPM / 64

78 Reversibility and Testing State Verification and Reversibility UIO sequence A UIO sequence for a state s is a walk ρ such that ρ produces different output sequence from s than from any other state s. Hardness of State Verification Checking the existence of UIO Sequences is PSPACE-complete. Mousavi FSM-Based Testing IPM / 64

79 Reversibility and Testing State Verification and Reversibility UIO sequence A UIO sequence for a state s is a walk ρ such that ρ produces different output sequence from s than from any other state s. Hardness of State Verification Checking the existence of UIO Sequences is PSPACE-complete. General Idea Once a UIO sequence for a given state is found, one can construct UIOs for other states by taking transitions backwards. Mousavi FSM-Based Testing IPM / 64

80 Reversibility and Testing State Verification and Reversibility General Idea Once a UIO sequence for a given state is found, one can construct UIOs for other states by taking backward transitions. Mousavi FSM-Based Testing IPM / 64

81 Reversibility and Testing State Verification and Reversibility General Idea Once a UIO sequence for a given state is found, one can construct UIOs for other states by taking backward transitions. Mousavi FSM-Based Testing IPM / 64

82 Reversibility and Testing State Verification and Reversibility General Idea Once a UIO sequence for a given state is found, one can construct UIOs for other states by taking backward transitions. Mousavi FSM-Based Testing IPM / 64

83 Reversibility and Testing State Verification and Reversibility General Idea Once a UIO sequence for a given state is found, one can construct UIOs for other states by taking backward transitions. Empirical Evidence In 89% of the cases, UIOs can be constructed using invertible sequences from the UIO of a state. [Hierons and Turker, IEEE TSE 15] Mousavi FSM-Based Testing IPM / 64

84 Reversibility and Testing Chasing Invertible Sequences Mousavi FSM-Based Testing IPM / 64

85 Reversibility and Testing Chasing Invertible Sequences Mousavi FSM-Based Testing IPM / 64

86 Reversibility and Testing Chasing Invertible Sequences Mousavi FSM-Based Testing IPM / 64

87 Reversibility and Testing Invertible sequences and Testing Our order of business Finding a set of states S with UIO sequences; finding maximal (number of) invertible sequences to S. Mousavi FSM-Based Testing IPM / 64

88 Reversibility and Testing Invertible sequences and Testing Our order of business Finding a set of states S with UIO sequences; finding maximal (number of) invertible sequences to S. Proper invertible sequences and UIO sequence An invertible sequence ρ is proper when all its suffixes are invertible sequences. Mousavi FSM-Based Testing IPM / 64

89 Reversibility and Testing Our Past Results in a Nutshell Criteria: Maximizing the Number of Visited States 1 Finding the longest proper invertible sequences: NP-Complete 2 Finding spanning trees of invertible sequences: NP-Complete 3 Finding sets of invertible sequences: PSPace-Complete [Hierons, Kirkedal, MRM, Türker. SOFSEM 17] Mousavi FSM-Based Testing IPM / 64

90 Reversibility and Testing Ongoing Work Finding long invertible sequences Idea: 1 Project the FSM into an properly invertible sub-fsm 2 Reverse the invertible sub-fsms 3 Perform breadth-first search from the state(s) with UIOs 4 For the remaining states (without a proper invertible sequence), perform a subset construction (guided by heuristics) to find invertible sequences Mousavi FSM-Based Testing IPM / 64

Using a Minimal Number of Resets when Testing from a Finite State Machine

Using a Minimal Number of Resets when Testing from a Finite State Machine Using a Minimal Number of Resets when Testing from a Finite State Machine R. M. Hierons a a Department of Information Systems and Computing, Brunel University, Uxbridge, Middlesex, UB8 3PH, United Kingdom

More information

Homing and Synchronizing Sequences

Homing and Synchronizing Sequences Homing and Synchronizing Sequences Sven Sandberg Information Technology Department Uppsala University Sweden 1 Outline 1. Motivations 2. Definitions and Examples 3. Algorithms (a) Current State Uncertainty

More information

Testing from a Finite State Machine: An introduction 1

Testing from a Finite State Machine: An introduction 1 Testing from a Finite State Machine: An introduction 1 The use of Finite State Machines (FSM) to model systems has lead to much interest in deriving tests from them. Having derived a test sequence from

More information

Describing Homing and Distinguishing Sequences for Nondeterministic Finite State Machines via Synchronizing Automata

Describing Homing and Distinguishing Sequences for Nondeterministic Finite State Machines via Synchronizing Automata Describing Homing and Distinguishing Sequences for Nondeterministic Finite State Machines via Synchronizing Automata Natalia Kushik and Nina Yevtushenko Tomsk State University, Russia 2 Motivation Relies

More information

PRINCIPLES AND METHODS OF TESTING FINITE STATE MACHINES A SURVEY. David Lee. Mihalis Yannakakis. AT&T Bell Laboratories Murray Hill, New Jersey

PRINCIPLES AND METHODS OF TESTING FINITE STATE MACHINES A SURVEY. David Lee. Mihalis Yannakakis. AT&T Bell Laboratories Murray Hill, New Jersey PRINCIPLES AND METHODS OF TESTING FINITE STATE MACHINES A SURVEY David Lee Mihalis Yannakakis AT&T Bell Laboratories Murray Hill, New Jersey ABSTRACT With advanced computer technology, systems are getting

More information

Model Based Testing -- FSM based testing

Model Based Testing -- FSM based testing Model Based Testing -- FSM based testing Brian Nielsen {bnielsen}@cs.aau.dk Automated Model Based Conformance Testing x>=2 Model DBLclick! click? x:=0 click? x

More information

DISTINGUISHABILITY RELATIONS BETWEEN INITIALIZED NONDETERMINISTIC FSMs. Nina Yevtushenko Tomsk State University, Russia April, 12, 2011

DISTINGUISHABILITY RELATIONS BETWEEN INITIALIZED NONDETERMINISTIC FSMs. Nina Yevtushenko Tomsk State University, Russia April, 12, 2011 DISTINGUISHABILITY RELATIONS BETWEEN INITIALIZED NONDETERMINISTIC FSMs Nina Yevtushenko Tomsk State University, Russia April, 12, 2011 Outline 1. Why do we need distinguishability relations? 2. External

More information

Testing Distributed Systems

Testing Distributed Systems Testing Distributed Systems R. M. Hierons Brunel University, UK rob.hierons@brunel.ac.uk http://people.brunel.ac.uk/~csstrmh Work With Jessica Chen Mercedes Merayo Manuel Nunez Hasan Ural Model Based Testing

More information

Embedded systems specification and design

Embedded systems specification and design Embedded systems specification and design David Kendall David Kendall Embedded systems specification and design 1 / 21 Introduction Finite state machines (FSM) FSMs and Labelled Transition Systems FSMs

More information

DISTINGUING NON-DETERMINISTIC TIMED FINITE STATE MACHINES

DISTINGUING NON-DETERMINISTIC TIMED FINITE STATE MACHINES DISTINGUING NON-DETERMINISTIC TIMED FINITE STATE MACHINES Maxim Gromov 1, Khaled El-Fakih 2, Natalia Shabaldina 1, Nina Yevtushenko 1 1 Tomsk State University, 36 Lenin Str.. Tomsk, 634050, Russia gromov@sibmail.com,

More information

Using Multiple Adaptive Distinguishing Sequences for Checking Sequence Generation

Using Multiple Adaptive Distinguishing Sequences for Checking Sequence Generation Using Multiple Adaptive Distinguishing Sequences for Checking Sequence Generation Canan Güniçen 1, Guy-Vincent Jourdan 2, and Hüsnü Yenigün 1 1 Sabanci University, Istanbul, Turkey {canangunicen,yenigun}@sabanciuniv.edu

More information

Equivalence of Regular Expressions and FSMs

Equivalence of Regular Expressions and FSMs Equivalence of Regular Expressions and FSMs Greg Plaxton Theory in Programming Practice, Spring 2005 Department of Computer Science University of Texas at Austin Regular Language Recall that a language

More information

A General Testability Theory: Classes, properties, complexity, and testing reductions

A General Testability Theory: Classes, properties, complexity, and testing reductions A General Testability Theory: Classes, properties, complexity, and testing reductions presenting joint work with Luis Llana and Pablo Rabanal Universidad Complutense de Madrid PROMETIDOS-CM WINTER SCHOOL

More information

School of Information Technology and Engineering University of Ottawa Ottawa, Canada

School of Information Technology and Engineering University of Ottawa Ottawa, Canada Using Adaptive Distinguishing Sequences in Checking Sequence Constructions Robert M. Hierons Guy-Vincent Jourdan Hasan Ural Husnu Yenigun School of Information Systems, Computing and Mathematics Brunel

More information

TESTING is one of the most important parts of the

TESTING is one of the most important parts of the IEEE TRANSACTIONS 1 Generating Complete Controllable Test Suites for Distributed Testing Robert M. Hierons, Senior Member, IEEE Abstract A test suite is m-complete for finite state machine (FSM) M if it

More information

Enhancing Active Automata Learning by a User Log Based Metric

Enhancing Active Automata Learning by a User Log Based Metric Master Thesis Computing Science Radboud University Enhancing Active Automata Learning by a User Log Based Metric Author Petra van den Bos First Supervisor prof. dr. Frits W. Vaandrager Second Supervisor

More information

Foreword. Grammatical inference. Examples of sequences. Sources. Example of problems expressed by sequences Switching the light

Foreword. Grammatical inference. Examples of sequences. Sources. Example of problems expressed by sequences Switching the light Foreword Vincent Claveau IRISA - CNRS Rennes, France In the course of the course supervised symbolic machine learning technique concept learning (i.e. 2 classes) INSA 4 Sources s of sequences Slides and

More information

Data Structures in Java

Data Structures in Java Data Structures in Java Lecture 21: Introduction to NP-Completeness 12/9/2015 Daniel Bauer Algorithms and Problem Solving Purpose of algorithms: find solutions to problems. Data Structures provide ways

More information

Using Distinguishing and UIO Sequences Together in a Checking Sequence

Using Distinguishing and UIO Sequences Together in a Checking Sequence Using Distinguishing and UIO Sequences Together in a Checking Sequence M.CihanYalcinandHusnuYenigun Faculty of Engineering and Natural Sciences, Sabanci University, Tuzla 34956, Istanbul, Turkey Abstract.

More information

Automata, Logic and Games: Theory and Application

Automata, Logic and Games: Theory and Application Automata, Logic and Games: Theory and Application 1. Büchi Automata and S1S Luke Ong University of Oxford TACL Summer School University of Salerno, 14-19 June 2015 Luke Ong Büchi Automata & S1S 14-19 June

More information

Abstractions and Decision Procedures for Effective Software Model Checking

Abstractions and Decision Procedures for Effective Software Model Checking Abstractions and Decision Procedures for Effective Software Model Checking Prof. Natasha Sharygina The University of Lugano, Carnegie Mellon University Microsoft Summer School, Moscow, July 2011 Lecture

More information

Peter Wood. Department of Computer Science and Information Systems Birkbeck, University of London Automata and Formal Languages

Peter Wood. Department of Computer Science and Information Systems Birkbeck, University of London Automata and Formal Languages and and Department of Computer Science and Information Systems Birkbeck, University of London ptw@dcs.bbk.ac.uk Outline and Doing and analysing problems/languages computability/solvability/decidability

More information

Peled, Vardi, & Yannakakis: Black Box Checking

Peled, Vardi, & Yannakakis: Black Box Checking Peled, Vardi, & Yannakakis: Black Box Checking Martin Leucker leucker@it.uu.se Department of Computer Systems,, Sweden Plan Preliminaries State identification and verification Conformance Testing Extended

More information

EEE2135 Digital Logic Design

EEE2135 Digital Logic Design EEE2135 Digital Logic Design Chapter 7. Sequential Circuits Design 서강대학교 전자공학과 1. Model of Sequential Circuits 1) Sequential vs. Combinational Circuits a. Sequential circuits: Outputs depend on both the

More information

arxiv: v3 [cs.fl] 2 Jul 2018

arxiv: v3 [cs.fl] 2 Jul 2018 COMPLEXITY OF PREIMAGE PROBLEMS FOR DETERMINISTIC FINITE AUTOMATA MIKHAIL V. BERLINKOV arxiv:1704.08233v3 [cs.fl] 2 Jul 2018 Institute of Natural Sciences and Mathematics, Ural Federal University, Ekaterinburg,

More information

Non-deterministic Finite Automata (NFAs)

Non-deterministic Finite Automata (NFAs) Algorithms & Models of Computation CS/ECE 374, Fall 27 Non-deterministic Finite Automata (NFAs) Part I NFA Introduction Lecture 4 Thursday, September 7, 27 Sariel Har-Peled (UIUC) CS374 Fall 27 / 39 Sariel

More information

Compiler Design. Spring Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro Diniz

Compiler Design. Spring Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro Diniz Compiler Design Spring 2010 Lexical Analysis Sample Exercises and Solutions Prof. Pedro Diniz USC / Information Sciences Institute 4676 Admiralty Way, Suite 1001 Marina del Rey, California 90292 pedro@isi.edu

More information

Automata-based Verification - III

Automata-based Verification - III CS3172: Advanced Algorithms Automata-based Verification - III Howard Barringer Room KB2.20/22: email: howard.barringer@manchester.ac.uk March 2005 Third Topic Infinite Word Automata Motivation Büchi Automata

More information

Temporal logics and explicit-state model checking. Pierre Wolper Université de Liège

Temporal logics and explicit-state model checking. Pierre Wolper Université de Liège Temporal logics and explicit-state model checking Pierre Wolper Université de Liège 1 Topics to be covered Introducing explicit-state model checking Finite automata on infinite words Temporal Logics and

More information

Java II Finite Automata I

Java II Finite Automata I Java II Finite Automata I Bernd Kiefer Bernd.Kiefer@dfki.de Deutsches Forschungszentrum für künstliche Intelligenz November, 23 Processing Regular Expressions We already learned about Java s regular expression

More information

Einführung in die Computerlinguistik

Einführung in die Computerlinguistik Einführung in die Computerlinguistik Context-Free Grammars (CFG) Laura Kallmeyer Heinrich-Heine-Universität Düsseldorf Summer 2016 1 / 22 CFG (1) Example: Grammar G telescope : Productions: S NP VP NP

More information

Models of Computation. by Costas Busch, LSU

Models of Computation. by Costas Busch, LSU Models of Computation by Costas Busch, LSU 1 Computation CPU memory 2 temporary memory input memory CPU output memory Program memory 3 Example: f ( x) x 3 temporary memory input memory Program memory compute

More information

Automata-based Verification - III

Automata-based Verification - III COMP30172: Advanced Algorithms Automata-based Verification - III Howard Barringer Room KB2.20: email: howard.barringer@manchester.ac.uk March 2009 Third Topic Infinite Word Automata Motivation Büchi Automata

More information

Compiler Design. Spring Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Compiler Design. Spring Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz Compiler Design Spring 2011 Lexical Analysis Sample Exercises and Solutions Prof. Pedro C. Diniz USC / Information Sciences Institute 4676 Admiralty Way, Suite 1001 Marina del Rey, California 90292 pedro@isi.edu

More information

Deterministic Finite Automata (DFAs)

Deterministic Finite Automata (DFAs) CS/ECE 374: Algorithms & Models of Computation, Fall 28 Deterministic Finite Automata (DFAs) Lecture 3 September 4, 28 Chandra Chekuri (UIUC) CS/ECE 374 Fall 28 / 33 Part I DFA Introduction Chandra Chekuri

More information

Overview. Discrete Event Systems Verification of Finite Automata. What can finite automata be used for? What can finite automata be used for?

Overview. Discrete Event Systems Verification of Finite Automata. What can finite automata be used for? What can finite automata be used for? Computer Engineering and Networks Overview Discrete Event Systems Verification of Finite Automata Lothar Thiele Introduction Binary Decision Diagrams Representation of Boolean Functions Comparing two circuits

More information

1 Introduction. 1.1 The Problem Domain. Self-Stablization UC Davis Earl Barr. Lecture 1 Introduction Winter 2007

1 Introduction. 1.1 The Problem Domain. Self-Stablization UC Davis Earl Barr. Lecture 1 Introduction Winter 2007 Lecture 1 Introduction 1 Introduction 1.1 The Problem Domain Today, we are going to ask whether a system can recover from perturbation. Consider a children s top: If it is perfectly vertically, you can

More information

Alan Bundy. Automated Reasoning LTL Model Checking

Alan Bundy. Automated Reasoning LTL Model Checking Automated Reasoning LTL Model Checking Alan Bundy Lecture 9, page 1 Introduction So far we have looked at theorem proving Powerful, especially where good sets of rewrite rules or decision procedures have

More information

Deterministic Finite Automata (DFAs)

Deterministic Finite Automata (DFAs) Algorithms & Models of Computation CS/ECE 374, Fall 27 Deterministic Finite Automata (DFAs) Lecture 3 Tuesday, September 5, 27 Sariel Har-Peled (UIUC) CS374 Fall 27 / 36 Part I DFA Introduction Sariel

More information

Intuitionistic Fuzzy Estimation of the Ant Methodology

Intuitionistic Fuzzy Estimation of the Ant Methodology BULGARIAN ACADEMY OF SCIENCES CYBERNETICS AND INFORMATION TECHNOLOGIES Volume 9, No 2 Sofia 2009 Intuitionistic Fuzzy Estimation of the Ant Methodology S Fidanova, P Marinov Institute of Parallel Processing,

More information

PSPACE-completeness of LTL/CTL model checking

PSPACE-completeness of LTL/CTL model checking PSPACE-completeness of LTL/CTL model checking Peter Lohmann April 10, 2007 Abstract This paper will give a proof for the PSPACE-completeness of LTLsatisfiability and for the PSPACE-completeness of the

More information

Hierarchical Overlap Graph

Hierarchical Overlap Graph Hierarchical Overlap Graph B. Cazaux and E. Rivals LIRMM & IBC, Montpellier 8. Feb. 2018 arxiv:1802.04632 2018 B. Cazaux & E. Rivals 1 / 29 Overlap Graph for a set of words Consider the set P := {abaa,

More information

Game Theory with Information: Introducing the Witsenhausen Intrinsic Model

Game Theory with Information: Introducing the Witsenhausen Intrinsic Model Game Theory with Information: Introducing the Witsenhausen Intrinsic Model Michel De Lara and Benjamin Heymann Cermics, École des Ponts ParisTech France École des Ponts ParisTech March 15, 2017 Information

More information

Complexity Bounds for Muller Games 1

Complexity Bounds for Muller Games 1 Complexity Bounds for Muller Games 1 Paul Hunter a, Anuj Dawar b a Oxford University Computing Laboratory, UK b University of Cambridge Computer Laboratory, UK Abstract We consider the complexity of infinite

More information

Graph-theoretic Problems

Graph-theoretic Problems Graph-theoretic Problems Parallel algorithms for fundamental graph-theoretic problems: We already used a parallelization of dynamic programming to solve the all-pairs-shortest-path problem. Here we are

More information

Learning of Bi-ω Languages from Factors

Learning of Bi-ω Languages from Factors JMLR: Workshop and Conference Proceedings 21:139 144, 2012 The 11th ICGI Learning of Bi-ω Languages from Factors M. Jayasrirani mjayasrirani@yahoo.co.in Arignar Anna Government Arts College, Walajapet

More information

More on NP and Reductions

More on NP and Reductions Indian Institute of Information Technology Design and Manufacturing, Kancheepuram Chennai 600 127, India An Autonomous Institute under MHRD, Govt of India http://www.iiitdm.ac.in COM 501 Advanced Data

More information

CS 6110 S16 Lecture 33 Testing Equirecursive Equality 27 April 2016

CS 6110 S16 Lecture 33 Testing Equirecursive Equality 27 April 2016 CS 6110 S16 Lecture 33 Testing Equirecursive Equality 27 April 2016 1 Equirecursive Equality In the equirecursive view of recursive types, types are regular labeled trees, possibly infinite. However, we

More information

Graph Theory and Optimization Computational Complexity (in brief)

Graph Theory and Optimization Computational Complexity (in brief) Graph Theory and Optimization Computational Complexity (in brief) Nicolas Nisse Inria, France Univ. Nice Sophia Antipolis, CNRS, I3S, UMR 7271, Sophia Antipolis, France September 2015 N. Nisse Graph Theory

More information

CSE 311 Lecture 23: Finite State Machines. Emina Torlak and Kevin Zatloukal

CSE 311 Lecture 23: Finite State Machines. Emina Torlak and Kevin Zatloukal CSE 3 Lecture 3: Finite State Machines Emina Torlak and Kevin Zatloukal Topics Finite state machines (FSMs) Definition and examples. Finite state machines with output Definition and examples. Finite state

More information

Temporal Logic. Stavros Tripakis University of California, Berkeley. We have designed a system. We want to check that it is correct.

Temporal Logic. Stavros Tripakis University of California, Berkeley. We have designed a system. We want to check that it is correct. EE 244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2016 Temporal logic Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE 244, Fall 2016

More information

Automata: a short introduction

Automata: a short introduction ILIAS, University of Luxembourg Discrete Mathematics II May 2012 What is a computer? Real computers are complicated; We abstract up to an essential model of computation; We begin with the simplest possible

More information

Introduction to Kleene Algebras

Introduction to Kleene Algebras Introduction to Kleene Algebras Riccardo Pucella Basic Notions Seminar December 1, 2005 Introduction to Kleene Algebras p.1 Idempotent Semirings An idempotent semiring is a structure S = (S, +,, 1, 0)

More information

Complexity: Some examples

Complexity: Some examples Algorithms and Architectures III: Distributed Systems H-P Schwefel, Jens M. Pedersen Mm6 Distributed storage and access (jmp) Mm7 Introduction to security aspects (hps) Mm8 Parallel complexity (hps) Mm9

More information

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016)

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016) FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016) The final exam will be on Thursday, May 12, from 8:00 10:00 am, at our regular class location (CSI 2117). It will be closed-book and closed-notes, except

More information

POLYNOMIAL SPACE QSAT. Games. Polynomial space cont d

POLYNOMIAL SPACE QSAT. Games. Polynomial space cont d T-79.5103 / Autumn 2008 Polynomial Space 1 T-79.5103 / Autumn 2008 Polynomial Space 3 POLYNOMIAL SPACE Polynomial space cont d Polynomial space-bounded computation has a variety of alternative characterizations

More information

2. Elements of the Theory of Computation, Lewis and Papadimitrou,

2. Elements of the Theory of Computation, Lewis and Papadimitrou, Introduction Finite Automata DFA, regular languages Nondeterminism, NFA, subset construction Regular Epressions Synta, Semantics Relationship to regular languages Properties of regular languages Pumping

More information

Finite-State Machines (Automata) lecture 12

Finite-State Machines (Automata) lecture 12 Finite-State Machines (Automata) lecture 12 cl a simple form of computation used widely one way to find patterns 1 A current D B A B C D B C D A C next 2 Application Fields Industry real-time control,

More information

A Simplified Approach for Testing Real-Time Systems Based on Action Refinement

A Simplified Approach for Testing Real-Time Systems Based on Action Refinement A Simplified Approach for Testing Real-Time Systems Based on Action Refinement Saddek Bensalem, Moez Krichen, Lotfi Majdoub, Riadh Robbana, Stavros Tripakis Verimag Laboratory, Centre Equation 2, avenue

More information

Testing Input/Output Partial Order Automata

Testing Input/Output Partial Order Automata Testing Input/Output Partial Order Automata Stefan Haar 1, Claude Jard 2, and Guy-Vincent Jourdan 3 1 IRISA/INRIA Rennes, France Stefan.Haar@irisa.fr 2 IRISA, ENS Cachan Bretagne Campus de Ker-Lann, F-35170

More information

Runtime Analysis of (1+1) EA on Computing Unique Input Output Sequences

Runtime Analysis of (1+1) EA on Computing Unique Input Output Sequences 1 Runtime Analysis of (1+1) EA on Computing Unique Input Output Sequences Per Kristian Lehre and Xin Yao Abstract Computing unique input output (UIO) sequences is a fundamental and hard problem in conformance

More information

NODIA AND COMPANY. GATE SOLVED PAPER Computer Science Engineering Theory of Computation. Copyright By NODIA & COMPANY

NODIA AND COMPANY. GATE SOLVED PAPER Computer Science Engineering Theory of Computation. Copyright By NODIA & COMPANY No part of this publication may be reproduced or distributed in any form or any means, electronic, mechanical, photocopying, or otherwise without the prior permission of the author. GATE SOLVED PAPER Computer

More information

Introduction to Languages and Computation

Introduction to Languages and Computation Introduction to Languages and Computation George Voutsadakis 1 1 Mathematics and Computer Science Lake Superior State University LSSU Math 400 George Voutsadakis (LSSU) Languages and Computation July 2014

More information

Exam Computability and Complexity

Exam Computability and Complexity Total number of points:... Number of extra sheets of paper:... Exam Computability and Complexity by Jiri Srba, January 2009 Student s full name CPR number Study number Before you start, fill in the three

More information

Algebraic Trace Theory

Algebraic Trace Theory Algebraic Trace Theory EE249 Roberto Passerone Material from: Jerry R. Burch, Trace Theory for Automatic Verification of Real-Time Concurrent Systems, PhD thesis, CMU, August 1992 October 21, 2002 ee249

More information

Learning Regular ω-languages

Learning Regular ω-languages Learning Regular ω-languages 1 2 Overview Motivation Background (ω-automata) 2014 Previous work on learning regular ω-languages Why is it difficult to extend L* [Angluin] to ω- languages? L* works due

More information

An implementation of deterministic tree automata minimization

An implementation of deterministic tree automata minimization An implementation of deterministic tree automata minimization Rafael C. Carrasco 1, Jan Daciuk 2, and Mikel L. Forcada 3 1 Dep. de Lenguajes y Sistemas Informáticos, Universidad de Alicante, E-03071 Alicante,

More information

Diagnosability Analysis of Discrete Event Systems with Autonomous Components

Diagnosability Analysis of Discrete Event Systems with Autonomous Components Diagnosability Analysis of Discrete Event Systems with Autonomous Components Lina Ye, Philippe Dague To cite this version: Lina Ye, Philippe Dague. Diagnosability Analysis of Discrete Event Systems with

More information

Exercises NP-completeness

Exercises NP-completeness Exercises NP-completeness Exercise 1 Knapsack problem Consider the Knapsack problem. We have n items, each with weight a j (j = 1,..., n) and value c j (j = 1,..., n) and an integer B. All a j and c j

More information

The Leader Election Protocol (IEEE 1394)

The Leader Election Protocol (IEEE 1394) The Leader Election Protocol (IEEE 1394) J.R. Abrial, D. Cansell, D. Méry July 2002 This Session - Background :-) - An informal presentation of the protocol :-) - Step by step formal design :- - Short

More information

CpE358/CS381. Switching Theory and Logical Design. Class 16

CpE358/CS381. Switching Theory and Logical Design. Class 16 CpE358/CS38 Switching Theory and Logical Design Class 6 CpE358/CS38 Summer- 24 Copyright 24-585 Today Fundamental concepts of digital systems (Mano Chapter ) inary codes, number systems, and arithmetic

More information

Guaranteeing No Interaction Between Functional Dependencies and Tree-Like Inclusion Dependencies

Guaranteeing No Interaction Between Functional Dependencies and Tree-Like Inclusion Dependencies Guaranteeing No Interaction Between Functional Dependencies and Tree-Like Inclusion Dependencies Mark Levene Department of Computer Science University College London Gower Street London WC1E 6BT, U.K.

More information

Operational Semantics

Operational Semantics Operational Semantics Semantics and applications to verification Xavier Rival École Normale Supérieure Xavier Rival Operational Semantics 1 / 50 Program of this first lecture Operational semantics Mathematical

More information

Introduction to Theory of Computing

Introduction to Theory of Computing CSCI 2670, Fall 2012 Introduction to Theory of Computing Department of Computer Science University of Georgia Athens, GA 30602 Instructor: Liming Cai www.cs.uga.edu/ cai 0 Lecture Note 3 Context-Free Languages

More information

Test Generation for a Protocol Specified in SDL with Complex Loops by Event-based EFSM Modeling

Test Generation for a Protocol Specified in SDL with Complex Loops by Event-based EFSM Modeling 122 IJCSNS International Journal of Computer Science and Network Security, VOL.8 No.3, March 2008 Test Generation for a Protocol Specified in SDL with Complex Loops by Event-based EFSM Modeling Tae-Hyong

More information

arxiv: v1 [cs.ds] 9 Apr 2018

arxiv: v1 [cs.ds] 9 Apr 2018 From Regular Expression Matching to Parsing Philip Bille Technical University of Denmark phbi@dtu.dk Inge Li Gørtz Technical University of Denmark inge@dtu.dk arxiv:1804.02906v1 [cs.ds] 9 Apr 2018 Abstract

More information

Synthesis weakness of standard approach. Rational Synthesis

Synthesis weakness of standard approach. Rational Synthesis 1 Synthesis weakness of standard approach Rational Synthesis 3 Overview Introduction to formal verification Reactive systems Verification Synthesis Introduction to Formal Verification of Reactive Systems

More information

Decision Trees. Lewis Fishgold. (Material in these slides adapted from Ray Mooney's slides on Decision Trees)

Decision Trees. Lewis Fishgold. (Material in these slides adapted from Ray Mooney's slides on Decision Trees) Decision Trees Lewis Fishgold (Material in these slides adapted from Ray Mooney's slides on Decision Trees) Classification using Decision Trees Nodes test features, there is one branch for each value of

More information

Explicit State Model Checking Algorithm for CTL. CSE 814 CTL Explicit-State Model Checking Algorithm

Explicit State Model Checking Algorithm for CTL. CSE 814 CTL Explicit-State Model Checking Algorithm Explicit State Model Checking for CTL 1 CTL Model Checking Problem Given A model describing the behaviors of a system A set of specifications expressed in CTL ically Check that every behavior satisfies

More information

Semi-asynchronous. Fault Diagnosis of Discrete Event Systems ALEJANDRO WHITE DR. ALI KARIMODDINI OCTOBER

Semi-asynchronous. Fault Diagnosis of Discrete Event Systems ALEJANDRO WHITE DR. ALI KARIMODDINI OCTOBER Semi-asynchronous Fault Diagnosis of Discrete Event Systems ALEJANDRO WHITE DR. ALI KARIMODDINI OCTOBER 2017 NC A&T State University http://www.ncat.edu/ Alejandro White Semi-asynchronous http://techlav.ncat.edu/

More information

NP-completeness. Chapter 34. Sergey Bereg

NP-completeness. Chapter 34. Sergey Bereg NP-completeness Chapter 34 Sergey Bereg Oct 2017 Examples Some problems admit polynomial time algorithms, i.e. O(n k ) running time where n is the input size. We will study a class of NP-complete problems

More information

hal , version 1-10 Sep 2013

hal , version 1-10 Sep 2013 Verification of Modular Systems with Unknown Components Combining Testing and Inference Roland Groz 1, Keqin Li 2, Alexandre Petrenko 3 1 Université de Grenoble, LIG Lab, France. Roland.Groz@imag.fr 2

More information

Pushdown Automata. Chapter 12

Pushdown Automata. Chapter 12 Pushdown Automata Chapter 12 Recognizing Context-Free Languages We need a device similar to an FSM except that it needs more power. The insight: Precisely what it needs is a stack, which gives it an unlimited

More information

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Discrete Systems Lecture: Automata, State machines, Circuits Stavros Tripakis University of California, Berkeley Stavros

More information

Theory of computation: initial remarks (Chapter 11)

Theory of computation: initial remarks (Chapter 11) Theory of computation: initial remarks (Chapter 11) For many purposes, computation is elegantly modeled with simple mathematical objects: Turing machines, finite automata, pushdown automata, and such.

More information

Tractable & Intractable Problems

Tractable & Intractable Problems Tractable & Intractable Problems We will be looking at : What is a P and NP problem NP-Completeness The question of whether P=NP The Traveling Salesman problem again Programming and Data Structures 1 Polynomial

More information

Models of Sequential Systems

Models of Sequential Systems Models of Sequential Systems Sungho Kang Yonsei University Outline Introduction to Finite State Machines Synthesis of Finite State Machines FSMs : Definition, Notation, and Examples FSM Minimization of

More information

Generative v. Discriminative classifiers Intuition

Generative v. Discriminative classifiers Intuition Logistic Regression (Continued) Generative v. Discriminative Decision rees Machine Learning 10701/15781 Carlos Guestrin Carnegie Mellon University January 31 st, 2007 2005-2007 Carlos Guestrin 1 Generative

More information

Tree Automata and Rewriting

Tree Automata and Rewriting and Rewriting Ralf Treinen Université Paris Diderot UFR Informatique Laboratoire Preuves, Programmes et Systèmes treinen@pps.jussieu.fr July 23, 2010 What are? Definition Tree Automaton A tree automaton

More information

Chapter 3 Deterministic planning

Chapter 3 Deterministic planning Chapter 3 Deterministic planning In this chapter we describe a number of algorithms for solving the historically most important and most basic type of planning problem. Two rather strong simplifying assumptions

More information

NP-Completeness. NP-Completeness 1

NP-Completeness. NP-Completeness 1 NP-Completeness x x x 2 x 2 x 3 x 3 x 4 x 4 2 22 32 3 2 23 3 33 NP-Completeness Outline and Reading P and NP ( 3.) Definition of P Definition of NP Alternate definition of NP NP-completeness ( 3.2) Definition

More information

Computational complexity

Computational complexity COMS11700 Computational complexity Department of Computer Science, University of Bristol Bristol, UK 2 May 2014 COMS11700: Computational complexity Slide 1/23 Introduction If we can prove that a language

More information

Automatic Verification of Parameterized Data Structures

Automatic Verification of Parameterized Data Structures Automatic Verification of Parameterized Data Structures Jyotirmoy V. Deshmukh, E. Allen Emerson and Prateek Gupta The University of Texas at Austin The University of Texas at Austin 1 Outline Motivation

More information

Requirements-based Test Generation for Predicate Testing

Requirements-based Test Generation for Predicate Testing Requirements-based Test Generation for Predicate Testing W. Eric Wong Department of Computer Science The University of Texas at Dallas ewong@utdallas.edu http://www.utdallas.edu/~ewong 1 Speaker Biographical

More information

Mm7 Intro to distributed computing (jmp) Mm8 Backtracking, 2-player games, genetic algorithms (hps) Mm9 Complex Problems in Network Planning (JMP)

Mm7 Intro to distributed computing (jmp) Mm8 Backtracking, 2-player games, genetic algorithms (hps) Mm9 Complex Problems in Network Planning (JMP) Algorithms and Architectures II H-P Schwefel, Jens M. Pedersen Mm6 Advanced Graph Algorithms (hps) Mm7 Intro to distributed computing (jmp) Mm8 Backtracking, 2-player games, genetic algorithms (hps) Mm9

More information

Introduction to Finite-State Automata

Introduction to Finite-State Automata Introduction to Finite-State Automata John McDonough Language Technologies Institute, Machine Learning for Signal Processing Group, Carnegie Mellon University March 26, 2012 Introduction In this lecture,

More information

Test Statistique Structurel et Fonctionnel

Test Statistique Structurel et Fonctionnel Test Statistique Structurel et Fonctionnel Pascale Thévenod-Fosse, Hélène Waeselynck {thevenod,waeselyn}@laas.fr Journée Club SEE "Systèmes informatiques de confiance" Thème : Test Paris, le 1er juin 1999

More information

On the query complexity of counterfeiting quantum money

On the query complexity of counterfeiting quantum money On the query complexity of counterfeiting quantum money Andrew Lutomirski December 14, 2010 Abstract Quantum money is a quantum cryptographic protocol in which a mint can produce a state (called a quantum

More information

Models for Efficient Timed Verification

Models for Efficient Timed Verification Models for Efficient Timed Verification François Laroussinie LSV / ENS de Cachan CNRS UMR 8643 Monterey Workshop - Composition of embedded systems Model checking System Properties Formalizing step? ϕ Model

More information

Last time: Summary. Last time: Summary

Last time: Summary. Last time: Summary 1 Last time: Summary Definition of AI? Turing Test? Intelligent Agents: Anything that can be viewed as perceiving its environment through sensors and acting upon that environment through its effectors

More information