"Monad Based Programming" (MBProg) Exam Protocol
We start immediately, no chit-chat.
- Define regular lambda calculus!
- \(t, s ::= ts \mid \lambda x . t \mid x\)
- I wasn't certain if there was anything else after this, because I was thinking about the PCF definition
- What semantics did we discuss?
- Eager (Call by Value) and Lazy (Call by Name)
- What other distinction did we have?
- Big step and small step
- Can you give us the definition of your favorite semantics?
- I define call by value eager semantics
- What is contextual equivalence \(s =_\text{ctx} t\)?
- I define context as a term with one and only one hole.
- \(\forall C \ldotp (C[s] \Downarrow v) \land (C[t] \Downarrow v)\)
- Note: The \(\land\) was wrong, it should have been \(\iff\)
- What is a Partial Order?
- \((A, \sqsubseteq)\) where \(\sqsubseteq\) is
- Transitive
- Reflexive
- Anti-symmetric
- \((A, \sqsubseteq)\) where \(\sqsubseteq\) is
- Was does the Kleene Fixpoint Theorem say?
- I start giving the definition, but I couldn't put the exact meaning into words.
- Can you define a Product
- I draw the commutative diagram for a product, and emphasise that \(\langle f, g \rangle\) is a unique morphism.
- There is some discussion on quantification (\(\forall A, B, C\)).
- Is there only one morphism that maps \(A\) and \(B\) to a product?
- The question confuses me, but the point was that given two
objects, you can construct either \(A \times B\) or \(B \times A\)
(ie.
swap
'ed).
- The question confuses me, but the point was that given two
objects, you can construct either \(A \times B\) or \(B \times A\)
(ie.
- What is an isomorphism.
- I draw down the diagram for an isomorphism
- What here is isomorphic to one another?
- I stutter once again. I believe it to be \(f \circ g\), but it was \(A\) and \(B\). I add that it makes sense, as using \(f\) and \(g\) we can map any object back and forth.
- We had two definitions of Monads. Can you give your favorite definition?
- Kleisli Triple and the Monad defined in terms of a functor and the natural transformations \(\mu\) and \(\eta\).
- I know that I cannot remember the second monad law for Kleisli, so I pick the latter definition, and draw down the diagrams.
- What is a strong monad?
- \(A \times FB \to F (A \times B)\)
- I try to write down the Pentagram-Diagram, but cannot remember the vertices or the edges. But luckily we are out of time, so we don't discuss this any more.
Final grade: 1.3 (very surprised), where both the exam and the exercise were graded as 1.3.