Research Topics in Software and Reasoning Systems Bharat Jayaraman University at Buffalo (SUNY) Collaborators: • • • • Fall 2014 Jan Chomicki, University at Buffalo Venu Govindaraju, University at Buffalo Kishore Ramachandran, Georgia Tech Luke Ziarek, University at Buffalo CSE Research Overview Three Current Topics 1. Unobtrusive Smart Spaces 2. Modeling Complex Systems 3. Dynamic Analysis & Visualization Research Methodology: - Start with Theoretical Foundations - Develop Practical Models/Languages - Implement, Apply, Learn, Improve Fall 2014 CSE Research Overview 1. Unobtrusive Smart Spaces Fall 2014 CSE Research Overview Research Topics 1. Large Camera Networks 2. Distributed State Transition System 3. Practical Deployment and Experiments 4. Smart Space Analytics Three R’s of Cyber-Physical Spaces, V. Menon, B. Jayaraman, V. Govindaraju IEEE Computer, 44(9): 73-89, 2011 A Distributed Framework for Spatio-Temporal Analysis on Large-scale Camera Networks, K Hong, M Voelz, V Govindaraju, B Jayaraman, U Ramachandran, Proc. Distributed Computing Systems Workshops (ICDCSW), 2013 Fall 2014 CSE Research Overview 2. Modeling Complex Systems Grand Challenge in Information Systems (www.cra.org) “We need a mathematical model that relates the global behavior of complex systems to the local behaviors and interaction patterns of the individual elements … Whatever form such a model takes, it must permit us to define and control emergent behavior using declarative, not imperative, techniques.” Motivating Domains: Engineering, Biological, … Common Features: Complex Assembly, Laws of Behavior, … Visualization . Fall 2014 CSE Research Overview Constrained Objects Constraints: “The load on a wall ≤ its load bearing capacity.” “The sum of the forces at a joint should be zero.” etc. Load Sum of Forces = 0 class joint { attributes bar [ ] Bars; load [ ] Loads; constraints (sum X in Bars : X.B.F * sin(X.A)) + (sum L in Loads : L.F * sin(L.A)) = 0; (sum Y in Bars : Y.B.F * cos(Y.A)) + (sum M in Loads : M.F * cos(M.A)) = 0; constructor joint(B1, L1) { Bars = B1; Loads = L1; } } Research Topics • Translation to Efficient Low-level Representations • Inconsistency Detection and Failure Analysis • Visualization for Dynamic Behavior • From Constrained Objects to Constraintbased Design Modeling Engineering Structures with Constrained Objects, B. Jayaraman and P. Tambay, Proc. Practical Aspects of Declarative Languages, Lecture Notes in Computer Science (2257), pp. 28-46, 2002 Compositional semantics for diagrams using constrained objects, B. Jayaraman, P. Tambay, Proc. Diagrammatic Representation and Inference, pp. 94-96, 2003 3. Dynamic Analysis & Visualization • • • • • Towards Better Program Comprehension Run-time Visualization, Query-based Debugging Execution Analysis, Summarization JIVE: Java Interactive Visualization Environment Extensions for Real-time, Concurrency, etc. Temporal Data Model for Program Debugging. D. Lessa, B. Jayaraman, J. Chomicki, Proc. Database Programming Languages, 2011. JI. FI: Visual Test and Debug Queries for Hard RealāTime, E. Blanton, D. Lessa, P. Arora, L. Ziarek, B. Jayaraman, Concurrency and Computation: Practice and Experience, 2013. Source Code Static – Behavior Obscure JIVE Interface Processes Enhanced Object Diagram Source Code Sequence Diagram Query Result JIVE Visualization: Objects as Environments JIVE object diagram showing objects as well as method activations in the object contexts Fall 2014 CSE Research Overview JIVE Objects: Detailed View JIVE object diagram showing internal details of objects and method activations Fall 2014 CSE Research Overview Objects as Environments: Call-Path View JIVE object diagram focusing on the calling path, or the call stack. Fall 2014 CSE Research Overview Flexible Views Fall 2014 CSE Research Overview Viewing Execution History: Multi-Threaded Programming Fall 2014 CSE Research Overview Visualization clarifies Program Behavior F1 F2 Fall 2014 F3 F4 F5 P1 P2 P3 JIVE sequence diagram clarifies thread interactions P4 P5 CSE Research Overview F1 F2 F3 F4 F5 P1 P2 P3 P4 P5 JIVE sequence diagram at point of deadlock Fall 2014 CSE Research Overview Concurrency Bug Analysis: JIVE + Java Path Finder Java Path Finder is a special JVM that explores all possible choices in scheduling with the goal of identifying a concurrency bug, such as deadlock, if one exists. The output of JPF is also an execution sequence that can be input to JIVE, which not only shows the tree of possible scheduling choices, but also the path leading to the error. 5/28/2016 CSE Research Overview Coupling with Java Path Finder 5/28/2016 Android Workshop 5/28/2016 CSE Research Review 5/28/2016 CSE Research Overview 3. Query Based Debugging • Traditional debugging is more like “web browsing” – you have to manually look for the error. • QBD is more akin to “web searching”, e.g.: - show all changes to a variable - when did a variable become negative when was an invariant violated when did concurrent update occur show all contended monitors show all priority inversion • Common queries can be form-based, but custom queries are necessary. Fall 2014 CSE Research Overview Form-based Query Interface When was ‘value’ assigned to an int less than 100? Fall 2014 CSE Research Overview Query Result Fall 2014 CSE Research Overview JIVE’s Overall Architecture Fall 2014 CSE Research Overview Eclipse/JIVE Two-Process Model Fall 2014 CSE Research Overview Important Property of JIVE – 1 JIVE does not represent program states directly, but infers (and reconstructs) states from events that occur. Fall 2014 CSE Research Overview Important Property of JIVE – 2 Queries and Visualization work in a synergistic way: Queries help focus on what is of interest. Visualization provides a canvas on which to report answers to queries. Fall 2014 CSE Research Overview JIVE Demo www.cse.buffalo.edu/jive Fall 2014 CSE Research Overview Scalable Visualizations: Vertical Compaction compactify Fall 2014 CSE Research Overview Execution Summarization: From Sequence to State Diagrams (View 1) Fall 2014 CSE Research Overview From Sequence to State Diagrams (View 2) CSE Research Overview Fall 2014 Summary and Conclusions • JIVE has useful features not found in modern IDEs: visualizing object states and execution history; query-based debugging; dynamic slicing; reverse stepping • Declarative Queries and Visualization work in a synergistic manner to provide an effective runtime environment for OO Languages. • JIVE can be used for teaching and learning, and also has features for understanding and debugging in industrial setting. Fall 2014 CSE Research Overview Further Work • Incorporate full Temporal Queries and State Diagram construction into JIVE interface. • Verification through Testing: the database approach to debugging facilitates analysis over multiple runs, checking invariants, etc. • Model Checking in JIVE: The State Diagram resembles a Kripke Structure, and we can perform model-checking of such structures with respect to temporal-logic formula. Fall 2014 CSE Research Overview