Nesting Probabilistic Programs

Total Page:16

File Type:pdf, Size:1020Kb

Nesting Probabilistic Programs Nesting Probabilistic Programs Tom Rainforth Department of Statistics University of Oxford [email protected] Abstract Some, so-called universal, systems (Goodman et al., 2008; We formalize the notion of nesting probabilistic Goodman and Stuhlmuller,¨ 2014; Mansinghka et al., programming queries and investigate the result- 2014; Wood et al., 2014) further allow the definition of ing statistical implications. We demonstrate models that would be hard, or even impossible, to convey that while query nesting allows the definition using conventional frameworks such as graphical models. of models which could not otherwise be ex- One enticing manner they do this is by allowing arbitrary pressed, such as those involving agents reason- nesting of models, known in the probabilistic program- ing about other agents, existing systems take ming literature as queries (Goodman et al., 2008), such approaches which lead to inconsistent estimates. that it is easy to define and run problems that fall outside We show how to correct this by delineating pos- the standard inference framework (Goodman et al., 2008; sible ways one might want to nest queries and Mantadelis and Janssens, 2011; Stuhlmuller¨ and Good- asserting the respective conditions required for man, 2014; Le et al., 2016). This allows the definition of convergence. We further introduce a new on- models that could not be encoded without nesting, such line nested Monte Carlo estimator that makes it as experimental design problems (Ouyang et al., 2016) substantially easier to ensure these conditions and various models for theory-of-mind (Stuhlmuller¨ and are met, thereby providing a simple framework Goodman, 2014). In particular, models that involve agents for designing statistically correct inference en- reasoning about other agents require, in general, some gines. We prove the correctness of this online form of nesting. For example, one might use such nesting estimator and show that, when using the recom- to model a poker player reasoning about another player as mended setup, its asymptotic variance is always shown in Section 3.1. As machine learning increasingly better than that of the equivalent fixed estimator, starts to try and tackle problem domains that require in- while its bias is always within a factor of two. teraction with humans or other external systems, such as the need for self-driving cars to account for the behavior of pedestrians, we believe that such nested problems are 1 INTRODUCTION likely to become increasingly common and that PPSs will Probabilistic programming systems (PPSs) allow proba- form a powerful tool for encoding them. bilistic models to be represented in the form of a genera- However, previous work has, in general, implicitly, and in- tive model and statements for conditioning on data (Good- correctly, assumed that the convergence results from stan- man et al., 2008; Gordon et al., 2014). Informally, one dard inference schemes carry over directly to the nested can think of the generative model as the definition of setting. In truth, inference for nested queries falls out- a prior, the conditioning statements as the definition of side the scope of conventional proofs and so additional a likelihood, and the output of the program as samples work is required to prove the consistency of PPS inference from a posterior distribution. Their core philosophy is to engines for nested queries. Such problems constitute spe- decouple model specification and inference, the former cial cases of nested estimation. In particular, the use of corresponding to the user-specified program code and the Monte Carlo (MC) methods by most PPSs mean they form latter to an inference engine capable of operating on ar- particular instances of nested Monte Carlo (NMC) esti- bitrary programs. Removing the need for users to write mation (Hong and Juneja, 2009). Recent work (Rainforth inference algorithms significantly reduces the burden of et al., 2016a, 2018; Fort et al., 2017) has demonstrated developing new models and makes effective statistical that NMC is consistent for a general class of models, but methods accessible to non-experts. also that it entails a convergence rate in the total com- expectation γ0 of a function λ using putational cost which decreases exponentially with the N0 h i 1 X depth of the nesting. Furthermore, additional assumptions γ = λ(y(0)) ≈ I = λ(y(0)) (1) 0 E 0 N n are required to achieve this convergence, most noticeably 0 n=1 that, except in a few special cases, one needs to drive not (0) i:i:d: (0) where yn ∼ p(y ), resulting in a mean squared er- only the total number of samples used to infinity, but also ror (MSE) that decreases at a rate O(1=N0). For nested the number of samples used at each layer of the estimator, estimation problems, λ(y(0)) is itself intractable, cor- a requirement generally flaunted by existing PPSs. responding to a nonlinear mapping of a (nested) esti- The aim of this work is to formalize the notion of query mation. Thus in the single nesting case, λ(y(0)) = (0) (0) (1) (0) nesting and use these recent NMC results to investigate f0 y ; E f1 y ; y y giving the statistical correctness of the resulting procedures car- h h ii (0) (0) (1) (0) ried out by PPS inference engines. To do this, we pos- γ0 = E f0 y ; E f1 y ; y y tulate that there are three distinct ways one might nest N0 N1 ! 1 X 1 X one query within another: sampling from the conditional ≈ I = f y(0); f y(0); y(1) 0 N 0 n N 1 n n;m distribution of another query (which we refer to as nested 0 n=1 1 m=1 (1) (1) (0) inference), factoring the trace probability of one query where each yn;m ∼ p(y jyn ) is drawn independently with the partition function estimate of another (which we and I0 is now a NMC estimate using T = N0N1 samples. refer to as nested conditioning), and using expectation es- More generally, one may have multiple layers of nesting. timates calculated using one query as first class variables To notate this, we first presume some fixed integral depth in another. We use the aforementioned NMC results to D ≥ 0 (with D = 0 corresponding to conventional esti- assess the relative correctness of each of these categories mation), and real-valued functions f ; : : : ; f . We then of nesting. In the interest of exposition, we will mostly 0 D recursively define focus on the PPS Anglican (Tolpin et al., 2016; Wood h i (0:D−1) (0:D) (0:D−1) et al., 2014) (and also occasionally Church (Goodman γD y = E fD y y ; and et al., 2008)) as a basis for our discussion, but note that h i (0:k−1) (0:k) (0:k) (0:k−1) our results apply more generally. For example, our nested γk(y ) = E fk y ; γk+1 y y inference case covers the problem of sampling from cut for 0 ≤ k < D. Our goal is to estimate γ0 = (0) (0) distributions in OpenBugs (Plummer, 2015). E f0 y ; γ1 y , for which the NMC estimate is We find that nested inference is statistically challenging I0 defined recursively using and incorrectly handled by existing systems, while nested ND 1 X I y(0:D−1) = f y(0:D−1); y(D) conditioning is statistically straightforward and done cor- D D nD and ND rectly. Using estimates as variables turns out to be exactly nD =1 equivalent to generic NMC estimation and must thus be (0:k−1) Ik y (2) dealt with on a case-by-case basis. Consequently, we will focus more on nested inference than the other cases. Nk 1 X (0:k−1) (k) (0:k−1) (k) = fk y ; y ;Ik+1 y ; y To assist in the development of consistent approaches, we N nk nk k n =1 further introduce a new online NMC (ONMC) scheme k (k) (k) (0:k−1) that obviates the need to revisit previous samples when for 0 ≤ k < D, where each yn ∼ p y jy is refining estimates, thereby simplifying the process of writ- drawn independently. Note that there are multiple values (k) (0:k−1) (0:k−1) ing consistent online nested estimation schemes, as re- of y for each associated y and that Ik y quired by most PPSs. We show that ONMC’s convergence is still a random variable given y(0:k−1). rate only varies by a small constant factor relative to con- As shown by (Rainforth et al., 2018, Theorem 3), if each ventional NMC: given some weak assumptions and the fk is continuously differentiable and use of recommended parameter settings, its asymptotic 2 2 (0:k) (0:k) (0:k−1) variance is always better than the equivalent NMC estima- &k = E fk y ; γk+1 y −γk y tor with matched total sample budget, while its asymptotic < 1 8k 2 0;:::;D, then the MSE converges at rate bias is always within a factor of two. 2 h 2i &0 E (I0 − γ0) ≤ + 2 BACKGROUND N0 2 (3) 2 D−2 k ! 2 ! 2.1 NESTED MONTE CARLO C0&1 X Y Ck+1&k+2 + Kd + O() 2N1 2Nk+2 We start by providing a brief introduction to NMC, us- k=0 d=0 ing similar notation to that of Rainforth et al. (2018). where Kk and Ck are respectively bounds on the magni- Conventional MC estimation approximates an intractable tude of the first and second derivatives of fk, and O() Anglican queries are written using the macro defquery. represents asymptotically dominated terms – a convention This allows users to define a model using a mixture of we will use throughout.
Recommended publications
  • A Concurrent PASCAL Compiler for Minicomputers
    512 Appendix A DIFFERENCES BETWEEN UCSD'S PASCAL AND STANDARD PASCAL The PASCAL language used in this book contains most of the features described by K. Jensen and N. Wirth in PASCAL User Manual and Report, Springer Verlag, 1975. We refer to the PASCAL defined by Jensen and Wirth as "Standard" PASCAL, because of its widespread acceptance even though no international standard for the language has yet been established. The PASCAL used in this book has been implemented at University of California San Diego (UCSD) in a complete software system for use on a variety of small stand-alone microcomputers. This will be referred to as "UCSD PASCAL", which differs from the standard by a small number of omissions, a very small number of alterations, and several extensions. This appendix provides a very brief summary Of these differences. Only the PASCAL constructs used within this book will be mentioned herein. Documents are available from the author's group at UCSD describing UCSD PASCAL in detail. 1. CASE Statements Jensen & Wirth state that if there is no label equal to the value of the case statement selector, then the result of the case statement is undefined. UCSD PASCAL treats this situation by leaving the case statement normally with no action being taken. 2. Comments In UCSD PASCAL, a comment appears between the delimiting symbols "(*" and "*)". If the opening delimiter is followed immediately by a dollar sign, as in "(*$", then the remainder of the comment is treated as a directive to the compiler. The only compiler directive mentioned in this book is (*$G+*), which tells the compiler to allow the use of GOTO statements.
    [Show full text]
  • Open Office Specification 1.0
    Open Office Specification 1.0 Committee Draft 1, 22 Mar 2004 Document identifier: office-spec-1.0-cd-1.sxw Location: http://www.oasis-open.org/committees/office/ Editors: Michael Brauer, Sun Microsystems <[email protected]> Gary Edwards <[email protected]> Daniel Vogelheim, Sun Microsystems <[email protected]> Contributors: Doug Alberg, Boeing <[email protected]> Simon Davis, National Archive of Australia <[email protected]> Patrick Durusau, Society of Biblical Literature <[email protected]> David Faure, <[email protected]> Paul Grosso, Arbortext <[email protected]> Tom Magliery, Blast Radius <[email protected]> Phil Boutros, Stellent <[email protected]> John Chelsom, CSW Informatics <[email protected]> Jason Harrop, SpeedLegal <[email protected]> Mark Heller, New York State Office of the Attorney General <[email protected]> Paul Langille, Corel <[email protected]> Monica Martin, Drake Certivo <[email protected]> Uche Ogbuji <[email protected]> Lauren Wood <[email protected]> Abstract: This is the specification of Open Office XML, an open, XML-based file format for office applications, based on OpenOffice.org XML [OOo]. Status: This document is a draft, and will be updated periodically on no particular schedule. Send comments to the editors. Committee members should send comments on this specification to the [email protected] list. Others should subscribe to and send comments to the [email protected] list. To subscribe, send an email message to office- [email protected] with the word "subscribe" as the body of the message.
    [Show full text]
  • The Evolution of Lisp
    1 The Evolution of Lisp Guy L. Steele Jr. Richard P. Gabriel Thinking Machines Corporation Lucid, Inc. 245 First Street 707 Laurel Street Cambridge, Massachusetts 02142 Menlo Park, California 94025 Phone: (617) 234-2860 Phone: (415) 329-8400 FAX: (617) 243-4444 FAX: (415) 329-8480 E-mail: [email protected] E-mail: [email protected] Abstract Lisp is the world’s greatest programming language—or so its proponents think. The structure of Lisp makes it easy to extend the language or even to implement entirely new dialects without starting from scratch. Overall, the evolution of Lisp has been guided more by institutional rivalry, one-upsmanship, and the glee born of technical cleverness that is characteristic of the “hacker culture” than by sober assessments of technical requirements. Nevertheless this process has eventually produced both an industrial- strength programming language, messy but powerful, and a technically pure dialect, small but powerful, that is suitable for use by programming-language theoreticians. We pick up where McCarthy’s paper in the first HOPL conference left off. We trace the development chronologically from the era of the PDP-6, through the heyday of Interlisp and MacLisp, past the ascension and decline of special purpose Lisp machines, to the present era of standardization activities. We then examine the technical evolution of a few representative language features, including both some notable successes and some notable failures, that illuminate design issues that distinguish Lisp from other programming languages. We also discuss the use of Lisp as a laboratory for designing other programming languages. We conclude with some reflections on the forces that have driven the evolution of Lisp.
    [Show full text]
  • From JSON to JSEN Through Virtual Languages of the Creative Commons Attribution License (
    © 2021 by the authors; licensee RonPub, Lübeck, Germany. This article is an open access article distributed under the terms and conditions A.of Ceravola, the Creative F. Joublin:Commons From Attribution JSON to license JSEN through(http://c reativecommons.org/licenses/by/4Virtual Languages .0/). Open Access Open Journal of Web Technology (OJWT) Volume 8, Issue 1, 2021 www.ronpub.com/ojwt ISSN 2199-188X From JSON to JSEN through Virtual Languages Antonello Ceravola, Frank Joublin Honda Research Institute Europe GmbH, Carl Legien Str. 30, Offenbach/Main, Germany, {Antonello.Ceravola, Frank.Joublin}@honda-ri.de ABSTRACT In this paper we describe a data format suitable for storing and manipulating executable language statements that can be used for exchanging/storing programs, executing them concurrently and extending homoiconicity of the hosting language. We call it JSEN, JavaScript Executable Notation, which represents the counterpart of JSON, JavaScript Object Notation. JSON and JSEN complement each other. The former is a data format for storing and representing objects and data, while the latter has been created for exchanging/storing/executing and manipulating statements of programs. The two formats, JSON and JSEN, share some common properties, reviewed in this paper with a more extensive analysis on what the JSEN data format can provide. JSEN extends homoiconicity of the hosting language (in our case JavaScript), giving the possibility to manipulate programs in a finer grain manner than what is currently possible. This property makes definition of virtual languages (or DSL) simple and straightforward. Moreover, JSEN provides a base for implementing a type of concurrent multitasking for a single-threaded language like JavaScript.
    [Show full text]
  • Basic Lisp Techniques
    Basic Lisp Techniques David J. Cooper, Jr. February 14, 2011 ii 0Copyright c 2011, Franz Inc. and David J. Cooper, Jr. Foreword1 Computers, and the software applications that power them, permeate every facet of our daily lives. From groceries to airline reservations to dental appointments, our reliance on technology is all-encompassing. And, it’s not enough. Every day, our expectations of technology and software increase: • smart appliances that can be controlled via the internet • better search engines that generate information we actually want • voice-activated laptops • cars that know exactly where to go The list is endless. Unfortunately, there is not an endless supply of programmers and developers to satisfy our insatiable appetites for new features and gadgets. Every day, hundreds of magazine and on-line articles focus on the time and people resources needed to support future technological expectations. Further, the days of unlimited funding are over. Investors want to see results, fast. Common Lisp (CL) is one of the few languages and development options that can meet these challenges. Powerful, flexible, changeable on the fly — increasingly, CL is playing a leading role in areas with complex problem-solving demands. Engineers in the fields of bioinformatics, scheduling, data mining, document management, B2B, and E-commerce have all turned to CL to complete their applications on time and within budget. CL, however, no longer just appropriate for the most complex problems. Applications of modest complexity, but with demanding needs for fast development cycles and customization, are also ideal candidates for CL. Other languages have tried to mimic CL, with limited success.
    [Show full text]
  • Nesting Forward-Mode AD in a Functional Framework Jeffrey M
    Purdue University Purdue e-Pubs ECE Technical Reports Electrical and Computer Engineering 1-1-2008 Nesting Forward-Mode AD in a Functional Framework Jeffrey M. Siskind Purdue University, [email protected] Barak A. Pearlmutter NUI Maynooth Co. Kildare, [email protected] Follow this and additional works at: http://docs.lib.purdue.edu/ecetr Part of the Electrical and Computer Engineering Commons Siskind, Jeffrey M. and Pearlmutter, Barak A., "Nesting Forward-Mode AD in a Functional Framework" (2008). ECE Technical Reports. Paper 377. http://docs.lib.purdue.edu/ecetr/377 This document has been made available through Purdue e-Pubs, a service of the Purdue University Libraries. Please contact [email protected] for additional information. Purdue ECE TR-08-09 Nesting Forward-Mode AD in a Functional Framework Jeffrey Mark Siskind School of Electrical & Computer Engineering Purdue University 465 Northwestern Avenue West Lafayette, IN 47907-2035 USA +1 765 496 3197 [email protected] Barak A. Pearlmutter Hamilton Institute NUI Maynooth Co. Kildare Ireland +353 1 708 6100 [email protected] Abstract We discuss the augmentation of a functional-programming language with a derivative- taking operator implemented with forward-mode automatic differentiation (AD). The primary technical difficulty in doing so lies in ensuring correctness in the face of nested invocation of that operator, due to the need to distinguish perturbations introduced by distinct invocations. We exhibit a series of implementations of a referentially- transparent forward-mode-AD derivative-taking operator, each of which uses a different non-referentially-transparent mechanism to distinguish perturbations. Even though the forward-mode-AD derivative-taking operator is itself referentially transparent, we hypothesize that one cannot correctly formulate this operator as a function definition in current pure dialects of Haskell.
    [Show full text]
  • Measuring Spreadsheet Formula Understandability
    Measuring Spreadsheet Formula Understandability Felienne Hermans , Martin Pinzger & Arie van Deursen Mekelweg 4, Delft {f.f.j.hermans, m.pinzger, arie.vandeursen}@tudelft.nl ABSTRACT Spreadsheets are widely used in industry, because they are flexible and easy to use. Sometimes they are even used for business-critical applications. It is however difficult for spreadsheet users to correctly assess the quality of spreadsheets, especially with respect to their understandability. Understandability of spreadsheets is important, since spreadsheets often have a long lifespan, during which they are used by several users. In this paper, we establish a set of spreadsheet understandability metrics. We start by studying related work and interviewing 40 spreadsheet professionals to obtain a set of characteristics that might contribute to understandability problems in spreadsheets. Based on those characteristics we subsequently determine a number of understandability metrics. To evaluate the usefulness of our metrics, we conducted a series of experiments in which professional spreadsheet users performed a number of small maintenance tasks on a set of spreadsheets from the EUSES spreadsheet corpus. We subsequently calculate the correlation between the metrics and the performance of subjects on these tasks. The results clearly indicate that the number of ranges, the nesting depth and the presence of conditional operations in formulas significantly increase the difficulty of understanding a spreadsheet. 1 INTRODUCTION Spreadsheets are used extensively in business, for all sorts of tasks and purposes. While other assets of companies---like software products and processes---are strongly guarded, spreadsheets are usually not structurally checked. This lack of control contrasts their impact, which can be very large, as previous studies have shown.
    [Show full text]
  • Learn Pascal.Pdf
    Index • Introduction • History of Pascal • Pascal Compilers • Hello, world. • Basics o Program Structure o Identifiers o Constants o Variables and Data Types o Assignment and Operations o Standard Functions o Punctuation and Indentation o Programming Assignment o Solution • Input/Output o Input o Output o Formatting output o Files o EOLN and EOF o Programming Assignment o Solution • Program Flow o Sequential control o Boolean Expressions o Branching . IF . CASE o Looping . FOR..DO . WHILE..DO . REPEAT..UNTIL o Programming Assignments: Fibonacci Sequence and Powers of Two o Solutions • Subprograms o Procedures o Parameters o Functions o Scope o Recursion o Forward Referencing o Programming Assignment: the Towers of Hanoi o Solution • Data types o Enumerated types o Subranges o 1-dimensional arrays o Multidimensional arrays o Records o Pointers • Final words 2 Introduction Welcome to Learn Pascal! This tutorial is an introduction to the Pascal simple, yet complete, introduction to the Pascal programming language. It covers all of the syntax of standard Pascal, including pointers. I have tried to make things are clear as possible. If you don't understand anything, try it in your Pascal compiler and tweak things a bit. Pascal was designed for teaching purposes, and is a very structured and syntactically-strict language. This means the compiler will catch more beginner errors and yield more beginner-friendly error messages than with a shorthand-laden language such as C or PERL. This tutorial was written for beginner programmers, so assumes no knowledge. At the same time, a surprising number of experienced programmers have found the tutorial a useful reference source for picking up Pascal.
    [Show full text]
  • Openoffice.Org for Dummies.Pdf
    542222 FM.qxd 11/6/03 3:29 PM Page i OpenOffice.org FOR DUMmIES‰ by Gurdy Leete, Ellen Finkelstein, and Mary Leete 542222 FM.qxd 11/6/03 3:29 PM Page iv 542222 FM.qxd 11/6/03 3:29 PM Page i OpenOffice.org FOR DUMmIES‰ by Gurdy Leete, Ellen Finkelstein, and Mary Leete 542222 FM.qxd 11/6/03 3:29 PM Page ii OpenOffice.org For Dummies® Published by Wiley Publishing, Inc. 111 River Street Hoboken, NJ 07030-5774 Copyright © 2004 by Wiley Publishing, Inc., Indianapolis, Indiana Published by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4447, e-mail: [email protected]. Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc.
    [Show full text]
  • Control Flow Graph (CFG) /1
    SENG 421: Software Metrics Measuring Internal Product Attributes: Structural Complexity (Chapter 6) Department of Electrical & Computer Engineering, University of Calgary B.H. Far ([email protected]) http://www.enel.ucalgary.ca/People/far/Lectures/SENG421/06/ Problem Statement How complex is the following program? 1: read x,y,z; 2: type = “scalene”; 3: if (x == y or x == z or y == z) type =“isosceles”; 4: if (x == y and x == z) type =“equilateral”; 5: if (x >= y+z or y >= x+z or z >= x+y) type =“not a triangle”; 6: if (x <= 0 or y <= 0 or z <= 0) type =“bad inputs”; 7: print type; Is there a way to measure it? It has something to do with program structure (branches, nesting) & flow of data [email protected] 2 Contents Software structural measurement Control-flow structure Structural complexity: cyclomatic complexity Data flow and data structure attributes Architectural measurement [email protected] 3 Software Complexity Metrics Depth of nesting Code Cyclomatic complexity Morphological measures Complexity Cohesion Metrics Architecture Coupling Information flow complexity Data structure complexity [email protected] 4 How to Represent Program Structure? Software structure can have 3 attributes: Control-flow structure: Sequence of execution of instructions of the program. Data flow: Keeping track of data as it is created or handled by the program. Data structure: The organization of data itself independent of the program. [email protected] 5 Goal & Questions … Q1: How to represent “structure” of a program? A1: Control-flow diagram Q2: How to define “complexity” in terms of the structure? A2: Cyclomatic complexity; depth of nesting [email protected] 6 Basic Control Structure /1 Basic Control Structures (BCSs) are set of essential control-flow mechanisms used for building the logical structure of the program.
    [Show full text]
  • Programming Languages Session 2 – Main Theme Imperative Languages
    Programming Languages Session 2 – Main Theme Imperative Languages: Names, Scoping, and Bindings Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical Sciences Adapted from course textbook resources Programming Language Pragmatics (3rd Edition) Michael L. Scott, Copyright © 2009 Elsevier 1 Agenda 11 SessionSession OverviewOverview 22 ImperativeImperative Languages:Languages: Names,Names, Scoping,Scoping, andand BindingsBindings 33 ConclusionConclusion 2 What is the course about? Course description and syllabus: » http://www.nyu.edu/classes/jcf/g22.2110-001 » http://www.cs.nyu.edu/courses/fall10/G22.2110-001/index.html Textbook: » Programming Language Pragmatics (3rd Edition) Michael L. Scott Morgan Kaufmann ISBN-10: 0-12374-514-4, ISBN-13: 978-0-12374-514-4, (04/06/09) 3 Session Agenda Session Overview Imperative Languages: Names, Scoping, and Bindings Conclusion 4 Review: BNF, Concrete and Abstract Syntax Trees e expr ::= expr “+” term | expr “–” term | t term term ::= term “*” factor | t term “/” factor | f factor factor ::= number | e identifier | “(“ expr “)” e t * t t + f f f f * ( A + B * C ) * D A B C D 5 Icons / Metaphors Information Common Realization Knowledge/Competency Pattern Governance Alignment Solution Approach 66 Agenda 11 SessionSession OverviewOverview 22 ImperativeImperative Languages:Languages: Names,Names, Scoping,Scoping, andand BindingsBindings 33 ConclusionConclusion 7 Imperative Languages: Names, Scoping, and Bindings - Sub-Topics Use of Types Name, Scope,
    [Show full text]
  • Advanced Programming Language Design (Raphael A. Finkel)
    See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/220692467 Advanced programming language design. Book · January 1996 Source: DBLP CITATIONS READS 41 3,040 1 author: Raphael Finkel University of Kentucky 122 PUBLICATIONS 6,757 CITATIONS SEE PROFILE All content following this page was uploaded by Raphael Finkel on 16 December 2013. The user has requested enhancement of the downloaded file. ADVANCED PROGRAMMING LANGUAGE DESIGN Raphael A. Finkel ❖ UNIVERSITY OF KENTUCKY ▲ ▼▼ Addison-Wesley Publishing Company Menlo Park, California · Reading, Massachusetts New York · Don Mills, Ontario · Harlow, U.K. · Amsterdam Bonn · Paris · Milan · Madrid · Sydney · Singapore · Tokyo Seoul · Taipei · Mexico City · San Juan, Puerto Rico hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh On-line edition copyright 1996 by Addison-Wesley Publishing Company. Permission is granted to print or photo- copy this document for a fee of $0.02 per page, per copy, payable to Addison-Wesley Publishing Company. All other rights reserved. Acquisitions Editor: J. Carter Shanklin Proofreader: Holly McLean-Aldis Editorial Assistant: Christine Kulke Text Designer: Peter Vacek, Eigentype Senior Production Editor: Teri Holden Film Preparation: Lazer Touch, Inc. Copy Editor: Nick Murray Cover Designer: Yvo Riezebos Manufacturing Coordinator: Janet Weaver Printer: The Maple-Vail Book Manufacturing Group Composition and Film Coordinator: Vivian McDougal Copyright 1996 by Addison-Wesley Publishing Company All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, or any other media embodiments now known, or hereafter to become known, without the prior written permission of the publisher.
    [Show full text]