Shared Flashcard Set

Details

CS396
2nd Test Review
24
Computer Science
Not Applicable
04/25/2007

Additional Computer Science Flashcards

 


 

Cards

Term
What are two main characteristics of a Strongly Typed Language?
Definition
1. types are know at compile time
2. types do not change
Term
What are the 3 levels of Object Oriented Programming comittment?
Definition
1. Full - All data types are classes, no primative types.
2. Pure Extention - adding OOP model to existing language.
3. Partial - retain privative and impartive operations while adding OOP
Term
What is denotational semantics?
Definition
Semantics of computer systems by constructing mathematical objects which express the semantics of these systems
Term
What is a proposition?
Definition
a statement about something(not a statement of fact) i.e. Woman(Mike)
Term
What is a predicate?
Definition
Expresses a relation amoung two or more things. i.e man(loves martin pepsi)
Term
Discribe the 3 Primary Steps in the Flow of Satisfaction.
Definition
1. Given a goal (single or compound list of goals)
2. Take the first one and start at the top of the knowledge base.
3. Attempt to unify the goal with the knowledge base.
Term
What is the distinction between Keywords and Reserved words?
Definition
Keywords are usable by the programmer while Reserved words are not
Term
What is Alising?
Definition
When two or more names are binded to one memory location
Term
What are 4 distinctions of Types in a language?
Definition
1. Interpetation of contents
2. how much memory to allocate
3. range of possible values that can be assigned.
4. legal operations
Term
Binding is static if?
Definition
Its known before runtime and never changes
Term
What is Ambiguity?
Definition
When a grammer that generates a sentenial form for which there are two or more distinct parse trees is said to be ambiguous
Term
What is the difference between Sythesized Attrubutes and Inheruted Attributes?
Definition
1. Synthesized attributes are used to pass semantic information up a parse tree.
2. Inherited Attributes are used to pass semantics down and across the parse tree.
Term
What is operational Semantics?
Definition
Operational Semantics is used to describe the meaning of a program by executing its statements on a machine, the changes on the machines state when it executes a given statement define the meaning of that statement.
Term
What is Axiomatic Semantics?
Definition
Axiomatic Semantics uses assertions (predicates) which come in two flavors, pre and postcondtions, and requires that proof of a given program requires that every statement in the program have both a pre and postcondtion.
Term
What is the difference between a sentential form and a sentence?
Definition
sentential form of a grammar G to be any sequence of grammar symbols (terminals or nonterminals) derived in 0 or more steps from the start symbol of G. A sentence is a sentential-form which contains only terminal symbols.
Term
What is the difference between static and dynamic semantics?
Definition
Dynamic semantics are difined during execution time and can change while static semantics are known at compile time and do not change. See Operational Semantics
Term
List the 3 common componets of Attribute Grammar.
Definition
1. Attributes - associated to grammar symbols, like variables have assigned values.
2. Attribute Compuataion funcions - aka semantic functions, used to define how attribute values are computed.
3. Predicate Functions - state the semantic rules of a language
Term
Define Syntax
Definition
The rules governing the way in which words and phrases are combined to form sentences in a language.
Term
Define Semantics
Definition
Semantics is concerned with the meaning of words, expressions and sentences
Term
Define Right Recursive and Left Recursive respectively
Definition
1. If the LHS is appearing at the end of its RHS
2. If the LHS is appearing at the begining of its RHS
Term
List 3 reasons why lexical analysis is seperated from Syntax analysis
Definition
1. Simplicity - Techniquest for LA are less complex then SA.
2. Efficiency - its good to optimize LA but not useful to optimize SA
3. Portiablilty - LA reads input file program it is partically platform dependant while SA does not and is not.
Term
Define lexical
Definition
leical is how the characters in source code are translated into tokens that the compiler can understand.
Term
List 2 goals of a Syntax Analysis
Definition
1. Syntax analyzer must check the input program to determine if it is syntactically correct.
2. Produce either a complete parse tree or at least trace the structure of the complete parse tree for syntically correct input
Term
What is the difference between Top-Down and Bottom-Up parsers?
Definition
Top-Down is built from the ROOT downward to the leaves(left to right order, leftmost derivation), Bottom-Up is built from the leaves up-ward to the root (rightmost derivation)
Supporting users have an ad free experience!