Shared Flashcard Set

Details

CS 326 Midterm
CS 326 Midterm Study Cards
44
Computer Science
Undergraduate 3
10/13/2009

Additional Computer Science Flashcards

 


 

Cards

Term
Imperative Language(How to do)
Definition
Von Neumann: Fortran, C
Side Effects
Object Oriented: Java, C++
Interaction between objects
Term
Declarative Language(What to do)
Definition
Functional: Lisp, Scheme
Applications of functions from inputs to outputs
Logic, constraint based: Prolog
Propositional logic
Term
Syntax
Definition
What a program looks like
Term
Semantics
Definition
What a program means
Term
Implementation
Definition
How a program executes
Term
Machine Language
Definition
Sequence of bits directly control processor
Term
Assembly Language
Definition
Translated by an assembler, machine dependent
Term
High-Level Languages
Definition
Machine Independent
Translated by a compiler or interpreter
Term
Compiler
Definition
Translates into target language then goes away
Term
Interpreter
Definition
Stays around at execution time
Term
Rules(productions)
Definition
A finite set of replacement rules
Term
Nonterminals
Definition
A finite set of symbols
Term
Terminals
Definition
A finite set of symbols
Term
Start Symbol
Definition
One of the non-terminals
Term
Ambiguous Grammar
Definition
One string has multiple parse trees
Term
Regular Expression
Definition
A character, empty string, concatenation, alteration, repetition
Term
Scanner
Definition
Ignores white space, comments, recognises tokens
Term
Parser
Definition
Calls the scanner to obtain tokens, builds parse tree,
passes it to later phases
Term
Scheme Expressions
Definition
Either Atoms or Lists
Term
Constant Atoms
Definition
Evaluate to themselves
Term
Scheme-Preventing evaluation
Definition
Use quote
Term
Scheme-Forcing evaluation
Definition
Use Eval
Term
Recursion (List)
Definition
2 questions:
null? and (cdr lst)
Term
Recursion (Number)
Definition
n=0 and else
make sure (-n,1)
Term
Scheme Internal Structure
Definition
Each element is a cons cell.
Term
Early Binding
Definition
Greater Efficiency, typically compiler
Term
Late Binding
Definition
Associated with greater flexibility
Interpreted languages typically
Term
Lifetime
Definition
The time interval between creation and destruction
Term
Garbage
Definition
Object outlives its binding
Term
Dangling Reference
Definition
A binding outlives its object
Term
Static Storage Allocation
Definition
Each object is given an address before execution begins and retains the address throughout
Term
Dynamic Stack Allocation
Definition
Objects are allocated on a stack and bindings are made when entering a subroutine
Term
Dynamic Heap (Explicit)
Definition
Allocated and de-allocated by explicit directives at arbitrary times
Term
Dynamic Heap (Implicit)
Definition
Allocation and de-allocation are implicit, requires garbage collection
Term
Statically Scoped (Lexically)
Definition
Bindings are determined by examination
Can be determined at compile time
Term
Dynamically Scoped
Definition
Binding depends on the flow of control run time
Most recent active binding
Term
Shallow Binding
Definition
Use the environment from the moment of function call
Term
Deep Binding
Definition
Use the environment from the moment when the function was passed/stored/returned
Term
LeBlanc-Cook Symbol Table
Definition
Uses a hash table for symbols and a smoke stack
Term
Enumeration-controlled loops
Definition
executed once for every value in a igiven set.
Term
Logically-controlled loops
Definition
executed until soom boolean condition changes.
Term
Logically-controlled loops
Definition
executed until soom boolean condition changes.
Term
Logically-controlled loops
Definition
executed until soom boolean condition changes.
Term
Applicative-order
Definition
lands in most languages
Supporting users have an ad free experience!