Data Types Data Types Descriptors Primitive Data Types: Floating Point Internal Representation of Floats

Total Page:16

File Type:pdf, Size:1020Kb

Data Types Data Types Descriptors Primitive Data Types: Floating Point Internal Representation of Floats Data Types Data Types COSC337 • Evolution of Data Types: – FORTRAN I (1956) - INTEGER, REAL, arrays… – COBOL allowed users to define precision – ALGOL (1968) provided a few basic types, and by Matt Evett allowed user to form new aggregate types. – Ada (1983) - User can create a unique type for adopted from slides by Robert Sebesta every category of variables in the problem space and have the system enforce the types Descriptors Primitive Data Types: • Def: A descriptor is the collection of the • Primitive Data Types are those types not attributes of a variable defined in terms of other data types. – If all attributes are static, descriptors are required • Integer only at compilation time (usually stored within – Almost always an exact reflection of the hardware, compiler’s symbol table) so the mapping is trivial – If dynamic, this information must be stored in – There may be as many as eight different integer memory (Lisp does this via property lists) and types in a language used by run-time system. • Ex: int, long, char, byte • Data type is part of a descriptor. Floating Point Internal Representation of Floats • Model real numbers, but only approximately • IEEE Floating-Point Standard 754 • Languages for scientific use support at least sign bit two floating-point types 8 bits 23 bits • Usually the representation matches the exponent fraction hardware’s, but not always; some languages allow accuracy specs in code 11 bits 52 bits – e.g. (Ada) exponent fraction • type SPEED is digits 7 range 0.0..1000.0; • type VOLTAGE is delta 0.1 range -12.0..24.0; Decimal Boolean • Common in systems supporting financial applications • Could be implemented as bits, but often as • Store a fixed number of decimal digits (coded) bytes – Advantage: accuracy • Advantage: readability – Disadvantages: limited range, wastes memory Strings Examples of Strings • Pascal • Values are sequences of characters – Not primitive; assignm ent and comparison only (of • Design issues: packed arrays) – Is it a primitive type or just a special kind of array? • Ada, FORTRAN 77, FORTRAN 90 and – Is the length of objects static or dynamic? BASIC • Operations: – Somewhat primitive – Assignm ent – Assignm ent, comparison, catenation, substring – Comparison (=, >, etc.) reference – Catenation (or “concatenation”) – FORTRAN has an intrinsic for pattern matching – Substring reference – Ada provides catenation (N := N1 & N2 ) and – Pattern matching (find matching substrings, etc.) substrings (N(2..4)) Strings in C More String Examples •C • SNOBOL4 (a string manipulation language) – Not primitive – Primitive – Use char arrays and a library of functions that – Many operations, including elaborate pattern provide operations matching • C++ • Perl – Provides C-style strings – Patterns are defined in terms of regular expressions – Use of STL class provides “primitive” strings • A very powerful facility! Similar to Unix’s grep • e.g: /[A-Za-z][A-Za-z\d]+/ • Java – String class primitive String Length Encoding Utility (of string types): • String Length Options: • Aid to writability • Static - FORTRAN 77, Ada, COBOL • As a primitive type with static length, they are – e.g. (FORTRAN 90) inexpensive to provide--why not have them? CHARACTER (LEN = 15) NAME; • Dynamic length is nice, but is it worth the – NAME knows its own length expense? • Limited Dynamic Length - C and C++ actual – An additional pointer indirection. length is indicated implicitly by a null character delimiter • Dynamic - SNOBOL4, Perl, C++ and Java String classes Implementing Strings Ordinal Types • Static strings - compile-time descriptor • Def: ordinal type = range of possible values • Limited dynamic strings - may need a run-time can be easily associated with the set of positive descriptor for current & max length integers – But not in C and C++. Of course there’s no index – Enumeration checking provided! – Subrange • Dynamic strings - need run-time descriptor; allocation/deallocation is the biggest implementation problem Enumerations Enumerations in Languages • The user enumerates all of the possible values, • Pascal which are symbolic constants. – cannot reuse constants; they can be used for array – Design Issue: Should a symbolic constant be subscripts, for variables, case selectors; NO input allowed to be in more than one enumeration type? or output; can be compared. • No in C, C++, Pascal, because they’re implicitly • Predecessor and successor functions, loops converted into integers. •Ada • Ex (Pascal): – constants can be reused (overloaded literals); type WATER_TEMP = ( Frigid, Cold, Warm, Hot); disambiguate with context or type_name ‘ (one of var temp : WATER_TEMP; … them); can be used as in Pascal; CAN be input if temp > Warm ... and output Enumeration in Languages (2) Utility (of enumerations) • C and C++ • Aid to readability--e.g. no need to code a color – like Pascal, except they can be input and output as as a number integers • Aid to reliability--e.g. compiler can check • Java does not include an enumeration type operations and ranges of values – E.g. Don’t have to worry about bad indices: • int dailyHighTemp[MONDAY] vs. • int dailyHighTemp[1] Subrange Type Examples of Subrange Types • An ordinal type representing an ordered contiguous subsequence of another ordinal – Ada type • Subtypes are not new types, just constrained existing types (so they are compatible); can be used as in Pascal, plus case • Examples: constants – Pascal • Ex: • Subrange types behave as their parent types; can be used subtype POS_TYPE is INTEGER range 0 ..INTEGER'LAST; as for variables and array indices e.g. type pos = 0 .. MAXINT; Implementating user-defined Utility of subrange types: ordinal types • Aid to readability • Enumeration types are implemented as integers • Aid to reliability - restricted ranges add error • Subrange types are the parent types with code detection inserted (by the compiler) to restrict assignments to subrange variables Arrays Indexing • A homogeneous aggregate of data elements in • Def: mapping from indices to elements which an individual element is identified by its map(array_name, index_value_list) : an element position in the aggregate, relative to the first. • Syntax • Design Issues: – FORTRAN, PL/I, Ada use parentheses – What types are legal for subscripts? – Most others use brackets – Are subscripting expressions in element references range checked? – When are subscript ranges bound? • Subscript Types: – When does allocation take place? – FORTRAN, C - int only – What is the maximum number of subscripts? – Pascal - any ordinal type (int, boolean, char, enum) – Can array objects be initialized? – Ada - int or enum (includes boolean and char) – Are any kind of slices allowed? – Java - integer types only Categories of Arrays Static and Fixed Stack • Static • (based on subscript binding and binding to – range of subscripts and storage bindings are static storage) – e.g. FORTRAN 77, some arrays in Ada, static and – Static global C arrays – Fixed stack dynamic – Advantage: execution efficiency (no allocation or – Stack-dynamic deallocation) – Heap-dynamic • Fixed stack dynamic – range of subscripts is statically bound, but storage is bound at elaboration time – e.g. Pascal locals and, C locals that are not static – Advantage: space efficiency Stack-Dynamic Heap-dynamic • Subscript range and storage bindings are • Range and storage are dynamic, but fixed from dynamic and not fixed then on for the variable’s lifetime • e.g. (FORTRAN 90) • e.g. Ada declare blocks: INTEGER, ALLOCATABLE, ARRAY (:,:) :: MAT declare (Declares MAT to be a dynamic 2-dim array) ALLOCATE (MAT (10, NUMBER_OF_COLS)) STUFF : array (1..N) of FLOAT; (Allocates MAT to have 10 rows and begin NUMBER_OF_COLS columns) ... DEALLOCATE MAT end; (Deallocates MAT’s storage) • Advantage: flexibility - size need not be • APL & Perl: arrays grow and shrink as needed known until the array is about to be used • In Java, all arrays are objects (heap-dynamic) Subscripts Array Initialization • Usually just a list of values that are put in the • Number of subscripts array in the order in which the array elements – FORTRAN I allowed up to three are stored in memory – FORTRAN 77 allows up to seven • Examples: – C, C++, and Java allow just one, but elements can – FORTRAN - uses the DATA statement, or put the be arrays values in / ... / on the declaration – Others - no limit – C and C++ - put the values in braces; can let the compiler count them • e.g. int stuff [] = {2, 4, 6, 8}; – Ada - positions for the values can be specified SCORE : array (1..14, 1..2) := (1 => (24, 10), 2 => (10, 7), 3 =>(12, 30), others => (0, 0)); Slices Implementing Arrays • 1. FORTRAN 90 • - Access function maps subscript expressions to • INTEGER MAT (1 : 4, 1 : 4) • an address in the array • MAT(1 : 4, 1) - the first column • - Row major (by rows) or column major order (by • MAT(2, 1 : 4) - the second row • columns) • 2. Ada - single-dimensioned arrays only • LIST(4..10) Chapter 5 Associative Arrays • - An associative array is an unordered collection of • data elements that are indexed by an equal • number of values called keys • - Design Issues: • 1. What is th eform of references to elements? • 2. Is the size static or dynamic? Chapter 5 Chapter 5 Record Definition Syntax - Structure and Operations in Perl - COBOL uses level numbers to show nested - Names begin with % records; others use recursive definitions - Literals are delimited by parentheses e.g., Record Field References %hi_temps = ("Monday" => 77, 1. COBOL "Tuesday" => 79,…); field_name OF record_name_1 OF ..
Recommended publications
  • Metaobject Protocols: Why We Want Them and What Else They Can Do
    Metaobject protocols: Why we want them and what else they can do Gregor Kiczales, J.Michael Ashley, Luis Rodriguez, Amin Vahdat, and Daniel G. Bobrow Published in A. Paepcke, editor, Object-Oriented Programming: The CLOS Perspective, pages 101 ¾ 118. The MIT Press, Cambridge, MA, 1993. © Massachusetts Institute of Technology All rights reserved. No part of this book may be reproduced in any form by any electronic or mechanical means (including photocopying, recording, or information storage and retrieval) without permission in writing from the publisher. Metaob ject Proto cols WhyWeWant Them and What Else They Can Do App ears in Object OrientedProgramming: The CLOS Perspective c Copyright 1993 MIT Press Gregor Kiczales, J. Michael Ashley, Luis Ro driguez, Amin Vahdat and Daniel G. Bobrow Original ly conceivedasaneat idea that could help solve problems in the design and implementation of CLOS, the metaobject protocol framework now appears to have applicability to a wide range of problems that come up in high-level languages. This chapter sketches this wider potential, by drawing an analogy to ordinary language design, by presenting some early design principles, and by presenting an overview of three new metaobject protcols we have designed that, respectively, control the semantics of Scheme, the compilation of Scheme, and the static paral lelization of Scheme programs. Intro duction The CLOS Metaob ject Proto col MOP was motivated by the tension b etween, what at the time, seemed liketwo con icting desires. The rst was to have a relatively small but p owerful language for doing ob ject-oriented programming in Lisp. The second was to satisfy what seemed to b e a large numb er of user demands, including: compatibility with previous languages, p erformance compara- ble to or b etter than previous implementations and extensibility to allow further exp erimentation with ob ject-oriented concepts see Chapter 2 for examples of directions in which ob ject-oriented techniques might b e pushed.
    [Show full text]
  • Chapter 2 Basics of Scanning And
    Chapter 2 Basics of Scanning and Conventional Programming in Java In this chapter, we will introduce you to an initial set of Java features, the equivalent of which you should have seen in your CS-1 class; the separation of problem, representation, algorithm and program – four concepts you have probably seen in your CS-1 class; style rules with which you are probably familiar, and scanning - a general class of problems we see in both computer science and other fields. Each chapter is associated with an animating recorded PowerPoint presentation and a YouTube video created from the presentation. It is meant to be a transcript of the associated presentation that contains little graphics and thus can be read even on a small device. You should refer to the associated material if you feel the need for a different instruction medium. Also associated with each chapter is hyperlinked code examples presented here. References to previously presented code modules are links that can be traversed to remind you of the details. The resources for this chapter are: PowerPoint Presentation YouTube Video Code Examples Algorithms and Representation Four concepts we explicitly or implicitly encounter while programming are problems, representations, algorithms and programs. Programs, of course, are instructions executed by the computer. Problems are what we try to solve when we write programs. Usually we do not go directly from problems to programs. Two intermediate steps are creating algorithms and identifying representations. Algorithms are sequences of steps to solve problems. So are programs. Thus, all programs are algorithms but the reverse is not true.
    [Show full text]
  • Abstract Data Types
    Chapter 2 Abstract Data Types The second idea at the core of computer science, along with algorithms, is data. In a modern computer, data consists fundamentally of binary bits, but meaningful data is organized into primitive data types such as integer, real, and boolean and into more complex data structures such as arrays and binary trees. These data types and data structures always come along with associated operations that can be done on the data. For example, the 32-bit int data type is defined both by the fact that a value of type int consists of 32 binary bits but also by the fact that two int values can be added, subtracted, multiplied, compared, and so on. An array is defined both by the fact that it is a sequence of data items of the same basic type, but also by the fact that it is possible to directly access each of the positions in the list based on its numerical index. So the idea of a data type includes a specification of the possible values of that type together with the operations that can be performed on those values. An algorithm is an abstract idea, and a program is an implementation of an algorithm. Similarly, it is useful to be able to work with the abstract idea behind a data type or data structure, without getting bogged down in the implementation details. The abstraction in this case is called an \abstract data type." An abstract data type specifies the values of the type, but not how those values are represented as collections of bits, and it specifies operations on those values in terms of their inputs, outputs, and effects rather than as particular algorithms or program code.
    [Show full text]
  • 5. Data Types
    IEEE FOR THE FUNCTIONAL VERIFICATION LANGUAGE e Std 1647-2011 5. Data types The e language has a number of predefined data types, including the integer and Boolean scalar types common to most programming languages. In addition, new scalar data types (enumerated types) that are appropriate for programming, modeling hardware, and interfacing with hardware simulators can be created. The e language also provides a powerful mechanism for defining OO hierarchical data structures (structs) and ordered collections of elements of the same type (lists). The following subclauses provide a basic explanation of e data types. 5.1 e data types Most e expressions have an explicit data type, as follows: — Scalar types — Scalar subtypes — Enumerated scalar types — Casting of enumerated types in comparisons — Struct types — Struct subtypes — Referencing fields in when constructs — List types — The set type — The string type — The real type — The external_pointer type — The “untyped” pseudo type Certain expressions, such as HDL objects, have no explicit data type. See 5.2 for information on how these expressions are handled. 5.1.1 Scalar types Scalar types in e are one of the following: numeric, Boolean, or enumerated. Table 17 shows the predefined numeric and Boolean types. Both signed and unsigned integers can be of any size and, thus, of any range. See 5.1.2 for information on how to specify the size and range of a scalar field or variable explicitly. See also Clause 4. 5.1.2 Scalar subtypes A scalar subtype can be named and created by using a scalar modifier to specify the range or bit width of a scalar type.
    [Show full text]
  • Lecture 2: Variables and Primitive Data Types
    Lecture 2: Variables and Primitive Data Types MIT-AITI Kenya 2005 1 In this lecture, you will learn… • What a variable is – Types of variables – Naming of variables – Variable assignment • What a primitive data type is • Other data types (ex. String) MIT-Africa Internet Technology Initiative 2 ©2005 What is a Variable? • In basic algebra, variables are symbols that can represent values in formulas. • For example the variable x in the formula f(x)=x2+2 can represent any number value. • Similarly, variables in computer program are symbols for arbitrary data. MIT-Africa Internet Technology Initiative 3 ©2005 A Variable Analogy • Think of variables as an empty box that you can put values in. • We can label the box with a name like “Box X” and re-use it many times. • Can perform tasks on the box without caring about what’s inside: – “Move Box X to Shelf A” – “Put item Z in box” – “Open Box X” – “Remove contents from Box X” MIT-Africa Internet Technology Initiative 4 ©2005 Variables Types in Java • Variables in Java have a type. • The type defines what kinds of values a variable is allowed to store. • Think of a variable’s type as the size or shape of the empty box. • The variable x in f(x)=x2+2 is implicitly a number. • If x is a symbol representing the word “Fish”, the formula doesn’t make sense. MIT-Africa Internet Technology Initiative 5 ©2005 Java Types • Integer Types: – int: Most numbers you’ll deal with. – long: Big integers; science, finance, computing. – short: Small integers.
    [Show full text]
  • Csci 658-01: Software Language Engineering Python 3 Reflexive
    CSci 658-01: Software Language Engineering Python 3 Reflexive Metaprogramming Chapter 3 H. Conrad Cunningham 4 May 2018 Contents 3 Decorators and Metaclasses 2 3.1 Basic Function-Level Debugging . .2 3.1.1 Motivating example . .2 3.1.2 Abstraction Principle, staying DRY . .3 3.1.3 Function decorators . .3 3.1.4 Constructing a debug decorator . .4 3.1.5 Using the debug decorator . .6 3.1.6 Case study review . .7 3.1.7 Variations . .7 3.1.7.1 Logging . .7 3.1.7.2 Optional disable . .8 3.2 Extended Function-Level Debugging . .8 3.2.1 Motivating example . .8 3.2.2 Decorators with arguments . .9 3.2.3 Prefix decorator . .9 3.2.4 Reformulated prefix decorator . 10 3.3 Class-Level Debugging . 12 3.3.1 Motivating example . 12 3.3.2 Class-level debugger . 12 3.3.3 Variation: Attribute access debugging . 14 3.4 Class Hierarchy Debugging . 16 3.4.1 Motivating example . 16 3.4.2 Review of objects and types . 17 3.4.3 Class definition process . 18 3.4.4 Changing the metaclass . 20 3.4.5 Debugging using a metaclass . 21 3.4.6 Why metaclasses? . 22 3.5 Chapter Summary . 23 1 3.6 Exercises . 23 3.7 Acknowledgements . 23 3.8 References . 24 3.9 Terms and Concepts . 24 Copyright (C) 2018, H. Conrad Cunningham Professor of Computer and Information Science University of Mississippi 211 Weir Hall P.O. Box 1848 University, MS 38677 (662) 915-5358 Note: This chapter adapts David Beazley’s debugly example presentation from his Python 3 Metaprogramming tutorial at PyCon’2013 [Beazley 2013a].
    [Show full text]
  • Kind of Quantity’
    NIST Technical Note 2034 Defning ‘kind of quantity’ David Flater This publication is available free of charge from: https://doi.org/10.6028/NIST.TN.2034 NIST Technical Note 2034 Defning ‘kind of quantity’ David Flater Software and Systems Division Information Technology Laboratory This publication is available free of charge from: https://doi.org/10.6028/NIST.TN.2034 February 2019 U.S. Department of Commerce Wilbur L. Ross, Jr., Secretary National Institute of Standards and Technology Walter Copan, NIST Director and Undersecretary of Commerce for Standards and Technology Certain commercial entities, equipment, or materials may be identifed in this document in order to describe an experimental procedure or concept adequately. Such identifcation is not intended to imply recommendation or endorsement by the National Institute of Standards and Technology, nor is it intended to imply that the entities, materials, or equipment are necessarily the best available for the purpose. National Institute of Standards and Technology Technical Note 2034 Natl. Inst. Stand. Technol. Tech. Note 2034, 7 pages (February 2019) CODEN: NTNOEF This publication is available free of charge from: https://doi.org/10.6028/NIST.TN.2034 NIST Technical Note 2034 1 Defning ‘kind of quantity’ David Flater 2019-02-06 This publication is available free of charge from: https://doi.org/10.6028/NIST.TN.2034 Abstract The defnition of ‘kind of quantity’ given in the International Vocabulary of Metrology (VIM), 3rd edition, does not cover the historical meaning of the term as it is most commonly used in metrology. Most of its historical meaning has been merged into ‘quantity,’ which is polysemic across two layers of abstraction.
    [Show full text]
  • Subtyping Recursive Types
    ACM Transactions on Programming Languages and Systems, 15(4), pp. 575-631, 1993. Subtyping Recursive Types Roberto M. Amadio1 Luca Cardelli CNRS-CRIN, Nancy DEC, Systems Research Center Abstract We investigate the interactions of subtyping and recursive types, in a simply typed λ-calculus. The two fundamental questions here are whether two (recursive) types are in the subtype relation, and whether a term has a type. To address the first question, we relate various definitions of type equivalence and subtyping that are induced by a model, an ordering on infinite trees, an algorithm, and a set of type rules. We show soundness and completeness between the rules, the algorithm, and the tree semantics. We also prove soundness and a restricted form of completeness for the model. To address the second question, we show that to every pair of types in the subtype relation we can associate a term whose denotation is the uniquely determined coercion map between the two types. Moreover, we derive an algorithm that, when given a term with implicit coercions, can infer its least type whenever possible. 1This author's work has been supported in part by Digital Equipment Corporation and in part by the Stanford-CNR Collaboration Project. Page 1 Contents 1. Introduction 1.1 Types 1.2 Subtypes 1.3 Equality of Recursive Types 1.4 Subtyping of Recursive Types 1.5 Algorithm outline 1.6 Formal development 2. A Simply Typed λ-calculus with Recursive Types 2.1 Types 2.2 Terms 2.3 Equations 3. Tree Ordering 3.1 Subtyping Non-recursive Types 3.2 Folding and Unfolding 3.3 Tree Expansion 3.4 Finite Approximations 4.
    [Show full text]
  • Subtyping, Declaratively an Exercise in Mixed Induction and Coinduction
    Subtyping, Declaratively An Exercise in Mixed Induction and Coinduction Nils Anders Danielsson and Thorsten Altenkirch University of Nottingham Abstract. It is natural to present subtyping for recursive types coin- ductively. However, Gapeyev, Levin and Pierce have noted that there is a problem with coinductive definitions of non-trivial transitive inference systems: they cannot be \declarative"|as opposed to \algorithmic" or syntax-directed|because coinductive inference systems with an explicit rule of transitivity are trivial. We propose a solution to this problem. By using mixed induction and coinduction we define an inference system for subtyping which combines the advantages of coinduction with the convenience of an explicit rule of transitivity. The definition uses coinduction for the structural rules, and induction for the rule of transitivity. We also discuss under what condi- tions this technique can be used when defining other inference systems. The developments presented in the paper have been mechanised using Agda, a dependently typed programming language and proof assistant. 1 Introduction Coinduction and corecursion are useful techniques for defining and reasoning about things which are potentially infinite, including streams and other (poten- tially) infinite data types (Coquand 1994; Gim´enez1996; Turner 2004), process congruences (Milner 1990), congruences for functional programs (Gordon 1999), closures (Milner and Tofte 1991), semantics for divergence of programs (Cousot and Cousot 1992; Hughes and Moran 1995; Leroy and Grall 2009; Nakata and Uustalu 2009), and subtyping relations for recursive types (Brandt and Henglein 1998; Gapeyev et al. 2002). However, the use of coinduction can lead to values which are \too infinite”. For instance, a non-trivial binary relation defined as a coinductive inference sys- tem cannot include the rule of transitivity, because a coinductive reading of transitivity would imply that every element is related to every other (to see this, build an infinite derivation consisting solely of uses of transitivity).
    [Show full text]
  • 4 Hash Tables and Associative Arrays
    4 FREE Hash Tables and Associative Arrays If you want to get a book from the central library of the University of Karlsruhe, you have to order the book in advance. The library personnel fetch the book from the stacks and deliver it to a room with 100 shelves. You find your book on a shelf numbered with the last two digits of your library card. Why the last digits and not the leading digits? Probably because this distributes the books more evenly among the shelves. The library cards are numbered consecutively as students sign up, and the University of Karlsruhe was founded in 1825. Therefore, the students enrolled at the same time are likely to have the same leading digits in their card number, and only a few shelves would be in use if the leadingCOPY digits were used. The subject of this chapter is the robust and efficient implementation of the above “delivery shelf data structure”. In computer science, this data structure is known as a hash1 table. Hash tables are one implementation of associative arrays, or dictio- naries. The other implementation is the tree data structures which we shall study in Chap. 7. An associative array is an array with a potentially infinite or at least very large index set, out of which only a small number of indices are actually in use. For example, the potential indices may be all strings, and the indices in use may be all identifiers used in a particular C++ program.Or the potential indices may be all ways of placing chess pieces on a chess board, and the indices in use may be the place- ments required in the analysis of a particular game.
    [Show full text]
  • Generic Programming
    Generic Programming July 21, 1998 A Dagstuhl Seminar on the topic of Generic Programming was held April 27– May 1, 1998, with forty seven participants from ten countries. During the meeting there were thirty seven lectures, a panel session, and several problem sessions. The outcomes of the meeting include • A collection of abstracts of the lectures, made publicly available via this booklet and a web site at http://www-ca.informatik.uni-tuebingen.de/dagstuhl/gpdag.html. • Plans for a proceedings volume of papers submitted after the seminar that present (possibly extended) discussions of the topics covered in the lectures, problem sessions, and the panel session. • A list of generic programming projects and open problems, which will be maintained publicly on the World Wide Web at http://www-ca.informatik.uni-tuebingen.de/people/musser/gp/pop/index.html http://www.cs.rpi.edu/˜musser/gp/pop/index.html. 1 Contents 1 Motivation 3 2 Standards Panel 4 3 Lectures 4 3.1 Foundations and Methodology Comparisons ........ 4 Fundamentals of Generic Programming.................. 4 Jim Dehnert and Alex Stepanov Automatic Program Specialization by Partial Evaluation........ 4 Robert Gl¨uck Evaluating Generic Programming in Practice............... 6 Mehdi Jazayeri Polytypic Programming........................... 6 Johan Jeuring Recasting Algorithms As Objects: AnAlternativetoIterators . 7 Murali Sitaraman Using Genericity to Improve OO Designs................. 8 Karsten Weihe Inheritance, Genericity, and Class Hierarchies.............. 8 Wolf Zimmermann 3.2 Programming Methodology ................... 9 Hierarchical Iterators and Algorithms................... 9 Matt Austern Generic Programming in C++: Matrix Case Study........... 9 Krzysztof Czarnecki Generative Programming: Beyond Generic Programming........ 10 Ulrich Eisenecker Generic Programming Using Adaptive and Aspect-Oriented Programming .
    [Show full text]
  • Guide for the Use of the International System of Units (SI)
    Guide for the Use of the International System of Units (SI) m kg s cd SI mol K A NIST Special Publication 811 2008 Edition Ambler Thompson and Barry N. Taylor NIST Special Publication 811 2008 Edition Guide for the Use of the International System of Units (SI) Ambler Thompson Technology Services and Barry N. Taylor Physics Laboratory National Institute of Standards and Technology Gaithersburg, MD 20899 (Supersedes NIST Special Publication 811, 1995 Edition, April 1995) March 2008 U.S. Department of Commerce Carlos M. Gutierrez, Secretary National Institute of Standards and Technology James M. Turner, Acting Director National Institute of Standards and Technology Special Publication 811, 2008 Edition (Supersedes NIST Special Publication 811, April 1995 Edition) Natl. Inst. Stand. Technol. Spec. Publ. 811, 2008 Ed., 85 pages (March 2008; 2nd printing November 2008) CODEN: NSPUE3 Note on 2nd printing: This 2nd printing dated November 2008 of NIST SP811 corrects a number of minor typographical errors present in the 1st printing dated March 2008. Guide for the Use of the International System of Units (SI) Preface The International System of Units, universally abbreviated SI (from the French Le Système International d’Unités), is the modern metric system of measurement. Long the dominant measurement system used in science, the SI is becoming the dominant measurement system used in international commerce. The Omnibus Trade and Competitiveness Act of August 1988 [Public Law (PL) 100-418] changed the name of the National Bureau of Standards (NBS) to the National Institute of Standards and Technology (NIST) and gave to NIST the added task of helping U.S.
    [Show full text]