Shared Flashcard Set

Details

CMSC 403: Programming Languages (Quiz 3)
N/A
12
Computer Science
Undergraduate 4
09/15/2011

Additional Computer Science Flashcards

 


 

Cards

Term
What is a powerset type? its cardinality? operations?
Definition
the set of all subsets
Term
Is a string a primitive or composite type?
Definition
depends on the language (no consensus)
Term
What do recursive type values look like in ML?
Definition
(vague question) see notes
Term
How does one define recursive types in ML?
Definition
with constructors, datatype intList = null | cons of int * intList
Term
Does Java have recursive types? If so, how are they implemented?
Definition
yes, linked lists
Term
What are the values of a list type?
Definition
the values in the list are of the same type as that of the head of the list
Term
How does one define a list type?
Definition
recursively, L = Unit + (S × L)
Term
What is a recursive type?
Definition
one whose values are composed from values of
the same type, i.e. a recursive type is defined in terms of itself.
Term
What is a Power sets cardinality?
Definition
#(℘S) = 2#S
Term
What are the powerset operations
Definition
membership/inclusion test, union,
intersection
Term
What is a recursive types cardinality?
Definition
infinite
Term
What are the recursive type operations?
Definition
depends on implementation
Supporting users have an ad free experience!