From 4224cb3a9afdac601fd2778253214e42f8b2fdf4 Mon Sep 17 00:00:00 2001
From: Brian Norris <banorris@uci.edu>
Date: Thu, 24 May 2012 11:33:36 -0700
Subject: [PATCH] main: take/revert snapshots

Use basic snapshotting for 'reset_to_initial_state()'.
---
 main.cc  | 2 ++
 model.cc | 1 +
 2 files changed, 3 insertions(+)

diff --git a/main.cc b/main.cc
index c5b6028f..8db63e6d 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 09ee4b4a..4db55728 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()
-- 
2.34.1