Abstract: There is provided a computer implemented method, a system for performing the method, and a computer program for recreating a program state. In one aspect, the invention comprises associating a step counter with respective points in the progress of a program's execution and generating a snapshot by storing the set of program values associated with a first step counter value. The state of the program is subsequently recreated by recreating the program state from the snapshot preceding the point in the progress of the program execution associated with a query step counter value and executing the program from the recreated state of the program to the point in the progress of the program execution associated with the second index reference value, including using previously stored non-deterministic values.