OpenModelica Eclipse Plugin and MetaModelica Exercises

Similar documents
Towards Modelica 4 Meta-Programming and Language Modeling with MetaModelica 2.0

CS520 Setting Up the Programming Environment for Windows Suresh Kalathur. For Windows users, download the Java8 SDK as shown below.

Using Eclipse for C, MPI, and Suzaku

Meta-Programming and Language Modeling with MetaModelica 1.0

An Eclipse-based Integrated Environment for Developing Executable Structural Operational Semantics Specifications

Lab #1: A Quick Introduction to the Eclipse IDE

OpenModelica Development Environment with Eclipse Integration for Browsing, Modeling, and Debugging

OpenModelica Environment and Modelica Overview

Using Eclipse for Java. Using Eclipse for Java 1 / 1

Modelica Meta-Programming and Symbolic Transformations

ICOM 4015 Advanced Programming Laboratory. Chapter 1 Introduction to Eclipse, Java and JUnit

Eclipse. JVM, main method and using Eclipse. Dr. Siobhán Drohan. Produced by: Department of Computing and Mathematics

INF 111 / CSE 121. Homework 3: Code Reading

Creating a new CDC policy using the Database Administration Console

SDKs - Eclipse. SENG 403, Tutorial 2

1.00 Lecture 2. What s an IDE?

Prerequisites for Eclipse

ECE QNX Real-time Lab

Getting Started with Eclipse/Java

Overview of Eclipse Lectures. Module Road Map

Installing and using CW 10.6 for TPMS applications. Revision 4

DOMAIN TECHNOLOGIES. Getting Started Guide Version 1.1. BoxView IDE. Integrated Development Environment

CSCI 201 Google Chrome DevTools

OpenModelica Compiler (OMC) Overview

OpenModelica Compiler (OMC) Overview

Compile and Run WordCount via Command Line

Drools Tools Reference Guide. Version: CR1

NSIGHT ECLIPSE EDITION

NSIGHT ECLIPSE EDITION

Introduction to Eclipse

At the shell prompt, enter idlde

What s NetBeans? Like Eclipse:

Meta-Programming with Modelica. Model Transformations

Lab 0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio

NSIGHT ECLIPSE EDITION

Tutorial on Basic Android Setup

POOSL IDE Installation Manual

Synaptic Labs. HyperFlash Programmer for the Nios II Ecosystem. Introduction

OMEdit OpenModelica Connection Editor

form layout - we will demonstrate how to add your own custom form extensions in to form layout

Your password is: firstpw

COBOL-IT Developer Studio

Using NIOS 2 Embedded Design Suite 10

Technical Overview of OpenModelica and its Development Environment

Module 3: Working with C/C++

Lab 1: Introduction to C Programming. (Creating a program using the Microsoft developer Studio, Compiling and Linking)

COBOL-IT Developer Studio 2.0

Resource 2 Embedded computer and development environment

Table of Contents HOL-SDC-1422

Exercises. Cacti Installation and Configuration

Exercises. Cacti Installation and Configuration

Python Development with PyDev and Eclipse -

Introduction to Computation and Problem Solving

The ImageJ Eclipse Howto

STM32 Ecosystem Workshop. T.O.M.A.S Team

Using Virtual EEPROM and Flash API for Renesas MCUs RX600 Series

SpringSource Tool Suite 2.7.1

Wentworth Institute of Technology. Engineering & Technology WIT COMP1000. Testing and Debugging

Installing and using CW 10.x for TPMS applications. Revision 5

GRLIDE. LEON IDE plugin for Eclipse User's Manual. The most important thing we build is trust GR-LIDE-UM. August 2016, Version 1.

Outline. Debugging. In Class Exercise Solution. Review If Else If. Immediate Program Errors. Function Test Example

IDE: Integrated Development Environment

CodeWarrior Development Studio for etpu v10.x Quick Start SYSTEM REQUIREMENTS

WebSphere MQ V7 STEW. JMS Setup Lab. October 2008 V2.3

Debugging in AVR32 Studio

Just Enough Eclipse What is Eclipse(TM)? Why is it important? What is this tutorial about?

Infor LN Studio Application Development Guide

Eclipse/Websphere. Page 1 Copyright 2004 GPL License. All rights reserved.

IBM C Rational Functional Tester for Java. Download Full Version :

Modelica Based Parser Generator with Good Error Handling

OpenModelica OMShell and OMNotebook Introduction and Exercises

Javac and Eclipse tutorial

Using Eclipse and the

egui Eclipse User Guide

Visual Studio.NET. Although it is possible to program.net using only the command OVERVIEW OF VISUAL STUDIO.NET

Perl (5 Days Content)

IBM i Debugger. Overview Service Entry Points Debugger Functions Attach to an IBM i Job Launch Configurations and Settings

Java Program Structure and Eclipse. Overview. Eclipse Projects and Project Structure. COMP 210: Object-Oriented Programming Lecture Notes 1

Cupid Documentation. Release 0.2 (ESMF v7) Rocky Dunlap

Create Datamart. Alessandro Taurelli 2010/06/15 13:41

COMP 110/401 APPENDIX: INSTALLING AND USING ECLIPSE. Instructor: Prasun Dewan (FB 150,

Building and Running a Simple UML RT Model in RSARTE

Section 2: Getting Started with a FPU Demo Project using EK-LM4F232

i2b2 Workbench Developer s Guide: Eclipse Neon & i2b2 Source Code

The following content has been imported from Legacy Help systems and is in the process of being checked for accuracy.

OMEdit. OpenModelica Connection Editor. User Manual Version April 2011

Modelica Development Tooling for Eclipse

Module Road Map. 7. Version Control with Subversion Introduction Terminology

Wowza IDE 2. User's Guide

Laboratory Assignment #3 Eclipse CDT

MEDIA COMPUTATION DRJAVA. Lecture 11.3 November 7, 2008

Mobile App:IT. Methods & Classes

Parallel Tools Platform

InterPSS OpenCIM User s Guide Software Release 1.2.1

ActiveSpaces Transactions. Quick Start Guide. Software Release Published May 25, 2015

Code Composer Studio v4. Introduction

ADT: Eclipse development tools for ATL

QNX Software Development Platform 6.6. Quickstart Guide

Appendix C WORKSHOP. SYS-ED/ Computer Education Techniques, Inc.

CHAPTER 1INTRODUCTION... 3 CHAPTER 2INSTALLING ECLIPSE...

Transcription:

OpenModelica Eclipse Plugin and MetaModelica Exercises Adrian Pop adrpo@ida.liu.se PELAB/IDA/LIU 2007-03-29 OpenModelica & MetaModelica Course Outline Eclipse and Exercise Setup Exercises 01_experiment 02a_exp1, 02b_exp2 03_assignment 04a_assigntwotype 04b_modassigntwotype 05_advanced 06_OMCAndCorba 07-10 as samples of Prog. Lang. modeling 2 1

Eclipse Setup Switching Workspace 3 Select and Open all projects 4 2

Refresh all projects 5 Close all projects 6 3

Open the first project 7 Eclipse Setup Creating the projects Build Automatically should be DISABLED for all projects 8 4

Build the first project 9 Eclipse Building a project leave empty builds the project clean cleans the project run runs the program the problems are in the Problems view after the build the build and run results are displayed in the console 10 5

Setting the debug configuration 11 Specify the executable from the project Click Browse and select the executable you just built. Give parameters to the program 12 6

Specify the name of the executable Click Browse and select the executable you just built. 13 Set breakpoints in.mo file Double click on the ruler to set breakpoints 14 7

Run the debug configuration to start debugging Click and select the debug configuration. The debugging will start. 15 Eclipse will ask to switch to debugging perspective 16 8

Debugging perspective Use the buttons to step. Only step into works right now. Browse variables here. Also there is a tab with breakpoints. 17 Switching perspectives Switch between Debug and Modelica Perspective 18 9

Eclipse Setup Creating the projects repeat the procedure for all exercises 01_experiment 02a_exp1, 02b_exp2 03_assignment 04a_assigntwotype 04b_modassigntwotype 05_advanced 06_OMCAndCorba leave open only the project you are working on! close all the others 19 Eclipse Building a project 20 10

Eclipse Opening views To open additional views: Window->ShowView->Other 21 Exercises Each exercise is in a different Eclipse project All exercises have : README.txt - information about the exercise SOLUTION.txt the solution of the exercise (if the exercise has some implementation assignment) program.txt input program to the exercise, edit if needed (for the exercises which have an input) Consult the MetaModelica Programming Guide and the slides if you need additional information during the exercises. Of course, feel free to ask us any type of questions, is faster and better! 22 11

Exercises - 01_experiment In this exercise you experiment with Types Constants Functions Assignment Write functions in Functions.mo to display the constants defined in Types.mo. Search for // your code here in Main.mo and Functions.mo Compare your solution with the SOLUTION.txt you find in the Eclipse project 23 Exercises 02a_exp1 In this exercise you will add new constructs to the exp1 language and deal with their evaluation. Assignment - add new constructs to the language a power operator (^) a factorial operator (!) search for // your code here within Exp1.mo Note the parser/lexer are ready, you only have to uncomment some rules in parser.y Compare your solution with the SOLUTION.txt you find in the Eclipse project 24 12

Exercises 02b_exp2 In this exercise you will explore a different way to model the exp1 language using different Exp trees. Explore the Exp2.mo file and compare it with Exp1.mo file. 25 Exercises 03_assignment Assignment - add functions to print: the assignments present in the current program before the actual evaluation the environment after it was augmented with the assignments search for // your code here within Assignment.mo Compare your solution with the SOLUTION.txt you find in the Eclipse project 26 13

Exercises 04a_assigntwotype Assignment - add functions to print: add a new String type which can hold only integers as strings to the current Exp node add cases to evaluate expressions/assignments of the form "2" + 1 + "1" + 1.0 in the eval function search for // your code here within AssignTwoType.mo Note the parser/lexer are ready, you only have to uncomment some rules in parser.y Compare your solution with the SOLUTION.txt you find in the Eclipse project 27 Exercises 04b_modassigntwotype In this exercise you will explore a different way to structure your code within different packages. The code from 04a_assigntwotype is now split over 4 packages. Compare the 04a/b projects. 28 14

Exercises 05_advanced (I) In this exercise you experiment with polymorphic types constants higher order functions Assignment 1 Write a polymorphic function that orders a list of any type. The function has as input a list and a compare function between the objects of that list. Write the comparison functions for Integers, Strings and Reals. Test your function on the Types.intList 29 Exercises 05_advanced (II) Assignment 2 Write a polymorphic map function that applies a function over a list and returns a new list with the result. Write three functions that transform from: integer to real integer to string real to string Use your map function and the two transformation functions to transform the Types.intList to a list of reals and a list of string, then apply the ordering function from Assignment 1 on the newly created lists 30 15

Exercises 05_advanced (III) Assignment 3 Write a polymorphic map function that applies a print function over a list (of Strings) and prints the it. Use the transformer functions from real->string and integer->string from Assignment 2 to transform the real list or the integer list to a string list for printing. Compare your solution with the SOLUTION.txt you find in the Eclipse project 31 OMC Overview We are Switching to OMC Overview now! 32 16

Eclipse Switching to Java Perspective 33 Exercises 06_OMCAndCorba In this exercise you will send commands to the OMC Compiler (omc.exe) via CORBA OMCProxy.java has functionality for starting the omc process if is not already started the starting is a bit different for Windows/Linux sending commands to OMC logging facilities If you need clients in C++ or Python check http://www.ida.liu.se/labs/pelab/modelica/openmodelica.html developer pages 34 17

Eclipse Setup Creating the projects 35 End Thank you! Administrative Question: What would you like to implement tomorrow in the OpenModelica Compiler? 36 18