-
Notifications
You must be signed in to change notification settings - Fork 3
Description
The debugger fails when run on the output of cbmc-viewer when cbmc-viewer was run on the textual output of cbmc.
To reproduce, build any of the FreeRTOS proofs using the legacy starter kit:
git clone https://github.com/FreeRTOS/FreeRTOS-Plus-TCP.git
cd FreeRTOS-Plus-TCP
git submodule update --init --checkout --recursive
cd test/cbmc/proofs
./prepare.py
cd ARP/ARPAgeCache
make
This runs cbmc in text mode without the --xml-ui flag and produces cbmc.txt instead of cbmc.xml.
Now start up code, load the traces, and start the debugger.
The debugger fails in simulatorState.addAssignment while trying to parse the scope of the left-hand side of the assignment because the scope is null. This invocation of addAssignment occurs while simulating an assignment step. The null value arises because the scope is taken from lhs-lexical-scope in the trace step.
The problem is that when cbmc-viewer is scanning the traces produced by cbmc, viewer finds a value for lhs-lexical-scope when parsing xml output of cbmc not when parsing text output or parsing json output. The problem is that this scope simply isn't present in the textual output of cbmc.