设计了一种用于覆盖测试的代码插桩器,重点介绍了一种高效的词法语法分析方法:通过所读入的左右大括号是否匹配把整个代码分为函数内部和外部,根据这两部分感兴趣的关键字不同建立不同的DFA状态转换表,使每个词素能够用最少的状态转换次数判断出是否为所关注的关键字,减少状态转移的时间复杂度;使用已生成的状态转换表,消除了建立DFA的时间开销。描述了状态转换表的生成过程,插桩器的实现过程以及运行结果。
Paper designes a new instrumentor that is used to coverage test,focusing on Introducing an efficient syntax and lexical analyzer:the code divided into the inner and the external of the function by curly braces matching or not and different DFA state transition table were formulated for the different part,so that every morpheme would be made judgment on in shortest time.The instrumentor use the existing DFA state transition table to eliminate the time of formulating DFA.Paper also shows the process of formulating DFA , realizing of instrumentor and the result.