Section 1

Preview this deck

Call by value

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (33)

Section 1

(33 cards)

Call by value

Front

evaluates the argument expression first, producing a value, which is then added to the environment (eager, C)

Back

top-level function

Front

functions as they occur in non-functional languages like C

Back

parameter passing convention

Front

describes how arguments to functions are evaluated, or to be more precise, it describes the order of evaluation of an application and its arguments

Back

expression

Front

an expression is a combination of variables, values, and operations over these values ex. (2+3)

Back

variable

Front

a symbol referring to a value

Back

actual arguments

Front

i = foo('A',99); 'A' and 99 are actual args of foo

Back

Object Language

Front

Language being studied (in our case arithmetic expressions)

Back

zip [1,2,3,4,5] [5,5,5,5,5]

Front

[(1,5),(2,5),(3,5),(4,5),(5,5)]

Back

closure

Front

a closure combines a function expression with an environment. It is a value expressed by a function expression

Back

Kinds of errors

Front

division by 0, undefined variables, and type-errors

Back

free variable

Front

refers to variables used in a function that are neither local variables or parameters of the function

Back

parser

Front

converts concrete syntax into abstract syntax concrete -> abstract concrete: "3 + 81 * 2" abstract: Add (Number 3) (Multiply (Number 81) (Number 2))

Back

enviroment

Front

collection of multiple bindings

Back

dynamic property

Front

can only be determined by executing or evaluating program (common error is dividing by 0)

Back

abstract syntax

Front

conceptual structure

Back

Meta Language

Front

the language of description/implementation (haskell)

Back

monad

Front

Monads are a structure composed of two basic operations (bind and return), which capture a common pattern that occurs in many types

Back

token

Front

basic syntactic unit of a language, want to make them as simple as possible

Back

Call by name

Front

only evaluates the argument when the value is needed to complete the computation (lazy, haskell)

Back

first-class value

Front

A first-class value is a value that can be used like any other value. Specifically: 1 A value is first class if it can be passed to functions, 2 returned from functions, and 3 represented in a variable binding. (functions in haskell can be used as first-class values)

Back

problem with grammar:

Front

ambiguity

Back

syntactic category

Front

"parts of a language" expressions, terms, functions, types, classes, etc

Back

associatity

Front

specifies whether binary operations are grouped left or right in order to resolve ambiguity

Back

first-class function

Front

functions as they occur in functional languages like Haskell and JavaScript

Back

grammar

Front

set of rules that specify how tokens can be placed together to form valid expressions of a language

Back

static property

Front

can be determined by examining the text of the program without executing it

Back

concrete syntax

Front

the particular details and rules for writing expressions as strings of characters

Back

precedence

Front

order on grammar rules that define which rule applies first in case of ambiguity

Back

syntax

Front

the syntax of an expression describes how the various components of the expressions can be combined. Ex. (+ +) is not valid

Back

binding

Front

association with variable to a value

Back

literal

Front

constant value that appears in the program

Back

formal parameters

Front

int foo(char c, int x) { ... } c and x are formal parameters of foo

Back

evaluation

Front

each expression has a meaning (or value) which is defined by the evaluation of that expression

Back