Introduction to SML Amtoft from Hatcliff from Leavens

Total Page:16

File Type:pdf, Size:1020Kb

Introduction to SML Amtoft from Hatcliff from Leavens Language Paradigms Introduction to SML Amtoft from Hatcliff from Leavens Paradigms Motivation Different ways of expressing computation; Statements vs. Expressions I imperative Basics functional I Typing I logic Environment Tuples and Lists I ...object-oriented Others: dataflow, coordination, algebraic, graph-based, etc Note: distinction is sometimes fuzzy! Imperative Paradigm Introduction to SML Amtoft from Hatcliff from Leavens Example: compute mn (n ≥ 0) Paradigms Motivation r e s u l t := 1 ; Statements vs. while n > 0 do Expressions result := result ∗ m; Basics n := n − 1 Typing end while ; Environment Tuples and Lists Assessment: I computation is expressed by repeated modification of an implicit store (i.e., components command a store modification), I intermediate results are held in store I iteration (loop)-based control Functional Paradigm Introduction to SML Amtoft from Hatcliff from Leavens Example: compute mn (n ≥ 0) Paradigms Motivation fun power (m,n) = Statements vs. i f ( n = 0) Expressions then 1 Basics e l s e m ∗ power (m, n −1); Typing Environment Assessment: Tuples and Lists I computation is expressed by function application and composition I no implicit store I intermediate results (function outputs) are passed directly into other functions I recursion-based control Logic Paradigm Introduction to SML Amtoft n from Hatcliff Example: compute m (n ≥ 0) from Leavens /∗ define predicate power(m,n,result) ∗/ Paradigms Motivation Statements vs. power(m,0 ,1). Expressions power(m,n, result) Basics <− minus(n,1,n sub1 ) , Typing power (m, n sub1 , t e m p r e s u l t ) , Environment times(m, temp result ,result). Tuples and Lists Assessment: I computation is expressed by proof search, or alternatively, by recursively defining relations I no implicit store I all intermediate results (i.e., function outputs) are stored in variables I recursion-based control Introduction to SML Introduction to SML Amtoft from Hatcliff from Leavens Paradigms Motivation SML is an expression-based (functional) language. Statements vs. 1. why SML in CIS505? Expressions Basics 2. statements vs. expressions Typing 3. basic SML expressions Environment I literals, variable references, function calls, Tuples and Lists conditionals, ... 4. typing issues 5. variables and bindings 6. tuples and lists Why SML? Introduction to SML Amtoft from Hatcliff from Leavens Paradigms I Well-understood foundations: This is a course Motivation about the foundations of programming languages, Statements vs. and the theory/foundations of SML have been Expressions Basics studied more in recent years than almost any other Typing language. Environment I Well-designed: Robin Milner, the principal designer Tuples and Lists of SML received the Turing Award, in part, because of his work on SML. I Advanced features: Many of the features of SML, such as parametric polymorhism, pattern matching, and advanced modules are very elegant and do not appear in other languages like Java, C++, etc. Why SML? (continued) Introduction to SML Amtoft from Hatcliff from Leavens I Very high-level: Using SML lets us describe Paradigms language processors very succinctly (much more Motivation concisely than any imperative language). Statements vs. Expressions I Clean: SML is useful for various critical applications where programs need to be proven correct Basics Typing I It's different than Java: At some point in your Environment career, you will have to learn a new language. This Tuples and Lists course prepares you for that by forcing you to learn a new language (SML) quickly. In addition, compared to Java, C, etc., SML uses a totally different style to describe computation. This forces you to think more deeply (mental pushups!). I There's more! There are also several different concurrent versions of SML, object-oriented extensions, libraries for various applications, etc. Statement Introduction to SML Amtoft from Hatcliff from Leavens I construct evaluated only for its effect Paradigms Motivation Examples: Statements vs. Expressions m := 5 ; Basics n := 2 ; Typing r e s u l t := 1 ; Environment while n > 0 do Tuples and Lists result := result ∗ m; n := n − 1 end while ; write r e s u l t ; Statement-oriented/imperative languages: I Pascal, C, C++, Ada, FORTRAN, COBOL, etc Expression Introduction to SML Amtoft from Hatcliff from Leavens Paradigms Motivation I construct evaluated to yield value Statements vs. Examples: Expressions Basics A := 2 + 3 ; /∗ rhs is expression ∗/ Typing Environment power 5 2 /∗ SML function call ∗/ Tuples and Lists a = (b= c++)+ 1; /∗ C , C++, Java ∗/ Pure expressions: no side-effects Expression-oriented/functional languages: I Scheme, ML, Lisp, Haskell, Miranda, FP, etc Basic SML Expressions Introduction to SML Amtoft from Hatcliff from Leavens Paradigms Motivation Statements vs. Expressions Basics I constants (i.e., literals) Typing I variable references Environment Tuples and Lists I function application I conditional expressions Constants Introduction to SML Amtoft from Hatcliff from Leavens Paradigms Motivation Statements vs. Expressions I Integers: 0, 22, 353,... Basics Typing I Reals: 12.0, 3E-2, 3.14e12 Environment I Booleans: true, false Tuples and Lists I Strings: "KSU", "foonn" I Characters: #"x", #"A", #"nn" Example Session Introduction to SML Amtoft from Hatcliff from Leavens − 2 ; v a l i t = 2 : i n t Paradigms − i t + 1 ; Motivation v a l i t = 3 : i n t Statements vs. − i t ; Expressions v a l i t = 3 : i n t Basics − ~234 + 2 ; Typing v a l it = ~232 : int Environment − 1 2 . 0 ; v a l it = 12.0 : real Tuples and Lists − 1 2 . + 3 . 1 ; stdIn:16.1 Error: syntax error found at DOT − "KSU" ; v a l it = "KSU" : string − " foo nn" ; v a l i t = " foo nn" : s t r i n g − #"x" ; v a l it =#"x" : char − #"gh" ; ... Error: character constant not length 1 Arithmetic Operators Introduction to SML Amtoft from Hatcliff from Leavens Precedence: lowest to highest Paradigms Motivation I +, − Statements vs. I ∗, =, div, mod Expressions Basics I ~ Typing Also: Environment I ML is case sensitive (cf. mod) Tuples and Lists I associativity and precedence as in other languages I operators associate to the left I parentheses are I needed only to enforce evaluation order, as in x * (y + z) I but may be freely added to improve clarity, as in x + (y * z) String Operators Introduction to SML Amtoft from Hatcliff from Leavens Paradigms Concatenation: Motivation − "abra" ^ "cadabra"; Statements vs. Expressions v a l it = "abracadabra" : string Basics Typing − "abra" ^ "" ^ "cadabra" ^ ""; Environment v a l it = "abracadabra" : string Tuples and Lists − "abra" ^ ("" ^ "cadabra") ^ ""; v a l it = "abracadabra" : string I "" (empty string) is identity element I ^ is associative Comparison Operators Introduction to SML Amtoft from Hatcliff from Leavens =, <, >, <=, >=, <> Paradigms Note: Motivation Statements vs. I cannot use = or <> on reals Expressions I to avoid problems with rounding Basics I use e.g., <= and >= for = Typing I < means \lexicographically procedes" for characters Environment and strings Tuples and Lists − "a" < "b" ; v a l it = true : bool − "c" < "b" ; v a l it = false : bool − " abc " < " acb " ; v a l it = true : bool − " s t u v " < " s t u " ; v a l it = false : bool Boolean Operators Introduction to SML Amtoft from Hatcliff from Leavens Paradigms Motivation Statements vs. not, andalso, orelse Expressions Basics I behave like C's !, &&, || | not like Pascal Typing I not commutative, as \short-circuit" operation Environment Tuples and Lists − (1 < 4) o r e l s e ( ( 5 d i v 0) < 2 ) ; v a l it = true : bool − ( ( 5 d i v 0) < 2) o r e l s e (1 < 4 ) ; ∗∗ e r r o r ∗∗ If-then-else Expressions Introduction to SML Amtoft from Hatcliff from Leavens Examples: Paradigms − i f 4 < 3 then "a" e l s e " bcd " ; Motivation v a l it = "bcd" : string Statements vs. Expressions − v a l t = t r u e ; Basics v a l t = true : bool Typing − v a l f = f a l s e ; v a l f = false : bool Environment Tuples and Lists − i f t = f then (5 d i v 0) e l s e 6 ; v a l i t = 6 : i n t − i f t = t r u e then 7 e l s e " foo " ; ... Error: types of rules don't agree... earlier rule(s): bool −> i n t this rule: bool −> s t r i n g i n r u l e : f a l s e => " foo " Typing Issues Introduction to SML Amtoft from Hatcliff from Leavens ML has strong typing: Paradigms Motivation (strong/weak = how much) Statements vs. Expressions I each value has exactly one type Basics for example, 12 is but not I int real Typing I explicit coercions therefore necessary Environment ML has static typing: Tuples and Lists (static/dynamic = when) I type-checking occurs before programs are run I thus if x = y then 7 else "foo" is an error I but it wouldn't be in a dynamically typed language These concepts are too often mixed up, even in the Ullman textbook (pages 3 and 143) Coercions Introduction to SML Amtoft from Hatcliff From integers to reals: from Leavens − r e a l ( 1 1 ) ; Paradigms v a l it = 11.0 : real − 5 . 0 + 1 1 ; Motivation Statements vs. ... Error: operator and operand mismatch Expressions operator domain: real ∗ r e a l Basics operand: real ∗ i n t i n expression: Typing 5 . 0 + 11 Environment − 5.0 + real(11); Tuples and Lists v a l it = 16.0 : real From reals to integers: − floor (5.4); v a l i t = 5 : i n t − c e i l ( 5 . 4 ) ; v a l i t = 6 : i n t − round(5.5); v a l i t = 6 : i n t − trunc(~5.4); v a l i t = ~5 : i n t Coercions Introduction to SML Amtoft from Hatcliff from Leavens Paradigms Between characters and integers: Motivation Statements vs.
Recommended publications
  • C Strings and Pointers
    Software Design Lecture Notes Prof. Stewart Weiss C Strings and Pointers C Strings and Pointers Motivation The C++ string class makes it easy to create and manipulate string data, and is a good thing to learn when rst starting to program in C++ because it allows you to work with string data without understanding much about why it works or what goes on behind the scenes. You can declare and initialize strings, read data into them, append to them, get their size, and do other kinds of useful things with them. However, it is at least as important to know how to work with another type of string, the C string. The C string has its detractors, some of whom have well-founded criticism of it. But much of the negative image of the maligned C string comes from its abuse by lazy programmers and hackers. Because C strings are found in so much legacy code, you cannot call yourself a C++ programmer unless you understand them. Even more important, C++'s input/output library is harder to use when it comes to input validation, whereas the C input/output library, which works entirely with C strings, is easy to use, robust, and powerful. In addition, the C++ main() function has, in addition to the prototype int main() the more important prototype int main ( int argc, char* argv[] ) and this latter form is in fact, a prototype whose second argument is an array of C strings. If you ever want to write a program that obtains the command line arguments entered by its user, you need to know how to use C strings.
    [Show full text]
  • THE 1995 STANDARD MUMPS POCKET GUIDE Fifth Edition of the Mumps Pocket Guide Second Printing
    1995 S TA N DA R D M U M P S P O C K E T G U I D E FIFTH EDITION FREDERICK D. S. MARSHALL for Octo Barnett, Bob Greenes, Curt Marbles, Neil Papalardo, and Massachusetts General Hospital who gave the world MUMPS and for Ted O’Neill, Marty Johnson, Henry Heffernan, Bill Glenn, and the MUMPS Development Committee who gave the world standard MUMPS T H E 19 9 5 S TA N DA R D M U M P S P O C K E T G U I D E FREDERICK D. S. MARSHALL MUMPS BOOKS • seattle • 2010 THE 1995 STANDARD MUMPS POCKET GUIDE fifth edition of the mumps pocket guide second printing MUMPS BOOKS an imprint of the Vista Expertise Network 819 North 49th Street, Suite 203 ! Seattle, Washington 98103 www.vistaexpertise.net [email protected] (206) 632-0166 copyright © 2010 by frederick d. s. marshall All rights reserved. V I S t C E X P E R T I S E N E T W O R K C O N T E N T S 1 ! I N T R O D U C T I O N ! 1 1.1 ! Purpose ! 1 1.2 ! Acknowledgments ! 1 2 ! O T H E R R E F E R E N C E S ! 2 3 ! T H E S U I T E O F S T A N D A R D S ! 3 4 ! S Y S T E M M O D E L ! 5 4.1 ! Multi-processing ! 5 4.2 ! Data ! 5 4.3 ! Code ! 7 4.4 ! Environments ! 7 4.5 ! Pack ages ! 7 4.6 ! Char acter Sets ! 7 4.7 ! Input/Output Devices ! 8 5 ! S Y N T A X ! 9 5.1 ! Metalanguage Element Index ! 9 6 ! R O U T I N E S ! 15 6.1 ! Routine Structure ! 15 6.2 ! Lines ! 15 6.3 ! Line References ! 17 6.4 ! Execution ! 19 6.4.1 ! the process stack ! 19 6.4.2 ! block Processing ! 19 6.4.3 ! error codes ! 21 7 ! E X P R E S S I O N S ! 2 3 7.1 ! Values ! 24 7.1.1 ! representation ! 24 7.1.2 ! interpretation
    [Show full text]
  • Blank Space in Python
    Blank Space In Python Is Travers dibranchiate or Mercian when imprecates some bings dollies irrespective? Rid and insomniac Gardner snatches her paean bestiaries disillusions and ruralizing representatively. Is Ludwig bareknuckle when Welsh horde articulately? What of my initial forms, blank in the men and that is whitespace without any backwards compatible of users be useful However, managers of software developers do not understand what writing code is about. Currently is also probably are numeric characters to pay people like the blank space is do you receive amazing, blank spaces and without a couple of the examples are. String methods analyze strings of space in english sentences, conforming to type of the error if not contain any safe location on coding styles? Strings are a sequence of letters, between the functions and the class, and what goes where. In python that some point in python. Most will first parameter is able to grow the blank line containing the blank space in python program repeatedly to a block mixed tabs. Note that the program arguments in the usage message have mnemonic names. You can give arguments for either. Really the best way to deal with primitive software that one should not be writing code in. Most python on how do it difficult, blank space in python installer installs pip in different numbers internally; back to your preferences. How do I convert escaped HTML into a string? Try to find a pattern in what kinds of numbers will result in long decimals. In case of spaces, is not so picky. FORTRAN written on paper, the older languages would stand out in the regression chart.
    [Show full text]
  • String Objects: the String Class Library
    String Objects: The string class library Lecture 12 COP 3014 Spring 2018 March 26, 2018 C-strings vs. string objects I In C++ (and C), there is no built-in string type I Basic strings (C-strings) are implemented as arrays of type char that are terminated with the null character I string literals (i.e. strings in double-quotes) are automatically stored this way I Advantages of C-strings: I Compile-time allocation and determination of size. This makes them more efficient, faster run-time when using them I Simplest possible storage, conserves space I Disadvantages of C-strings: I Fixed size I Primitive C arrays do not track their own size, so programmer has to be careful about boundaries I The C-string library functions do not protect boundaries either! I Less intuitive notation for such usage (library features) string objects I C++ allows the creation of objects, specified in class libraries I Along with this comes the ability to create new versions of familiar operators I Coupled with the notion of dynamic memory allocation (not yet studied in this course), objects can store variable amounts of information inside I Therefore, a string class could allow the creation of string objects so that: I The size of the stored string is variable and changeable I Boundary issues are handled inside the class library I More intuitive notations can be created I One of the standard libraries in C++ is just such a class The string class library I The cstring library consists of functions for working on C-strings.
    [Show full text]
  • Languages and Regular Expressions Lecture 2
    Languages and Regular expressions Lecture 2 1 Strings, Sets of Strings, Sets of Sets of Strings… • We defined strings in the last lecture, and showed some properties. • What about sets of strings? CS 374 2 Σn, Σ*, and Σ+ • Σn is the set of all strings over Σ of length exactly n. Defined inductively as: – Σ0 = {ε} – Σn = ΣΣn-1 if n > 0 • Σ* is the set of all finite length strings: Σ* = ∪n≥0 Σn • Σ+ is the set of all nonempty finite length strings: Σ+ = ∪n≥1 Σn CS 374 3 Σn, Σ*, and Σ+ • |Σn| = ?|Σ |n • |Øn| = ? – Ø0 = {ε} – Øn = ØØn-1 = Ø if n > 0 • |Øn| = 1 if n = 0 |Øn| = 0 if n > 0 CS 374 4 Σn, Σ*, and Σ+ • |Σ*| = ? – Infinity. More precisely, ℵ0 – |Σ*| = |Σ+| = |N| = ℵ0 no longest • How long is the longest string in Σ*? string! • How many infinitely long strings in Σ*? none CS 374 5 Languages 6 Language • Definition: A formal language L is a set of strings 1 ε 0 over some finite alphabet Σ or, equivalently, an 2 0 0 arbitrary subset of Σ*. Convention: Italic Upper case 3 1 1 letters denote languages. 4 00 0 5 01 1 • Examples of languages : 6 10 1 – the empty set Ø 7 11 0 8 000 0 – the set {ε}, 9 001 1 10 010 1 – the set {0,1}* of all boolean finite length strings. 11 011 0 – the set of all strings in {0,1}* with an odd number 12 100 1 of 1’s.
    [Show full text]
  • The Ocaml System Release 4.02
    The OCaml system release 4.02 Documentation and user's manual Xavier Leroy, Damien Doligez, Alain Frisch, Jacques Garrigue, Didier R´emy and J´er^omeVouillon August 29, 2014 Copyright © 2014 Institut National de Recherche en Informatique et en Automatique 2 Contents I An introduction to OCaml 11 1 The core language 13 1.1 Basics . 13 1.2 Data types . 14 1.3 Functions as values . 15 1.4 Records and variants . 16 1.5 Imperative features . 18 1.6 Exceptions . 20 1.7 Symbolic processing of expressions . 21 1.8 Pretty-printing and parsing . 22 1.9 Standalone OCaml programs . 23 2 The module system 25 2.1 Structures . 25 2.2 Signatures . 26 2.3 Functors . 27 2.4 Functors and type abstraction . 29 2.5 Modules and separate compilation . 31 3 Objects in OCaml 33 3.1 Classes and objects . 33 3.2 Immediate objects . 36 3.3 Reference to self . 37 3.4 Initializers . 38 3.5 Virtual methods . 38 3.6 Private methods . 40 3.7 Class interfaces . 42 3.8 Inheritance . 43 3.9 Multiple inheritance . 44 3.10 Parameterized classes . 44 3.11 Polymorphic methods . 47 3.12 Using coercions . 50 3.13 Functional objects . 54 3.14 Cloning objects . 55 3.15 Recursive classes . 58 1 2 3.16 Binary methods . 58 3.17 Friends . 60 4 Labels and variants 63 4.1 Labels . 63 4.2 Polymorphic variants . 69 5 Advanced examples with classes and modules 73 5.1 Extended example: bank accounts . 73 5.2 Simple modules as classes .
    [Show full text]
  • CSE 105, Fall 2019 Homework 3 Solutions
    CSE 105, Fall 2019 Homework 3 Solutions Due: Monday 10/28 by midnight Instructions Upload a single file to Gradescope for each group. All group members’ names and PIDs should be on each page of the submission. Your assignments in this class will be evaluated not only on the correctness of your answers, but on your ability to present your ideas clearly and logically. You should always explain how you arrived at your conclusions, using mathematically sound reasoning. Whether you use formal proof techniques or write a more informal argument for why something is true, your answers should always be well-supported. Your goal should be to convince the reader that your results and methods are sound. For questions that only ask for diagrams, justifications are not required but highly recommended. It helps to show your logic in achieving the answers and partial credit can be given if there are minor mistakes in the diagrams. Reading Sipser Sections 1.3 and 1.4 ​ Key Concepts DFA, NFA, equivalence of DFA and NFA, regular expressions, equivalence of ​ DFA and regular expressions, regular languages, closure of the class of regular languages under certain operations, the Pumping Lemma, pumping length, proofs of nonregularity Problem 1 (10 points) For each of the regular expressions below, give two examples of strings in the corresponding language and give two examples of strings not in the corresponding language. a. (000 ⋃ 1)*(0 ⋃ 111)* Examples of strings in the language: 000, 1, 0, 111, 11, 00, 10, 000111, empty string Examples of strings not in the language: 01, 001, 011 b.
    [Show full text]
  • Regular Expressions
    Regular Expressions A regular expression describes a language using three operations. Regular Expressions A regular expression (RE) describes a language. It uses the three regular operations. These are called union/or, concatenation and star. Brackets ( and ) are used for grouping, just as in normal math. Goddard 2: 2 Union The symbol + means union or or. Example: 0 + 1 means either a zero or a one. Goddard 2: 3 Concatenation The concatenation of two REs is obtained by writing the one after the other. Example: (0 + 1) 0 corresponds to f00; 10g. (0 + 1)(0 + ") corresponds to f00; 0; 10; 1g. Goddard 2: 4 Star The symbol ∗ is pronounced star and means zero or more copies. Example: a∗ corresponds to any string of a’s: f"; a; aa; aaa;:::g. ∗ (0 + 1) corresponds to all binary strings. Goddard 2: 5 Example An RE for the language of all binary strings of length at least 2 that begin and end in the same symbol. Goddard 2: 6 Example An RE for the language of all binary strings of length at least 2 that begin and end in the same symbol. ∗ ∗ 0(0 + 1) 0 + 1(0 + 1) 1 Note precedence of regular operators: star al- ways refers to smallest piece it can, or to largest piece it can. Goddard 2: 7 Example Consider the regular expression ∗ ∗ ((0 + 1) 1 + ")(00) 00 Goddard 2: 8 Example Consider the regular expression ∗ ∗ ((0 + 1) 1 + ")(00) 00 This RE is for the set of all binary strings that end with an even nonzero number of 0’s.
    [Show full text]
  • Define ​Basic String View(Nullptr)
    Doc. no.: P0903R2 Date: 2018-05-07 Reply to: Ashley Hedberg ([email protected]), Titus Winters ([email protected]), ​ ​ ​ ​ Jorg Brown ([email protected]) ​ ​ Audience: LEWG/EWG/LWG Define basic_string_view(nullptr) ​ Abstract 1 Background 2 What is a string_view? 2 What does const char* mean? 2 What is an empty string_view? 3 Existing behavior of basic_string_view(null_char_ptr) 3 Motivation 4 Once we convert into the string_view domain, code is better 4 Nul-terminated strings are not the design we'd choose today 5 Nul-termination + null can match string_view’s existing design 5 Discussion Points 6 Can we we weaken preconditions? (Or: do we believe that string_view(null_char_ptr) is more likely to match programmer intent or to represent a bug?) 6 How many functions are there today that accept const char* and (by contract or not) allow for null values? 7 Which view of string_view design speaks to you: is it a lightweight string, or is it a pointer-and-length pair, or is it a mix of the two? 7 Which provides more net value to the C++ community? 7 Could we add a new type such as nullable_string_view? 7 Will the proposed changes negatively affect performance? 8 Proposed Wording 8 Change History 9 Acknowledgements 9 Abstract This paper proposes modifying the requirements of basic_string_view(const charT* str) ​ such that it becomes well-defined for null pointers, both at compile-time and at runtime. Background What is a string_view? ​ ​ The string_view type has shipped in C++17. Substantive redesign is likely out of the question ​ ​ without getting into P0684 territory and long-term refactoring plans.
    [Show full text]
  • Simple Presentation Web App Generator
    Simple Presentation Web App Generator Code Name: SPWAG Members Lauren Zou (ljz2112) Aftab Khan (ajk2194) Richard Chiou (rc2758) Yunhe (John) Wang (yw2439) Aditya Majumdar (am3713) Table of Contents Members Table of Contents 1 Introduction 1.1 Project Overview 1.2 Motivation 1.3 Design Goals 2 Language Tutorial 3 Language Manual 3.1 Lexical Conventions 3.1.1 Identifiers 3.1.2 Keywords 3.1.3 Data Types and Variables 3.1.3.1 Integer 3.1.3.2 Boolean 3.1.3.3 Strings 3.1.3.4 Other types 3.1.4 Conversions 3.1.5 Operators 3.1.6 Comments 3.2 Functions 3.2.1 Function Calls 3.2.2 Native Functions 3.3 Function Definition 3.4 Components 3.4.1 Native Components 3.5 Slides 1 3.6 Attributes 3.6.1 Native Attributes 3.6.2 Setting Component Attributes 3.7 Program Structure 3.7.1 Statements and Control Flow 3.7.1.1 Code Blocks and White Space 3.7.1.2 Control Structures 3.7.1.3 Precedence 3.7.2 Basic Expressions 3.7.3 Logical Expressions 3.7.3.1 Unary Boolean Expressions 3.7.3.2 Binary Boolean Expressions 3.7.3.3 Comparison Expressions 3.7.4 Scoping 3.7.4.1 Global Scope 3.7.4.2 Block Scope 3.7.5 Inheritance 3.8 Execution 4 Project Plan 4.1 Directory Structure and Programming Styles 4.2 Project Timeline 4.3 Roles and Responsibilities 4.4 Development Environment 4.5 Project Log 5 Architectural Design 5.1 Component Interface Interaction 6 Test Plan 6.1 Test Cases 6.1.1 hello-world 6.1.2 one-fish-two-fish 6.1.3 presentation 6.1.4 fiver 7 Lessons Learned 7.1 Lauren Zou 7.2 Aftab Khan 7.3 Yunhe (John) Wang 7.4 Richard Chiou 7.5 Aditya Majumdar 8 Appendix 8.1 Main
    [Show full text]
  • Declare Empty Function Python
    Declare Empty Function Python Morse aim his intercession crash-dive bias, but nether Jerrie never palm so homoeopathically. Lying-in Richmond sometimes resuscitated his autogenesis indigently and breezed so sustainedly! Jervis admitted evangelically while devisable Duncan chimneying unsparingly or cooings abstractly. Suppose you declare an array of characters. Rossum apply: An alternative way to speed up sorts is to construct a disable of tuples whose first element is yes sort them that way sort properly using the default comparison, and whose second element is the inside list element. So that just like any type parameters in this tutorial that will not just after n characters. NASA show any computer screens? The current code generator emits no code for your assert statement when optimization is requested at compile time. The python programming languages like names are useful things can declare empty function python efficiently, apply these exceptions. It for multiple urls according to declare empty function python. This article above through Golang JSON decoding examples using a struct, map, and type assertion. Sample demonstrates what is not work just like an empty string will return value. Concatenate two arguments in your correct email for cpu tensor types to declare empty! Write a fragment of code to rely and print the portion of the string between wrist angle brackets. It later not grope the full details of the algorithm or function requirements. Each VBA Tutorial contains macro examples to help out learn VBA code quickly. Returns a string key the combination of its parts. Most significant unit. Quackery does sure have variables or assignment.
    [Show full text]
  • Expect Basics
    Expect Basics Tutorial 3 ECE453 & CS447 Software Testing, Quality Assurance and Maintenance Tutorial Overview 1. Central commands of Expect 2. Interact with other processes 3. Error and timeout handling 4. Glob Pattern Matching in Expect 5. Regular Expression pattern matching in Expect ECE453 & CS447 Tutorial-3 Expect Basics 2 Getting Started with Expect • Executing Expect $ expect – Using Expect interpreter expect1.1> exit $ – Executing Expect script $ expect script-filename files from Unix. …… – For simplicity, > is used as prompt for Expect interpreter. • Three central commands: send, expect and spawn. – send: send a string to a > send “Hello world” connected process. Hello world> – It does not format string $ expect speak in any way. Hello world$ – Can save the command to a file and execute it from Unix shell directly. (assume speak is that file) ECE453 & CS447 Tutorial-3 Expect Basics 3 Command: expect expect command waits for a string > expect “hi” from a process, the default is from philosophic //input from keyboard keyboard. > Syntax: > expect “hi” { expect [ pattern-string {action} ] send “hello there\n” } It waits for first occurrence of philosophic //input from keyboard pattern and stop only when match hello there //command output is found or timeout. > The match pattern string is stored > expect “hi” { in expect_out(0, string) and the send $expect_out(0, string)\n entire string read is kept in send $expect_out(buffer)\n expect_out(buffer). } philosophical //input from keyboard The remain string “cal<newline>” hi //value of
    [Show full text]