LMU ☀️ CMSI 585
PROGRAMMING LANGUAGE FOUNDATIONS
Quiz 1

Answer as many questions as you can.

  1. When processing arrays in a functional style to do something like getting the sum of the squares of the even numbers, which of the following is the correct pipeline?
    $\bigcirc$ map then filter then reduce
    $\bigcirc$ reduce then filter then map
    $\bigcirc$ reduce then filter then map
    $\bigcirc$ filter then map then reduce
    $\bigcirc$ map then reduce then filter
  2. What are the six dimensions of programming language study we’ll be undertaking in this class? Just list them, don’t explain them.
  3. “Foundations of Programming Languages (FPL)” is one of the 17 knowledge areas identifed by the ACM/IEEE-CS Computer Science Curriculum. Why is it in some sense more fundamental to computer science than the others, including the venerable "Algorithmic Foundations (AL)"?
    $\bigcirc$ Algorithms are very messy and include creative aspects that are hard to formalize.
    $\bigcirc$ Programming Language Foundations deals with how data and computation are formally expressed; without a means to do so, there would be no computer science.
    $\bigcirc$ The study of algorithms says nothing about their correctness but this is the overriding concern in the study of programming languages.
    $\bigcirc$ The study of algorithms is done without concern for efficient execution.
  4. Match the decade with the big computational developments in computer science. (Draw a line connecting each decade with the corresponding development.)
      1960s                    Web
      1970s                    Multicore and Big Data
      1980s                    Gen AI
      1990s                    Structured Programming
      2000s                    Dynamic Languages rise again
      2010s                    OOP
      2020s                    High-level languages become dominant
    
  5. What are the four main theories of computation and, in 10 words or less, their primary concern?
  6. Logic deals primarily with _______________. (You have to get this word exactly right)
  7. Which of the following are accurate translations of “Either all programming languages suck or C++ is god tier”?
    $\Box$ $\forall p. Lp \supset Sp \lor Gc$
    $\Box$ ($\forall p. Lp \supset Sp) \lor Gc$
    $\Box$ $\forall p. Lp \supset (Sp \lor Gc)$
    $\Box$ $\forall p. (Lp \supset Sp \lor Gc)$
    $\Box$ $\forall p. Gc \lor (Lp \supset Sp)$
    $\Box$ $\forall p. (Gc \lor Lp \supset Sp)$
    $\Box$ $Gc \lor \forall p. Lp \supset Sp$
  8. Which is the best and correct translation of “English is the most widely spoken language in the world but less than 40% of its speakers are native speakers”.
    $\bigcirc$ $\forall x. Ne \gt Nx \supset pr(Fpe \mid Spe) \lt 0.4$
    $\bigcirc$ ($\forall x. Ne \gt Nx) \land (\forall p. Spe \supset pr(Fpe) \lt 0.4)$
    $\bigcirc$ $\forall x. Ne \gt Nx \land (\forall p. Spe \supset pr(Fpe) \gt 0.6)$
    $\bigcirc$ $\forall x. Ne \gt Nx \land pr(Fpe \mid Spe) \leq 0.4$
  9. Write (in the logic notation used in this class) an encoding of “It is possible that something evil caused all evil things except itself”.
  10. Write (in the logic notation used in this class) an encoding of “Tanya runs quickly and explosively”.