The forum of the Computer Science students of the University of Pisa

Oral exam - 2018

Hi! I've created this thread in order to collect all the questions made by prof. Corradini during the oral exams.

Topic chosen by the student: Python (almost all, excluding GIL)

  • Given a bean, how can we tell what is its public API?
  • Question about complexity of some haskell function. What are the problems between arrays and generics in Java? What happens with generic at runtime/after compilation?
  • Is Python more OO or more functional, according to your opinion?

Questions on the syllabus:
  • Explain the concept (with written example) of covariance and contravariance in a language with universal polymorphism and explain in what cases their use is safe
  • Explain inversion of control and dependecy injection
  • What is lazy evalutaion in haskell and explain the spirit of IO Monads
Topic chosen by the student: lambda expressions in Java

  • Java:
    • What are streams in java?
    • Example of lambdas in a context different from streams
    • What are functional interfaces?
    • How the java compiler manges lambdas?
    • Differences between component, packages and classes
    • Talk about the lifecycle of a sw component
    • How can we interact with java beans?
    • How can Netbeans (or another builder tool) provides "live interaction" with a bean?
    • What kind of properties a bean can have?
  • Haskell:
    • What is "Functor" in haskell?
    • What relationships there are between functor and maybe type class?
    • Lazyness in haskell
  • Python:
    • What are python decorator?
    • How can we write functions with a variable number of arguments
  • Other:
    • Describe the different kind of parameter passing strategies
    • What is memoization?
Topic chosen by the student: JVM internals and JVM instruction set

For this exam, most of the questions were asked during the presentation of the topic chosen by the student.

  • Java:
    • Memory management
    • How are lambda expressions implemented?
    • Talk about streams
  • Python:
    • What is GIL?
    • Talk about decorators and higher order functions in general
    • Namespaces and scopes
    • What does the "@staticmethod" decorator do?
  • Other:
    • Differences between "reduce" in functional programming and "collect" in the Java Stream API
    • Give an example of list comprehension and write a function using a functional language that does the same thing, using combinators such as filter, foldr, map ecc