Deck 12: Formal Semantics

Full screen (f)
exit full mode
Question
Semantic domains having additional mathematical structure are called algebras.
Use Space or
up arrow
down arrow
to flip the card.
Question
Semantic domains are the sets in which semantic functions take their values.
Question
It is possible to implement operational semantic rules directly as a program to get an executable specification.
Question
A least-fixed-point solution is a solution that has been made as flexible as possible.
Question
Programming is a goal-oriented activity.
Question
Formal specifications written in the operational or denotational style can be translated relatively easily into languages suitable for prototyping,such as Prolog.
Question
Language semantics should be dependent,such that each rule is derived from the other rules.
Question
Operational semantics cannot be used to define program behavior in terms of an abstract machine.
Question
There is a single,universal standard mathematical system for providing precise semantic descriptions of languages.
Question
In the sample small language presented in Chapter 12,the sets Program and Expression is an example of a syntactic domain.
Question
A formal specification method must be complete and consistent.
Question
Predicate transformers create new assertions out of old ones.
Question
An inference rule in logic indicates that when the premise is true,the conclusion is also true.
Question
Values of semantic functions in denotational descriptions will often be functions themselves.
Question
Axiomatic semantics define the semantics of a program by describing the effect its execution has on assertions about the data manipulated by the program.
Question
Reduction machines use reduction rules to specify how the control reduces the constructs of the language to a value.
Question
Semantic domains in denotational descriptions are never function domains.
Question
A denotational definition of a programming language contains a definition of the valuation functions.
Question
In the sample small language presented in Chapter 12,the sets Integer is an example of a syntactic domain.
Question
In the sample small language defined in Chapter 12,the empty environment defines all identifiers as 0.
Question
When an ambiguous grammar is used to define semantics,and the nonterminal symbols are replaced by single letters,____ syntax is in use.

A) dynamic
B) abstract
C) referential
D) variable
Question
The range of a semantic function is a ____.

A) syntactic domain
B) semantic domain
C) syntactic range
D) semantic range
Question
The theory of axiomatic semantics was developed as a tool for proving the correctness of programs and program fragments.
Question
An axiomatic specification of the semantics of a language construct implies that if the precondition is true,then the postcondition is true.
Question
____ semantics uses mathematical logic to define a language.

A) Axiomatic
B) Denotational
C) Operational
D) Logical
Question
A(n)____ specification allows us to construct a language interpreter directly from a formal specification.

A) abstract
B) executable
C) reduction
D) inference
Question
A(n)____ can be viewed as consisting of a program,a control,and a store or memory.

A) abstract machine
B) reduction machine
C) definitional compiler
D) semantic machine
Question
The value of a semantic function is specified by giving a semantic ____ corresponding to each grammar rule.

A) range
B) definition
C) value
D) equation
Question
____ are inference rules with no premise.

A) Axioms
B) Postulates
C) Theorems
D) Reduction rules
Question
The domain of a semantic function is a ____.

A) syntactic domain
B) semantic range
C) syntactic range
D) semantic domain
Question
The ____ rule expresses that reductions can be performed stepwise.

A) transitivity
B) sequential
C) stepwise
D) parallel
Question
____ semantics define a language by describing its actions in terms of the operations of an actual or hypothetical machine.

A) Denotational
B) Axiomatic
C) Theoretical
D) Operational
Question
To show that a while-statement is correct,we do not need to derive completely its weakest precondition,but only an approximation of it.
Question
The weakest precondition of a series of statements is the composition of the weakest preconditions of its parts.
Question
An identifier I is free if it is bound only by the existential quantifier.
Question
A translator is ____ to ensure that it produces behavior described in the language definition.

A) verified
B) validated
C) proven
D) vetted
Question
The ____ is an abstract machine whose control operates directly on a program to reduce it to its semantic value.

A) definitional compiler
B) abstract evaluator
C) reduction machine
D) elimination semantics
Question
____ semantics use mathematical functions on program components to specify semantics.

A) Operational
B) Denotational
C) Axiomatic
D) Mathematical
Question
____ interpreters can be used to specify the operational semantics for a language definition.

A) Operational
B) Definitional
C) Theoretical
D) Abstract
Question
In ____ semantics,a function describes semantics by associating semantic values to syntactically correct constructs.

A) axiomatic
B) denotational
C) operational
D) abstract
Question
The Law of ____ states that if a postcondition Q implies R then the weakest precondition of Q implies the weakest precondition of R.

A) the Excluded Miracle
B) Conjunction
C) Monotonicity
D) Disjunction
Question
The Distributivity of ____ concerns the behavior of the weakest precondition and the logical operator "and".

A) Conjunction
B) Monotonicity
C) Disjunction
D) Excluded Miracle
Question
The evaluation of expressions in the presence of an environment must include a(n)____ as a parameter.

A) reduction rule
B) arithmetic operator
C) environment
D) domain
Question
In denotational semantics,a semantic function is specified for each ____.

A) semantic domain
B) syntactic domain
C) environment
D) lifted domain
Question
Assertions about the situation just before execution are called ____.

A) preconditions
B) postconditions
C) executable assertions
D) requirements
Question
A function is a(n)____ if it takes a predicate as an argument and returns a predicate result.

A) axiomatic specification
B) predicate axiom
C) predicate transformer
D) expression transformer
Question
A semantic domain with the special value called bottom added to it is called a ____.

A) minimal environment
B) lifted environment
C) minimal domain
D) lifted domain
Question
Assertions about the situation just after execution are called ____.

A) preconditions
B) executable results
C) postconditions
D) verifications
Question
The Distributivity of ____ concerns the behavior of the weakest precondition and the logical operator "or".

A) the Excluded Miracle
B) Conjunction
C) Monotonicity
D) Disjunction
Question
The Law of ____ states that nothing a programming construct can do will make false into true.

A) Monotonicity
B) Conjunction
C) Disjunction
D) the Excluded Miracle
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 12: Formal Semantics
1
Semantic domains having additional mathematical structure are called algebras.
True
2
Semantic domains are the sets in which semantic functions take their values.
True
3
It is possible to implement operational semantic rules directly as a program to get an executable specification.
True
4
A least-fixed-point solution is a solution that has been made as flexible as possible.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
Programming is a goal-oriented activity.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
Formal specifications written in the operational or denotational style can be translated relatively easily into languages suitable for prototyping,such as Prolog.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
Language semantics should be dependent,such that each rule is derived from the other rules.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
Operational semantics cannot be used to define program behavior in terms of an abstract machine.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
There is a single,universal standard mathematical system for providing precise semantic descriptions of languages.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
In the sample small language presented in Chapter 12,the sets Program and Expression is an example of a syntactic domain.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
A formal specification method must be complete and consistent.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
Predicate transformers create new assertions out of old ones.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
An inference rule in logic indicates that when the premise is true,the conclusion is also true.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
Values of semantic functions in denotational descriptions will often be functions themselves.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
Axiomatic semantics define the semantics of a program by describing the effect its execution has on assertions about the data manipulated by the program.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
Reduction machines use reduction rules to specify how the control reduces the constructs of the language to a value.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
Semantic domains in denotational descriptions are never function domains.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
A denotational definition of a programming language contains a definition of the valuation functions.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
In the sample small language presented in Chapter 12,the sets Integer is an example of a syntactic domain.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
In the sample small language defined in Chapter 12,the empty environment defines all identifiers as 0.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
When an ambiguous grammar is used to define semantics,and the nonterminal symbols are replaced by single letters,____ syntax is in use.

A) dynamic
B) abstract
C) referential
D) variable
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
The range of a semantic function is a ____.

A) syntactic domain
B) semantic domain
C) syntactic range
D) semantic range
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
The theory of axiomatic semantics was developed as a tool for proving the correctness of programs and program fragments.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
An axiomatic specification of the semantics of a language construct implies that if the precondition is true,then the postcondition is true.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
____ semantics uses mathematical logic to define a language.

A) Axiomatic
B) Denotational
C) Operational
D) Logical
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
A(n)____ specification allows us to construct a language interpreter directly from a formal specification.

A) abstract
B) executable
C) reduction
D) inference
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
A(n)____ can be viewed as consisting of a program,a control,and a store or memory.

A) abstract machine
B) reduction machine
C) definitional compiler
D) semantic machine
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
The value of a semantic function is specified by giving a semantic ____ corresponding to each grammar rule.

A) range
B) definition
C) value
D) equation
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
____ are inference rules with no premise.

A) Axioms
B) Postulates
C) Theorems
D) Reduction rules
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
The domain of a semantic function is a ____.

A) syntactic domain
B) semantic range
C) syntactic range
D) semantic domain
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
The ____ rule expresses that reductions can be performed stepwise.

A) transitivity
B) sequential
C) stepwise
D) parallel
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
____ semantics define a language by describing its actions in terms of the operations of an actual or hypothetical machine.

A) Denotational
B) Axiomatic
C) Theoretical
D) Operational
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
To show that a while-statement is correct,we do not need to derive completely its weakest precondition,but only an approximation of it.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
The weakest precondition of a series of statements is the composition of the weakest preconditions of its parts.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
An identifier I is free if it is bound only by the existential quantifier.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
A translator is ____ to ensure that it produces behavior described in the language definition.

A) verified
B) validated
C) proven
D) vetted
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
The ____ is an abstract machine whose control operates directly on a program to reduce it to its semantic value.

A) definitional compiler
B) abstract evaluator
C) reduction machine
D) elimination semantics
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
____ semantics use mathematical functions on program components to specify semantics.

A) Operational
B) Denotational
C) Axiomatic
D) Mathematical
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
____ interpreters can be used to specify the operational semantics for a language definition.

A) Operational
B) Definitional
C) Theoretical
D) Abstract
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
In ____ semantics,a function describes semantics by associating semantic values to syntactically correct constructs.

A) axiomatic
B) denotational
C) operational
D) abstract
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
The Law of ____ states that if a postcondition Q implies R then the weakest precondition of Q implies the weakest precondition of R.

A) the Excluded Miracle
B) Conjunction
C) Monotonicity
D) Disjunction
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
The Distributivity of ____ concerns the behavior of the weakest precondition and the logical operator "and".

A) Conjunction
B) Monotonicity
C) Disjunction
D) Excluded Miracle
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
The evaluation of expressions in the presence of an environment must include a(n)____ as a parameter.

A) reduction rule
B) arithmetic operator
C) environment
D) domain
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
In denotational semantics,a semantic function is specified for each ____.

A) semantic domain
B) syntactic domain
C) environment
D) lifted domain
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
Assertions about the situation just before execution are called ____.

A) preconditions
B) postconditions
C) executable assertions
D) requirements
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
A function is a(n)____ if it takes a predicate as an argument and returns a predicate result.

A) axiomatic specification
B) predicate axiom
C) predicate transformer
D) expression transformer
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
A semantic domain with the special value called bottom added to it is called a ____.

A) minimal environment
B) lifted environment
C) minimal domain
D) lifted domain
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
Assertions about the situation just after execution are called ____.

A) preconditions
B) executable results
C) postconditions
D) verifications
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
The Distributivity of ____ concerns the behavior of the weakest precondition and the logical operator "or".

A) the Excluded Miracle
B) Conjunction
C) Monotonicity
D) Disjunction
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
The Law of ____ states that nothing a programming construct can do will make false into true.

A) Monotonicity
B) Conjunction
C) Disjunction
D) the Excluded Miracle
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 50 flashcards in this deck.