* Outline ** Introduction - Where are you in school right now? - CSCI 1951X last semester - CSCI 1710 now - Doing research on formal methods with Shriram Krishnamurti, Rob Lewis, and Nikos Vasilakis - What are formal methods and why are the classes you took considered "formal methods classes". ** Preliminaries *** What are specifications? ** Lightweight formal methods: SAT/SMT solvers like Alloy https://people.csail.mit.edu/dnj/publications/alloy-journal.pdf *** What makes these methods "lightweight"? *** What are they, in principle? *** Forge versus Alloy *** How do they work? *** Application: Memory Management *** Margrave http://www.margrave-tool.org/ ** Heavyweight formal methods: specification and theorem proving *** Specification *** Programming Language Semantics **** Big-Step **** Small-Step **** Denotational *** Theorem Proving **** Lean **** Coq *** Refinement *** Application: Proving the Correctness of a Scheme Program "what I did for the final project was somewhat natural, so we'll dive into that and then explain how it's similar to refinement" **** Parsing Lisp **** Modeling Scheme **** A Type-Theoretic Representation for Programs **** A Type-Theoretic Representation for Programs **** A (Sketch of a) Realized Interpreter **** A Proof of Correctness for Factorial ** What I hope to learn, eventually While I feel I'm leaving with a good understanding of the underlying concepts.. Ultimately, I'd like to bring what I learn back to work. There's a big push for [[https://inl.gov/digital-engineering/][digital engineering]] where I sit. And I think there are a few specific tools that would be especially useful in my line of work. *** TLA+ *** EasyCrypt *** VerifPal Christine described it as the "one with an anime mascot" once. ** Conclusion ** Appendix: Tooling on Gentoo *** Forge I didn't bother packaging it. I just use =raco= to update. I use =alloy-mode=, which is pretty broken, but sufficient for my needs. #+BEGIN_SRC elisp (use-package alloy-mode :straight (alloy-mode :type git :host github :repo "torus/alloy-mode" :fork (:host github :repo "dwwmmn/alloy-mode")) ;; For some reason, `alloy-mode' indents with tabs of width 3. Let's change ;; that to something more sensical. :init (setq alloy-basic-offset 4) :hook (alloy-mode-hook . (lambda () (setq indent-tabs-mode nil))) ;; Use alloy-mode for Forge files as well. :config (add-to-list 'auto-mode-alist '("\\.frg\\'" . alloy-mode))) #+END_SRC *** Lean Lean 3 is packaged in Gentoo and =lean-mode= works out of the box, but my experience has been that Lean 4 is way better. **** =lean4-mode= This probably also works out of the box but I hate =lsp-mode=, so I hacked together some code to get a functional goal buffer. # TODO I hear that [[https://proofgeneral.github.io/][Proof General]] might be getting Lean support soon, and I'm 50/50 on whether or not I'd switch. It's a very nice interface to Coq, but I think my fingers might get an extra year or two of life if I don't have to =C-c C-.= every time I want to update the goal buffer **** ebuild