Term
|
Definition
A type of syntax rule to check the validity of a program. Defines the alphabet, words, and language of a program |
|
|
Term
|
Definition
Terminals: encloed in double quotes, such as "a", "+", "begin"
Nonterminals: enclosed in "<" and ">", such as "prog"
Production Rules: A single nonterminal, followed by "::=", followed by a sequence of terminals and nonterminals
MetaSymbols: "+": One or more occurrences of the previous element; "*": Zero or more occurrences of the previous element; "|": means "or" |
|
|
Term
|
Definition
Terminals: enclosed in single quotes, such as 'a', '+', 'begin'
Nonterminals: not enclosed
Production Rules: A single nonterminal, followed by "→", followed by a sequence of terminals and nonterminals
MetaSymbols: Optional: "[]"; Alternative: "|"; Group: "()"; Repetition: "{}" |
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
Parse tree for A:=B*(A+C) |
|
Definition
|
|
Term
|
Definition
Constraints applied to syntactically correct program before execution |
|
|
Term
|
Definition
Rules that are enforced by the compiler at compile time. Any constraints that can be checked at compile time. E.g.: Type checking, check functions/methods, formal and actual parameters, etc. |
|
|
Term
|
Definition
Rules of a given construct that are enforced at the run-time. It is the meaning of each construct of a language |
|
|
Term
|
Definition
Describe the meaning of a program by executing its statements on an abstract machine. Each program statement is described by a set of operations of this machine. State changes are defined by coded algorithms. |
|
|
Term
|
Definition
Based on formal logic (First order predicate calculus). Define axioms or inference rules for each statement type in the language (to allow transformations of expressions to other expressions). |
|
|
Term
Functional (Denotational) Semantics |
|
Definition
The most abstract semantics description method based on recursive theory. The operations of the computer are simulated by writing mathematical functions. |
|
|
Term
|
Definition
Provides runtime process management, file system for storing programs, I/O operations |
|
|
Term
|
Definition
Provides source to object code translation |
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
Source code is not translated but run directly by a software interpreter; Allows easy source level debugging implementation, provides maximum flexibility, but suffers slow execution speed and large memory requirement; Difficult to build an interpreter because of high level constructs; Pseudocode: Read the next statement (Fetch), Determine the actions to be executed (Decode), Perform the actions (Execute) |
|
|
Term
|
Definition
|
|
Term
|
Definition
Source code is translated (by a compiler) into machine language and run directly by hardware |
|
|
Term
|
Definition
Has a preprocessor, a lexical analyzer, a parser, optionally an optimizer, and a code generator |
|
|
Term
|
Definition
Links the different user and system object files into the final executable |
|
|
Term
|
Definition
The _____ _____ _____ between CPU and memory limits the execution speed |
|
|
Term
|
Definition
Performs the following tasks:
-
Reads the executable and creats an address space large enough for the program and its data
-
Copies the instructions and data into memory
-
Initializes the machine's registers and sets the stack pointer
-
Loads the Program Counter with the address of the entry point of the program (main method in Java or C)
-
Starts the execution
|
|
|
Term
Hybrid Implementation Systems |
|
Definition
Source code is translated into an intermediate form and run by a software virtual machine; E.g.: Java compiler produces byte code that can be run on any Java virtual machine (JVM) |
|
|
Term
|
Definition
A set of tools that help programmers develop applications |
|
|
Term
|
Definition
Commonly used to create several methods with the same name that perform similar tasks. Java enables methods of the same name to be defined if they have different signatures
public int square(int side);
public double square(double side); |
|
|
Term
|
Definition
Allow the same code to be used for multiple data types. E.g.: ADT stack, sorting, searching, etc. Called templates in C++. Bound to actual types by instantiation at compile time |
|
|
Term
|
Definition
Types that are not built from other types. Mimics hardware unit
E.g.: Char in C. Boolean in Java. Not String or boolean in C |
|
|
Term
|
Definition
Also called compound object. Consists of one or more data type objects. E.g.: Arrays |
|
|
Term
|
Definition
Method used to create an aggregate data type. E.g.: Cartesian Products, Sequences |
|
|
Term
|
Definition
A constructor used to create records and structures
[image] |
|
|
Term
|
Definition
A function from a set of values (domain) to a set of values (range) |
|
|
Term
|
Definition
Mapping from a set of integers (index) to a set of values (content of the array)
[image] |
|
|
Term
|
Definition
A constructor that allows objects to be specified by a disjunctive of fields. E.g.: field1 or field2 or ... or fieldn
An instance object has only one field: Save space. It is up to the programmer to remember which address is valid
[image] |
|
|
Term
|
Definition
A constructor that creates a variable whose value is a set of elements of type T. T is called the base type. E.g.: set type in Pascal, Java APIs: Sets |
|
|
Term
|
Definition
Constructor allows the creation of objects whose number of elements are not specified. Objects will have arbitrary size. E.g.: sequential files, Vector, List in Java |
|
|
Term
|
Definition
The ability to create new data types using primitive data types
[image] |
|
|
Term
|
Definition
An extension to the record or structure construct: Plus routines. C++/Java: _____ is a class construct |
|
|
Term
|
Definition
Allocates and initializes the fields of an ADT. Languages usually provide a default _____ and default initializations
[image] |
|
|
Term
|
Definition
Releases the memory allocated for an instance. C++: a _____ has the name of the class prefixed by '~'. Java: provides a garbage collector to clean memory allocated by an object |
|
|
Term
|
Definition
An ADT that takes data types as parameters
[image] |
|
|
Term
|
Definition
A type system is said to be _____ if it guarantees not to generate type errors |
|
|
Term
|
Definition
Weakens the value of strong typing |
|
|
Term
|
Definition
The type of each expression must be known at compile time
Requirements: Only built-in types can be used. All variables are declared with an associate type. All operations are specified by stating the types of the required operands and the type of the results |
|
|
Term
|
Definition
_____ typed languages are _____ typed languages |
|
|
Term
|
Definition
Also called conformance or equivalence. A compatible type is one that is either legal for the operator, or is allowed under language rules to be implicitly converted, by compiler-generated code, to a legal type |
|
|
Term
|
Definition
Two variables can have compatible types only if they are in either the same declaration or in declarations that use the same type name. Highly restrictive. Easier to implement. Ada uses |
|
|
Term
Structure Type Compatibility |
|
Definition
Two variables have compatible types if their types have identical structures. More flexible. Difficult to implement: compare the whole structure instead of just names. Types are compatible if T1 is name compatible with T2 or T1 and T2 are defined by applying the same type constructor to structurally compatible corresponding type components |
|
|
Term
|
Definition
Needed when the types of an expression are not compatible
func: T1→R1
T1 x1;
R1 x2;
x2=func(x1); |
|
|
Term
|
Definition
|
|