A Portable Debugger for Algorithmic Modelica Code Adrian Pop, Peter Fritzson Programming Environments Laboratory (PELAB) Department of Computer and Information.

Slides:



Advertisements
Similar presentations
How SAS implements structured programming constructs
Advertisements

Chapter 15 Debugging. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Debugging with High Level Languages.
Debugging Natural Semantics Specifications Adrian Pop and Peter Fritzson Programming Environment Laboratory Department of Computer and Information Science.
General Computer Science for Engineers CISC 106 Lecture 21 Dr. John Cavazos Computer and Information Sciences 04/10/2009.
1 Owais Mohammad Haq Department of Computer Science Eastern Michigan University April, 2005 Java Script.
Java developer tools Emanuel Dohi Lars Larsson
General Computer Science for Engineers CISC 106 Lecture 19 Dr. John Cavazos Computer and Information Sciences 04/06/2009.
Composition of XML Dialects A ModelicaXML case study Adrian Pop, Ilie Savga, Uwe Aßmann, Peter Fritzson Programming Environments Laboratory Linköping University.
An Eclipse-based Integrated Environment for Developing Executable Structural Operational Semantics Specifications Adrian Pop and Peter Fritzson Programming.
Integrated Development Environments. Today We Will: Go over more advanced functionality of Eclipse. Break up into teams to work on presentation and final.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
An framework for model-driven product design and development using Modelica Adrian Pop, Olof Johansson, Peter Fritzson Programming Environments Laboratory.
1 Lab Session-2 CSIT 121 Spring 2005 Debugging Tips NiMo’s Varying Rates Lab-2 Exercise.
Chapter 8: Introduction to High-level Language Programming Invitation to Computer Science, C++ Version, Third Edition.
OpenModelica Development Environment with Eclipse Integration Adrian Pop, Peter Fritzson, Andreas Remar, Elmir Jagudin, David Akhvlediani Programming Environment.
Contributions to Meta-Modeling Tools and Methods Adrian Pop Programming Environments Laboratory.
03 Using Eclipse. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as.
Introduction to programming in MATLAB MATLAB can be thought of as an super-powerful graphing calculator Remember the TI-83 from calculus? With many more.
COMP 1001: Introduction to Computers for Arts and Social Sciences Programming in Scratch Monday, May 16, 2011.
CSC141 Introduction to Computer Programming
Towards a Text Generation Template Language for Modelica Peter Fritzson *, Pavol Privitzer +, Martin Sjölund *, Adrian Pop * + Institute of Pathological.
Institute for Personal Robots in Education (IPRE)‏ CSC 170 Computing: Science and Creativity.
CPSC1301 Computer Science 1 Overview of Dr. Java.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Design and Implementation.
BT Trace Animation Ferdiansyah Dolot / Depok, April 7 th 2011 FMSE.
Welcome To Eclipse. Basic Concepts Workspace – directory where your projects are stored –Projects grouping of related works –Resources generic term to.
9/2/ CS171 -Math & Computer Science Department at Emory University.
FireBug. What is Firebug?  Firebug is a powerful tool that allows you to edit HTML, CSS and view the coding behind any website: CSS, HTML, DOM and JavaScript.
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
1 EMT 101 – Engineering Programming Dr. Farzad Ismail School of Aerospace Engineering Universiti Sains Malaysia Nibong Tebal Pulau Pinang Week 2.
BIT 115: Introduction To Programming Professor: Dr. Baba Kofi Weusijana (say Doc-tor Way-oo-see-jah-nah, Doc-tor, or Bah-bah)
Java Basics Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
Eclipse. An IDE is an Integrated Development Environment Different IDEs meet different needs BlueJ, DrJava are designed as teaching tools Emphasis is.
Copyright © 2004 – 2013 Curt Hill Java Debugging In Eclipse.
Programming Languages
The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development Lecture 2 Debugging,
CSc 352 Debugging Tools Saumya Debray Dept. of Computer Science The University of Arizona, Tucson
(1) Introduction to Robocode Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii Honolulu.
Dale Roberts Introduction to Java - Input, Program Control and Instantiation Dale Roberts, Lecturer Computer Science, IUPUI
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
An introduction to the debugger And jGrasp editor-syncrasies (ideosyncrasies)
Netbeans QuickStart. Creating a project File->New Project –For now you want General->Java Application –Then fill in the project details.
Debugging and Testing Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
1 Using an Integrated Development Environment. Integrated Development Environments An Integrated Development Environment, or IDE, permits you to edit,
The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development Lecture 2 Debugging,
Bootstrapping a Modelica Compiler Martin Sjölund, Peter Fritzson, Adrian Pop Linköping University th International Modelica Conference Dresden,
FOP: While Loops.
ATS Application Programming: Java Programming
Topics: jGRASP editor ideosyncrasies assert debugger.
Software Design and Development
CS 153: Concepts of Compiler Design November 30 Class Meeting
all loops initialization – set up the loop
Debugging with Eclipse
Debuggers.
Compilation VS Interpretation
Computers & Programming Languages
MATLAB – What Is It ? Name is from matrix laboratory Powerful tool for
Comp 110/401 Appendix: Debugging Using Eclipse
Lecture Notes – Week 3 Lecture-2
System Concept Simulation for Concurrent Engineering
MATLAB – What Is It ? Name is from matrix laboratory Powerful tool for
DEBUGGING JAVA PROGRAMS USING ECLIPSE DEBUGGER
Debugging at Scale.
Design and Implementation
CSc 352 Debugging Tools Saumya Debray Dept. of Computer Science
Debugging Visual Basic Programs
jGRASP editor-syncrasies (idiosyncrasies)
Debugging with Eclipse
15/09/2019 BT Trace Animation Ferdiansyah Dolot Ferdiansyah Dolot / )
Chapter 15 Debugging.
Presentation transcript:

A Portable Debugger for Algorithmic Modelica Code Adrian Pop, Peter Fritzson Programming Environments Laboratory (PELAB) Department of Computer and Information Science (IDA) in collaboration with Department of Mechanical Engineering (IKP) Linköping University (LiU)

2 Outline  Introduction  Why there is a need for such a debugger?  Debugger implementation  Overview  Source code instrumentation  Functionality  Java Browser for Modelica Data Structures  Conclusions & Future Work  Debugger Demo

3 Introduction  Why do we need such a debugger?  debugging of equation-sections exists  debugging of algorithmic code  Modelica  large algorithmic sections in functions  scripting  Modelica+  implementation of the OpenModelica compiler  43 packages, lines of code, 4054 functions, 132 data structures

4 Debugger Implementation - Overview

5 Debugger Implementation - Instrumentation function bubbleSort input Real [:] unordElem; output Real [size(unordElem, 1)] ordElem; protected Real tempVal; Boolean isOver = false; algorithm ordElem := unordElem; while not isOver loop isOver := true; for i in 1:size(ordElem, 1)-1 loop if ordElem[i] > ordElem[i+1] then tempVal := ordElem[i]; ordElem[i] := ordElem[i+1]; ordElem[i+1] := tempVal; isOver := false; end if; end for; end while; end bubbleSort; function bubbleSort input Real [:] unordElem; output Real [size(unordElem, 1)] ordElem; protected Real tempVal; Boolean isOver = false; algorithm Debug.register_in("unordElem",unordElem); Debug.step(...); ordElem := unordElem; Debug.register_out("ordElem", ordElem); Debug.register_in("isOver", isOver); Debug.step(...); while not isOver loop isOver := true; Debug.register_out("isOver", isOver); Debug.register_in("ordElem",ordElem); Debug.step(...); for i in 1:size(ordElem, 1)-1 loop Debug.register_out("i", i); Debug.register_in("i", i); Debug.register_in("ordElem[i]", ordElem[i]); Debug.register_in("ordElem[i+1]", ordElem[i+1]); Debug.step(...);... end bubbleSort;

6 Debugger Implementation – Functionality (1)  Breakpoints  can be placed on lines or function/package names  can be deleted (selectively or all)  Stepping and Running  step mode (step into) – stops before each statement  run mode – stops only at breakpoints  next mode (step over) – stops at next function call

7 Debugger Implementation – Functionality (2)  Examining data  printing variables  setting the depth of printing  sending variables to an external browser  Additional functionality  viewing status information  printing backtrace information (stack trace)  printing call chain  setting debugger defaults  getting help

8 Java Browser for Modelica+ Data Structures

9 Conclusions and Future Work  Releasing the debugger together with OpenModelica compiler (implemented in Extended Modelica)  Supporting all Modelica algorithmic constructs  Better integration with other Modelica tools  model editor  equation debugger  Eclipse plugin for Modelica

10 Debugger Demo  Debugger demo on an expression evaluator

11 End Thank you! Questions?