Introduction to Computers and Programming Using C++ and MATLAB

Total Page:16

File Type:pdf, Size:1020Kb

Introduction to Computers and Programming Using C++ and MATLAB Introduction to Computers and Programming using C++ and MATLAB Alex F. Bielajew The University of Michigan Department of Nuclear Engineering andRadiologicalSciences 2927 Cooley Building (North Campus) 2355 Bonisteel Boulevard Ann Arbor, Michigan 48109-2104 U. S. A. Tel: 734 764 6364 Fax: 734 763 4540 email: [email protected] c 2000—2010 Alex F Bielajew Revision: October 12, 2010 2 Preface This “book” arises out of a course I teach, a four-credit (52 hour) freshman-level course Introduction to Computers and Programming being taught in the College of Engineering at the University of Michigan. The book is in reasonably rough shape at this stage. It was assembledfrom my lecture notes several years ago andis under constant revision. I may never finish it! A wise person once said, “Old age happens when you dwell more on the past than on the future.” By this definition, I have found eternal youth, insofar as this book is concerned. My educational objectives are quite simple. This is not really a course in computing. It is a course in thinking, technical thinking, logical thinking, about formulating a problem, a mathematical problem, a physics problem, a game, andthen executing a solution andmaking it “work”. I consider the computer and the ability to program it as a kind of laboratory—a laboratory to investigate practically, the theories andideasof other technical courses. It is possible, for example, to teach a lot of Calculus to students without ever mentioning the word, and there are several examples throughout this book. This course is not about syntax. Hence, the book introduces the minimum amount syntax to get through a problem. Indeed, I even keep some syntax hidden, to encourage students to discover their own algorithms. So, if you are thinking of using this book as a technical reference in C++ or Matlab, I anticipate that you will be disappointed. The greatest value in this book, if there is any to be found, is in the exercises, problems and projects at the back of almost every chapter. The ideal way to learn a computer language is to learn a little syntax andthen try it out on a computer. The idealway to think is not to readabout it, but to actually doit! The book reflects this. The material in the chapters, separatedfrom the exercises, is worse than useless, for readingthe material and not doing the problems is just a waste of time. Do the problems! Moreover, don’t ask me for the solutions! There is much more pedagogical value in a well-posed question than a well-articulatedanswer. OK, I’ll step off my soap box now! Several professors and many students have contributed to the ideas put into this book. Professor James Holloway and I have had endless discussion on the general problem of teaching algorithmic thinking to freshman. We still have not come to any conclusions except i ii that it is highly challenging and rewarding. As for how it actually gets done, well, to be sure it is a works-in-progress. I spent a very enjoyable term co-teaching this course (the first time I taught it) with Professor Ken Powell. Thanks, Ken, for nursing me through that first year! Both James’s and Ken’s diverse computational backgrounds are reflected to some degree in this book. I owe a debt of gratitude to the dozens of Graduate Student Instructors who have taught with me on this course. One of them, Dan Osborne, deserves special recognition. He is one of the most giftedandcommittedteachers I have ever encountered. Dan andI spent hour after hour discussing the challenges of teaching computing and thinking skills to undergraduates. To the 3000 or so undergraduates, mostly freshmen, who have taken my course: Every time I teach this course I learn something new—about computing, about teaching, about the joy of making an early “deflection” in a student’s career. Finally, I am one of those people who tends to see the forest, instead of the trees. Conse- quently, spelling andsentence structure usually yieldto an enthusiasm to present the material in an interesting way. It’s not my only fault, but maybe my most visible one. To this end, please inform me if you spot any errors. I am also deeply indebted to my wife-to-be, Linda Park, for her unimaginable attention to detail, her proofreading and suggestions. Linda, every time you undertake a proofreading project on my behalf, my mind boggles, truly. AFB, October 12, 2010 Contents 1 Introduction to the course 1 1.1Whatthiscourseisabout............................ 1 1.2Problems...................................... 6 2 Data representations 7 2.1Bits,nibbles,bytesandwords.......................... 7 2.24-bitBinary,HexadecimalandDecimalDigits................. 9 2.3Binaryarithmetic................................. 9 2.4Convertingfrombinarytodecimal....................... 10 2.4.1 Wholenumbers.............................. 10 2.4.2 Realnumbers............................... 11 2.5Binaryintegerarithmeticoncomputers..................... 11 2.5.1 Two’s-complementintegerarithmetic.................. 12 2.632-bitBinary,Hexadecimal,UnsignedandSignedIntegers.......... 13 2.7Problems...................................... 15 3 Algorithms and Pseudocodes 23 3.1Whatisanalgorithm?.............................. 23 3.2Flowchartrepresentation............................. 24 3.3Pseudocoderepresentation............................ 24 3.4Decisions,conditionals,branchinstructions .................. 25 3.5Loopingorjumpinstructions.......................... 25 iii iv CONTENTS 3.6Sequencing,branchingandlooping....................... 26 3.7Amini-summarybeforetheexamples...................... 27 3.8Someexamples.................................. 27 3.8.1 The Breakfast algorithm, or, Bielajew’s Sunday Morning Internationally- famouspancakes............................. 28 3.8.2 Solve for x: Ax2 + Bx + C =0whereA, B, C are arbitrary constants 29 3.8.3 Iteration:Asummingloop........................ 33 3.8.4 Iteration:Aproductloop........................ 36 3.9Anasideoncomputerarchitecture....................... 40 3.9.1 What does S = S +1mean?....................... 40 3.10Problems...................................... 41 3.11Projects...................................... 47 4 Getting started in C++ 49 4.1 Simple input/output (I/O): A first program in C++ .............. 49 4.2 Compiling, linking, loading and running .................... 52 4.3Declaringandinitializingvariables....................... 55 4.4IntegermathinC++............................... 57 4.5FloatingpointmathinC++........................... 59 4.6 The if/else if/else construct......................... 60 4.7Logicalexpressions................................ 63 4.7.1 LogicalexpressionswithANDorOR.................. 66 4.7.2 Mixedarithmeticandlogicalexpressions................ 67 4.8Problems...................................... 69 4.9Projects...................................... 73 5Loops 83 5.1 The while loop.................................. 83 5.2 The do/while loop................................ 86 5.3 The for loop................................... 89 CONTENTS v 5.4Problems...................................... 94 5.5Projects...................................... 111 6 Early Abstraction—Functions 123 6.1Motivationforfunctions............................. 123 6.2User-definedfunctions.............................. 129 6.3Example:Aproblemtackledwithteamwork.................. 134 6.4Callbyvalue,callbyreference,referenceparameters............. 138 6.4.1 Theaddressofavariable......................... 138 6.4.2 Call-by-value vs. call-by-reference.................... 140 6.5Therulesofscope................................. 145 6.6Problems...................................... 153 6.7Projects...................................... 160 7 More Variable Types, Data Abstraction 167 7.1Representationoffloating-pointnumbers.................... 167 7.1.1 Whenisonenotone?Floatingpointanomalies............. 174 7.2 char:thecharactervariable........................... 175 7.2.1 Characterstrings;thestringclass.................... 177 7.3Thevectorclass.................................. 179 7.3.1 Introductiontovectors.......................... 179 7.3.2 Declaringandusingvectors....................... 180 7.3.3 Vectorsyntaxandrules:......................... 182 7.3.4 Vectorsandfunctions........................... 187 7.4Problems...................................... 189 8 More Data Abstraction, Arrays, Structures 199 8.1Arrays....................................... 199 8.1.1 Declaringa2-dimensionalarray..................... 200 8.1.2 Initializinga2-dimensionalarray.................... 201 vi CONTENTS 8.1.3 Passingatwo-dimensionalarraytoafunction............. 204 8.2Characterarrays................................. 209 8.2.1 Onedimensionalcharacterarrays.................... 209 8.2.2 Twodimensionalcharacterarrays.................... 211 8.3Structures..................................... 211 8.3.1 Thestructuredefinition......................... 212 8.3.2 Wherecanstructuresbedefined?.................... 213 8.3.3 Themembersofastructure....................... 213 8.3.4 Declaringstructurevariables....................... 213 8.3.5 Assigningvaluestostructuremembers................. 213 8.3.6 Re-assigningvaluesofstructuremembers................ 214 8.3.7 Functioncall-by-valueofastructure.................. 214 8.3.8 Functioncall-by-referencetoastructure................ 215 8.3.9 Structurearrays.............................. 215 8.3.10Exampleusingstructuresandarrays:Iontransport.......... 218 8.4Problems...................................... 222 8.5Projects...................................... 228 9 Miscellaneous
Recommended publications
  • Basic Structures: Sets, Functions, Sequences, and Sums 2-2
    CHAPTER Basic Structures: Sets, Functions, 2 Sequences, and Sums 2.1 Sets uch of discrete mathematics is devoted to the study of discrete structures, used to represent discrete objects. Many important discrete structures are built using sets, which 2.2 Set Operations M are collections of objects. Among the discrete structures built from sets are combinations, 2.3 Functions unordered collections of objects used extensively in counting; relations, sets of ordered pairs that represent relationships between objects; graphs, sets of vertices and edges that connect 2.4 Sequences and vertices; and finite state machines, used to model computing machines. These are some of the Summations topics we will study in later chapters. The concept of a function is extremely important in discrete mathematics. A function assigns to each element of a set exactly one element of a set. Functions play important roles throughout discrete mathematics. They are used to represent the computational complexity of algorithms, to study the size of sets, to count objects, and in a myriad of other ways. Useful structures such as sequences and strings are special types of functions. In this chapter, we will introduce the notion of a sequence, which represents ordered lists of elements. We will introduce some important types of sequences, and we will address the problem of identifying a pattern for the terms of a sequence from its first few terms. Using the notion of a sequence, we will define what it means for a set to be countable, namely, that we can list all the elements of the set in a sequence.
    [Show full text]
  • Introduction
    Introduction A need shared by many applications is the ability to authenticate a user and then bind a set of permissions to the user which indicate what actions the user is permitted to perform (i.e. authorization). A LocalSystem may have implemented it's own authentication and authorization and now wishes to utilize a federated Identity Provider (IdP). Typically the IdP provides an assertion with information describing the authenticated user. The goal is to transform the IdP assertion into a LocalSystem token. In it's simplest terms this is a data transformation which might include: • renaming of data items • conversion to a different format • deletion of data • addition of data • reorganization of data There are many ways such a transformation could be implemented: 1. Custom site specific code 2. Scripts written in a scripting language 3. XSLT 4. Rule based transforms We also desire these goals for the transformation. 1. Site administrator configurable 2. Secure 3. Simple 4. Extensible 5. Efficient Implementation choice 1, custom written code fails goals 1, 3 and 4, an admin cannot adapt it, it's not simple, and it's likely to be difficult to extend. Implementation choice 2, script based transformations have a lot of appeal. Because one has at their disposal the full power of an actual programming language there are virtually no limitations. If it's a popular scripting language an administrator is likely to already know the language and might be able to program a new transformation or at a minimum tweak an existing script. Forking out to a script interpreter is inefficient, but it's now possible to embed script interpreters in the existing application.
    [Show full text]
  • Pharo by Example
    Portland State University PDXScholar Computer Science Faculty Publications and Computer Science Presentations 2009 Pharo by Example Andrew P. Black Portland State University, [email protected] Stéphane Ducasse Oscar Nierstrasz University of Berne Damien Pollet University of Lille Damien Cassou See next page for additional authors Let us know how access to this document benefits ouy . Follow this and additional works at: http://pdxscholar.library.pdx.edu/compsci_fac Citation Details Black, Andrew, et al. Pharo by example. 2009. This Book is brought to you for free and open access. It has been accepted for inclusion in Computer Science Faculty Publications and Presentations by an authorized administrator of PDXScholar. For more information, please contact [email protected]. Authors Andrew P. Black, Stéphane Ducasse, Oscar Nierstrasz, Damien Pollet, Damien Cassou, and Marcus Denker This book is available at PDXScholar: http://pdxscholar.library.pdx.edu/compsci_fac/108 Pharo by Example Andrew P. Black Stéphane Ducasse Oscar Nierstrasz Damien Pollet with Damien Cassou and Marcus Denker Version of 2009-10-28 ii This book is available as a free download from http://PharoByExample.org. Copyright © 2007, 2008, 2009 by Andrew P. Black, Stéphane Ducasse, Oscar Nierstrasz and Damien Pollet. The contents of this book are protected under Creative Commons Attribution-ShareAlike 3.0 Unported license. You are free: to Share — to copy, distribute and transmit the work to Remix — to adapt the work Under the following conditions: Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
    [Show full text]
  • An Extensible and Expressive Visitor Framework for Programming Language Reuse
    EVF: An Extensible and Expressive Visitor Framework for Programming Language Reuse Weixin Zhang and Bruno C. d. S. Oliveira The University of Hong Kong, Hong Kong, China {wxzhang2,bruno}@cs.hku.hk Abstract Object Algebras are a design pattern that enables extensibility, modularity, and reuse in main- stream object-oriented languages such as Java. The theoretical foundations of Object Algebras are rooted on Church encodings of datatypes, which are in turn closely related to folds in func- tional programming. Unfortunately, it is well-known that certain programs are difficult to write and may incur performance penalties when using Church-encodings/folds. This paper presents EVF: an extensible and expressive Java Visitor framework. The visitors supported by EVF generalize Object Algebras and enable writing programs using a generally recursive style rather than folds. The use of such generally recursive style enables users to more naturally write programs, which would otherwise require contrived workarounds using a fold-like structure. EVF visitors retain the type-safe extensibility of Object Algebras. The key advance in EVF is a novel technique to support modular external visitors. Modular external visitors are able to control traversals with direct access to the data structure being traversed, allowing dependent operations to be defined modularly without the need of advanced type system features. To make EVF practical, the framework employs annotations to automatically generate large amounts of boilerplate code related to visitors and traversals. To illustrate the applicability of EVF we conduct a case study, which refactors a large number of non-modular interpreters from the “Types and Programming Languages” (TAPL) book.
    [Show full text]
  • Declaration a Variable Within Curly Braces
    Declaration A Variable Within Curly Braces How cyprinoid is Allan when rotiferous and towery Fulton mutilating some charities? Heywood often assumes ditto when waiversoapless very Grove once. overuse andante and mongrelising her lollipop. Mortified Winslow sploshes unmeasurably, he hones his Initialization is always applicable. The curly brace must declare tcl commands in declaring constructors like comparision, often want to perform a command contained within their benefits. But lower is a fundamental difference between instrumentation and. It is variable. But also used from within curly braces though, declare a declaration and your comment! Controlling precision with tcl_precision. Every opening brace has a closing brace. However, bitwise NOT, a feel turn to contact us. Simply indicates that variables declared or braces. There is no difference in the way they are executed on a page. JavaScript Scope and Closures CSS-Tricks. If the code goes first, and it represents one of the values in that array. That curly braces. They can declare be used within strings to separate variables from surrounding text. Requires curly braces. The braces within another is a single character or white space is just ignored in declarations, declare various types and destructuring variable not when you have. Basics of Jinja Template Language Flask tutorial OverIQcom. PREFER using interpolation to compose strings and values. The variable declarations by a decorative frame. The code between any pair of curly braces in a method is facilitate a function b brick c block d sector. Beginners sometimes answer that. This is destructuring assignment syntax. Null pointer to me or variable declaration a within curly braces can two.
    [Show full text]
  • An Introduction to the C Programming Language and Software Design
    An Introduction to the C Programming Language and Software Design Tim Bailey Preface This textbook began as a set of lecture notes for a first-year undergraduate software engineering course in 2003. The course was run over a 13-week semester with two lectures a week. The intention of this text is to cover topics on the C programming language and introductory software design in sequence as a 20 lecture course, with the material in Chapters 2, 7, 8, 11, and 13 well served by two lectures apiece. Ample cross-referencing and indexing is provided to make the text a servicable reference, but more complete works are recommended. In particular, for the practicing programmer, the best available tutorial and reference is Kernighan and Ritchie [KR88] and the best in-depth reference is Harbison and Steele [HS95, HS02]. The influence of these two works on this text is readily apparent throughout. What sets this book apart from most introductory C-programming texts is its strong emphasis on software design. Like other texts, it presents the core language syntax and semantics, but it also addresses aspects of program composition, such as function interfaces (Section 4.5), file modularity (Section 5.7), and object-modular coding style (Section 11.6). It also shows how to design for errors using assert() and exit() (Section 4.4). Chapter 6 introduces the basics of the software design process—from the requirements and specification, to top-down and bottom-up design, to writing actual code. Chapter 14 shows how to write generic software (i.e., code designed to work with a variety of different data types).
    [Show full text]
  • Pharo by Example
    Pharo by Example Andrew P. Black Stéphane Ducasse Oscar Nierstrasz Damien Pollet with Damien Cassou and Marcus Denker Version of 2009-10-28 ii This book is available as a free download from http://PharoByExample.org. Copyright © 2007, 2008, 2009 by Andrew P. Black, Stéphane Ducasse, Oscar Nierstrasz and Damien Pollet. The contents of this book are protected under Creative Commons Attribution-ShareAlike 3.0 Unported license. You are free: to Share — to copy, distribute and transmit the work to Remix — to adapt the work Under the following conditions: Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license. • For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page: creativecommons.org/licenses/by-sa/3.0/ • Any of the above conditions can be waived if you get permission from the copyright holder. • Nothing in this license impairs or restricts the author’s moral rights. Your fair dealing and other rights are in no way affected by the above. This is a human-readable summary of the Legal Code (the full license): creativecommons.org/licenses/by-sa/3.0/legalcode Published by Square Bracket Associates, Switzerland. http://SquareBracketAssociates.org ISBN 978-3-9523341-4-0 First Edition, October, 2009.
    [Show full text]
  • Node.Js 562 Background
    Eloquent JavaScript 3rd edition Marijn Haverbeke Copyright © 2018 by Marijn Haverbeke This work is licensed under a Creative Commons attribution-noncommercial license (http://creativecommons.org/licenses/by-nc/3.0/). All code in the book may also be considered licensed under an MIT license (https: //eloquentjavascript.net/code/LICENSE). The illustrations are contributed by various artists: Cover and chap- ter illustrations by Madalina Tantareanu. Pixel art in Chapters 7 and 16 by Antonio Perdomo Pastor. Regular expression diagrams in Chap- ter 9 generated with regexper.com by Jeff Avallone. Village photograph in Chapter 11 by Fabrice Creuzot. Game concept for Chapter 16 by Thomas Palef. The third edition of Eloquent JavaScript was made possible by 325 financial backers. You can buy a print version of this book, with an extra bonus chapter in- cluded, printed by No Starch Press at http://a-fwd.com/com=marijhaver- 20&asin-com=1593279507. i Contents Introduction 1 On programming .......................... 2 Why language matters ....................... 4 What is JavaScript? ......................... 9 Code, and what to do with it ................... 11 Overview of this book ........................ 12 Typographic conventions ...................... 13 1 Values, Types, and Operators 15 Values ................................. 16 Numbers ............................... 17 Strings ................................ 21 Unary operators ........................... 24 Boolean values ............................ 25 Empty values ............................
    [Show full text]
  • ID Database Utilities Programs for Simple, Fast, High-Capacity Cross-Referencing for Version 4.6
    ID database utilities Programs for simple, fast, high-capacity cross-referencing for version 4.6 Greg McGary Tom Horsley ID utilities 1 ID utilities This manual documents version 4.6 of the ID utilities. Chapter 1: Introduction 2 1 Introduction An ID database is a binary file containing a list of file names, a list of tokens, andasparse matrix indicating which tokens appear in which files. With this database and some tools to query it (described in this manual), many text- searching tasks become simpler and faster. For example, you can list all files that reference a particular #include file throughout a huge source hierarchy, search for all the memos containing references to a project, or automatically invoke an editor on all files containing references to some function or variable. Anyone with a large software project to maintain, or a large set of text files to organize, can benefit from the ID utilities. Although the name `ID' is short for `identifier’, the ID utilities handle more than just identifiers; they also treat other kinds of tokens, most notably numeric constants, andthe contents of certain character strings. Thus, this manual will use the word token as a term that is inclusive of identifiers, numbers and strings. There are several programs in the ID utilities family: `mkid' scans files for tokens and builds the ID database file. `lid' queries the ID database for tokens, then reports matching file names or match- ing lines. `fid' lists all tokens recorded in the database for given files, or tokens common to two files. `fnid' matches the file names in the database, rather than the tokens.
    [Show full text]
  • Types and Programming Languages
    Types and Programming Languages Types and Programming Languages Benjamin C. Pierce The MIT Press Cambridge, Massachusetts London, England ©2002 Benjamin C. Pierce All rights reserved. No part of this book may be reproduced in any form by any electronic of mechanical means (including photocopying, recording, or information storage and retrieval) without permission in writing from the publisher. A This book was set in Lucida Bright by the author using the LTEX document preparation system. Printed and bound in the United States of America. Library of Congress Cataloging-in-Publication Data Pierce, Benjamin C. Types and programming languages / Benjamin C. Pierce p. cm. Includes bibliographical references and index. ISBN 0-262-16209-1 (hc. : alk. paper) 1. Programming languages (Electronic computers). I. Title. QA76.7 .P54 2002 005.13—dc21 2001044428 Contents Preface xiii 1 Introduction 1 1.1 Types in Computer Science 1 1.2 What Type Systems Are Good For 4 1.3 Type Systems and Language Design 9 1.4 Capsule History 10 1.5 Related Reading 12 2 Mathematical Preliminaries 15 2.1 Sets, Relations, and Functions 15 2.2 Ordered Sets 16 2.3 Sequences 18 2.4 Induction 19 2.5 Background Reading 20 I Untyped Systems 21 3 Untyped Arithmetic Expressions 23 3.1 Introduction 23 3.2 Syntax 26 3.3 Induction on Terms 29 3.4 Semantic Styles 32 3.5 Evaluation 34 3.6 Notes 43 vi Contents 4 An ML Implementation of Arithmetic Expressions 45 4.1 Syntax 46 4.2 Evaluation 47 4.3 The Rest of the Story 49 5 The Untyped Lambda-Calculus 51 5.1 Basics 52 5.2 Programming in
    [Show full text]
  • Squeak by Example
    Portland State University PDXScholar Computer Science Faculty Publications and Presentations Computer Science 2009 Squeak by Example Andrew P. Black Portland State University, [email protected] Stéphane Ducasse Oscar Nierstrasz Damien Pollet Damien Cassou See next page for additional authors Follow this and additional works at: https://pdxscholar.library.pdx.edu/compsci_fac Part of the Programming Languages and Compilers Commons Let us know how access to this document benefits ou.y Citation Details Black, Andrew, et al. Squeak by example. 2009. This Book is brought to you for free and open access. It has been accepted for inclusion in Computer Science Faculty Publications and Presentations by an authorized administrator of PDXScholar. Please contact us if we can make this document more accessible: [email protected]. Authors Andrew P. Black, Stéphane Ducasse, Oscar Nierstrasz, Damien Pollet, Damien Cassou, and Marcus Denker This book is available at PDXScholar: https://pdxscholar.library.pdx.edu/compsci_fac/110 Squeak by Example Andrew P. Black Stéphane Ducasse Oscar Nierstrasz Damien Pollet with Damien Cassou and Marcus Denker Version of 2009-09-29 ii This book is available as a free download from SqueakByExample.org, hosted by the Institute of Computer Science and Applied Mathematics of the University of Bern, Switzerland. Copyright © 2007, 2008, 2009 by Andrew P. Black, Stéphane Ducasse, Oscar Nierstrasz and Damien Pollet. The contents of this book are protected under Creative Commons Attribution-ShareAlike 3.0 Unported license. You are free: to Share — to copy, distribute and transmit the work to Remix — to adapt the work Under the following conditions: Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
    [Show full text]
  • Squeak by Example Andrew Black, Stéphane Ducasse, Oscar Nierstrasz, Damien Pollet, Damien Cassou, Marcus Denker
    Squeak by Example Andrew Black, Stéphane Ducasse, Oscar Nierstrasz, Damien Pollet, Damien Cassou, Marcus Denker To cite this version: Andrew Black, Stéphane Ducasse, Oscar Nierstrasz, Damien Pollet, Damien Cassou, et al.. Squeak by Example. Square Bracket Associates, pp.304, 2007, 978-3-9523341-0-2. inria-00441576 HAL Id: inria-00441576 https://hal.inria.fr/inria-00441576 Submitted on 16 Dec 2009 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Squeak by Example Andrew P. Black Stéphane Ducasse Oscar Nierstrasz Damien Pollet with Damien Cassou and Marcus Denker Version of 2009-09-29 ii This book is available as a free download from SqueakByExample.org, hosted by the Institute of Computer Science and Applied Mathematics of the University of Bern, Switzerland. Copyright © 2007, 2008, 2009 by Andrew P. Black, Stéphane Ducasse, Oscar Nierstrasz and Damien Pollet. The contents of this book are protected under Creative Commons Attribution-ShareAlike 3.0 Unported license. You are free: to Share — to copy, distribute and transmit the work to Remix — to adapt the work Under the following conditions: Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
    [Show full text]