A Proposal for Verified Code Generation from Modelica

Size: px
Start display at page:

Download "A Proposal for Verified Code Generation from Modelica"

Transcription

1 A Proposal for Verified Code Generation from Modelica Bernhard Thiele PELAB Linköping University 04. February th MODPROD Workshop on Model-Based Product Development 1 / 22

2 Goals of this presentation Explain motivation for verified code generation. Introduce ACG-Modelica a proposal for a restricted Modelica subset for high-integrity code generation. Present a mapping of an ACG-Modelica subset to a synchronous data-flow kernel language for safety-related applications. 2 / 22

3 Safety-Related Model-Based Software Development Safety-related: Software failure may damage the environment, injure or kill people. = The risk stemming from such software needs to be reduced to a reasonable level. Consequences for development tools: Requirement to provide use-case dependent evidence for software tool suitability (Tool Qualification, see e.g., ISO 26262). = Particularly, validation of code generation from models. 3 / 22

4 Safety-Related Model-Based Software Development Safety-related: Software failure may damage the environment, injure or kill people. = The risk stemming from such software needs to be reduced to a reasonable level. Consequences for development tools: Requirement to provide use-case dependent evidence for software tool suitability (Tool Qualification, see e.g., ISO 26262). = Particularly, validation of code generation from models. 3 / 22

5 How to safeguard generated code? Two basic approaches: 1 Use generated code as if it was hand-generated: = Code is passed into the usual assurance process, i.e., code needs to be well-structured and obey reasonable guidelines for hand-generated code, code reviews on generated code. + No need for costly code generator qualification. Requires costly V&V efforts on generated code. 2 Use a certified/qualified code generator: = Need to provide evidence about tool suitability for the respective use-case. + Eliminates (some) V&V efforts on generated code, e.g., code reviews are done solely on model level rather than on embedded C source code level. Requires code generator qualification. 4 / 22

6 How to safeguard generated code? Two basic approaches: 1 Use generated code as if it was hand-generated: = Code is passed into the usual assurance process, i.e., code needs to be well-structured and obey reasonable guidelines for hand-generated code, code reviews on generated code. + No need for costly code generator qualification. Requires costly V&V efforts on generated code. 2 Use a certified/qualified code generator: = Need to provide evidence about tool suitability for the respective use-case. + Eliminates (some) V&V efforts on generated code, e.g., code reviews are done solely on model level rather than on embedded C source code level. Requires code generator qualification. 4 / 22

7 Consequences for Modelica Code Generation Generate readable code, particularly for support of 1 approach. Restrict language to ease qualification efforts, particularly for support of 2 approach. Bernhard Thiele, Stefan-Alexander Schneider, Pierre R. Mai. A Modelica Sub- and Superset for Safety-Relevant Control Applications. In 9 th Int. Modelica Conference, Munich, Germany, September Modelica Language High-Level Application Model Environment Model Specification Model sample(..) Plant Reference Qualifiable Modelica Subset Enrichment with implementation details hold(..) Code Generation Model Following presentation extends that previous work. 5 / 22

8 Consequences for Modelica Code Generation Generate readable code, particularly for support of 1 approach. Restrict language to ease qualification efforts, particularly for support of 2 approach. Bernhard Thiele, Stefan-Alexander Schneider, Pierre R. Mai. A Modelica Sub- and Superset for Safety-Relevant Control Applications. In 9 th Int. Modelica Conference, Munich, Germany, September Modelica Language High-Level Application Model Environment Model Specification Model sample(..) Plant Reference Qualifiable Modelica Subset Enrichment with implementation details hold(..) Code Generation Model Following presentation extends that previous work. 5 / 22

9 ACG-Modelica Proposal for a restricted language subset for high-integrity automatic code generation Restrict the valid language elements, e.g.: Clocked Variables Exclusivity: Only discrete-time clocked partitions as introduced in Modelica 3.3, Chapter Synchronous Language Elements are allowed. Restricted set of allowed keywords, operators and built-in functions (e.g., Only about 50% of the Modelica keywords are maintained). 6 / 22

10 ACG-Modelica Proposal for a restricted language subset for high-integrity automatic code generation Restrict the valid language elements, e.g.: Clocked Variables Exclusivity: Only discrete-time clocked partitions as introduced in Modelica 3.3, Chapter Synchronous Language Elements are allowed. Restricted set of allowed keywords, operators and built-in functions (e.g., Only about 50% of the Modelica keywords are maintained). 6 / 22

11 ACG-Modelica Proposal for a restricted language subset for high-integrity automatic code generation Simplified Modifications: Only one level of nesting supported (e.g., b(c=2) is OK, a(b(c=2)) is NOK). Causal data-flow semantics: Single variable (the unknown) is at the left-hand side and a flow expression is at the right-hand side (e.g., a = b c is valid while a + b = 0 or a 2 = b is invalid). Additional rules for the graphical representation to achieve semantical unambiguousness at the graphical layer. 7 / 22

12 ACG-Modelica Proposal for a restricted language subset for high-integrity automatic code generation Simplified Modifications: Only one level of nesting supported (e.g., b(c=2) is OK, a(b(c=2)) is NOK). Causal data-flow semantics: Single variable (the unknown) is at the left-hand side and a flow expression is at the right-hand side (e.g., a = b c is valid while a + b = 0 or a 2 = b is invalid). Additional rules for the graphical representation to achieve semantical unambiguousness at the graphical layer. 7 / 22

13 ACG-Modelica Proposal for a restricted language subset for high-integrity automatic code generation Simplified Modifications: Only one level of nesting supported (e.g., b(c=2) is OK, a(b(c=2)) is NOK). Causal data-flow semantics: Single variable (the unknown) is at the left-hand side and a flow expression is at the right-hand side (e.g., a = b c is valid while a + b = 0 or a 2 = b is invalid). Additional rules for the graphical representation to achieve semantical unambiguousness at the graphical layer. 7 / 22

14 Why Modular Code Generation Should be Supported Modular Code Generation: Preserve modularity of a block instance at source code level. Improves traceability between model and generated code. Facilitates to generate code that is is well-structured and obeys similar guidelines as hand-generated code. Allows straight forward separate compilation (advantage in respect to scalability and protection of intellectual property). Potentially decreased size of code footprint (block reusable function). 8 / 22

15 Why Modular Code Generation Should be Supported Modular Code Generation: Preserve modularity of a block instance at source code level. Improves traceability between model and generated code. Facilitates to generate code that is is well-structured and obeys similar guidelines as hand-generated code. Allows straight forward separate compilation (advantage in respect to scalability and protection of intellectual property). Potentially decreased size of code footprint (block reusable function). 8 / 22

16 Why Modular Code Generation Should be Supported Modular Code Generation: Preserve modularity of a block instance at source code level. Improves traceability between model and generated code. Facilitates to generate code that is is well-structured and obeys similar guidelines as hand-generated code. Allows straight forward separate compilation (advantage in respect to scalability and protection of intellectual property). Potentially decreased size of code footprint (block reusable function). 8 / 22

17 Why Modular Code Generation Should be Supported Modular Code Generation: Preserve modularity of a block instance at source code level. Improves traceability between model and generated code. Facilitates to generate code that is is well-structured and obeys similar guidelines as hand-generated code. Allows straight forward separate compilation (advantage in respect to scalability and protection of intellectual property). Potentially decreased size of code footprint (block reusable function). 8 / 22

18 Why Modular Code Generation Should be Supported Modular Code Generation: Preserve modularity of a block instance at source code level. Improves traceability between model and generated code. Facilitates to generate code that is is well-structured and obeys similar guidelines as hand-generated code. Allows straight forward separate compilation (advantage in respect to scalability and protection of intellectual property). Potentially decreased size of code footprint (block reusable function). 8 / 22

19 Translation to a Synchronous Data-Flow Kernel (SDFK) Goal Mapping of ACG-Modelica to a synchronous data-flow kernel language for which compilation techniques are known that are well-understood and accepted by certification authorities. Approach: 1 Define a representative language kernel for ACG-Modelica (further denoted as macg-modelica). 2 Define a set of formal translation equations from macg-modelica to SDFK. Argue that the semantics of macg-modelica are defined in terms of that translation (translational semantics). Reasoning If translation exists it opens up a path to a qualifiable compiler for ACG-Modelica. 9 / 22

20 Translation to a Synchronous Data-Flow Kernel (SDFK) Goal Mapping of ACG-Modelica to a synchronous data-flow kernel language for which compilation techniques are known that are well-understood and accepted by certification authorities. Approach: 1 Define a representative language kernel for ACG-Modelica (further denoted as macg-modelica). 2 Define a set of formal translation equations from macg-modelica to SDFK. Argue that the semantics of macg-modelica are defined in terms of that translation (translational semantics). Reasoning If translation exists it opens up a path to a qualifiable compiler for ACG-Modelica. 9 / 22

21 Translation to a Synchronous Data-Flow Kernel (SDFK) Goal Mapping of ACG-Modelica to a synchronous data-flow kernel language for which compilation techniques are known that are well-understood and accepted by certification authorities. Approach: 1 Define a representative language kernel for ACG-Modelica (further denoted as macg-modelica). 2 Define a set of formal translation equations from macg-modelica to SDFK. Argue that the semantics of macg-modelica are defined in terms of that translation (translational semantics). Reasoning If translation exists it opens up a path to a qualifiable compiler for ACG-Modelica. 9 / 22

22 Translation to a Synchronous Data-Flow Kernel (SDFK) Goal Mapping of ACG-Modelica to a synchronous data-flow kernel language for which compilation techniques are known that are well-understood and accepted by certification authorities. Approach: 1 Define a representative language kernel for ACG-Modelica (further denoted as macg-modelica). 2 Define a set of formal translation equations from macg-modelica to SDFK. Argue that the semantics of macg-modelica are defined in terms of that translation (translational semantics). Reasoning If translation exists it opens up a path to a qualifiable compiler for ACG-Modelica. 9 / 22

23 The SDFK target language The synchronous data-flow kernel is presented in: D. Biernacki, J.-L. Colaço, G. Hamon, and M. Pouzet. Clock-directed modular code generation for synchronous data-flow languages. SIGPLAN Not., 43(7): , June That article: Describes modular code generation from that kernel into imperative code. basic calculus that is powerful enough to express any Lustre program. The principles presented in this article are implemented in the RELUC compiler of SCADE/LUSTRE and experimented on industrial real-size examples. The commercial Lustre-based Scade tool provides a code generator, KCG, that already has been successfully qualified for safety-critical applications. 10 / 22

24 The SDFK target language The synchronous data-flow kernel is presented in: D. Biernacki, J.-L. Colaço, G. Hamon, and M. Pouzet. Clock-directed modular code generation for synchronous data-flow languages. SIGPLAN Not., 43(7): , June That article: Describes modular code generation from that kernel into imperative code. basic calculus that is powerful enough to express any Lustre program. The principles presented in this article are implemented in the RELUC compiler of SCADE/LUSTRE and experimented on industrial real-size examples. The commercial Lustre-based Scade tool provides a code generator, KCG, that already has been successfully qualified for safety-critical applications. 10 / 22

25 The SDFK target language The synchronous data-flow kernel is presented in: D. Biernacki, J.-L. Colaço, G. Hamon, and M. Pouzet. Clock-directed modular code generation for synchronous data-flow languages. SIGPLAN Not., 43(7): , June That article: Describes modular code generation from that kernel into imperative code. basic calculus that is powerful enough to express any Lustre program. The principles presented in this article are implemented in the RELUC compiler of SCADE/LUSTRE and experimented on industrial real-size examples. The commercial Lustre-based Scade tool provides a code generator, KCG, that already has been successfully qualified for safety-critical applications. 10 / 22

26 The SDFK target language The synchronous data-flow kernel is presented in: D. Biernacki, J.-L. Colaço, G. Hamon, and M. Pouzet. Clock-directed modular code generation for synchronous data-flow languages. SIGPLAN Not., 43(7): , June That article: Describes modular code generation from that kernel into imperative code. basic calculus that is powerful enough to express any Lustre program. The principles presented in this article are implemented in the RELUC compiler of SCADE/LUSTRE and experimented on industrial real-size examples. The commercial Lustre-based Scade tool provides a code generator, KCG, that already has been successfully qualified for safety-critical applications. 10 / 22

27 The SDFK target language The synchronous data-flow kernel is presented in: D. Biernacki, J.-L. Colaço, G. Hamon, and M. Pouzet. Clock-directed modular code generation for synchronous data-flow languages. SIGPLAN Not., 43(7): , June That article: Describes modular code generation from that kernel into imperative code. basic calculus that is powerful enough to express any Lustre program. The principles presented in this article are implemented in the RELUC compiler of SCADE/LUSTRE and experimented on industrial real-size examples. The commercial Lustre-based Scade tool provides a code generator, KCG, that already has been successfully qualified for safety-critical applications. 10 / 22

28 Multi-Level Translation Approach Translation to SDFK is achieved in two steps: 1 Normalization of macg-modelica (source-to-source transformation) 1 Generation of connection equations. (will omit that) 2 Strip parameter modifications, normalize component modifications and extract component dot accesses appearing in expressions. 3 Create a fresh block that instantiates the top-level block as a component with normalized component modifications. (will omit that) 2 Translation to SDFK Normalization and translation are defined as a set of mutually recursive functions. This talk: No formal equations, just the basic ideas. 11 / 22

29 Multi-Level Translation Approach Translation to SDFK is achieved in two steps: 1 Normalization of macg-modelica (source-to-source transformation) 1 Generation of connection equations. (will omit that) 2 Strip parameter modifications, normalize component modifications and extract component dot accesses appearing in expressions. 3 Create a fresh block that instantiates the top-level block as a component with normalized component modifications. (will omit that) 2 Translation to SDFK Normalization and translation are defined as a set of mutually recursive functions. This talk: No formal equations, just the basic ideas. 11 / 22

30 Multi-Level Translation Approach Translation to SDFK is achieved in two steps: 1 Normalization of macg-modelica (source-to-source transformation) 1 Generation of connection equations. (will omit that) 2 Strip parameter modifications, normalize component modifications and extract component dot accesses appearing in expressions. 3 Create a fresh block that instantiates the top-level block as a component with normalized component modifications. (will omit that) 2 Translation to SDFK Normalization and translation are defined as a set of mutually recursive functions. This talk: No formal equations, just the basic ideas. 11 / 22

31 Multi-Level Translation Approach Translation to SDFK is achieved in two steps: 1 Normalization of macg-modelica (source-to-source transformation) 1 Generation of connection equations. (will omit that) 2 Strip parameter modifications, normalize component modifications and extract component dot accesses appearing in expressions. 3 Create a fresh block that instantiates the top-level block as a component with normalized component modifications. (will omit that) 2 Translation to SDFK Normalization and translation are defined as a set of mutually recursive functions. This talk: No formal equations, just the basic ideas. 11 / 22

32 Multi-Level Translation Approach Translation to SDFK is achieved in two steps: 1 Normalization of macg-modelica (source-to-source transformation) 1 Generation of connection equations. (will omit that) 2 Strip parameter modifications, normalize component modifications and extract component dot accesses appearing in expressions. 3 Create a fresh block that instantiates the top-level block as a component with normalized component modifications. (will omit that) 2 Translation to SDFK Normalization and translation are defined as a set of mutually recursive functions. This talk: No formal equations, just the basic ideas. 11 / 22

33 Normalization Parameter and Component Modifications Parameter modifications in a class are stripped away: block PI parameter Real kd = Td * 2 ; parameter Real Td = 0. 1 ; end PI ; block PI parameter Real kd ; parameter Real Td ; end PI ; All parameters of an instantiated class are extracted, merged with applicable instance modifications and introduced as new parameters with a modification expression: block A parameter Real k ; parameter Real Td=0. 2 ; PI p i ( Td=Td ) ; end A ; block A parameter Real k ; parameter Real Td ; parameter Real _pi_kd=_pi_td * 2 ; parameter Real _pi_td=td ; PI p i ( kd=_pi_kd, Td=_pi_Td ) ; end A ; 12 / 22

34 Normalization Parameter and Component Modifications Parameter modifications in a class are stripped away: block PI parameter Real kd = Td * 2 ; parameter Real Td = 0. 1 ; end PI ; block PI parameter Real kd ; parameter Real Td ; end PI ; All parameters of an instantiated class are extracted, merged with applicable instance modifications and introduced as new parameters with a modification expression: block A parameter Real k ; parameter Real Td=0. 2 ; PI p i ( Td=Td ) ; end A ; block A parameter Real k ; parameter Real Td ; parameter Real _pi_kd=_pi_td * 2 ; parameter Real _pi_td=td ; PI p i ( kd=_pi_kd, Td=_pi_Td ) ; end A ; 12 / 22

35 Normalization Extract Component Dot Accesses Component dot accesses in RHS equations are extracted: block PI input Real u ; output Real y ; equation y = u ; end PI ; block A output Real y ; PI p i ; equation p i. u = 3; y = pi.y + 2; end A ; block PI input Real u ; output Real y ; equation y = u ; end PI ; block A output Real y ; PI p i ; Real _t1; equation p i. u = 3; _t1 = pi.y; y = _t1 + 2; end A ; 13 / 22

36 Translation of Normalized PI to SDFK Inputs + Parameters without mod. node input arguments Outputs node return values Delays + start values initialized delay (0 fby x) block PI input Real u ; output Real y ; parameter Real kd ; parameter Real Td ; Real x ( s t a r t = 0 ) ; equation x = previous ( x ) + u / Td ; y = kd * ( x + u ) ; end PI ; node PI ( Td : real, kd : real, u : r e a l ) = y : r e a l with var x : r e a l in x = 0 fby x + u / Td and y = kd * ( x + u ) 14 / 22

37 Translation of Normalized A to SDFK Parameters with mod. Local var + equation Instance mod. + dot-access Function like node instance call block A input Real ua ; output Real ya ; parameter Real k ; parameter Real Td ; parameter Real _pi_kd=_pi_td*2; parameter Real _pi_td=td; PI pi(kd=_pi_kd, Td=_pi_Td); Real _t1 ; equation pi.u = ua * k ; _t1 = pi.y ; ya = _t1 ; end A ; node A ( Td : real, k : real, ua : r e a l ) = ( ya : r e a l ) with var _pi_kd:real, _pi_td:real, _t1 : r e a l in _pi_kd = _pi_td*2 and _pi_td = Td and ya = _t1 and _t1 = PI(_pi_Td, _pi_kd, ua*k) 15 / 22

38 Implementation Formal translation equations have been implemented in a proof-of-concept translator using the Scala language. Implementation includes an emitter from SDFK to Lustre. The freely available academic LUSTRE V4 TOOLBOX 1 can be used to generate C-code from Lustre. The C-code can be interfaced back to Modelica for convenient back-to-back testing / 22

39 Implementation Formal translation equations have been implemented in a proof-of-concept translator using the Scala language. Implementation includes an emitter from SDFK to Lustre. The freely available academic LUSTRE V4 TOOLBOX 1 can be used to generate C-code from Lustre. The C-code can be interfaced back to Modelica for convenient back-to-back testing. Back-to-back testing of Block A parameter k = 1.0 parameter T_d = 0.2 input ua = unit step at tick / 22

40 Questions? 17 / 22

41 Other PI Example SDFK Grammar td ::= type bt type bt = C C d ::= node f(p) = p with var p in D p ::= x : bt;...;x : bt D ::= pat = a D and D pat ::= x (pat,...,pat) a ::= e ck e ::= v x (a,...,a) v fby a op(a,...,a) f(a,...,a) every a a when C(x) merge x (C a)...(c a) if x then a else a v ::= C i ct ::= ck ct... ct ck ::= base ck on C(x) if x then e 2 else e 3 = merge x (True e 2 when True(x)) (False e 3 when False(x)) 18 / 22

42 Other PI Example macg-modelica Grammar td ::= Boolean Integer Real d ::= block id p equation D end; tm ::= input parameter output p ::= p p t x; t x mo; tm t x; tm t x mo; mo ::= (ar,..., ar) = e ar ::= id = v D ::= D D eq; e ::= x op(e,...,e) previous(x) if e then e else e eq ::= x = e connect(x,x) x ::= c id id denotes a variable c ::= id. No deep nesting allowed! v = value id = identifier Only one level of modification nesting supported. (No elseif) 19 / 22

43 Other PI Example PI Controller Example Connector declarations: connector In = input Real ; connector Out = output Real ; PI-block: block PI In u ; Out y ; parameter Real kd = Td * 2 ; parameter Real Td = 0. 1 ; Real x ( s t a r t = 0 ) ; equation x = previous ( x ) + u / Td ; y = kd * ( x + u ) ; end PI ; Block A instantiating PI: block A In ua ; Out ya ; parameter Real k ; parameter Real Td=0. 2 ; PI p i ( Td=Td ) ; equation p i. u = ua * k ; connect ( ya, p i. y ) ; end A ; 20 / 22

44 Other PI Example Instantiation of Block A Block A: block A In ua ; Out ya ; parameter Real k ; parameter Real Td=0. 2 ; PI p i ( Td=Td ) ; equation p i. u = ua * k ; connect ( ya, p i. y ) ; end A ; Normalized instance block of A: block _Inst_A input Real ua ; output Real ya ; parameter Real _a_k ; parameter Real _a_td=0. 2 ; A a ( k=_a_k, Td=_a_Td ) ; equation a.ua = ua ; ya = a.ya ; end _Inst_A ; 21 / 22

45 Other PI Example Translation of Instantiated Block A to SDFK Remember Normalization Step 3: Create a fresh block that instantiates the top-level block as a component with normalized component modifications. Instantiate block A: block _Inst_A input Real ua ; output Real ya ; parameter Real _a_k ; parameter Real _a_td=0. 2 ; A a(k=_a_k, Td=_a_Td) ; equation a.ua = ua ; ya = a.ya ; end _Inst_A ; SDFK node of _Inst_A: node _Inst_A ( _a_k : f l o a t, ua : f l o a t ) = ya : f l o a t with var _a_td : f l o a t in ya = A( _a_k, _a_td, ua ) and _a_td = / 22

Clock-directed Modular Code-generation for Synchronous Data-flow Languages

Clock-directed Modular Code-generation for Synchronous Data-flow Languages 1 Clock-directed Modular Code-generation for Synchronous Data-flow Languages Dariusz Biernacki Univ. of Worclaw (Poland) Jean-Louis Colaço Prover Technologies (France) Grégoire Hamon The MathWorks (USA)

More information

State Machines in OpenModelica

State Machines in OpenModelica State Machines in OpenModelica Current Status and Further Development Bernhard Thiele PELAB Linköping University 02. February 2015 - Open Modelica Annual Workshop 1 / 16 Goals of this presentation Introduce

More information

A Synchronous-based Code Generator For Explicit Hybrid Systems Languages

A Synchronous-based Code Generator For Explicit Hybrid Systems Languages A Synchronous-based Code Generator For Explicit Hybrid Systems Languages Timothy Bourke 1 Jean-Louis Colaço 2 Bruno Pagano 2 Cédric Pasteur 2 Marc Pouzet 3,1 1. INRIA Paris-Rocquencourt 2. Esterel-Technologies/ANSYS,

More information

Synchronous Kahn Networks (ten years later)

Synchronous Kahn Networks (ten years later) Synchronous Kahn Networks (ten years later) Marc Pouzet LRI Marc.Pouzet@lri.fr Workshop SYNCHRON, 27/11/06 Overview The origins From Lustre to Lucid Synchrone Developping a Language Conclusion The origins

More information

Lecture 2. The SCADE Language Data Flow Kernel. Daniel Kästner AbsInt GmbH 2012

Lecture 2. The SCADE Language Data Flow Kernel. Daniel Kästner AbsInt GmbH 2012 Lecture 2 The SCADE Language Data Flow Kernel Daniel Kästner AbsInt GmbH 2012 2 Synchronous Programming Two simple ways of implementing reactive systems: Event-driven Foreach input_event

More information

Synchronous Specification

Synchronous Specification Translation Validation for Synchronous Specification in the Signal Compiler Van-Chan Ngo Jean-Pierre Talpin Thierry Gautier INRIA Rennes, France FORTE 2015 Construct a modular translation validationbased

More information

Programming Embedded Systems

Programming Embedded Systems Programming Embedded Systems Lecture 10 An introduction to Lustre Wednesday Feb 15, 2012 Philipp Rümmer Uppsala University Philipp.Ruemmer@it.uu.se 1/34 Course topic: programming lang. Which language to

More information

Synchronous Control and State Machines in Modelica

Synchronous Control and State Machines in Modelica Synchronous Control and State Machines in Modelica Hilding Elmqvist Dassault Systèmes Sven Erik Mattsson, Fabien Gaucher, Francois Dupont Dassault Systèmes Martin Otter, Bernhard Thiele DLR Content Introduction

More information

An Introduction to Lustre

An Introduction to Lustre An Introduction to Lustre Monday Oct 06, 2014 Philipp Rümmer Uppsala University Philipp.Ruemmer@it.uu.se 1/35 ES Programming languages Which language to write embedded software in? Traditional: low-level

More information

Modeling Kernel Language (MKL)

Modeling Kernel Language (MKL) Modeling Kernel Language (MKL) A formal and extensible approach to equation-based modeling languages Guest Talk, EECS, Chess, UC Berkeley February 17, 2011 Department of Computer and Information Science

More information

Modelica Change Proposal MCP-0019 Flattening (In Development) Proposed Changes to the Modelica Language Specification Version 3.

Modelica Change Proposal MCP-0019 Flattening (In Development) Proposed Changes to the Modelica Language Specification Version 3. Modelica Change Proposal MCP-0019 Flattening (In Development) Proposed Changes to the Modelica Language Specification Version 3.3 Revision 1 Table of Contents Preface 3 Chapter 1 Introduction 3 Chapter

More information

Type-based Initialization Analysis of a Synchronous Data-flow Language

Type-based Initialization Analysis of a Synchronous Data-flow Language Software Tools for Technology Transfer manuscript No. (will be inserted by the editor) Type-based Initialization Analysis of a Synchronous Data-flow Language Jean-Louis Colaço 1, Marc Pouzet 2 1 LIP6,

More information

Extensible Modeling Languages

Extensible Modeling Languages Extensible ing Languages Utilizing Libraries for Creation, Use, and Domain-Specific Extensions 5th MODPROD Workshop on -Based Product Development February 8, 2011 Department of Computer and Information

More information

System Verilog Tagged Unions and Pattern Matching

System Verilog Tagged Unions and Pattern Matching System Verilog Tagged Unions and Pattern Matching (An extension to System Verilog 3.1 proposed to Accellera) Bluespec, Inc. Contact: Rishiyur S. Nikhil, CTO, Bluespec, Inc. 200 West Street, 4th Flr., Waltham,

More information

INTEGRATING SYSTEM AND SOFTWARE ENGINEERING FOR CERTIFIABLE AVIONICS APPLICATIONS

INTEGRATING SYSTEM AND SOFTWARE ENGINEERING FOR CERTIFIABLE AVIONICS APPLICATIONS INTEGRATING SYSTEM AND SOFTWARE ENGINEERING FOR CERTIFIABLE AVIONICS APPLICATIONS Thierry Le Sergent Mathieu Viala Alain Le Guennec Frédéric Roméas thierry.lesergent@esterel-technologies.com mathieu.viala@esterel-technologies.com

More information

Processadors de Llenguatge II. Functional Paradigm. Pratt A.7 Robert Harper s SML tutorial (Sec II)

Processadors de Llenguatge II. Functional Paradigm. Pratt A.7 Robert Harper s SML tutorial (Sec II) Processadors de Llenguatge II Functional Paradigm Pratt A.7 Robert Harper s SML tutorial (Sec II) Rafael Ramirez Dep Tecnologia Universitat Pompeu Fabra Paradigm Shift Imperative Paradigm State Machine

More information

The PCAT Programming Language Reference Manual

The PCAT Programming Language Reference Manual The PCAT Programming Language Reference Manual Andrew Tolmach and Jingke Li Dept. of Computer Science Portland State University September 27, 1995 (revised October 15, 2002) 1 Introduction The PCAT language

More information

Program Abstractions, Language Paradigms. CS152. Chris Pollett. Aug. 27, 2008.

Program Abstractions, Language Paradigms. CS152. Chris Pollett. Aug. 27, 2008. Program Abstractions, Language Paradigms. CS152. Chris Pollett. Aug. 27, 2008. Outline. Abstractions for telling a computer how to do things. Computational Paradigms. Language Definition, Translation.

More information

Using SCADE to Develop Mission-critical High-quality Radar Application Software

Using SCADE to Develop Mission-critical High-quality Radar Application Software Using SCADE to Develop Mission-critical High-quality Radar Application Software Bernard Dion and Aubanel Monnier Esterel Technologies, Parc Euclide 8 rue Blaise Pascal, F-78990, Elancourt, France bernard.dion@esterel-technologies.com

More information

Compiler Theory. (Semantic Analysis and Run-Time Environments)

Compiler Theory. (Semantic Analysis and Run-Time Environments) Compiler Theory (Semantic Analysis and Run-Time Environments) 005 Semantic Actions A compiler must do more than recognise whether a sentence belongs to the language of a grammar it must do something useful

More information

Reasoning About Imperative Programs. COS 441 Slides 10

Reasoning About Imperative Programs. COS 441 Slides 10 Reasoning About Imperative Programs COS 441 Slides 10 The last few weeks Agenda reasoning about functional programming It s very simple and very uniform: substitution of equal expressions for equal expressions

More information

Mutable References. Chapter 1

Mutable References. Chapter 1 Chapter 1 Mutable References In the (typed or untyped) λ-calculus, or in pure functional languages, a variable is immutable in that once bound to a value as the result of a substitution, its contents never

More information

Tutorial and Reference Manual

Tutorial and Reference Manual Zélus: a Synchronous Language with ODEs Release, version 1.2 Tutorial and Reference Manual http://zelus.di.ens.fr Marc Pouzet Albert Benveniste, Timothy Bourke and Benoit Caillaud Inria Project Team PARKAS,

More information

Featherweight Java (FJ)

Featherweight Java (FJ) x = 1 let x = 1 in... x(1).!x(1) x.set(1) Programming Language Theory Featherweight Java (FJ) Ralf Lämmel This lecture is based on David Walker s lecture: Computer Science 441, Programming Languages, Princeton

More information

Model-Based Design for High Integrity Software Development Mike Anthony Senior Application Engineer The MathWorks, Inc.

Model-Based Design for High Integrity Software Development Mike Anthony Senior Application Engineer The MathWorks, Inc. Model-Based Design for High Integrity Software Development Mike Anthony Senior Application Engineer The MathWorks, Inc. Tucson, AZ USA 2009 The MathWorks, Inc. Model-Based Design for High Integrity Software

More information

System-On-Chip Architecture Modeling Style Guide

System-On-Chip Architecture Modeling Style Guide Center for Embedded Computer Systems University of California, Irvine System-On-Chip Architecture Modeling Style Guide Junyu Peng Andreas Gerstlauer Rainer Dömer Daniel D. Gajski Technical Report CECS-TR-04-22

More information

SCADE System, a comprehensive toolset for smooth transition from Model-Based System Engineering to certified embedded control and display software

SCADE System, a comprehensive toolset for smooth transition from Model-Based System Engineering to certified embedded control and display software SCADE System, a comprehensive toolset for smooth transition from Model-Based System Engineering to certified embedded control and display software Thierry Le Sergent (Product Manager) Alain Le Guennec

More information

CS205: Scalable Software Systems

CS205: Scalable Software Systems CS205: Scalable Software Systems Lecture 4 September 14, 2016 Lecture 4 CS205: Scalable Software Systems September 14, 2016 1 / 16 Quick Recap Things covered so far Problem solving by recursive decomposition

More information

SCADE S E M I N A R I N S O F T W A R E E N G I N E E R I N G P R E S E N T E R A V N E R B A R R

SCADE S E M I N A R I N S O F T W A R E E N G I N E E R I N G P R E S E N T E R A V N E R B A R R SCADE 1 S E M I N A R I N S O F T W A R E E N G I N E E R I N G P R E S E N T E R A V N E R B A R R What is SCADE? Introduction 2 Software Critical Application Development Environment, a Lustrebased IDE

More information

A Formally Verified Compiler for Lustre

A Formally Verified Compiler for Lustre A Formally Verified Compiler for Lustre Timothy Bourke 1,2 Lélio Brun 1,2 Pierre-Évariste Dagand 4,3,1 Xavier Leroy 1 Marc Pouzet 4,2,1 Lionel Rieg 5,6 1. Inria Paris 2. DI, École normale supérieure 3.

More information

Computing Fundamentals 2 Introduction to CafeOBJ

Computing Fundamentals 2 Introduction to CafeOBJ Computing Fundamentals 2 Introduction to CafeOBJ Lecturer: Patrick Browne Lecture Room: K408 Lab Room: A308 Based on work by: Nakamura Masaki, João Pascoal Faria, Prof. Heinrich Hußmann. See notes on slides

More information

Begin at the beginning

Begin at the beginning Begin at the beginning Expressions (Syntax) Exec-time Dynamic Values (Semantics) Compile-time Static Types 1. Programmer enters expression 2. ML checks if expression is well-typed Using a precise set of

More information

A Model-Based Reference Workflow for the Development of Safety-Related Software

A Model-Based Reference Workflow for the Development of Safety-Related Software A Model-Based Reference Workflow for the Development of Safety-Related Software 2010-01-2338 Published 10/19/2010 Michael Beine dspace GmbH Dirk Fleischer dspace Inc. Copyright 2010 SAE International ABSTRACT

More information

Verifying a Lustre Compiler Part 2

Verifying a Lustre Compiler Part 2 Verifying a Lustre Compiler Part 2 Lélio Brun PARKAS (Inria - ENS) Timothy Bourke, Pierre-Évariste Dagand, Xavier Leroy, Marc Pouzet, Lionel Rieg SYNCHRON 2016 December 7, 2016 Lélio Brun Verifying a Lustre

More information

CHAPTER 8. Copyright Cengage Learning. All rights reserved.

CHAPTER 8. Copyright Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS Copyright Cengage Learning. All rights reserved. SECTION 8.3 Equivalence Relations Copyright Cengage Learning. All rights reserved. The Relation Induced by a Partition 3 The Relation

More information

Testing. Lydie du Bousquet, Ioannis Parissis. TAROT Summer School July (TAROT 2009)

Testing. Lydie du Bousquet, Ioannis Parissis. TAROT Summer School July (TAROT 2009) Testing TAROT Summer School Lustre/SCADE programs 2009 - July 6-10 Lydie du Bousquet, Ioannis Parissis 1 (TAROT 2009) Synchrone Scade/Lustre Siesta Issues 2 Synchronous / safety-critical software control/command

More information

CIM-Compliant Model-to-Model Transformation

CIM-Compliant Model-to-Model Transformation CIM-Compliant Model-to-Model Transformation For Modelica Models Generation and Power Systems Dynamic Simulations Francisco J. Gómez 1, Prof. Luigi Vanfretti 1 Svein H. Olsen 2 fragom@kth.se, luigiv@kth.se

More information

CSCE 314 TAMU Fall CSCE 314: Programming Languages Dr. Flemming Andersen. Haskell Functions

CSCE 314 TAMU Fall CSCE 314: Programming Languages Dr. Flemming Andersen. Haskell Functions 1 CSCE 314: Programming Languages Dr. Flemming Andersen Haskell Functions 2 Outline Defining Functions List Comprehensions Recursion 3 Conditional Expressions As in most programming languages, functions

More information

Z Notation. June 21, 2018

Z Notation. June 21, 2018 Z Notation June 21, 2018 1 Definitions There are many different ways to introduce an object in a Z specification: declarations, abbreviations, axiomatic definitions, and free types. Keep in mind that the

More information

DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6)

DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6) Technology & Information Management Instructor: Michael Kremer, Ph.D. Database Program: Microsoft Access Series DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6) AGENDA 3. Executing VBA

More information

Variables and Bindings

Variables and Bindings Net: Variables Variables and Bindings Q: How to use variables in ML? Q: How to assign to a variable? # let = 2+2;; val : int = 4 let = e;; Bind the value of epression e to the variable Variables and Bindings

More information

Meta-Programming with Modelica. Model Transformations

Meta-Programming with Modelica. Model Transformations Meta-Programming with Modelica for Meta-Modeling Modeling and Model Transformations, Adrian Pop OpenModelica Course, 2007 02 05 1 Extensibility and Modularity of Modeling Tools Modeling and simulation

More information

G Programming Languages - Fall 2012

G Programming Languages - Fall 2012 G22.2110-003 Programming Languages - Fall 2012 Lecture 4 Thomas Wies New York University Review Last week Control Structures Selection Loops Adding Invariants Outline Subprograms Calling Sequences Parameter

More information

A Conservative Extension of Synchronous Data-flow with State Machines

A Conservative Extension of Synchronous Data-flow with State Machines A Conservative Extension of Synchronous Data-flow with State Machines Jean-Louis Colaço Esterel-Technologies France Bruno Pagano Esterel-Technologies France Marc Pouzet LRI, Université Paris-Sud France

More information

The Lustre Language Synchronous Programming Pascal Raymond, Nicolas Halbwachs Verimag-CNRS

The Lustre Language Synchronous Programming Pascal Raymond, Nicolas Halbwachs Verimag-CNRS The Lustre Language Synchronous Programming Pascal Raymond, Nicolas Halbwachs Verimag-CNRS Data-flow approach 2 A program = a network of operators connected by wires Rather classical (control theory, circuits)

More information

A Library for Synchronous Control Systems in Modelica

A Library for Synchronous Control Systems in Modelica Martin Otter 1, Berhard Thiele 1, Hilding Elmqvist 2 1 DLR Institute of System Dynamics and Control, D-82234 Wessling, Germany 2 Dassault Systèmes AB, Ideon Science Park, SE-223 70 Lund, Sweden Martin.Otter@dlr.de,

More information

Certification Authorities Software Team (CAST) Position Paper CAST-25

Certification Authorities Software Team (CAST) Position Paper CAST-25 Certification Authorities Software Team (CAST) Position Paper CAST-25 CONSIDERATIONS WHEN USING A QUALIFIABLE DEVELOPMENT ENVIRONMENT (QDE) IN CERTIFICATION PROJECTS COMPLETED SEPTEMBER 2005 (Rev 0) NOTE:

More information

JavaScript. Training Offer for JavaScript Introduction JavaScript. JavaScript Objects

JavaScript. Training Offer for JavaScript Introduction JavaScript. JavaScript Objects JavaScript CAC Noida is an ISO 9001:2015 certified training center with professional experience that dates back to 2005. The vision is to provide professional education merging corporate culture globally

More information

Semantic Analysis. Lecture 9. February 7, 2018

Semantic Analysis. Lecture 9. February 7, 2018 Semantic Analysis Lecture 9 February 7, 2018 Midterm 1 Compiler Stages 12 / 14 COOL Programming 10 / 12 Regular Languages 26 / 30 Context-free Languages 17 / 21 Parsing 20 / 23 Extra Credit 4 / 6 Average

More information

EECS 4313 Software Engineering Testing. Topic 05: Equivalence Class Testing Zhen Ming (Jack) Jiang

EECS 4313 Software Engineering Testing. Topic 05: Equivalence Class Testing Zhen Ming (Jack) Jiang EECS 4313 Software Engineering Testing Topic 05: Equivalence Class Testing Zhen Ming (Jack) Jiang Relevant Readings [Jorgensen] chapter 6 Introduction Boundary Value Testing derives test cases with Massive

More information

Programming Language Concepts, cs2104 Lecture 04 ( )

Programming Language Concepts, cs2104 Lecture 04 ( ) Programming Language Concepts, cs2104 Lecture 04 (2003-08-29) Seif Haridi Department of Computer Science, NUS haridi@comp.nus.edu.sg 2003-09-05 S. Haridi, CS2104, L04 (slides: C. Schulte, S. Haridi) 1

More information

Lexical Considerations

Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2005 Handout 6 Decaf Language Wednesday, September 7 The project for the course is to write a

More information

Lecture 3. The SCADE Language Data Flow Kernel. Daniel Kästner AbsInt GmbH 2012

Lecture 3. The SCADE Language Data Flow Kernel. Daniel Kästner AbsInt GmbH 2012 Lecture 3 The SCADE Language Data Flow Kernel Daniel Kästner AbsInt GmbH 2012 2 3 Semantic Checks node minmax (in: int) returns (min, max: int) min = 0-> if (in < min) then in else min; max = 0-> if (in

More information

EXPRESSING REQUIREMENTS IN MODELICA

EXPRESSING REQUIREMENTS IN MODELICA EXPRESSING REQUIREMENTS IN MODELICA Lena Buffoni and Peter Fritzson Linköping University SE-581 83 Linköping Sweden ABSTRACT As cyber-physical systems grow increasingly complex, the need for methodologies

More information

Programming Languages

Programming Languages CSE 130: Spring 2010 Programming Languages Lecture 3: Epressions and Types Ranjit Jhala UC San Diego A Problem fun -> +1 Can functions only have a single parameter? A Solution: Simultaneous Binding Parameter

More information

The Substitution Model

The Substitution Model The Substitution Model Prof. Clarkson Fall 2017 Today s music: Substitute by The Who Review Previously in 3110: simple interpreter for expression language abstract syntax tree (AST) evaluation based on

More information

Programming the Simulink Standard Library with Zélus: experience report 1

Programming the Simulink Standard Library with Zélus: experience report 1 Programming the Simulink Standard Library with Zélus: experience report 1 Marc Pouzet Marc.Pouzet@ens.fr DI, ENS ANR Cafein Les Angles February 2, 2016 1 Joint work with Timothy Bourke (INRIA Paris) and

More information

Programming Languages Lecture 14: Sum, Product, Recursive Types

Programming Languages Lecture 14: Sum, Product, Recursive Types CSE 230: Winter 200 Principles of Programming Languages Lecture 4: Sum, Product, Recursive Types The end is nigh HW 3 No HW 4 (= Final) Project (Meeting + Talk) Ranjit Jhala UC San Diego Recap Goal: Relate

More information

On Meaning Preservation of a Calculus of Records

On Meaning Preservation of a Calculus of Records On Meaning Preservation of a Calculus of Records Emily Christiansen and Elena Machkasova Computer Science Discipline University of Minnesota, Morris Morris, MN 56267 chri1101, elenam@morris.umn.edu Abstract

More information

Side note: Tail Recursion. Begin at the beginning. Side note: Tail Recursion. Base Types. Base Type: int. Base Type: int

Side note: Tail Recursion. Begin at the beginning. Side note: Tail Recursion. Base Types. Base Type: int. Base Type: int Begin at the beginning Epressions (Synta) Compile-time Static Eec-time Dynamic Types Values (Semantics) 1. Programmer enters epression 2. ML checks if epression is well-typed Using a precise set of rules,

More information

Informal Semantics of Data. semantic specification names (identifiers) attributes binding declarations scope rules visibility

Informal Semantics of Data. semantic specification names (identifiers) attributes binding declarations scope rules visibility Informal Semantics of Data semantic specification names (identifiers) attributes binding declarations scope rules visibility 1 Ways to Specify Semantics Standards Documents (Language Definition) Language

More information

Type Checking. Outline. General properties of type systems. Types in programming languages. Notation for type rules.

Type Checking. Outline. General properties of type systems. Types in programming languages. Notation for type rules. Outline Type Checking General properties of type systems Types in programming languages Notation for type rules Logical rules of inference Common type rules 2 Static Checking Refers to the compile-time

More information

Tail Recursion: Factorial. Begin at the beginning. How does it execute? Tail recursion. Tail recursive factorial. Tail recursive factorial

Tail Recursion: Factorial. Begin at the beginning. How does it execute? Tail recursion. Tail recursive factorial. Tail recursive factorial Begin at the beginning Epressions (Synta) Compile-time Static Eec-time Dynamic Types Values (Semantics) 1. Programmer enters epression 2. ML checks if epression is well-typed Using a precise set of rules,

More information

COMP Parallel Computing. CC-NUMA (2) Memory Consistency

COMP Parallel Computing. CC-NUMA (2) Memory Consistency COMP 633 - Parallel Computing Lecture 11 September 26, 2017 Memory Consistency Reading Patterson & Hennesey, Computer Architecture (2 nd Ed.) secn 8.6 a condensed treatment of consistency models Coherence

More information

Zélus, a Synchronous Language with ODEs 1

Zélus, a Synchronous Language with ODEs 1 Zélus, a Synchronous Language with ODEs Marc Pouzet École normale supérieure (DI) Univ. Pierre et Marie Curie INRIA Paris, France Seminar, Berkeley Univ. Feb., 204 Joint work with Benveniste, Bourke, Caillaud

More information

The Synchronous Languages 12 Years Later

The Synchronous Languages 12 Years Later The Synchronous Languages 12 Years Later Tawatchai Siripanya Seminar in Programming Language(19666) Advisor: Lilit Hakobyan Supervisor: Prof. Dr. Elfriede Fehr Institute of Computer Science Freie Universität

More information

Outline. General properties of type systems. Types in programming languages. Notation for type rules. Common type rules. Logical rules of inference

Outline. General properties of type systems. Types in programming languages. Notation for type rules. Common type rules. Logical rules of inference Type Checking Outline General properties of type systems Types in programming languages Notation for type rules Logical rules of inference Common type rules 2 Static Checking Refers to the compile-time

More information

CSI33 Data Structures

CSI33 Data Structures Outline Department of Mathematics and Computer Science Bronx Community College October 24, 2018 Outline Outline 1 Chapter 8: A C++ Introduction For Python Programmers Expressions and Operator Precedence

More information

Simulation and Verification of Timed and Hybrid Systems

Simulation and Verification of Timed and Hybrid Systems Simulation and Verification of Timed and Hybrid Systems Bert van Beek and Koos Rooda Systems Engineering Group Eindhoven University of Technology ISC 2007 Delft 11 June 2007 Bert van Beek and Koos Rooda

More information

The SPL Programming Language Reference Manual

The SPL Programming Language Reference Manual The SPL Programming Language Reference Manual Leonidas Fegaras University of Texas at Arlington Arlington, TX 76019 fegaras@cse.uta.edu February 27, 2018 1 Introduction The SPL language is a Small Programming

More information

Types. Type checking. Why Do We Need Type Systems? Types and Operations. What is a type? Consensus

Types. 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 information

Material: Specification and Reasoning. Book: Logic in Computer Science, M.Huth, M.Ryan, Cambridge University Press. Lectures mondays here,

Material: Specification and Reasoning. Book: Logic in Computer Science, M.Huth, M.Ryan, Cambridge University Press. Lectures mondays here, Material: Specification and Reasoning Lectures mondays here, Lecturer Pasquale Malacaria CS/428 Labs thursdays with Dino DiStefano Book: Logic in Computer Science, M.Huth, M.Ryan, Cambridge University

More information

Programming Languages

Programming Languages CSE 130 : Spring 2011 Programming Languages Lecture 3: Crash Course Ctd, Expressions and Types Ranjit Jhala UC San Diego A shorthand for function binding # let neg = fun f -> fun x -> not (f x); # let

More information

CIS 341 Final Examination 4 May 2017

CIS 341 Final Examination 4 May 2017 CIS 341 Final Examination 4 May 2017 1 /14 2 /15 3 /12 4 /14 5 /34 6 /21 7 /10 Total /120 Do not begin the exam until you are told to do so. You have 120 minutes to complete the exam. There are 14 pages

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Fall 2016 Lecture 3a Andrew Tolmach Portland State University 1994-2016 Formal Semantics Goal: rigorous and unambiguous definition in terms of a wellunderstood formalism (e.g.

More information

Axiomatic Specification. Al-Said, Apcar, Jerejian

Axiomatic Specification. Al-Said, Apcar, Jerejian Axiomatic Specification Al-Said, Apcar, Jerejian 1 Axioms: Wffs that can be written down without any reference to any other Wffs. Wffs that are stipulated as unproved premises for the proof of other wffs

More information

Generation of Functional Mock-up Units from Causal Block Diagrams

Generation of Functional Mock-up Units from Causal Block Diagrams Generation of Functional Mock-up Units from Causal Block Diagrams Bavo Vander Henst University of Antwerp Model Driven Engineering Bavo.VanderHenst@student.uantwerpen.be Abstract The purpose of this paper

More information

Pattern-Oriented Development with Rational Rose

Pattern-Oriented Development with Rational Rose Pattern-Oriented Development with Rational Rose Professor Peter Forbrig, Department of Computer Science, University of Rostock, Germany; Dr. Ralf Laemmel, Department of Information Management and Software

More information

CMSC 330: Organization of Programming Languages. Operational Semantics

CMSC 330: Organization of Programming Languages. Operational Semantics CMSC 330: Organization of Programming Languages Operational Semantics Notes about Project 4, Parts 1 & 2 Still due today (7/2) Will not be graded until 7/11 (along with Part 3) You are strongly encouraged

More information

System Verilog Tagged Unions and Pattern Matching

System Verilog Tagged Unions and Pattern Matching System Verilog Tagged Unions and Pattern Matching (An extension to System Verilog 3.1 proposed to Accellera) Bluespec, Inc. Contact: Rishiyur S. Nikhil, CTO, Bluespec, Inc. 200 West Street, 4th Flr., Waltham,

More information

Recap: Functions as first-class values

Recap: Functions as first-class values Recap: Functions as first-class values Arguments, return values, bindings What are the benefits? Parameterized, similar functions (e.g. Testers) Creating, (Returning) Functions Iterator, Accumul, Reuse

More information

MATVEC: MATRIX-VECTOR COMPUTATION LANGUAGE REFERENCE MANUAL. John C. Murphy jcm2105 Programming Languages and Translators Professor Stephen Edwards

MATVEC: MATRIX-VECTOR COMPUTATION LANGUAGE REFERENCE MANUAL. John C. Murphy jcm2105 Programming Languages and Translators Professor Stephen Edwards MATVEC: MATRIX-VECTOR COMPUTATION LANGUAGE REFERENCE MANUAL John C. Murphy jcm2105 Programming Languages and Translators Professor Stephen Edwards Language Reference Manual Introduction The purpose of

More information

Garbage In/Garbage SIGPLAN Out

Garbage In/Garbage SIGPLAN Out COMFY A Comfortable Set of Control Primitives for Machine Language Programming Author: Henry G. Baker, http://home.pipeline.com/ hbaker1/home.html; hbaker1@pipeline.com Henry G. Baker 1 Laboratory for

More information

An Evolution of Mathematical Tools

An Evolution of Mathematical Tools An Evolution of Mathematical Tools From Conceptualization to Formalization Here's what we do when we build a formal model (or do a computation): 0. Identify a collection of objects/events in the real world.

More information

SMURF Language Reference Manual Serial MUsic Represented as Functions

SMURF Language Reference Manual Serial MUsic Represented as Functions SMURF Language Reference Manual Serial MUsic Represented as Functions Richard Townsend, Lianne Lairmore, Lindsay Neubauer, Van Bui, Kuangya Zhai {rt2515, lel2143, lan2135, vb2363, kz2219}@columbia.edu

More information

The essence of dataflow programming

The essence of dataflow programming The essence of dataflow programming Tarmo Uustalu 1 2 1 Institute of Cybernetics Tallinn University of Technology 2 Department of Computer Science University of Tartu WG2.8 workshop, Kalvi, 1-4 September

More information

An Approach to the Generation of High-Assurance Java Card Applets

An Approach to the Generation of High-Assurance Java Card Applets An Approach to the Generation of High-Assurance Java Card Applets Alessandro Coglio Kestrel Institute 3260 Hillview Avenue, Palo Alto, CA 94304, USA Ph. +1-650-493-6871 Fax +1-650-424-1807 http://www.kestrel.edu/

More information

Operational Semantics. One-Slide Summary. Lecture Outline

Operational Semantics. One-Slide Summary. Lecture Outline Operational Semantics #1 One-Slide Summary Operational semantics are a precise way of specifying how to evaluate a program. A formal semantics tells you what each expression means. Meaning depends on context:

More information

Functions in C C Programming and Software Tools

Functions in C C Programming and Software Tools Functions in C C Programming and Software Tools N.C. State Department of Computer Science Functions in C Functions are also called subroutines or procedures One part of a program calls (or invokes the

More information

Introduction to Scientific Computing Languages

Introduction to Scientific Computing Languages 1 / 17 Introduction to Scientific Computing Languages Prof. Paolo Bientinesi pauldj@aices.rwth-aachen.de Languages for Scientific Computing 2 / 17 What is a programming language? Languages for Scientific

More information

11/6/17. Functional programming. FP Foundations, Scheme (2) LISP Data Types. LISP Data Types. LISP Data Types. Scheme. LISP: John McCarthy 1958 MIT

11/6/17. Functional programming. FP Foundations, Scheme (2) LISP Data Types. LISP Data Types. LISP Data Types. Scheme. LISP: John McCarthy 1958 MIT Functional programming FP Foundations, Scheme (2 In Text: Chapter 15 LISP: John McCarthy 1958 MIT List Processing => Symbolic Manipulation First functional programming language Every version after the

More information

INSTITUTE OF AERONAUTICAL ENGINEERING

INSTITUTE OF AERONAUTICAL ENGINEERING INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad -500 043 INFORMATION TECHNOLOGY TUTORIAL QUESTION BANK Name : PRINCIPLES OF PROGRAMMING LANGUAGES Code : A40511 Class : II B. Tech

More information

Software Testing. 1. Testing is the process of demonstrating that errors are not present.

Software Testing. 1. Testing is the process of demonstrating that errors are not present. What is Testing? Software Testing Many people understand many definitions of testing :. Testing is the process of demonstrating that errors are not present.. The purpose of testing is to show that a program

More information

Operational Semantics of Cool

Operational Semantics of Cool Operational Semantics of Cool Key Concepts semantics: the meaning of a program, what does program do? how the code is executed? operational semantics: high level code generation steps of calculating values

More information

02157 Functional Programming Lecture 2: Functions, Basic Types and Tuples

02157 Functional Programming Lecture 2: Functions, Basic Types and Tuples Lecture 2: Functions, Basic Types and Tuples nsen 1 DTU Informatics, Technical University of Denmark Lecture 2: Functions, Basic Types and Tuples MRH 13/09/2012 Outline A further look at functions, including

More information

CSc 520 Principles of Programming Languages

CSc 520 Principles of Programming Languages CSc 520 Principles of Programming Languages 27 : Control Structures Procedures Christian Collberg Department of Computer Science University of Arizona collberg+520@gmail.com Copyright c 2008 Christian

More information

Formal semantics of loosely typed languages. Joep Verkoelen Vincent Driessen

Formal semantics of loosely typed languages. Joep Verkoelen Vincent Driessen Formal semantics of loosely typed languages Joep Verkoelen Vincent Driessen June, 2004 ii Contents 1 Introduction 3 2 Syntax 5 2.1 Formalities.............................. 5 2.2 Example language LooselyWhile.................

More information

Tool Qualification Plan for Testwell CTC++

Tool Qualification Plan for Testwell CTC++ Tool Qualification Plan for Testwell CTC++ Version: 0.8 Date: 2014-11-17 Status: Author: File: Size: Generic / Adapted / Presented / Generated / Reviewed / Final Dr. Martin Wildmoser, Dr. Oscar Slotosch

More information

Programming in C. main. Level 2. Level 2 Level 2. Level 3 Level 3

Programming in C. main. Level 2. Level 2 Level 2. Level 3 Level 3 Programming in C main Level 2 Level 2 Level 2 Level 3 Level 3 1 Programmer-Defined Functions Modularize with building blocks of programs Divide and Conquer Construct a program from smaller pieces or components

More information

Verification by Static Analysis

Verification by Static Analysis Verification by Static Analysis Intelligent Testing Conference Bristol, 17 th March 2014 Verification overview Software Verification is The process of evaluating software during or at the end of the development

More information