Make sure to review all the notes for each class, paying
close attention to definitions of terms. A good understanding of BNF, types, expressions,
formulas and MIS will definitely come in handy. There are question(s) on the midterm from
almost every single class.
Some sample questions (with selected answers):
Is abbbaa a string of (b*a*) ? What about a+b*a* ?
No. Yes.
Is pop(pop(push(2,empty))) a valid expression from (int stack) ?
Yes.
Write out the type ('a x ('b seq -> 'a seq)) -> 'a set in english.
A function from a tuple of type 'a and a function
from type a sequence of type 'b to a sequence of type 'a, to a set
of type 'a.
[Hard] Give the BNF for the set of all strings on alphabet {a,b,c} that start with 2 a's,
always contain accb as a substring, and ends with b ?
(aa(a|b|c)*accb(a|b|c)*b | aacb(a|b|c)*b |
aa(a|b|c)*accb | aaccb) or
aa((a|b|c)*a)?ccb((a|b|c)*b)?
[Easy] Give the BNF for the set of all strings on alphabet {a,b,c} that start with 2 b's,
always contain accb as a substring, and ends with a ?
(bb(a|b|c)*accb(a|b|c)*a
What does MVC stand for, and where would it be encountered?
Model-View-Controller. It is the abstract architecture
of any (good) Graphical User Interface.