Lect 7: DEVS Model Reuse and Schedule Conflict
|
|
- Moses Doyle
- 6 years ago
- Views:
Transcription
1 Lect 7: DEVS Model Reuse and Schedule Conflict
2 Simulation Enge: Independent of Model 2 of 20 Model Execution Algorithm = Execution Enge = Simulation Enge Model and Simulation Enge should be dependent A simulation enge can execute a model different manner. Ex: Model execution time Virtual vs Real time Static System (No time specified) Dynamic System (Time advance specified ) Model Simulteneous Eq. Rule Base Differential Eq. DEVS Eq. Interface Simulation Enge Eq. Solver (Substitution) Inference Enge (Rule Matchg) Numerical Analyzer (Numerical Integrator ) DEVS Enge (Time schedule & Message delivery) One model may have different simulation enge Complexity of enge vs Execution time
3 DEVS M&S Environment with Language L: DEVSim-L 3 of 20 Discrete Event System Modelg/Simulation Tool Realization of the DEVS formalism C++ / Java DEVS Formalism and Object-oriented Paradigm Separatg Models from Simulation Enge DEVSim++ (C++); DEVSimJava (Java); DEVSimHLA (C++ and HLA compliant) DEVSim-L Hierarchical Simulation Enge Modeler s Interface DEVS Modelg Coupled DEVS request ack Root Coordator Coordators Atomic DEVS request ack Simulators Utility Class Library of Language L See the DEVSimHLA manual for class defitions hierarchy
4 Why C++ Implementation DEVSim++? 4 of 20 C++ Language Developed by Bjarne Stroustrup (Bell Laboratories) early 1980 s Motivation of C++ Imitation of the first object-oriented simulation language, Simula 67, usg C Introducg Class concept usg C C with Classes Use as discrete event simulation Characteristics of Object-oriented language C++ Object-oriented simulation language Move toward an object-oriented general purpose language One-to-one mappg from a real-world object to a model class Encapsulation as components beg resused Ease of modification/matenance Improved S/W Quality Support of C languae DEVSim++ M&S Tool Development of DEVS models usg C++
5 CAtomic and CCoupled Head files DEVSim++ 5 of 20 Part of Atomic DEVS defition CAtomic.h used DEVSim++ class CAtomic : public Cmodel public: virtual bool ExtTransFn(const CDEVSimMessage &) return false; virtual bool IntTransFn() return false; virtual bool OutputFn(CDEVSimMessage &) return false; virtual TimeType TimeAdvanceFn() return -1; ; void Contue() m_bcontue = true; void Cancel() m_bcancel = true; DEVSim++ classes Cmodel CAtomic CCoupled heritance Users defed classes Part of Coupled DEVS defition CCoupled.h used DEVS++ class CCoupled : public Cmodel public: bool AddComponent(t num, ); bool AddCouplg(CModel *src_model, const char *src_port, CModel *dst_model, const char *dst_port); bool AddCouplg(CModel *src_model, unsigned t src_port, CModel *dst_model, unsigned t dst_port); bool RemoveCouplg(CModel* src_model, const char* src_port, CModel* dst_model, const char *dst_port); bool RemoveCouplg(CModel* src_model, const char* src_port); bool RemoveCouplg(CModel* src_model, unsigned t src_port, CModel* dst_model, unsigned t dst_port); bool RemoveCouplg(CModel* src_model, unsigned t src_port); ; bool SetPriority(t num, );
6 DEVSim++/ DEVSimHLA Code For SgleServerQueue 6 of 20 SgleSeverQueue Generator QueueServer class SgleSeverQueue : public CCoupled public: SgleSverQueue(); ~SgleServerQueue(); ; SgleServerQueue::SgleServerQueue() CModel *Gen, *QueSer; Gen = new Generator; QueSer = new QueueServer; AddComponent(2, Gen, QueSer); SetPriority(2, Gen, QueSer); AddCouplg(Gen, ", QueSer, ");...
7 Defition of Atomic Class QueueServer API 7 of 20 class QueueServer : public CAtomic public: QueueServer(); ~ QueueServer(); virtual bool ExtTransFn(const Cmessage &); virtual bool IntTransFn(); virtual bool OutputFn(CMessage &message); virtual TimeType TimeAdvanceFn(); ; // Atomic Model: QueueServer // external transition function // ternal transition fucntion // put function // time advance function bool QueueServer ::ExtTransFn(const CMessage &message) bool QueueServer ::IntTransFn() bool QueueServer ::OutputFn(CMessage &message) TimeType QueueServer ::TimeAdvanceFn()
8 Server.status DEVSim++ Code For QueueServer 8 of 20 B F QueueServer 0 Queue Server Queue.length Server.status X = Y = S = (length,status) length I, status B, F ext ((n 0,-),) = (n+1,-) ext ((0,F),) = (1,B) t ((n 1,B)) = (n-1,b) t ((n=1,b)) = (0,F) ((n 0,-)) = ta((n 0,-)) = Service_time queue.length (n) bool QueueServer::OutputFn(CMessage &message) bool class QueueServer::ExtTransFn(const if(!isstate(length, 0)) public CAtomic CMessage &message) message.setportvalue(, NULL); public: if(message.getport() return true; == ) QueueServer(); if(!isstate (length, 0)) ~QueueServer(); SetStateValue(length, GetIntStateValue(length)+1); virtual else if(isstate(length, bool ExtTransFn(const 0) && IsState(status, CMessage &); F)) TimeType QueueServer::TimeAdvanceFn() virtual SetStateValue(length, bool IntTransFn(); 1); virtual SetStateValue(Status, bool OutputFn(CMessage B); if(isstate(length, 0)) &); virtual return TimeType Service_Time; TimeAdvanceFn(); ; return true; else return Infity; QueueServer::QueueServer() bool QueueServer::IntTransFn() AddInPorts(1, ); if(!isstate(length, AddOutPorts(1, 1) ); && IsState(status, B )) AddStateVariables SetStateValue(length, (2, length, GetIntStateValue(length)-1); status ); InitStateValue SetStateBale(status, ( length, B); new Integer(0)); InitStateValue ( status, new Strg( F )); else if(isstate(length, 1) && IsState(status, B)) SetStateValue(length, 0); QueueServer::~QueueServer() SetStateBale(status, F); return true;
9 Two Dimensional Reuse DEVSim-L (L: OOP Lang.) 9 of 20 M123 M12 M3 Components reuse Coupled models Coupled models Subclasses of atomic or coupled models M12 Atomic models M1 M2 Library of characteristic functions and state variables OO Paradigm Italics can be reused M = < X, Y, S, ext, t, ta, > DN = < X,Y, M, EIC, EOC, IC, SELECT>
10 Reuse Through Inheritance: Subclass of Atomic DEVS 10 of 20 Atomic_ models sert : ext delete: t + Buffer ext : X Q S t : S S : S Y ta : S R + 0, reusable delete FIFO (First-, First-) sert ext : X Q S :New defition t : S S : S Y Reuse by heritance ta : S R + 0, sert delete LIFO (Last-, First-) ext : X Q S : New defition t : S S : S Y Reuse ta : S R + by heritance 0,
11 DEVSim++ Code : Buffer, FIFO, LIFO 11 of 20 class Buffer : public CAtomic ; virtual Buffer::ExtTransFn(const CMessage &message) Buffer bool Buffer::IntTransFn() bool Buffer::OutputFn(CMessage &message) TimeType Buffer::TimeAdvanceFn() Inheritance class FIFO : public Buffer ; FIFO bool FIFO::ExtTransFn(const Cmessage &message) class LIFO : public Buffer ; LIFO bool LIFO::ExtTransFn(const CMessage &message)
12 Reuse Through Inheritance: Subclass of Coupled DEVS 12 of 20 Example of Reuse couplg scheme Coupled DEVS EIC : parameterzied one of multicast, unicast, broadcast IC : fixed EOC : fixed Multicast-1 Unicast-3 Broadcast-1 M1 M1 M1 M2 M2 M2 M3 M3 M3
13 Example of Subclass of Coupled Models 13 of 20 Coupled_models Receiver Mi : reusable EIC IC EOC reusable select Multicast EIC : REC-to-many IC EOC select Mi Reuse by heritance Unicast EIC : REC-to-one IC EOC select Mi Reuse by heritance Broadcast EIC : REC-to-all IC EOC select Mi Reuse by heritance
14 DEVS as State/put Equation Form 14 of 20 DES Dynamic Equations q = (s, r ) = t (q) ext (q, x ) = t (s, r) ext ( (s, r), x ) y = (s, r) Interpretation q' = t (s, r) ext ( (s, r), x ) t (s, r) if only t occurs = ext ( (s, r), x ) if only ext occurs Input-free transition putted transition Not happen both t and ext occur y = (s, r) : always occurs with t (s, r)
15 DEVS Graph DEVS graph G = < V, E > Visual representation of DEVS atomic model a labeled graph V represents DEVS sequential (discrete) state V = S E represents ternal or external transition with labels on E E V V with a label (X Y ) R X: put; Y:put; : empty put; R: elapsed time Representation Example (,e) (x,0) s 0 s 0 (y, ta(s 0 )-e) s 2 Internal transition + put External transition 15 of 20 s 1 s 0 s 1 (x,e) (y, ta(s 0 )) s 2 s 0 s 1 (y, r) x s 2 Interpretation If S= s0 and X= x before r then S = s2 If S=s0 and no put until r then S=s1 and Y=y e at (x, e) is not represented this model Note] Each node G can have either ternal transition or external transition or both.
16 Schedule Conflict(Tie) 16 of 20 Event schedulg: Only for put event by ta after each state transition M Incomg time of is not controllable by M Outgog time of is scheduled by M s ta Assumptions on Atomic DEVS Modelg A-1: Transition either by put or by put-free, but not both :: q = t (q) ext (q, x ) A-2: Arrivg one put event at a time :: ext (q, x) Schedule Conflict Case: Violation of assumptions Internal() and External() Events Violation of A-1 M1 External(1) and External(2) Events Violation of A M2 Internal(1) and Internal(2) Events Never happen (because one put for a state) M3 1 2
17 Schedule Tie-Break: Select function 17 of 20 Tie-break ==> Select : 2 Mi M i conflict resolution: priority of ternal transitions of models that cause conflict. Case A-1: For M1, Internal and external transitions are conflict M1 Tie-break:: Select (M1, M3) = M1 M3 t ( (s, r)) for M1 is applied first Then, t ( (s, r)) for M3 Case A-2: For M2, two puts are conflict M4 M5 1 2 M2 Tie-break:: Select (M4, M5) = M4 For M2 ext ( (s, r), 1 ) is applied first Then, ext ( (s, r), 2) Select decides order of q' = t (q) ext (q, x ) when both transition occur
18 Schedule Contuation or Override 18 of 20 s 0 x (y, r 0 ) s 2 s 1 Assume: ta(s 0 ) = r 0 current simulation time: t case 1: no put is arrived next r0 time unit at (t + r 0 ), ternal transition :: (s 0, r 0 ) -> (s 1, 0) generate put y new schedule r 1 = ta(s 1 ) case 2: an put x is arrived next e < r 0 time unit at (t + e), external transition :: ((s 0, e), x) -> (s 2, 0) case 2-1: contuation of previous schedule ta(s 2 ) = r 2 = r 0 e case 2-2: cancel previous schedule and make a new one ta(s 2 ) = r 2 = new value
19 Time Chart for Schedule Contuation/Override 19 of 20 s 0 s 0 s 1 y r 0 = ta(s 0 ) Initial Schedule r 0 Case 1: no put before scheduled time y y x s 2 r 0 -e s 2 x r 2 s 0 e s 0 e r 0 Case 2-1: contuation of previous schedule r 0 Case 2-2: make a new schedule
20 Schedule Contuation DEVSim++: Macro contue Time advance : ta(s) ta is decided based only on the current discrete state Executed after both ternal(put-free) and external(putted) state transitions Time advance after ternal transition A new schedule for a new state is required: ta(current-state) = new-value Time advance after external transition Schedule at the previous state (ta-old) may exist ta(current-state) after external transition is either contuation of old one or new one. Time advance after external transition For contuation extra state variables (ta-old, e) may be required (ta-old: existg schedule; e: time elapsed after existg schedule) Time advance at current state ta(current-state) = ta-old e for contuation of existg schedule = new-value otherwise Macro contue DEVSim++ contue :: ta(current-state) = ta-old e The macro contue DEVSimHLA can be used with external transition function with extra state vars by users 20 of 20
Lect 10: DEVS Modeling Process and Implementation in DEVSim++
Lect 10: DEVS Modeling Process and Implementation in DEVSim++ OO Modeling vs DEVS Modeling Process 2 of 32 OO Modeling by Observation of real world Step 1:Identify objects and associated attributes Step
More informationSTUDY NOTES UNIT 1 - INTRODUCTION TO OBJECT ORIENTED PROGRAMMING
OBJECT ORIENTED PROGRAMMING STUDY NOTES UNIT 1 - INTRODUCTION TO OBJECT ORIENTED PROGRAMMING 1. Object Oriented Programming Paradigms 2. Comparison of Programming Paradigms 3. Basic Object Oriented Programming
More informationFramework for Component-based Modeling/Simulation of Discrete Event Systems
Framework for Component-based ing/simulation of Discrete Event Systems Young-Ik Cho, Jae-Hyun Kim and Tag Gon Kim Systems ing Simulation Lab Department of Electrical Engineering & Computer Science KAIST
More informationDEVSim++ Environment
Reusability Measure of DEVS Simulation Models in DEVSim++ Environment Yoonil Choi and Tag Gon Kim Department of Electrical Engineering Korea Advanced Institute of Science and Technology 373-1 Kusong-dong
More informationOOPLs - Inheritance. Inheritance
OOPLs - Inheritance Desirable properties Models of inheritance Class-based: with single, multiple parents Delegation Mix-ins Functionality as code reuse as subtyping 1 Inheritance Data abstraction plus
More informationC++ Programming: Introduction to C++ and OOP (Object Oriented Programming)
C++ Programming: Introduction to C++ and OOP (Object Oriented Programming) 2018 년도 2 학기 Instructor: Young-guk Ha Dept. of Computer Science & Engineering Contents Brief introduction to C++ OOP vs. Procedural
More informationMethodology for Automatic Synthesis of Wargame Simulator using DEVS
Methodology for Automatic Synthesis of Wargame Simulator using DEVS Kim Ju Young, Shim Kwang Hyun ETRI kimjy1113@etri.re.kr, shimkh@etri.re.kr Abstract In specific domain such as wargame, simulator developers
More informationCS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE
CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE PART A UNIT I 1. Differentiate object oriented programming from procedure oriented programming. 2. Define abstraction and encapsulation. 3. Differentiate
More informationIEEE TRANSACTIONS ON SYSTEMS, MAN, AND CYBERNETICS: SYSTEMS 1. Se Jung Kwon, Bonggu Kang, Changbeom Choi, and Tag Gon Kim, Senior Member, IEEE
IEEE TRANSACTIONS ON SYSTEMS, MAN, AND CYBERNETICS: SYSTEMS 1 Adaptive Discrete Event Simulation Systems to Embrace Changes of Requirements Using Event Control Models Se Jung Kwon, Bonggu Kang, Changbeom
More informationParametric Behavior Modeling Framework for War Game Models Development Using OO Co-Modeling Methodology
Parametric Behavior Modeling Framework for War Game Models Development Using OO Co-Modeling Methodology Jae-Hyun Kim* and Tag Gon Kim** Department of EECS KAIST 373-1 Kusong-dong, Yusong-gu Daejeon, Korea
More informationCSE 504. Expression evaluation. Expression Evaluation, Runtime Environments. One possible semantics: Problem:
Expression evaluation CSE 504 Order of evaluation For the abstract syntax tree + + 5 Expression Evaluation, Runtime Environments + + x 3 2 4 the equivalent expression is (x + 3) + (2 + 4) + 5 1 2 (. Contd
More informationCHAPTER 5 GENERAL OOP CONCEPTS
CHAPTER 5 GENERAL OOP CONCEPTS EVOLUTION OF SOFTWARE A PROGRAMMING LANGUAGE SHOULD SERVE 2 RELATED PURPOSES : 1. It should provide a vehicle for programmer to specify actions to be executed. 2. It should
More informationCIS233J Java Programming II. Threads
CIS233J Java Programming II Threads Introduction The purpose of this document is to introduce the basic concepts about threads (also know as concurrency.) Definition of a Thread A thread is a single sequential
More informationC Multiple Choice Questions and answers MCQ with Ans.
C Multiple Choice Questions and answers MCQ with Ans. 1. Who is father of C Language? A. Bjarne Stroustrup B. Dennis Ritchie C. James A. Gosling D. Dr. E.F. Codd Answer : B 2. C Language developed at?
More informationSTRUCTURING OF PROGRAM
Unit III MULTIPLE CHOICE QUESTIONS 1. Which of the following is the functionality of Data Abstraction? (a) Reduce Complexity (c) Parallelism Unit III 3.1 (b) Binds together code and data (d) None of the
More informationEvaluation Issues in Generic Programming with Inheritance and Templates in C++
Evaluation Issues in Generic Programming with Inheritance and Templates in C++ Emil Vassev, Joey Paquet Department of Computer Science and Software Engineering Concordia University Montreal, Quebec, H3G
More informationDEVS and DEVS Model. Dr. Xiaolin Hu. Dr. Xiaolin Hu
DEVS and DEVS Model Outline Review of last class DEVS introduction How DEVS model works Simple atomic models (SISO) Simple atomic models (with multiple ports) Simple coupled models Event list Scheduling
More informationDEVS Framework for Component-based Modeling/Simulation of Discrete Event Systems
DEVS Framework for Component-based Modeling/Simulation of Discrete Event Systems Young Ik Cho and Tag Gon Kim Systems Modeling Simulation Lab Department of Electrical Engineering and Computer Science Korea
More informationAn XML-based DEVS Modeling Tool to Enhance Simulation Interoperability
An XML-based DEVS Modeling Tool to Enhance Simulation Interoperability Yung-Hsin Wang Yao-Chung Lu Department of Information Management Department of Computer Science and Engineering Tatung University
More informationPART I. Part II Answer to all the questions 1. What is meant by a token? Name the token available in C++.
Unit - III CHAPTER - 9 INTRODUCTION TO C++ Choose the correct answer. PART I 1. Who developed C++? (a) Charles Babbage (b) Bjarne Stroustrup (c) Bill Gates (d) Sundar Pichai 2. What was the original name
More informationIntroduction to C++ Systems Programming
Introduction to C++ Systems Programming Introduction to C++ Syntax differences between C and C++ A Simple C++ Example C++ Input/Output C++ Libraries C++ Header Files Another Simple C++ Example Inline Functions
More informationData Abstractions. National Chiao Tung University Chun-Jen Tsai 05/23/2012
Data Abstractions National Chiao Tung University Chun-Jen Tsai 05/23/2012 Concept of Data Structures How do we store some conceptual structure in a linear memory? For example, an organization chart: 2/32
More informationLecture 13: Object orientation. Object oriented programming. Introduction. Object oriented programming. OO and ADT:s. Introduction
Lecture 13: Object orientation Object oriented programming Introduction, types of OO languages Key concepts: Encapsulation, Inheritance, Dynamic binding & polymorphism Other design issues Smalltalk OO
More informationMODELING AND SIMULATION OF THRESHOLD ANALYSIS FOR PVFS IN WIRELESS SENSOR NETWORKS
Science MODELING AND SIMULATION OF THRESHOLD ANALYSIS FOR PVFS IN WIRELESS SENSOR NETWORKS Tae Ho Cho *1, Su Man Nam 2 *1 College of Software, Sungkyunkwan University, KOREA 2 College of Information and
More informationObject Oriented Programming
Object Oriented Programming Ray John Pamillo 1/27/2016 1 Nokia Solutions and Networks 2014 Outline: Brief History of OOP Why use OOP? OOP vs Procedural Programming What is OOP? Objects and Classes 4 Pillars
More informationObject-Oriented Design
Object-Oriented Design Lecture 14: Design Workflow Department of Computer Engineering Sharif University of Technology 1 UP iterations and workflow Workflows Requirements Analysis Phases Inception Elaboration
More informationClasses, subclasses, subtyping
1 CSCE 314: Programming Languages Dr. Flemming Andersen Classes, subclasses, subtyping 2 3 Let me try to explain to you, what to my taste is characteristic for all intelligent thinking. It is, that one
More informationAdvanced features of Functional Programming (Haskell)
Advanced features of Functional Programming (Haskell) Polymorphism and overloading January 10, 2017 Monomorphic and polymorphic types A (data) type specifies a set of values. Examples: Bool: the type of
More informationPierce Ch. 3, 8, 11, 15. Type Systems
Pierce Ch. 3, 8, 11, 15 Type Systems Goals Define the simple language of expressions A small subset of Lisp, with minor modifications Define the type system of this language Mathematical definition using
More informationAN OBJECT-ORIENTED VISUAL SIMULATION ENVIRONMENT FOR QUEUING NETWORKS
AN OBJECT-ORIENTED VISUAL SIMULATION ENVIRONMENT FOR QUEUING NETWORKS Hussam Soliman Saleh Al-Harbi Abdulkader Al-Fantookh Abdulaziz Al-Mazyad College of Computer and Information Sciences, King Saud University,
More informationWeek 7. Statically-typed OO languages: C++ Closer look at subtyping
C++ & Subtyping Week 7 Statically-typed OO languages: C++ Closer look at subtyping Why talk about C++? C++ is an OO extension of C Efficiency and flexibility from C OO program organization from Simula
More informationChapter 13. Object Oriented Programming
Chapter 13. Object Oriented Programming Byoung-Tak Zhang TA: Hanock Kwak Biointelligence Laboratory School of Computer Science and Engineering Seoul National University http://bi.snu.ac.kr Computer Programming
More informationProblem with Scanning an Infix Expression
Operator Notation Consider the infix expression (X Y) + (W U), with parentheses added to make the evaluation order perfectly obvious. This is an arithmetic expression written in standard form, called infix
More informationCourse 7. Reusability, interoperability. S. Motogna - Software Quality
Course 7 Reusability, interoperability Reusability Reusability Definition: Extent to which a program can be used in other applications - related to the packaging and scope of the functions that programs
More informationSDL. Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund, Informatik 年 10 月 18 日. technische universität dortmund
12 SDL Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund, Informatik 12 2017 年 10 月 18 日 Springer, 2010 These slides use Microsoft clip arts. Microsoft copyright restrictions apply. Models
More informationChapter 8: Data Abstractions
Chapter 8: Data Abstractions Computer Science: An Overview Tenth Edition by J. Glenn Brookshear Presentation files modified by Farn Wang Copyright 28 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
More information2. The object-oriented paradigm
2. The object-oriented paradigm Plan for this section: Look at things we have to be able to do with a programming language Look at Java and how it is done there Note: I will make a lot of use of the fact
More informationAdvanced Database Applications. Object Oriented Database Management Chapter 13 10/29/2016. Object DBMSs
Object Oriented Database Chapter 13 1 Object DBMSs Underlying concepts: Freely sharing data across processing routines creates unacceptable data dependencies All software should be constructed out of standard,
More informationUML-BASED MODELING AND SIMULATION METHOD FOR MISSION-CRITICAL REAL-TIME EMBEDDED SYSTEM DEVELOPMENT
UML-BASED MODELING AND SIMULATION METHOD FOR MISSION-CRITICAL REAL-TIME EMBEDDED SYSTEM DEVELOPMENT KeungSik Choi, SungChul Jung, HyunJung Kim, Doo-Hwan Bae Department of EECS Korea Advanced Institute
More informationUNIT V. Computer Networks [10MCA32] 1
Computer Networks [10MCA32] 1 UNIT V 1. Explain the format of UDP header and UDP message queue. The User Datagram Protocol (UDP) is a end-to-end transport protocol. The issue in UDP is to identify the
More informationOBJECT ORIENTED PROGRAMMING USING C++ CSCI Object Oriented Analysis and Design By Manali Torpe
OBJECT ORIENTED PROGRAMMING USING C++ CSCI 5448- Object Oriented Analysis and Design By Manali Torpe Fundamentals of OOP Class Object Encapsulation Abstraction Inheritance Polymorphism Reusability C++
More informationChapter 8: Data Abstractions
Chapter 8: Data Abstractions Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear Copyright 2012 Pearson Education, Inc. Chapter 8: Data Abstractions 8.1 Data Structure Fundamentals 8.2
More informationLesson 10A OOP Fundamentals. By John B. Owen All rights reserved 2011, revised 2014
Lesson 10A OOP Fundamentals By John B. Owen All rights reserved 2011, revised 2014 Table of Contents Objectives Definition Pointers vs containers Object vs primitives Constructors Methods Object class
More informationExercise Unit 2: Modeling Paradigms - RT-UML. UML: The Unified Modeling Language. Statecharts. RT-UML in AnyLogic
Exercise Unit 2: Modeling Paradigms - RT-UML UML: The Unified Modeling Language Statecharts RT-UML in AnyLogic Simulation and Modeling I Modeling with RT-UML 1 RT-UML: UML Unified Modeling Language a mix
More informationProgramming, numerics and optimization
Programming, numerics and optimization Lecture A-4: Object-oriented programming Łukasz Jankowski ljank@ippt.pan.pl Institute of Fundamental Technological Research Room 4.32, Phone +22.8261281 ext. 428
More informationLecture 7: Type Systems and Symbol Tables. CS 540 George Mason University
Lecture 7: Type Systems and Symbol Tables CS 540 George Mason University Static Analysis Compilers examine code to find semantic problems. Easy: undeclared variables, tag matching Difficult: preventing
More informationInheritance and Substitution (Budd chapter 8, 10)
Inheritance and Substitution (Budd chapter 8, 10) 1 2 Plan The meaning of inheritance The syntax used to describe inheritance and overriding The idea of substitution of a child class for a parent The various
More informationContextual Analysis (2) Limitations of CFGs (3)
G53CMP: Lecture 5 Contextual Analysis: Scope I Henrik Nilsson University of Nottgham, UK This Lecture Limitations of context-free languages: Why checkg contextual constrats is different from checkg syntactical
More informationJava. Representing Data. Representing data. Primitive data types
Computer Science Representing Data Java 02/23/2010 CPSC 449 161 Unless otherwise noted, all artwork and illustrations by either Rob Kremer or Jörg Denzinger (course instructors) Representing data Manipulating
More informationGet Unique study materials from
Downloaded from www.rejinpaul.com VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur 603203. DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year & Semester : IV Section : EEE - 1 & 2 Subject Code
More informationDay 6. COMP1006/1406 Summer M. Jason Hinek Carleton University
Day 6 COMP1006/1406 Summer 2016 M. Jason Hinek Carleton University today s agenda assignments Assignment 3 is due on Monday a quick look back abstract classes and interfaces casting objects abstract data
More informationPetri Nets ee249 Fall 2000
Petri Nets ee249 Fall 2000 Marco Sgroi Most slides borrowed from Luciano Lavagno s lecture ee249 (1998) 1 Models Of Computation for reactive systems Main MOCs: Communicating Finite State Machines Dataflow
More informationSri Vidya College of Engineering & Technology
UNIT I INTRODUCTION TO OOP AND FUNDAMENTALS OF JAVA 1. Define OOP. Part A Object-Oriented Programming (OOP) is a methodology or paradigm to design a program using classes and objects. It simplifies the
More informationObject Oriented Programming in Java. Jaanus Pöial, PhD Tallinn, Estonia
Object Oriented Programming in Java Jaanus Pöial, PhD Tallinn, Estonia Motivation for Object Oriented Programming Decrease complexity (use layers of abstraction, interfaces, modularity,...) Reuse existing
More informationCMSC 330: Organization of Programming Languages
CMSC 330: Organization of Programming Languages Operational Semantics CMSC 330 Summer 2018 1 Formal Semantics of a Prog. Lang. Mathematical description of the meaning of programs written in that language
More informationCS 376b Computer Vision
CS 376b Computer Vision 09 / 25 / 2014 Instructor: Michael Eckmann Today s Topics Questions? / Comments? Enhancing images / masks Cross correlation Convolution C++ Cross-correlation Cross-correlation involves
More informationSeptember 10,
September 10, 2013 1 Bjarne Stroustrup, AT&T Bell Labs, early 80s cfront original C++ to C translator Difficult to debug Potentially inefficient Many native compilers exist today C++ is mostly upward compatible
More information1st Semester MTCE 601A COMPUTER SYSTEM SOFTWARE
1st Semester MTCE 601A COMPUTER SYSTEM SOFTWARE LECTURE-1 Syllabus Introduction 1.1 Introduction to Object Oriented 1.2 Introduction to UML 1.3 Software Process and OOA&D 1.4 Component and CBSD 1.5 Patterns
More informationComputer Science II (20073) Week 1: Review and Inheritance
Computer Science II 4003-232-01 (20073) Week 1: Review and Inheritance Richard Zanibbi Rochester Institute of Technology Review of CS-I Hardware and Software Hardware Physical devices in a computer system
More informationOutline. 1 About the course
Outline EDAF50 C++ Programming 1. Introduction 1 About the course Sven Gestegård Robertz Computer Science, LTH 2018 2 Presentation of C++ History Introduction Data types and variables 1. Introduction 2/1
More informationCS 320 Introduction to Software Engineering Spring March 06, 2017
CS 320 Introduction to Software Engineering Spring 2017 March 06, 2017 Recap: types of Polymorphism Recap: types of Polymorphism Ad-hoc polymorphism (e.g., operator overloading) a + b String vs. int, double,
More informationShort Notes of CS201
#includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system
More informationChapter 5: Procedural abstraction. Function procedures. Function procedures. Proper procedures and function procedures
Chapter 5: Procedural abstraction Proper procedures and function procedures Abstraction in programming enables distinction: What a program unit does How a program unit works This enables separation of
More informationOO Design Principles
OO Design Principles Software Architecture VO (706.706) Roman Kern Institute for Interactive Systems and Data Science, TU Graz 2018-10-10 Roman Kern (ISDS, TU Graz) OO Design Principles 2018-10-10 1 /
More informationData Structures. BSc in Computer Science University of New York, Tirana. Assoc. Prof. Marenglen Biba 1-1
Data Structures BSc in Computer Science University of New York, Tirana Assoc. Prof. Marenglen Biba 1-1 General info Course : Data Structures (3 credit hours) Instructor : Assoc. Prof. Marenglen Biba Office
More informationCS 32. Lecture 5: Templates
CS 32 Lecture 5: Templates Vectors Sort of like what you remember from Physics but sort of not Can have many components Usually called entries Like Python lists Array vs. Vector What s the difference?
More informationTail Calls. CMSC 330: Organization of Programming Languages. Tail Recursion. Tail Recursion (cont d) Names and Binding. Tail Recursion (cont d)
CMSC 330: Organization of Programming Languages Tail Calls A tail call is a function call that is the last thing a function does before it returns let add x y = x + y let f z = add z z (* tail call *)
More informationCS201 - Introduction to Programming Glossary By
CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with
More informationIntroduction to Functional Programming in Haskell 1 / 56
Introduction to Functional Programming in Haskell 1 / 56 Outline Why learn functional programming? The essence of functional programming What is a function? Equational reasoning First-order vs. higher-order
More informationWhat does it mean by information hiding? What are the advantages of it? {5 Marks}
SECTION ONE (COMPULSORY) Question #1 [30 Marks] a) Describe the main characteristics of object-oriented programming. {5 Marks Encapsulation the ability to define a new type and a set of operations on that
More informationTypes. Type checking. Why Do We Need Type Systems? Types and Operations. What is a type? Consensus
Types Type checking What is a type? The notion varies from language to language Consensus A set of values A set of operations on those values Classes are one instantiation of the modern notion of type
More informationCS 520 Theory and Practice of Software Engineering Fall 2017
CS 520 Theory and Practice of Software Engineering Fall 2017 OO design principles September 14, 2017 Today Code review and (re)design of an MVC application OO design principles Information hiding (and
More informationCS 520 Theory and Practice of Software Engineering Fall 2018
Today CS 520 Theory and Practice of Software Engineering Fall 2018 Object Oriented (OO) Design Principles September 13, 2018 Code review and (re)design of an MVC application (and encapsulation) Polymorphism
More informationFast Introduction to Object Oriented Programming and C++
Fast Introduction to Object Oriented Programming and C++ Daniel G. Aliaga Note: a compilation of slides from Jacques de Wet, Ohio State University, Chad Willwerth, and Daniel Aliaga. Outline Programming
More informationJAVA MOCK TEST JAVA MOCK TEST II
http://www.tutorialspoint.com JAVA MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to Java Framework. You can download these sample mock tests at your
More informationTopics. Java arrays. Definition. Data Structures and Information Systems Part 1: Data Structures. Lecture 3: Arrays (1)
Topics Data Structures and Information Systems Part 1: Data Structures Michele Zito Lecture 3: Arrays (1) Data structure definition: arrays. Java arrays creation access Primitive types and reference types
More informationObjects as Session-Typed Processes
Objects as Session-Typed Processes Stephanie Balzer and Frank Pfenning Computer Science Department, Carnegie Mellon University AGERE! 2015 The essence of object-orientation 2 The essence of object-orientation
More informationUnit 1 : Principles of object oriented programming
Unit 1 : Principles of object oriented programming Difference Between Procedure Oriented Programming (POP) & Object Oriented Programming (OOP) Divided Into Importance Procedure Oriented Programming In
More informationCOMPUTER APPLICATION
Total No. of Printed Pages 16 HS/XII/A.Sc.Com/CAP/14 2 0 1 4 COMPUTER APPLICATION ( Science / Arts / Commerce ) ( Theory ) Full Marks : 70 Time : 3 hours The figures in the margin indicate full marks for
More information6.096 Introduction to C++ January (IAP) 2009
MIT OpenCourseWare http://ocw.mit.edu 6.096 Introduction to C++ January (IAP) 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. Welcome to 6.096 Lecture
More informationChapter 13 Object Oriented Programming. Copyright 2006 The McGraw-Hill Companies, Inc.
Chapter 13 Object Oriented Programming Contents 13.1 Prelude: Abstract Data Types 13.2 The Object Model 13.4 Java 13.1 Prelude: Abstract Data Types Imperative programming paradigm Algorithms + Data Structures
More informationObject-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 2: Review of Object Orientation
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 2: Review of Object Orientation 2.1 What is Object Orientation? Procedural paradigm: Software is organized
More informationChapter 15 - C++ As A "Better C"
Chapter 15 - C++ As A "Better C" Outline 15.1 Introduction 15.2 C++ 15.3 A Simple Program: Adding Two Integers 15.4 C++ Standard Library 15.5 Header Files 15.6 Inline Functions 15.7 References and Reference
More information2.4 Structuring programs
2.4 Structuring programs While theoretically a program could be written as one big expression, in reality we want some structure so that l The programmer has it easier to read the program l A compiler
More information«Computer Science» Requirements for applicants by Innopolis University
«Computer Science» Requirements for applicants by Innopolis University Contents Architecture and Organization... 2 Digital Logic and Digital Systems... 2 Machine Level Representation of Data... 2 Assembly
More informationIMPORTANT QUESTIONS IN C FOR THE INTERVIEW
IMPORTANT QUESTIONS IN C FOR THE INTERVIEW 1. What is a header file? Header file is a simple text file which contains prototypes of all in-built functions, predefined variables and symbolic constants.
More information2. The object-oriented paradigm!
2. The object-oriented paradigm! Plan for this section:! n Look at things we have to be able to do with a programming language! n Look at Java and how it is done there" Note: I will make a lot of use of
More informationCYES-C++: A Concurrent Extension of C++ through Compositional Mechanisms
CYES-C++: A Concurrent Extension of C++ through Compositional Mechanisms Raju Pandey J. C. Browne Department of Computer Sciences The University of Texas at Austin Austin, TX 78712 fraju, browneg@cs.utexas.edu
More informationIntroduction to Programming Using Java (98-388)
Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;
More informationPARALLEL SIMULATION TECHNIQUES FOR LARGE-SCALE DISCRETE-EVENT MODELS
PARALLEL SIMULATION TECHNIQUES FOR LARGE-SCALE DISCRETE-EVENT MODELS By Shafagh, Jafer, B. Eng., M.A.Sc. A thesis submitted to the Faculty of Graduate and Postdoctoral Affairs in partial fulfillment of
More informationCS242 COMPUTER PROGRAMMING
CS242 COMPUTER PROGRAMMING I.Safa a Alawneh Variables Outline 2 Data Type C++ Built-in Data Types o o o o bool Data Type char Data Type int Data Type Floating-Point Data Types Variable Declaration Initializing
More informationPart 7 - Object Oriented Concepts Classes, Objects, Properties and Methods
Part 7 - Object Oriented Concepts Classes, Objects, Properties and Methods Object Orientated Paradigm... 2 Abstract Data Types (ADT) & Encapsulation... 3 Encapsulation... 5 Classes and Objects... 6 Methods
More informationKey Differences Between Python and Java
Python Python supports many (but not all) aspects of object-oriented programming; but it is possible to write a Python program without making any use of OO concepts. Python is designed to be used interpretively.
More informationWhat are the characteristics of Object Oriented programming language?
What are the various elements of OOP? Following are the various elements of OOP:- Class:- A class is a collection of data and the various operations that can be performed on that data. Object- This is
More informationObject Oriented Programming. Solved MCQs - Part 2
Object Oriented Programming Solved MCQs - Part 2 Object Oriented Programming Solved MCQs - Part 2 It is possible to declare as a friend A member function A global function A class All of the above What
More informationCPSC 221: Algorithms and Data Structures ADTs, Stacks, and Queues
CPSC 221: Algorithms and Data Structures ADTs, Stacks, and Queues Alan J. Hu (Slides borrowed from Steve Wolfman) Be sure to check course webpage! http://www.ugrad.cs.ubc.ca/~cs221 1 Lab 1 available very
More informationCS558 Programming Languages Winter 2013 Lecture 8
OBJECT-ORIENTED PROGRAMMING CS558 Programming Languages Winter 2013 Lecture 8 Object-oriented programs are structured in terms of objects: collections of variables ( fields ) and functions ( methods ).
More informationConnecting to the Network
Connecting to the Network Networking for Home and Small Businesses Chapter 3 1 Objectives Explain the concept of networking and the benefits of networks. Explain the concept of communication protocols.
More informationtype environment updated subtype sound
#1 Type Checkg #2 One-Slide Summary A type environment gives types for free variables. You typecheck a let-body with an environment that has been updated to conta the new let-variable. If an object of
More informationObject-oriented perspective
Starting Reader #2 Object-oriented perspective Operating system = computer interface Shell/libraries/system calls = OS interface Will return to OS topics in upcoming lectures. Now: OO intro. Objects l
More information