Programming Languages Test 1

Programming Languages Test 1

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

Type System

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 (39)

Section 1

(39 cards)

Type System

Front

Rules for assigning types to values and mechanisms for determining type equivalence. See Wikipedia article Type system.

Back

Run-time (Test #1 vocab)

Front

The time when code execution begins. Occurs after compile-time and link-time. Things that happen at run-time are said to be dynamic. See Wikipedia article Run time (program lifecycle phase) .

Back

Parse / Parser / Parsing

Front

software that parses. Parsing is also known as syntax analysis. The result of parsing is an abstract syntax tree.

Back

Duck Typing

Front

"If it looks like a duck and quacks like a duck, it is a duck."

Back

Link-time (Test #1 vocab)

Front

The time at which uses and definitions of names are resolved. Occurs after compile-time and before run-time.

Back

Alias

Front

Two names for the same value. Causes unexpected side-effect if the value changes via one name and the other name is later used.

Back

Syntax Analysis

Front

What a parser does. Occurs after lexical analyis and before code generation.

Back

Strongly Typed

Front

A language with a high degree of type safety is called "strongly" typed (or "has a strong type system"). A language with a "strong" type system must minimally detect all type errors at or before run-time (the instructor refers to this as "dynamically strong" in contrast with "statically strong" requires that all type errors be prevented by static checking at compile-time. Contrast with "weakly typed." Note that static type checking is insufficient to ensure that a language has a strong type system. See Wikipedia article Strong and Weak Typing.

Back

Reference Type (Test #1 vocab)

Front

Assignment and normal parameter passing of a reference type results in an alias where two names refer to the same value. Resulting alias may be confusing if value changes. Contrast with "value type." See Wikipedia article Reference type.

Back

Tuple

Front

A fixed-sized, ordered, unindexed sequence of values. See Wikipedia article Tuple.

Back

Manifest Typing (Test #1 vocab) (

Front

The explicit identification of the type of each variable being declared. Also called "explicit type declaration." Contrast with inferred typing or "implicit type declaration." See Wikipedia article Manifest typing.

Back

Abstract Type

Front

A type which cannot be instantiated directly. Used as a subtype. Contrast with "concrete type". Not to be confused with "abstract data type" covered in later chapter.

Back

Inferred Typing

Front

The automatic deduction of the data type of a variable or expression. Contrast with "manifest typing." See Wikipedia article Type inference.

Back

Abstract Syntax Tree

Front

The result of the syntax analysis phase

Back

Static (Test #1 vocab)

Front

Occurring early the language processing pipeline, before run-time. Used in phrases such as static type checking, static memory allocation. Contrast with "dynamic."

Back

Interpreter (Test #1 vocab)

Front

Proceeds directly to run-time with out saving generated code to a file. Contrast with "compiler." See Wikipedia article Interpreter (computing).

Back

Associative Array

Front

A data structure using array notation, but typically implemented as a hash table using strings as keys/indices

Back

Just-In-Time (JIT &emdash; Test #1 vocab)

Front

Generation of native code at run-time. The Java Runtime Environment and the Google V8 JavaScript engine both use this technique to achieve high speed repeated execution of code. See Wikipedia article Just-in-time compilation.

Back

Semantic Analysis (Test #1 vocab)

Front

Optional phase done after or during syntax analysis. Includes type checking, for example. May also include checks such as variable initialization before variable use.

Back

Dynamic Type

Front

Type checking done at run-time rather than earlier

Back

Type Checking

Front

A kind of semantic analysis. Can be done at compile time (static) or run-time (dynamic) depending on the language.

Back

Virtual Machine

Front

The (usually abstract) machine that implements a programming language." In other contexts "Virtual Machine" usually means something very different, a "system virtual machine": a piece of software that lets you run separate operating system kernel instances. In this context, it may simply refer to the combination of a compiler, linker, and hardware or it may refer to an emulator for a possibly non-existent piece of hardware or it may refer to an interpreter or combinations thereof. When non-theoretical refers to a "process virtual machine" designed to execute programs in a platform-independent environment.

Back

Pointer (Test #1 vocab)

Front

A type which holds the address of a value, allowing indirect access to the value. Pointers are reference types even when the entity being pointed to is a value type. See Wikipedia article Pointer (computer programming).

Back

Native Machine Code (Test #1 vocab)

Front

Code that gets executed directly by hardware. Contrast with intermediate code and portable code.

Back

Name binding (Test #1 vocab)

Front

The association of a name with an entity such as a variable. See Wikipedia article Name binding.

Back

Intermediate Code

Front

Portable code saved in RAM after parsing. May be executed immediately in the case of an interpreter, saved by a compiler to be used with a JIT at run-time, or used to generate native machine code in a traditional compiler. See Wikipedia articles Bytecode and Intermediate representation.

Back

Record (Test #1 vocab)

Front

A type consisting of named fields such a struct in C or C# or a class in C++, C# or Java. See Wikipedia article Record (computer science).

Back

Dynamic

Front

Occurring late, at run-time rather than in an earlier phase. Used in phrases like dynamic type checking, dynamic linking, dynamic loading, and dynamic memory allocation.

Back

Lexical Analysis (Test #1 vocab)

Front

The first phase of translation, converting a stream of characters into a stream of tokens/lexemes. Software that performs lexical analysis is called a lexer, tokenizer, or scanner. Lexical analysis is done before syntax analysis / parsing. Typically, regular expressions are used to describe how lexical analysis is to be done.

Back

Compiler

Front

Saves generated code for later use at link-time and/or run-time.

Back

Type Safety

Front

The degree to which a programming language discourages / prevents type errors. See Wikipedia article Type safety. Type safety is often categorized as either weak or strong, but in reality there are shades in between. E.g., languges that ensure a program has no type errors if certain non-essential language features are not used. E.g., C# is type safe if the keyword unsafe is never used.

Back

Scope (Test #1 vocab)

Front

The scope of a name binding is the region of a program where the binding is valid. E.g., global scope, function-local scope, or block-local scope. See Wikipedia article Scope (computer science).

Back

(Context Free) Grammar

Front

The rules that drive the parsing process. Normally expressed in EBNF and implemented by a pushdown automata or a recursive descent parser. See Widkipedia article Context-free grammar.

Back

Weakly Typed

Front

A language has a "weak" type system if type errors are not caught. For example, C and C++ are weakly typed because they do not catch "index out of bounds" errors. They also allow unchecked pointer type conversions which may be type errors as well. Contrast with "strongly typed." See Wikipedia article Strong and Weak Typing.

Back

Static Type Checking

Front

Type checking done at compile-time rather than later. Contrast with "dynamic type checking." See section on static type checking in Wikipedia article on type systems.

Back

EBNF

Front

Extended Backus-Naur Form. Standard format for describing (context free) grammars.

Back

Regular Expression (Test #1 vocab)

Front

Notation used to describe tokens. Can be implemented by an NFA. See Wikipedia article Regular expression .

Back

Portable Code (Test #1 vocab)

Front

Code that will run on a wide variety of hardware. Contrast with "native machine code."

Back

Value Type

Front

Assignment or normal parameter passing of a value type results in a copy of the value being made. Contrast with "reference type."

Back