Program inversion has been successfully applied to several areas such as optimistic parallel discrete event simulation (OPDES) and reverse debugging. This paper introduces a new program inversion algorithm for imperative languages, and focuses on handling arbitrary control flows and basic operations. By building a value search graph that represents recoverability relationships between variable values, we turn the problem of recovering previous values into a graph search one. Forward and reverse code is generated according to the search results. We have implemented our algorithm as part of a compiler framework named Backstroke, a C++ source-to-source translator based on ROSE compiler. Backstroke targets optimistic simulation codes and automatically generates a reverse function to recover values modified by a target function. Experimental results show that our method is effective and produces better performance than previously proposed methods.
We introduce Backstroke, a new open source framework for the automatic generation of reverse code for functions written in C++. Backstroke enables reverse computation for optimistic parallel discrete event simulations. It is built over the ROSE open-source compiler infrastructure, and handles complex C++ features including pointers and pointer types, arrays, function and method calls, class types, inheritance, polymorphism, virtual functions, abstract classes, templated classes and containers. Backstroke also introduces new program inversion techniques based on advanced compiler analysis tools built into ROSE. We explore and illustrate some of the complex language and semantic issues that arise in generating correct reverse code for C++ functions. INTRODUCTIONBackstroke is a new open source framework for the automatic generation of reverse code for functions written in C++. It is built on ROSE, a widely used source-to-source compiler infrastructure that has been under development at Lawrence Livermore National Laboratory for a decade (Quinlan 2011). The primary purpose of Backstroke is to enable reverse computation for fast, efficient rollback in optimistic parallel discrete event simulations. Reverse computation is a well established technique now, but major practical barriers still prevent its widespread adoption. It is difficult to create correct and efficient reverse methods by hand, and unrealistic to require programmers to do so. Further, since the number of times an event is rolled back is unpredictable, simple bugs in reverse code frequently act as nondeterministic "Heisenbugs", making debugging very difficult. These considerations suggest automatic generation of reverse code (Perumalla 1999, Carothers, Perumalla, and. Backstroke takes this approach, but advances it considerably beyond prior systems. In particular, it can reverse more complex language constructs than prior work, since it applies to C++ rather than just C, and it serves as a general framework allowing experimentation with many different inversion techniques. We will describe some of the general approaches to automatic generation of reverse code, and explore language and semantic issues that arise in generating correct reverse code for C++ functions. CONTEXT AND RELATED WORKA parallel discrete event simulation (PDES) program consists of logical processes (LPs) that execute concurrently and exchange timestamped event messages. A synchronization algorithm is required to ensure each LP processes events in non-decreasing timestamp order. Optimistic synchronization uses rollback to undo the computation of events that are performed out of timestamp order (Jefferson 1985). Parallel discrete event simulation and optimistic execution are described in detail in (Fujimoto 2000). Reverse computation is a technique to efficiently implement event rollback (Carothers, Perumalla and Fujimoto, 1999;Tang Perumalla, and Fujimoto 2006, Naborskyy andFujimoto 2007). Each event routine is instrumented to save a minimal amount of control and data informat...
We recently introduced SASSY, the design for a hybrid simulator that provides an agent-based API atop a PDES kernel (Hybinette et al. 2006). Our hypothesis is that a design like SASSY offers the advantages of an agent-based paradigm for the application developer, but also provides the performance advantages of a PDES kernel. Since the time of our initial publication, most aspects of SASSY's design have been implemented, and we are now assessing our hypotheses e.g., (He and Hybinette 2008). In this paper we investigate performance advantages for a simple agent-based application on SASSY. In most cases, agentbased simulation environments are configured using a time-step approach, where the simulation proceeds in discrete steps. In this paper we evaluate the performance of a simple application running in a traditional time-step simulation, and also its performance when running on SASSY with PDES support.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
customersupport@researchsolutions.com
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.