Skip to content
This repository was archived by the owner on Nov 25, 2022. It is now read-only.

Latest commit

 

History

History
50 lines (31 loc) · 1.01 KB

notes-languages.md

File metadata and controls

50 lines (31 loc) · 1.01 KB

Notes - Languages

Polymorphism

  • Parametric polymorphism
    • Generic in Java
    • Template in C++
  • Subtyping polymorphism
    • Inheritance and polymorphism in OOP

Inference Rules

Coq vs. Math

  • Functional Extensionality: |- (forall x . f x = g x) --> f = g
  • Excluded Middle: |- P or ~P

IMP with Function Definitions

Featherweight Java R-Invk Rule

4 ways a FJ program can reach a normal form

  • Becomes a value (no field accesses / method class remain)
  • Attempts to access a field not declared for the class
  • Attempts to invoke a method not declared for the class
  • Attempts to cast to something other than a superclass of an object's runtime class

Heap

  • Use a total map to model heap.
  • Use a partial map to model allocation.
  • LJ: Each object has its own partial map to field values.

Lambda Calculus

Conventions

Substitution