LogFAT v1.0, Copyright(c) 2011-2021
Author:wangshudian@gmail.com
QQ:18005491
LogFAT is a log-based tool for software fault locating.
HOWTO
-----------------------------------------------------
Step1: Analyze Object State.
Step2: Edit state transition config file(.ini).
Step3: Get event log file with the appointed format.
Step4: Run LogFAT.exe.
Step5: Read report file(.txt).
-----------------------------------------------------
EXAMPLE 1
Step1: Analyze Object State.
-----------------------------
Statechart:
---------- ----------
| | E0 | |
| S0 |----------------->| S1 |
| |<-----------------| |
---------- E3 ----------
^ / ^
\ / /
\ E1 / /
\ / /E2
E3\ / /
\ v /
\ ----------
\ | |
\| S2 |
| |
----------
State transition table:
--------|------|-----|-----|-----|
|from\on| E0 | E1 | E2 | E3 |
|-------|------|-----|-----|-----|
| S0 | S1 | S-1 | S-2 | S-3 |
|-------|------|-----|-----|-----|
| S1 | S-4 | S2 | S-5 | S0 |
|-------|------|-----|-----|-----|
| S2 | S-6 | S-7 | S1 | S0 |
|-------|------|-----|-----|-----|
Step2: Edit state transition config file(.ini).
-----------------------------------------------
State transition config file example.ini:
[STATESET]
S0=state0
S1=state1
S2=state2
[INITSTATE]
S0
[ENDSTATE]
S0
[EVENTSET]
E0=event0
E1=event1
E2=event2
E3=event3
[EXCEPTIONSET]
S-1="error: info1..."
S-2="error: info2..."
S-3="error: info3..."
S-4="error: info4..."
S-5="error: info5..."
S-6="error: info6..."
S-7="error: info7..."
S-8="error: info8: not expected endstate"
[TRANSITION]
FROM=S0,ON=E0,TO=S1
FROM=S0,ON=E1,TO=S-1
FROM=S0,ON=E2,TO=S-2
FROM=S0,ON=E3,TO=S-3
FROM=S1,ON=E0,TO=S-4
FROM=S1,ON=E1,TO=S2
FROM=S1,ON=E2,TO=S-5
FROM=S1,ON=E3,TO=S0
FROM=S2,ON=E0,TO=S-6
FROM=S2,ON=E1,TO=S-7
FROM=S2,ON=E2,TO=S1
FROM=S2,ON=E3,TO=S0
Step3: Get event log file with the appointed format.
----------------------------------------------------
FILE:.\gtest_LogFileAnalysisTool.cpp,LINE:40,SM:statemachine_example,OBJID:0x477e22,EVENT:event0
FILE:.\gtest_LogFileAnalysisTool.cpp,LINE:40,SM:statemachine_example,OBJID:0x477e22,EVENT:event1
FILE:.\gtest_LogFileAnalysisTool.cpp,LINE:40,SM:statemachine_example,OBJID:0x477e22,EVENT:event1
Step4: Run LogFAT.exe.
----------------------
1) You may run LogFAT.exe directly.
The default file name is LogFile.txt and ReportFile.txt.
2) Or run in cmd.exe like this:
LogFAT.exe LogFile1.txt ReportFile1.txt
Step5: Read report file(.txt).
------------------------------
.\gtest_LogFileAnalysisTool.cpp(40): Exception 7: (error: info7...)
.\gtest_LogFileAnalysisTool.cpp(40): Exception 8: (error: info8: not expected endstate)
基于日志的代码缺陷自动定位小工具(LogFAT)
1星 需积分: 9 172 浏览量
2011-04-03
13:29:07
上传
评论
收藏 566KB RAR 举报
autoca
- 粉丝: 25
- 资源: 12