From: Brian Norris Date: Thu, 24 May 2012 18:33:36 +0000 (-0700) Subject: main: take/revert snapshots X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4224cb3a9afdac601fd2778253214e42f8b2fdf4;p=cdsspec-compiler.git main: take/revert snapshots Use basic snapshotting for 'reset_to_initial_state()'. --- diff --git a/main.cc b/main.cc index c5b6028..8db63e6 100644 --- a/main.cc +++ b/main.cc @@ -53,6 +53,8 @@ void real_main() { model->set_system_context(&main_context); + snapshotObject->snapshotStep(0); + do { /* Start user program */ model->add_thread(new Thread(&user_thread, (void (*)(void *)) &user_main, NULL)); diff --git a/model.cc b/model.cc index 09ee4b4..4db5572 100644 --- a/model.cc +++ b/model.cc @@ -59,6 +59,7 @@ void ModelChecker::reset_to_initial_state() nextThread = 0; next_backtrack = NULL; /* scheduler reset ? */ + snapshotObject->backTrackBeforeStep(0); } thread_id_t ModelChecker::get_next_id()