Spring CS 599. Instructor: Jyo Deshmukh

Slides:



Advertisements
Similar presentations
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Advertisements

CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Introduction to Operating Systems CS-2301 B-term Introduction to Operating Systems CS-2301, System Programming for Non-majors (Slides include materials.
PTIDES: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
Integrated Design and Analysis Tools for Software-Based Control Systems Shankar Sastry (PI) Tom Henzinger Edward Lee University of California, Berkeley.
Design of Fault Tolerant Data Flow in Ptolemy II Mark McKelvin EE290 N, Fall 2004 Final Project.
Models of Computation for Embedded System Design Alvise Bonivento.
Chapter 11: Distributed Processing Parallel programming Principles of parallel programming languages Concurrent execution –Programming constructs –Guarded.
EE 231 Digital Electronics Fall 01 week 1-slide 1 Digital Hardware Systems Digital Systems Digital vs. Analog Waveforms Analog: values vary over a broad.
State Machines Timing Computer Bus Computer Performance Instruction Set Architectures RISC / CISC Machines.
VB in Context Michael B. Spring Department of Information Science and Telecommunications University of Pittsburgh Pittsburgh, Pa 15260
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
- 1 - Embedded Systems - SDL Some general properties of languages 1. Synchronous vs. asynchronous languages Description of several processes in many languages.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
Mahapatra-A&M-Fall'001 Co-design Finite State Machines Many slides of this lecture are borrowed from Margarida Jacome.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Object Oriented Discrete-Event Simulation CS4730 Fall 2010 Jose M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
CS4730 Real-Time Systems and Modeling Fall 2010 José M. Garrido Department of Computer Science & Information Systems Kennesaw State University.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CS 5991 Presentation Ptolemy: A Framework For Simulating and Prototyping Heterogeneous Systems.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Chapter 3 Data Representation
OPERATING SYSTEMS CS 3502 Fall 2017
Computer Organization and Machine Language Programming CPTG 245
Processes and threads.
Chapter 2: Database System Concepts and Architecture - Outline
Chapter 1: Introduction
Introduction to Computer Science
Advanced Topics in Distributed and Reactive Programming
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
CS 326 Programming Languages, Concepts and Implementation
Welcome to CSE1002.
Revision Lecture
Parallel and Distributed Simulation Techniques
Seoul National University
课程名 编译原理 Compiling Techniques
Computer Software CS 107 Lecture 2 September 1, :53 PM.
Introduction to LUSTRE and LUKE
Assembler, Compiler, Interpreter
Advanced Topics in Distributed and Reactive Programming
Shanna-Shaye Forbes Ben Lickly Man-Kit Leung
Autonomous Cyber-Physical Systems: Synchronous Components: II
Autonomous Cyber-Physical Systems: Dynamical Systems
Objective of This Course
Distrustful Decomposition
Chapter 20 Object-Oriented Analysis and Design
CS 501: Software Engineering Fall 1999
JavaScript.
Programming Languages 2nd edition Tucker and Noonan
Analysis models and design models
Five Key Computer Components
Embedded Systems: A Focus on Time
Language Processors Application Domain – ideas concerning the behavior of a software. Execution Domain – Ideas implemented in Computer System. Semantic.
VHDL Introduction.
An Introduction to Software Architecture
COMP60611 Fundamentals of Parallel and Distributed Systems
Assembler, Compiler, Interpreter
Concurrency: Mutual Exclusion and Process Synchronization
PROGRAMMING FUNDAMENTALS Lecture # 03. Programming Language A Programming language used to write computer programs. Its mean of communication between.
Understand the interaction between computer hardware and software
CSE 370 – Winter Introduction -2- 1
Criteria for rapid prototyping
Advanced Topics in Functional and Reactive Programming
STATE MACHINE AND CONCURRENT PROCESS MODEL
STATE MACHINE AND CONCURRENT
Presentation transcript:

Spring 2018. CS 599. Instructor: Jyo Deshmukh Autonomous Cyber-Physical Systems: Model-based Design & Synchronous Components Spring 2018. CS 599. Instructor: Jyo Deshmukh Acknowledgment: Some of the material in these slides is based on the lecture slides for CIS 540: Principles of Embedded Computation taught by Rajeev Alur at the University of Pennsylvania. http://www.seas.upenn.edu/~cis540/

Model-based Development (MBD) or design Most popular paradigm in CPS software development We will learn various aspects of MBD through this course MBD when used for designing embedded software1 has 4 main steps Model the physical components/environment (also known as a plant model) Analyze the plant, and synthesize/design the control-software at a high-level Co-Simulate the plant and control-software Automatically generate code from the control-software model for deployment Popular MBD frameworks such as Simulink®, LabView™, RationalRose, DyMola, TargetLink, Scade, etc. [1] Nicolescu, Gabriela; Mosterman, Pieter J., eds. (2010). Model-Based Design for Embedded Systems. Computational Analysis, Synthesis, and Design of Dynamic Systems. 1. Boca Raton: CRC Press.

Our programs will be MBD models MBD languages are often visual and block-diagram based, e.g. Simulink We know how to interpret a file containing C, Java, Python, Haskell, Ocaml, or any other imperative/functional program How do we interpret MBD programs? What are their execution semantics?

Most convenient model of computation for an Autonomous CPS is a reactive and concurrent model of computation. An autonomous CPS can be viewed as a network of components that communicate either synchronously or asynchronously.

Models of Computation: Functional Classical model of computation: Functional or Transformational Programs Start from a given input, Produce a certain output and then terminate Desired functionality can be described by a mathematical function Emphasis is on data computation Canonical model: Turing machines e.g. compute square- root, encrypt some text, etc.

Models of Computation: Reactive/Interactive Interactive Programs: Interact with the user in their own time, i.e. react to user’s commands, but with no real-time constraints Emphasis is on user-interaction; e.g. a web browsers, word processors, etc. Reactive Programs: Continuously interact with the environment at a rate decided by the environment Emphasis is on system-environment interaction; e.g. airline autopilot, mail-servers, etc.

Sequential vs. Concurrent Processing Classical model: Sequential Entire computation is a linear sequence of instructions executed one at a time Program execution is deterministic Concurrent computation Multiple “threads” of execution, possibly exchanging information and evolving concurrently Key distinction imposed by regime in which threads exchange information: Synchronous: under a global “clocking” mechanism that forces lock-step computation Asynchronous: No central coordination

Synchronous Models All components execute in a sequence of rounds in lock-step Example: Components in a digital hardware circuit with a central global clock Fixed-step Simulation Models of Discrete Components in Simulink

Synchronous languages Rich class of languages called “synchronous dataflow” Benefit: system design is simpler if we use a simple round-based computation Challenge: How do we ensure synchronous execution when components may execute on different hardware?

Basic Layout of a Synchronous Component State Variables Declaration and initialization Update action that happens in each round Input Names and Types Output Names and Types Component

Simplest synchronous component: delay (Boolean = { 0, 1}) Input variable: in of type Boolean Output variable: out of type Boolean State variable: x of type Boolean, initialized to 0 In each round, component updates output from the state and state from input bool in bool out bool x := 0 out:=x ; x:= in

Execution of “Delay” bool x := 0 out:=x ; x:= in Initialize state to 0 Repeatedly execute rounds In each round: Choose value for input (provided from environment, e.g. by user) Execute update code bool in bool out bool x := 0 out:=x ; x:= in 1 / 0 1 1 / 1 1 0 / 1 0 / 0 1 / 0 1

Synchrony hypothesis Time needed to execute update is negligible compared to arrival times between consecutive inputs Synchronous execution is a logical abstraction Execution time of update code is 0 Production of outputs, updates to state and arrival of inputs happen instantaneously With multiple components, assume all execute synchronously and simultaneously Burden on design-time to validate hypothesis

Composition of Synchronous Components bool in1 bool out1 bool x1 := 0 out1:=x1 ; x1:= in1 bool in2 bool out2 bool x2 := 1 out2:=x2 ; x2:= in2 Delay sequentially composed with Delay

Composition of Synchronous Components bool in1 bool out1 bool x1 := 1 out1:=x1 ; x1:= in1 bool in2 bool out2 bool x2 := 0 out2:=x2 ; x2:= in2 Observe: in2 is the same as out1 in every round Ignoring first 2 rounds, outputs of d2 are the inputs to d1 delayed by 2 rounds 1 / 1 1 0 / 1 0 / 0 1 / 0 1 1 / 1 1 1 Delay 1 1 / 0 1 1 / 1 1 0 / 1 0 / 0 1 / 0 1 Delay 2

What does this model achieve? bool in int out int y:= 0 out:=y ; if (in==0) y:= y + 1 else y:= y-1 int c bool d := 0 bool warn if (c > 0) if (d != 0) warn:=1; else d := 1; end d := 0;

Next class: More on Synchronous Components and a preview of a simple semi- autonomous CPS model