Algorithmic Problems in Analysis of Real Time System Specifications

Total Page:16

File Type:pdf, Size:1020Kb

Algorithmic Problems in Analysis of Real Time System Specifications LATVIJAS UNIVERSITATE-UNIVERSITY OF LATVIA ALGORITHMIC PROBLEMS IN ANALYSIS OF REAL TIME SYSTEM SPECIFICATIONS Karlis Cerans Riga, 1992 LATVIJAS UNIVERSITATE.UNIVERSITY OF LATVIA Algorithmic Problems in Analysis of Real Time System Specifications Karhs Cerans A Thesis for the Dr.sc.cornp. Degree at University of Latvia Institute of Mathematics and Computer Science University of Latvia Riga, Rainis blvd. 29, Latvia. 226250 Copyright @1992 Karlis Cerans University of Latvia Riga, 1992 Abstr-act The thesis is devoted to the study of analysis automation possibilities (decidability and undecidability of reachability, infinite behaviour possibility and bisimulation equiva- lence problems) for various kinds of real time system specification formalisms. The investigated formalisms are based on finite state model control structure enriched in various ways to reflect data and time dependencies of the modelled system behaviour. Decidable proved are, first, the vertex rea.chability and infinite behaviour possi- bility (infinite fea.siblepath existence) problems for progra.ms in a simple theoretical programming language, ca.lled LTIBA, which is an enrichment of the Finite State Machine model with variables, suitable for modelling real time system behaviour de- pendencies both on quantitative time constraints (the LTIM system of commands) and external data (the LBASE system of commands). An effective symbolic charac- teristic of the sets of all fea.sibleprogram paths in the terms of path set projectivity is also given for LBASE, LTIM and LTIBA progra.ms whenever possible. The undecid- ability of the vertex rea.chability problem is proved for programs in a language LTIM' which is a slight variation of the considered time constraint specification language LTIM. In the thesis also the strong and weak (abstra.cted from system internal actions) hisimula.tionequivalence problems are proved decidable for the formalism of Parallel Timer Processes (PTP), which are provided with th~ real time labelled transition sys- tem semantics and allow to express in a direct way the quantitative time constraints on the behaviour of concurrent real time systems. Various enrichments of the basic PTP model by additional features (including the processes with the dependencies on external data) are also considered and investigated w.r.t. decidability of the vertex reachability, infinite path fea.sibilityand bisimulation equivalence problems. An unde- cidability result regarding the considered algorithmic problems is obtained for a class of timed processes supplied with memory cells for moving the timer value information along the time axis. Finally, in the appendix an example of the rea.chability and path fea.sibilityanalysis of a simple real time system, specified as a process in the C.C.LT.T. telecommunica- tion system specification language SDL, is presented. 11 .Anot.acija Disertacija veltita dazadu reala laika sist.ernu apr akst a forrnalisrnu arializes auto- matizacijas iespeju izpetei (petita atrisinamiba sasniedz arnibas. bezgaligas dar bibas iespejas un bisimulacijas ekvivalences algoritrniskajarn rnasu problernarn) Aplukoro apraksta formiilismu pamata Qemts gallga automata modelis, ka.s bagatinats ar Iidzek- [iem, ka.s [auj aprakstit modelejarno sisternu darbibas at.karibu no laika un datiern. Algoritrniska atrisinarniba pieradHa, vispirrns, programmas virsot.nes sasniedza- mibas un bezgallga realizejarna cela eksistences (bezgaligas program mas darbibas iespejas) problem am programrnarn vienkarsa teoretiska valoda LTIBA. Katra prog- ramma valoda LTIBA lidz ar galIgu vadibas grafu satur mainigos , kas at.lau] apr akstit rnodelejamas reala laika sistemas atkaribu gao no ternporali kvant.it ativiem nosa- cijumiem (LTIM komandu sistema), gan arf no arejiern datiem (LBASE komandu sistema). Situa.cija..s, kuras tas iespejams, apliikojarno va.lodu LBASE, LTIM un LTIBA prograrnmu realizejamo ce]u kopam dots efektivs simbolisks raksturojums projektivitates terminos. Virsotnes sasniedzamibas problemas algorit.rnisk a neatr isi- namiba pieradita prograrnrnarn valoda LTIM', ka.s tikai nedaudz atskiras no petitas temporalo atkaribu specifikaciju va.lodas LTIM. Darba pieradita ari' stingras un vaja..s (no sistemas darbibas ieksejiern noti kumiem abstrahetas] bisimulacijas ekvivalences problernu algoritrniska atrisinamiba paralelo tairneru procesu (PTP) modelim, kurarn defineta reala laika iez'imeto pareju sisternu sernantika, un kas atlauj dabiska veida aprakst.it paralelu sisternu atkaribu no tem- porali kvantitativajiern nosacijurniem. Virsotnes sesniedzamibas, bezgalIgas darbibas iespejes un bisimulacijas ekvivalences problemu algoritrniska atrisinarniba petit.a aTI daZa.d.iern PTP modela paplasinajurniern a.r papildus sisternu apr akst a lidzekliern (t.sk. procesiem ar arejo datu atkaribas atteJcianas iespejam). BisimuJii.cijas ekvivalences un virsotnes sasniedzamibes problemu neatrisinarnlbas rezultets ieguts ar at.minas silnam paplasinatu tairneru procesu klasei. Darba pielikuma apliikots pierners vienkarsas reala laika sistemas, kas uzdota ka process C.C.I.T.T. telekornunikaciju specifikaciju valoda SDL, sesniedzamibas un ce]u realizejamibas analizei. III AHHOT&Il:H.lI ~ pa60Ta ~ MCCJJell(lIl3HH ~ ~ aHaJlI.I3& pa3JlWlHbIXM¥l.eneHorreMptaJIHCrOBpet.eiH (~I Ha pa3pelllHM)CTh MllCCOIlbJe npo& .neMbI ~ JllBM:))JGl[lC' 6ecJ<oHe<nDI pa6am H 6~ 3KIlMll3JJeHI'- HOCTH~ PIlCOoCI'peJlHLJe ~ 6a3HpyJorcJI Ha I'IOIUrne ICOHe'HlrO llB'l'OolaTa, paClIlHPeHHOI"O 3,lIj!CI,pa31IH'IHblMH CIlOC06aMH!WI o6ecrJe1eoo:I ~ OmtC8HHll3<lBl£IDdX:'Df pa&m,I MO/l.~ CHCTeM OT IlpeMeHHIoIX ycII:lIlHHH H OT lUlHHbDC. ~ ~ n<lJ(33BHa CHIL'mlIa!WI MIIaX.I!bIX npo6neMLJ.()C'mlIGIM:l 'I'M BeJXIlllHhI H IlO3II.«llI<Kl ~ pa6am !WI nporpaMM B HeClJl)J(H)M ~ KOM Jl3hJKe LTIBA, ~ pac:JDHpeHHeM Ja:He'H>-1lIm:MlTI«lH MC¥lenH nyreM BIle,lJ£HIDI Ilepel-EHHblX H ~ IlI>lpIl3Ifil> ~ ~ CH:TeMI.I, KaK OT TeMr/()- pa11LHO KOIIH'IeC'l'BeHIX ~ (CK:TeMa ~ LTIM), TalC. OT BHeUIHHX ~IX (CHC'reMIl. J<OMM:flIlnLBASE).B CHI')'BUKlIX, ~~ IICfIM:DKRCl,~ CHMIlOI1H'If.CKO OI1HCllffile MHl>IlfCl'B BCeX peaJIJl3)'PMoIX nyreH B nptI1lIIMlolllX ~IX Jl3h1KDll LBASE, LTIM, LTIBA JJ,lIHO B Tep&IHllJC npoeI<TIIIHlCTH ~ Hepa3pellAlMlCTh npo& JJeMbI Lf.l)C'nrJIGlM: BeJIlHlbI .!I,CIal3llHll !WI IlJllX1BMM B Jl3hJKe LTIM', xoropoe 'I'OIlhW I1OHeMHOI"y ~ OT ~ BLIIIJe Jl3b1K& ornIl:8HHll' IlpeMeHHIoIX ~ LTIM. B pa6cYre JJ,OIal3llHa TtlIOfIe pa3pe1II1D.«lCn. C'I'JlOfOH H CJlll60H (~ OT BHY- TpeHHHX: co6LmIiiJ CHCTeMbI) ~ 3KBHIlaIIeHmOC' !WI ~ 11pODt.COl8 C napaJ1eln.IlblMH '1'aHMepaMH (PTP), ~ ~ ~ IlpeI>tiIH Onpe.lte1EHHYIO llOC'pe,I:II:'l CH:TeM IICNe'IeHHbIX ~ H ~ rIpllMbIM o6pa3oM OIIHCaTh 3&- ~ napane1lhHb1X CH:TeM pe1IJIYlOfO ape.eHH OT BpeMeHH> KOIIH4eC'llleHH ycJ1l:lIlMH. P83peIIlHt.DCTh npo6neM ~ BeJI11HHbI, BaN:l>KIlOC'l\I ~ pa6cym H 61t- c~ ~KmIl!ll1IeHll« HCC1IP,DPIlaHa TllIOIle!WI HeI<OrOJ:LIX JlIlCIIlHIleHHM 0CIDlH0fI Mene1IH PTP (~TaIOIQ!~!WI 0IlI«:aHHlI ~ ~IX CW;- TeMOT lJ,llHHhlX~ Pe1YJIbTaT ~ ~IX ~ npo6neM IIOlIy'leH!WI1UIaCCa TetoRlpIIJlLHLlX ~ HMeKJIlJfX JI'IclOOI nawmJ !WI nepeIlJIH)I<eHH ~IX 3Hll'eHMft no Bpet.rHHDH OCM. Ii.aKoftiJ, B ~ ~ I1JMM!P llH&1IH3a Jl.(lC'l"H)IOO H ~ nyreii B ~ HeClD>I<HCM CHC'I'eM1>I peam,mro BpeMejlH, 3a.IlllHHOO IlJlOl.'lCCOM Ha Jl3hJKe SDL, pa3jlIIliorlIHH M10CIT !WI omaHWI ~IX CHCTeM. iv Acknow ledgements First of all, I want to thank my thesis advisor Prof. Janis Barzdins for his sugges- tion to look at the time constrained real time system analysis, for his really noteworthy advices and continuous encouragement in my work on the thesis over the years. I am very thankful to all my colleagues at Department of Computer Science, In- stitute of Mathematics and Computer Science for the provided possibility to work on my thesis, for their understanding, support and encouragement. Among my col- leagues I want to thank especially Prof. Audris Kalnins for a number of interesting discussions we have had on the topic of the real time system analysis and automated test case generation and Lolita Zeltkalne for her help to improve the English in the most important parts of the thesis. I want to express also my thanks to my colleagues and friends abroad - Uno Holmer, Wang Vi, K.V.S. Prasad, Alan Jeffrey and Prof. Bengt Nordstrom in Gate- borg, as well as Kim G. Larsen and Jens Chr. Godskesen in Aalborg both for numerous interesting discussions on the real time process calculi, and for the provided possibility to have a look on a wide spectrum of the ongoing research in the general area of the program correctness in the world. My deepest thanks are also to Dr. Agnis Andzans and Prof. Rusins Freivalds who, though not being in a direct relation with my thesis work, have done very much for my mathematical and scientific ed uca.tion. Perhaps the most important help I recieved during the work on the thesis was that by my parents Silvija and Henrihs and my sister Kristine, let me say: Paldies Jums, rnilie vecaki un rnasa' Riga, Latvija June 17, 1992 Karlis Cerans. v Contents 1 Introduction 4 1.1 "Real Time Systems" . 4 1.2 Symbolic Models of Real Time Systems . 5 1.3 Automation of Model Analysis . 7 1.4 Languages for Specifying Data.and Time Dependencies 9 1.4.1 Dependencieson Integer Valued Data ... 9 1.4.2 Time Constraint Specification Languages 10 1.4.3 Results . 12 1.5 Parallel Timer Processes . 13 1.5.1 Modelling and Reachability ..... 15 1.5.2 Bisimula.tionEquivalencesfor PTPs . 16 1.6 Comparison with Related Work 18 1.7 Organization of the Material . 21 I Languages for Data and Time Dependencies 22 2 Mathematical Preliminaries 23 2.1 Labelled Gra.phs. 23 2.2 Projective Path Sets 25 3 Language Definitions 31 3.1 The Language LBASE 31 3.2 Languages LTIM and LTlBA 34 3.3 Feasibility end Reachability 37 4 Finite Path Feasibility 40 4.1 Variable Vector Value Set Partitionings . 41 4.2 Path Feasibility Graphs . 44 4.3 LBASE: Perfectness of BG(P) . 46 4.4 Basic Graphs for LBASQ programs 49 CONTENTS 2 4.5 LTIM: Perfectness of BG(P) .50 5 Path Inequality Systems 53 5.1 Path Inequality Systems for LBASE . 53 5.2 Path Inequality Systems: LTIM 57 5.3 Point Classes .... 61 6 LBASE: Infinite Feasible Paths 66 6.1 Accomplished Loops ..
Recommended publications
  • GNU MPFR the Multiple Precision Floating-Point Reliable Library Edition 4.1.0 July 2020
    GNU MPFR The Multiple Precision Floating-Point Reliable Library Edition 4.1.0 July 2020 The MPFR team [email protected] This manual documents how to install and use the Multiple Precision Floating-Point Reliable Library, version 4.1.0. Copyright 1991, 1993-2020 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back- Cover Texts. A copy of the license is included in Appendix A [GNU Free Documentation License], page 59. i Table of Contents MPFR Copying Conditions ::::::::::::::::::::::::::::::::::::::: 1 1 Introduction to MPFR :::::::::::::::::::::::::::::::::::::::: 2 1.1 How to Use This Manual::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 2 2 Installing MPFR ::::::::::::::::::::::::::::::::::::::::::::::: 3 2.1 How to Install ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 3 2.2 Other `make' Targets :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 4 2.3 Build Problems :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 4 2.4 Getting the Latest Version of MPFR ::::::::::::::::::::::::::::::::::::::::::::::: 4 3 Reporting Bugs::::::::::::::::::::::::::::::::::::::::::::::::: 5 4 MPFR Basics ::::::::::::::::::::::::::::::::::::::::::::::::::: 6 4.1 Headers and Libraries :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 6
    [Show full text]
  • Perl 6 Deep Dive
    Perl 6 Deep Dive Data manipulation, concurrency, functional programming, and more Andrew Shitov BIRMINGHAM - MUMBAI Perl 6 Deep Dive Copyright © 2017 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: September 2017 Production reference: 1060917 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78728-204-9 www.packtpub.com Credits Author Copy Editor Andrew Shitov Safis Editing Reviewer Project Coordinator Alex Kapranoff Prajakta Naik Commissioning Editor Proofreader Merint Mathew Safis Editing Acquisition Editor Indexer Chaitanya Nair Francy Puthiry Content Development Editor Graphics Lawrence Veigas Abhinash Sahu Technical Editor Production Coordinator Mehul Singh Nilesh Mohite About the Author Andrew Shitov has been a Perl enthusiast since the end of the 1990s, and is the organizer of over 30 Perl conferences in eight countries.
    [Show full text]
  • Functional and Procedural Languages and Data Structures Learning
    Chapter 1 Functional and Procedural Languages and Data Structures Learning Joao˜ Dovicchi and Joao˜ Bosco da Mota Alves1 Abstract: In this paper authors present a didactic method for teaching Data Structures on Computer Science undergraduate course. An approach using func- tional along with procedural languages (Haskell and ANSI C) is presented, and adequacy of such a method is discussed. Authors are also concerned on how functional language can help students to learn fundamental concepts and acquire competence on data typing and structure for real programming. 1.1 INTRODUCTION Computer science and Information Technology (IT) undergraduate courses have its main focus on software development and software quality. Albeit recent in- troduction of Object Oriented Programming (OOP) have been enphasized, the preferred programming style paradigm is based on imperative languages. FOR- TRAN, Cobol, Algol, Pascal, C and other procedural languages were frequently used to teach computer and programming concepts [Lev95]. Nowadays, Java is the choice for many computer science teaching programs [KW99, Gri00, Blu02, GT98], although “the novelty and popularity of a language do not automatically imply its suitability for the learning of introductory programming” [Had98]. Inside undergraduate curricula, Data Structures courses has some specific re- quirements that depends on mathematical formalism. In this perspective, concepts 1Remote Experimentation Laboratory, Informatics and Statistics Department (INE), Universidade Federal de Santa Catarina (UFSC), Florianopolis,´ SC, Brazil, CEP 88040-900; Phone: +55 (48) 331 7511; Fax: +55 (48) 331 9770; Email: [email protected] and [email protected] 1 on discrete mathematics is very important on understanding this formalism. These courses’ syllabuses include concept attainment and competence development on expression evaluation, iteration, recursion, lists, graphs, trees, and so on.
    [Show full text]
  • Vivado Design Suite User Guide: High-Level Synthesis (UG902)
    Vivado Design Suite User Guide High-Level Synthesis UG902 (v2018.3) December 20, 2018 Revision History Revision History The following table shows the revision history for this document. Section Revision Summary 12/20/2018 Version 2018.3 Schedule Viewer Updated information on the schedule viewer. Optimizing the Design Clarified information on dataflow and loops throughout section. C++ Arbitrary Precision Fixed-Point Types: Reference Added note on using header files. Information HLS Math Library Updated information on how hls_math.h is used. The HLS Math Library, Fixed-Point Math Functions Updated functions. HLS Video Library, HLS Video Functions Library Moved the HLS video library to the Xilinx GitHub (https:// github.com/Xilinx/xfopencv) HLS SQL Library, HLS SQL Library Functions Updated hls::db to hls::alg functions. System Calls Added information on using the __SYNTHESIS__ macro. Arrays Added information on array sizing behavior. Command Reference Updated commands. config_dataflow, config_rtl Added the option -disable_start_propagation Class Methods, Operators, and Data Members Added guidance on specifying data width. UG902 (v2018.3) December 20, 2018Send Feedback www.xilinx.com High-Level Synthesis 2 Table of Contents Revision History...............................................................................................................2 Chapter 1: High-Level Synthesis............................................................................ 5 High-Level Synthesis Benefits....................................................................................................5
    [Show full text]
  • C++ Object-Oriented Library User's Manual [COOL]
    TEXAS I NSTRUMENTS C++ Object-Oriented Library User’s Manual MANUAL REVISION HISTORY C++ Object-Oriented Library User’s Manual (2566801-0001) Original Issue. March 1990 Copyright © 1990, 1991 Texas Instruments Incorporated Permission is granted to any individual or institution to use, copy, modify, and distribute this document, provided that this complete copyright and permission notice is maintained, intact, in all copies and supporting documentation. Texas Instruments Incorporated makes no representations about the suitability of this document or the software described herein for any purpose. It is provided ”as is” without express or implied warranty. Texas Instruments Incorporated Information Technology Group Austin, Texas C++ OBJECT-ORIENTED LIBRARY USER’S MANUAL CONTENTS Paragraph Title Page About This Manual . xi 1 Overview of COOL 1.1 Introduction. 1-1 1.2 Audience. 1-1 1.3 Major Attributes. 1-1 1.4 Macros. 1-2 1.5 Parameterized Templates. 1-2 1.6 Symbols and Packages. 1-3 1.7 Polymorphic Management. 1-3 1.8 Exception Handling. 1-4 1.9 Classes. 1-4 1.10 Class Hierarchy. 1-7 2 String Classes 2.1 Introduction. 2-1 2.2 Requirements. 2-1 2.3 String Class. 2-1 2.4 String Example. 2-7 2.5 Auxiliary char* Functions. 2-8 2.6 Regular Expression Class. 2-10 2.7 Regular Expression Example. 2-12 2.8 General String Class. 2-13 2.9 General String Example. 2-20 3 Number Classes 3.1 Introduction. 3-1 3.2 Requirements. 3-1 3.3 Random Class. 3-1 3.4 Random Class Example.
    [Show full text]
  • The Sage Interpreter
    Parabola Volume 44, Issue 1 (2008) Sage | Free Software for Mathematics Bill McLean1 A lot of useful mathematical software is freely available via the internet. If you look hard enough you can find a code to solve just about any standard mathematical problem, and for many years professional scientists have downloaded programs and subroutine libraries from repositories like netlib [4]. The trouble is that most of this software is not easy to use, and typically requires specialised programming skills. For this reason, university mathematics courses mostly use commercial software appli- cations like Maple, Matlab or Mathematica, that provide a simpler user interface. Several free applications [1,3,6,8] provide similar, if less sophisticated, facilities. Some of these mathematics packages have a long history, for example, the earliest version of Matlab dates from the 1970s. In this article I will describe a relatively recent package called Sage [9] (Software for Algebra and Geometry Experimentation). The lead developer of Sage, a mathematics professor from the University of Washington called William Stein, released version 0.1 in February of 2005. At the time of writing, the latest version of Sage is 2.10.1. The Sage interpreter The quickest way to get a feeling for how Sage works is by looking at a few examples. After starting Sage, a command prompt appears, sage: You can then type a command and press enter to have the Sage interpreter carry out that command. For example, rational arithmetic is easy. sage: 3531=83411 − 45134=3132542 3648166864=130644230381 Here, Sage has evaluated the typed expression and printed the result on the next line (cancelling any common factors in the numerator and denominator).
    [Show full text]
  • Formal Methods for Secure Software Construction
    Formal Methods for Secure Software Construction by Ben Goodspeed A Thesis Submitted to Saint Mary's University, Halifax, Nova Scotia in Partial Fulfillment of the Requirements for the Degree of Master of Science in Applied Science. April, 2016, Halifax, Nova Scotia Copyright Ben Goodspeed. Approved: Dr. Stavros Konstantinidis Supervisor Approved: Dr. Diego Rojas Examiner Approved: Dr. Cristian Suteanu Examiner Approved: Dr. Peter Selinger Examiner Date: April 8, 2016 Abstract Formal Methods for Secure Software Construction by Ben Goodspeed The objective of this thesis is to evaluate the state of the art in formal methods usage in secure computing. From this evaluation, we analyze the common components and search for weaknesses within the common workflows of secure software construction. An improved workflow is proposed and appropriate system requirements are discussed. The systems are evaluated and further tools in the form of libraries of functions, data types and proofs are provided to simplify work in the selected system. Future directions include improved program and proof guidance via compiler error messages, and targeted proof steps. April 8, 2016 \There is no such thing as perfect security, only varying levels of insecurity." Salman Rushdie Acknowledgements Thanks to Dr. Stavros Konstantinidis for supervising this work - providing no end of encouragement and freedom to learn. Thanks to Drs Rojas, Suteanu, and Selinger for their help in making this thesis what it is today. Thank you to Mayya Assouad for putting up with me while I did this, and reading countless drafts. Thanks to my father Dan Goodspeed, my mother Kathy Goodspeed, my aunt Amy Austin and my uncle Wayne Basler for supporting me throughout my education, and always encouraging me.
    [Show full text]
  • Lecture P5: Abstract Data Types Data Type
    Review Lecture P5: Abstract Data Types Data type: Set of values and collection of operations on those values. Example: int Set of values: between -32,767 and 32,767 (minimum limits). Operations: +, -, *, /, %, printf("%d"), sqrt How is an int represented? multiply 16 bits? negative integers? shouldn't care! add int print ... 2 Overview "Non ADT’s" Is Rational data type an ABSTRACT data type? Separate implementation from specification. No: Representation in interface. INTERFACE: specify the allowed operations. Client can directly manipulate the data type: a.num = 5; IMPLEMENTATION: provide code for operations. CLIENT: code that uses operations. RAT.h client.c Abstract data type (ADT): typedef struct { #include "RAT.h" int num; Data type whose representation is HIDDEN. int den; int main(void) { Don’t want client to directly manipulate data type. } Rational; Rational a; Operations ONLY permitted through interface. legal C, but very bad a.num = 5; Rational RATadd(Rationalsoftware a, Rational design b); a.den = 8; Rational RATmul(Rational a, Rational b); RATshow(a); Principle of least privilege. Rational RATshow(Rational a); return 0; Rational RATinit(int x, int y); } Violates "principle of least privilege." 3 6 ADT's for Stacks and Queues Stack Interface Fundamental data type. Stack operations. Set of operations (insert, delete) on generic data. STACKinit(): initialize empty stack STACKisempty(): return 1 if stack is empty; 0 otherwise Stack ("last in first out" or LIFO). STACKpush(int): insert new item push: add info to the data structure STACKpop(): delete and return item most recently added pop: remove the info MOST recently added initialize, test if empty STACK.h Queue ("first in first out" or FIFO).
    [Show full text]
  • Programming in Scilab
    Programming in Scilab Micha¨elBaudin September 2011 Abstract In this document, we present programming in Scilab. In the first part, we present the management of the memory of Scilab. In the second part, we present various data types and analyze programming methods associated with these data structures. In the third part, we present features to design flexible and robust functions. In the last part, we present methods which allow to achieve good performances. We emphasize the use of vectorized functions, which allow to get the best performances, based on calls to highly optimized numerical libraries. Many examples are provided, which allow to see the effectiveness of the methods that we present. Contents 1 Introduction5 2 Variable and memory management5 2.1 The stack.................................6 2.2 More on memory management......................8 2.2.1 Memory limitations from Scilab.................8 2.2.2 Memory limitations of 32 and 64 bit systems.......... 10 2.2.3 The algorithm in stacksize ................... 11 2.3 The list of variables and the function who ................ 11 2.4 Portability variables and functions.................... 12 2.5 Destroying variables : clear ....................... 15 2.6 The type and typeof functions..................... 16 2.7 Notes and references........................... 17 2.8 Exercises.................................. 18 3 Special data types 18 3.1 Strings................................... 18 3.2 Polynomials................................ 22 3.3 Hypermatrices............................... 25 3.4 Type and dimension of an extracted hypermatrix........... 28 3.5 The list data type............................ 30 3.6 The tlist data type........................... 33 3.7 Emulating OO Programming with typed lists............. 36 1 3.7.1 Limitations of positional arguments............... 37 3.7.2 A "person" class in Scilab...................
    [Show full text]
  • TIFF Image Metadata
    Guidelines for TIFF Metadata Version 1.0 Guidelines for TIFF Metadata Recommended Elements and Format Version 1.0 February 10, 2009 Tagged Image File Format (TIFF) is a tag-based file format for the storage and interchange of raster images. It serves as a wrapper for a variety of encoded bit-mapped images, and is a popular format to use as a sustainable master in cultural heritage digital imaging projects. Created in the mid-1980s, TIFF was designed to be cross platform, backward compatible and, whenever possible, forward compatible. The most recent version of TIFF is 6.0, published in 1992. Adobe Systems controls the TIFF specification. Metadata is an essential component of the TIFF format; many TIFF images dating back to the 1980s still can be displayed in modern TIFF readers through the interpretation of the tagged metadata set. The tag set is extensible through a system of “private tags” and a framework for new complete systems of tags. Aware Systems’ TIFF Tag Reference lists 36 “Baseline” tags, 60 “Extension” tags, 74 “Private” tags, plus a set of 58 Exchangeable image file format (Exif) tags standardized by the Japan Electronics and Information Technology Industries Association (JEITA), a large group of camera manufactures. Other large extension sets of tags have been developed for GPS, GeoReference, and medical informatics purposes, as well as for Adobe’s Digital Negative (DNG) specification. The Library of Congress also maintains a complete tag list, along with significant additional information on the sustainability of numerous digital file formats at http://www.digitalpreservation.gov/formats/content/tiff_tags.shtml.
    [Show full text]
  • Beginning Julia Programming for Engineers and Scientists — Sandeep Nagar Beginning Julia Programming for Engineers and Scientists
    فقط کتاب مرجع معتبر دانلود کتاب های تخصصی Faghatketab.ir Beginning Julia Programming For Engineers and Scientists — Sandeep Nagar Beginning Julia Programming For Engineers and Scientists Sandeep Nagar Beginning Julia Programming: For Engineers and Scientists Sandeep Nagar New York, USA ISBN-13 (pbk): 978-1-4842-3170-8 ISBN-13 (electronic): 978-1-4842-3171-5 https://doi.org/10.1007/978-1-4842-3171-5 Library of Congress Control Number: 2017959880 Copyright © 2017 by Sandeep Nagar This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made.
    [Show full text]
  • TIFF ª Revision 6.0
    TIFF ™ Revision 6.0 Final — June 3, 1992 Author/Editor/Arbitrator: Steve Carlsen, Principal Engineer, Aldus Corporation Aldus Developers Desk Aldus Corporation 411 First Avenue South Seattle, WA 98104-2871 CompuServe: GO ALDSVC, Message Section #10 Applelink: Aldus Developers Icon For a copy of the TIFF 6.0 specification, call (206) 628-6593. If you have questions about the contents of this specification, see page 8. TIFF 6.0 Specification Final—June 3, 1992 Copyright © 1986-1988, 1992 Aldus Corporation. Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage and the Aldus copyright notice appears. If the major- ity of the document is copied or redistributed, it must be distributed verbatim, without repagination or reformatting. To copy otherwise requires specific permis- sion from the Aldus Corporation. Licenses and Trademarks Aldus and PageMaker are registered trademarks and TIFF is a trademark of Aldus Corporation. Apple and Macintosh are registered trademarks of Apple Computer, Inc. MS-DOS is a registered trademark of Microsoft Corporation. UNIX is a trademark of Bell Laboratories. CompuServe is a registered trademark of CompuServe Inc. PostScript is a registered trademark of Adobe Systems Inc. and all references to PostScript in this document are references to either the PostScript interpreter or language. Kodak and PhotoYCC are trademarks of Eastman Kodak Company. Rather than put a trademark symbol in every occurrence of other trademarked names, we state that we are using the names only in an editorial fashion, and to the benefit of the trademark owner, with no intention of infringement of the trade- mark.
    [Show full text]