Research Article
Infeasible Path Detection Based on Code Pattern and Backward Symbolic Execution
Algorithm 1
Search feasible path for n BACKWARDSEARCH.
| Require: Target n, CFG = {N, E, ne, no} | | Ensure: A feasible path from ne to n path; | | if first then | | SYMBOLICINIT (inputparams); | | path ⇐ INITPATH() | | state ⇐ initState; | | end if | | if n is in then | | Return Pathin; | | end if | | for each pre in precessors of n do | | STORESTATE(); | | b_flag⇐ EDGEOF(pre, n); | | if pre is C then | | ; | | end if | | if pre is A then | | [x: symbolExpression]⇐ SYMBOLICEXECUTION(pre); | | ; | | ; | | end if | | if IsCONSTRAINTSCONSISTENT is TRUE then | | BACKWARDSEARCH ; | | else | | RESTORE STATE(); | | continue; | | end if | | end for |
|