Idea: an Immersive Debugger for Actors

Idea: an Immersive Debugger for Actors

iDeA: An Immersive Debugger for Actors Aman Shankar Mathur Burcu Kulahcioglu Ozkan Rupak Majumdar MPI-SWS MPI-SWS MPI-SWS Germany Germany Germany [email protected] [email protected] [email protected] Abstract 1 Introduction We present iDeA, an immersive user interface for debug- Concurrent components interacting through asynchronous ging concurrent actor programs communicating through message passing are the basis for many modern applications— asynchronous message passing. iDeA is based on the hy- from large-scale servers to responsive user apps on the web pothesis that debugging and understanding actor programs or mobile platforms to networked embedded systems. The is a cognitive task which can be greatly facilitated by the vi- actor model of programming [2, 21] is a popular way to struc- sualization and interaction capabilities of modern immersive ture such applications. This model provides a high-level con- environments. The fundamental abstraction for visualization currency abstraction consisting of lightweight computation in iDeA is a concurrent trace: a partially ordered sequence of units called actors, which operate on an isolated, encapsu- asynchronous messages exchanged in the execution. iDeA lated state and communicate with each other by sending and provides a 3D interface in virtual reality for users to visualize receiving messages asynchronously. An application-level and manipulate program traces: users can set breakpoints, scheduler co-ordinates the execution by picking an actor query actor state, step through traces forward and backward, which has an outstanding message waiting to be processed and perform causal history of messages in a trace. and executing it serially. Executing the message receipt re- While the modularity of iDeA enables debugging any actor sults in an update of the actor’s local state as well as further program provided that the program events are collected and messages sent to the actors for future processing. The high- communicated to the visualization end, our implementation level concurrency abstraction relieves the programmers from of iDeA targets actor programs written in Akka framework explicitly considering low-level aspects of concurrency such in Scala. as threading, locks, or shared global state. The popularity of the model is shown by its widespread availability, either as a CCS Concepts • Software and its engineering → Soft- language construct (e.g., Erlang, P, Scratch) or as a library on ware testing and debugging; • Human-centered com- top of an asynchronous programming interface (e.g., Akka puting → Visualization; • Computing methodologies → for Scala and Java, Asynchronous Agents in C#, and many Distributed computing methodologies; others). In spite of the higher-level concurrency abstraction, pro- Keywords actor programs, debugging, concurrency, visu- gram comprehension and debugging for actor programs is alization, virtual reality not easy. While each actor processes its messages serially, the delivery of messages across different actors is concurrent. ACM Reference Format: This leads to complex concurrent chains of asynchronous Aman Shankar Mathur, Burcu Kulahcioglu Ozkan, and Rupak Ma- messages. The behavior of the system depends on the spe- jumdar. 2018. iDeA: An Immersive Debugger for Actors. In Proceed- cific processing order and a subtle change in the ordering ings of the 17th ACM SIGPLAN International Workshop on Erlang can lead to unexpected program behaviors. At the same (Erlang ’18), September 29, 2018, St. Louis, MO, USA. ACM, New York, NY, USA, 12 pages. https://doi.org/10.1145/3239332.3242762 time, modern IDEs provide rudimentary support for under- standing and debugging concurrent programs at this level of abstraction. Most debugging frameworks only provide functionality appropriate for sequential or low-level concur- Permission to make digital or hard copies of all or part of this work for rent code (step through code, query state or variables or the personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear call stack, set statement-level breakpoints) or a thin layer this notice and the full citation on the first page. Copyrights for components on top (intercept messages or visualize message sequences of this work owned by others than ACM must be honored. Abstracting with in 2D [10, 13, 14, 37]). Consequently, the main tool for de- credit is permitted. To copy otherwise, or republish, to post on servers or to bugging today is programmer-inserted log messages and redistribute to lists, requires prior specific permission and/or a fee. Request understanding concurrency from a serial log of execution. permissions from [email protected]. In this paper, we present iDeA, an immersive Debugger for Erlang ’18, September 29, 2018, St. Louis, MO, USA © 2018 Association for Computing Machinery. Actor programs. iDeA is an immersive environment for the ACM ISBN 978-1-4503-5824-8/18/09...$15.00 HTC Vive virtual reality device, and provides a simple, visual https://doi.org/10.1145/3239332.3242762 user interface for debugging actor programs written in Akka, Erlang ’18, September 29, 2018, St. Louis, MO, USA A. S. Mathur, B. K. Ozkan, and R. Majumdar an actor framework for the Scala language.1 The architecture While we provide text logs for the current trace within of iDeA has two parts. The first part intercepts scheduling the interface, we do not provide a capability to directly ma- choices by replacing the underlying scheduler and exports nipulate the code at the textual level within iDeA because the event for visualization and debugging. The second part current VR environments do not provide enough resolution performs trace visualization and direct manipulation through or interaction modalities for convenient text editing. debug actions. The two key concepts underlying iDeA are debugging at Immersive Visualization Environment. The visual metaphor in the message level and immersive visualization and animation. iDeA represents actors as geometric entities in 3D space and messages as dynamically constructed arrows between these Message-level Debugging. iDeA is intended for debugging sit- entities. Thus, traces are animations of arrow sequences uations where the serial behavior of each actor (the response with manipulation capabilities to focus attention on various to a single received request) is understood, but the global be- aspects of the execution. havior of many messages is not understood. This is the case The visual interface of iDeA is predicated on the assump- for many concurrent protocols where the programmer must tion that trace animation in an immersive environment can be explore and understand the set of global traces of messages. more effective for debugging and understanding large-scale Consequently, the visual interface in iDeA presents actors as concurrent actor systems than a traditional 2D-screen inter- 3D visual entities arranged in 3D space, messages as arrows face. We justify our assumption based on recent research in between objects which fade over time, and provides capabil- visual perception experiments in immersive environments ities for playing and manipulating sequences of messages.2 as well as on previous research on non-immersive trace vi- The notion of an atomic step is not statement-level execution, sualization for program comprehension. but the atomic handling of a message by an actor. Similarly, Recent research in visual search [42] shows that visual state of the system is defined only at schedule points; wedo search can be performed in reasonable time in an immersive not provide statement-level state changes for each actor. environment with over a thousand distractors; comparable Thus, iDeA enables a high-level interaction with the exe- experiments in 2D environments scale only to less than hun- cuting program at the level of the concurrency model. Instead dred distractors. People quickly learn positions of objects of stepping over a single statement or watching the value of a in 3D space and spatial memory can guide visual search in local variable between two statements in a message handler, an immersive setting [26, 34]. The importance of peripheral users step over processing a single message (whose execu- vision in perceptual processing has been studied extensively tion is semantically atomic in an actor program execution). [47, 48]. In an immersive environment, the transference of Users can set breakpoints on certain actors so that execution attention from a focus area to the periphery can be seamless breaks before these actors receive the next message. At any (and simply involves moving the eye/head/bearing), whereas point of execution, programmers can point to an actor and in a typical 2D environment requires an explicit interaction. query its state and the state of its message queue. Analogous iDeA assumes that evolution of state in a concurrent pro- to watch variables in conventional debuggers, evolution of gram can be effectively explored through animation. While actor state is animated along with the trace. Further, the animation may not be effective in every visualization sit- user can “time travel” along the trace to explore the timing uation, there is prior evidence that it can be effective in behavior of the execution. concurrent program comprehension (see, e.g., [11, 50] and While many debug actions replay the current execution the references therein). Animation has been used success- deterministically, leaving the scheduling

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    12 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us