Programs That Eat Programs

Programs That Eat Programs

Software GR Feb 24, 2015

25ee17e694c4590abcc3c1e3c628724b?s=128

Michael Bernstein

February 24, 2015
Tweet

Transcript

  1. Programs That Eat Programs Michael R. Bernstein February 24th, 2015

    Software GR, Grand Rapids, MI w michaelrbernste.in t @mrb_bk
  2. I’m Obsessed

  3. I’m Obsessed

  4. I’m Obsessed

  5. I have a podcast

  6. Static analysis is my day job

  7. I live in College Park, Maryland

  8. Programs That Eat Programs

  9. Programs That Eat Programs

  10. What Is A Program?

  11. None
  12. None
  13. None
  14. None
  15. Programs

  16. None
  17. None
  18. None
  19. Math

  20. Math is Cool

  21. “Introduction to Lattices and Order” Davey & Priestley

  22. “Ordered Sets and Complete Lattices: A Primer for Computer Science”

    Priestley
  23. A ______ is a _______ with a _______

  24. Partial Order

  25. Set Theory

  26. None
  27. Partially Ordered Sets

  28. None
  29. Lattices

  30. None
  31. Monotonicity

  32. Galois Connections

  33. None
  34. Very Cool Math

  35. “Principles of Program Analysis” Nielson, Nielson & Hankin

  36. What Is A Program?

  37. Programs That Eat Programs

  38. How Do You Eat One?

  39. Interpreters

  40. “Essentials of Programming Languages” Friedman & Wand

  41. “Abstracting Abstract Machines” Van Horn and Might

  42. From a concrete interpreter to an abstract interpreter

  43. type Σ = (Exp,Env,Store,Kont) type Env = Var :-> Addr

    data Storable = Clo (Lambda, Env) type Store = Addr :-> Storable data Kont = Mt | Ar (Exp,Env,Kont) | Fn (Lambda,Env,Kont) type Addr = Int
  44. step :: Σ -> Σ step (Ref x, ρ, σ,

    κ) = (Lam lam, ρ', σ, κ) where Clo (lam, ρ') = σ!(ρ!x) step (f :@ e, ρ, σ, κ) = (f, ρ, σ, Ar(e, ρ, κ)) step (Lam lam,ρ,σ,Ar(e, ρ', κ)) = (e, ρ', σ, Fn(lam, ρ, κ)) step (Lam lam,ρ,σ,Fn(x :=> e, ρ', κ)) = (e, ρ' // [x ==> a'], σ // [a' ==> Clo (lam, ρ)], κ) where a' = alloc(σ)
  45. None
  46. Static Analysis

  47. As long as we’ve been writing programs, we’ve been writing

    programs to analyze our programs
  48. As long as we’ve been writing programs, we’ve been writing

    programs that eat programs
  49. What Do We Hope To Learn?

  50. None
  51. State space exploration

  52. None
  53. None
  54. None
  55. Soundness

  56. “In Defense of Soundiness: A Manifesto” Livshits, Sridharan,et. al.

  57. Soundiness

  58. Higher-Order PLs

  59. Practicality

  60. Semantics Matter!

  61. Brakeman - Rails Security Scanner

  62. The Future

  63. SMT Solvers

  64. Why write code and then generate proofs when you could

    write proofs and generate code?
  65. Takeaways

  66. Works Cited https://gist.github.com/mrb/e015c37e2b851be2b6ae

  67. Thank You w michaelrbernste.in t @mrb_bk