ЛОКАЛИЗАЦИЯ ОШИБОК МЕТОДОМ СОКРАЩЕННОГО ВОСПРОИЗВЕДЕНИЯ ТРАССЫ

  • View
    216

  • Download
    3

Embed Size (px)

Text of ЛОКАЛИЗАЦИЯ ОШИБОК МЕТОДОМ СОКРАЩЕННОГО...

  • 137

    . . sgroshev@ispras.ru

    . UniTESK, , , . . . , , . CTESK.

    1. (). . , , . , , , . . , , UniTESK [1-4] , . , , , , .

    138

    , .

    2. . , , , . , , . , , , , . , , , . , () [5]. , (), , , ( ) . , . UniTESK. UniTESK ( ), [6]. , , , , [5,6]. . , .

  • 139

    . . , , , : , , . , (trace replay). UniTESK , , UniTESK . , . [6], , . , . ( , ) . , , , , . : . , , , , , . UniTESK , , , , . , . UniTESK .

    140

    ( ), . ( , ). UniTESK , , . .

    1. . 2. . 3.

    . 4. .

    .

    I. .

    II. , , , .

    III. ( ) , . UniTESK, , .

    I . , , . , ; . , , , A, S, A1 R1, , ,

  • 141

    A S, A2 R2, (A1, R1) (A2, R2). . ( (A1, R1) (A2, R2) ), , - , , . . , , . : alloc() , free() optimize() . . 1: free() . .

    ... state=10 alloc() state=11 alloc() NULL state=11 free() state=10 optimize() state=10 alloc() NULL ,

    2: , optimize() , . .

    ... state=10 alloc()

    142

    state=11 alloc() NULL state=11 free() state=10 optimize() , state=10 alloc() state=11 alloc() ,

    , . , . , ( ), , .

    3. , .

    1. , .

    2. . 3.

    , , , .

    : , . . UniTESK [7], . UniTESK . , ; . ,

  • 143

    . UniTESK : , , , . , , , , . , . , , . , ( , II) . (instance) , . , , , , . III, , ( ) , UniTESK. T1 T, T ( , ). , . , . , , . +, , - , :

    144

    1. + . 2. +

    . 3. :

    3.1. , , .

    3.2. , .

    3.3. ( , ) , , , , . , 3.1 , , .

    , .

    4. 4. : T = .

    , , . , , , D* ( D ) D. , , , . . 1.

  • 145

    . 1. .

    I , , . , T, . : T1 = .

    T1 T, . , . , T1. , . T : T = .

    T2 = (, , ) T, T = T1 + T2. , T2 T1, T1, , T2, T1 . . , T2 T1, .

    146

    , T2 . , , . 2-4.

    T =

    . 2. T.

    T =

    . 3. T.

    T =

    . 4. T.

    . 2-4 T2 , T = T1 + T2: , ( . 2-4 ).

  • 147

    T = T1 + T2 + + TN-1 + TN, .

    1. k=1N k = T1 + T2 + + Tk-1 + Tk , .

    2. T1 TN , , ( , i, j: 1 i < j N Ti , Tj)

    3. T1 T ( , , T1 )

    4. T2 TN .

    1 k. 2 , Tk, k , , II, , . 3 4 . 1. , 1-4. . 1 , . , , . fullPath , . . currentPath : ( ), , . , fullPath . , , currentPath . . i- , currentPath , , fullPath , ,

    148

    , . , . currentPath , , . , , currentPath . , , , . , currentPath ( , ). , . currentPath , . currentPath , , , (, , ) . , , . , . , 4. (T1) . , T1 . , 3 . currentPath , . . , 2. , 1 . , 1 = T1 . , pathes Tk (2kN). currentPath = S + Tk, S (, ), , Tk. Tk i1, , i2.

  • 149

    , , Tk-1 ( ). , , Tk-1 , , Tk , . , , , j1, , j2 j3, , j4 ( j1, , j2 ) , Tk-1, i1, , i2 , Tk. i1 j2, , Tk-1 , i2 j3. , k=2..N Tk-1 + Tk, Tk-1. , , . , , Tk-2 , Tk-1. , Tk-2 Tk-1 + Tk , , k3 Tk-2 + Tk-1 + Tk, Tk-2. , : i, j: 1 i j N, , Ti + + Tj. , 1 . . , , . .

    1. , , , , .

    2. , .

    3. k , k = T1 + T2 + + Tk-1 + Tk , k-1 = T1 + T2 + + T k-1 . , ,

    150

    Tk. .

    , . , , , , . 5. , , , . I II, , , , , , , .

    . 5. .

    , 1 .

    5. CTESK. CTESK [8,9] UniTESK , SeC [10].

    5.1. Java UniTESK Trace Tools. CTESK, .

  • 151

    . .

    o .

    o ( UniTESK , ).

    o . , .

    o .

    o , . , .

    , . SeC , SeC CTESK.

    . CTESK. (

    , , ).

    DFSM ( [7], [6]).

    , .

    , . , ,

    152

    JavaTESK, ( ) .

    5.2. 2. .

    replay_check_state(const char *state) CTESK.

    replay_call__initialize(int argc, char **argv) CTESK.

    replay_call__finalize() CTESK. replay_call__()

    . , .

    do_replay(int path_number) path_number

    main_(int argc, char **argv) .

    parse_(char *val) , .

    , CTESK TSBasis. CTESK SeC: . CTESK. (, Microsoft Visual Studio CTESK) , , , (, , , TSBasis,

  • 153

    ). ( ) ( , ; , ), main() CTESK main_() , .

    5.3. -path . 1 path_number MAX_PATH_NUMBER , path_number. , DEFAULT_PATH_NUMBER. path_number = 0 1 . init() , finish(), . . UniTESK, . k Scenario replay: trying path . , : Scenario replay: repeatable failure ; Scenario replay: could not repeat failure . Scenario replay: unexpected failure , . : Scenario replay: failure found at path k; Scenario replay: could

    154

    not repeat failure at any path k .

    1. ( ). , , ; , . - .

    2. , . .

    , , .

    6. , CTESK. , , [4] . , ( UniTESK , ) .

    1. .

    2. , .

    3. , .

    CTESK, , , ( ). , : (1). k , , (, , ,

  • 155

    ). , , ; , , , , , - , II. , Linux OLVER [11] . , : . , (, printf()), , , , UniTESK . (, , mutex, pthread) , , . , : , , . , , , , . , - ( ) (, , ). , , .

    7. , ,

    156

    . , . , , . . , , . , CTESK [8], UniTESK [1] . . .

    , UniTESK.

    , .

    .

    .

    , .

    .

    [1] http://www.unitesk.com/ru/ ,

    UniTesK . [2] . . , . . , . . , . . . UniTesK

    . , 29(6):2543, 2003. http://www.ispras.ru/~kuliamin/docs/Unitesk-2003-ru.pdf

    [3] I. Bourdonov, A. Kossatchev, A. Petrenko, and D. Galter. KVEST: Automated Generation of Test Suites from Formal Specifications. FM'99: Formal Methods. LNCS 1708:608621, Springer-Verlag, 1999.

    [4] I. Bourdonov, A. Kossatchev, V. Kuliamin and A. Petrenko. UniTesK Test Suite Architecture. Proceedings of FME 2002, LNCS 2391:7788, Springer-Verlag, 2002. http://www.ispras.ru/~kuliamin/docs/FME-2002-en.pdf

    [5] . . , . . , . . . . , 26(2):6173, 2000. http://www.ispras.ru/~kuliam