Databases Reference
In-Depth Information
// = source code; = FSM; TG = Trace!Generate; PDMC = Push!Down Model Check
// R = critical APIs, PC = probable clean!up APIs
// ERROR/NORMAL TRACE GENERATION
// Generate shortest error traces
exit
retValChk
main
ErT = getShortest ( TG ( ,
main
entry
API
CALL
API
1
start
1
2
3
end
));
enclosing
procedure
return
errno Chk
// Extract error!return traces (ErRT) and error!exit traces (ErExT) from ErT
// Note that ErT = ErExT + ErRT
ErExT = getErExT (ErT);
// E t
2
// Extract API!error checks (AEC) from ErExT
AECSet = getAECSet ( majorityMine (ErExT));
// Use AECSet to extract ErRT from ErT
ErRT = getErRT (ErT, AECSet);
t API
h k (AEC) f
E E T
3
4
// Identify critical APIs and probable clean up APIs from error traces (ErT)
R, PC = getRandPC (ErT);
5 R, PC getRandPC (ErT);
5
// Generate random normal traces (NT) up to a specified upper!bound L
R, PC
main
entry
main
return
6
NT = getRandomL ( TG ( ,
));
start
end
1
// SPECIFICATION MINING
// Generate error!check specifications (ErCS) as FSMs from AECSet
7
ErCS = generateErCS (AECSet);
// Generate multiple!API specifications (MAS) as FSMs from normal traces (NT)
// Generate multiple API specifications (MAS) as FSMs from normal traces (NT)
// Apply sequence mining with specified support on extracted scenarios
8
MAS = generateMAS ( sequenceMine ( extractScenarios (NT), min_sup));
// VERIFICATION
// Detect error!check violations (ErCV)
9
foreach( in ErCS) { ErCV += getShortest ( PDMC ( ,
)); }
// Detect Multiple!API violation along error paths
10
foreach( in MAS) {MAV += getShortest ( PDMC ( ,
)); }
FIGURE 5.19: The algorithm for mining API error-handling specifications.
 
Search WWH ::




Custom Search