[klee-dev] Question on Tracking Number of Instructions Per Path in Klee
Daniel Schemmel
d.schemmel at imperial.ac.uk
Thu May 9 22:41:28 BST 2024
Hello,
the idea of stats in KLEE is to provide aggregate statistics, which
means it is rather unsuited for getting information for each individual
path.
The per-instruction step count is available as
`klee::ExecutionState::steppedInstructions`
(https://github.com/klee/klee/blob/7cc669ba153918988cfb480cb018aee16da5eaf7/lib/Core/ExecutionState.h#L230).
Best,
Daniel
On 08/05/2024 14:26, someone wrote:
> Hi everyone,
>
> I want to find the number of LLVM instructions executed on each path
> in Klee. I can get the number of total instructions across all paths
> using standart Klee outputs so far.
> There must be a way to find out the number of instruction on each
> path, but I don't know how.
>
> Here’s what I’ve tried:
> - I've looked into the `klee-stats` and Klee’s output directories but
> found only aggregate data.
> - I considered modifying `Executor.cpp` to add instruction counting
> directly but am unsure of the best place and method to insert this
> counting logic.
>
> Could anyone guide me on:
> 1. Whether there is an existing feature or tool in Klee that I might
> have missed that can serve this purpose?
> 2. If modifying the source code is the only option, where should I
> insert the code to count instructions per path?
>
> Any guidance, code snippets, or pointers to relevant parts of the
> documentation would be greatly appreciated.
>
> Thank you in advance for your help!
>
> Best regards,
>
>
> _______________________________________________
> klee-dev mailing list
> klee-dev at imperial.ac.uk
> https://mailman.ic.ac.uk/mailman/listinfo/klee-dev
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the klee-dev
mailing list