3 ms·
side question, which CS class(es) teach about invariants?
by fnord77 5mo ago
side question, which CS class(es) teach about invariants?
- pramodbiligiri 5mo agoUsually goes under Formal Methods: https://github.com/luigiapetre/Formal-Methods-Courses https://github.com/luigiapetre/Formal-Methods-Courses There’s a book called Logic for Programmers: https://leanpub.com/logic#table-of-contents https://leanpub.com/logic#table-of-contents
- anthk 5mo agoA bit expensive. Just get Swi Prolog. https://www.swi-prolog.org/ https://www.swi-prolog.org/ The Simply Logical book as a start: https://book.simply-logical.space/src/simply-logical.html https://book.simply-logical.space/src/simply-logical.html you can get a PDF just fine. Also, for hardcore mode, get paper and pen, I'm not kidding: (again, just use SWI Prolog): https://www.ida.liu.se/~ulfni53/lpp/bok/ https://www.ida.liu.se/~ulfni53/lpp/bok/ Another approach. Scheme and Logic: S9 Scheme, get the bleeding edge version and compile it. Enough to do the book: https://www.t3x.org/s9fes/ https://www.t3x.org/s9fes/ Sketchy Lisp, intro to Scheme: https://archive.org/details/sketchy-lisp https://archive.org/details/sketchy-lisp Logic Progamming in Scheme: https://www.t3x.org/amk/index.html https://www.t3x.org/amk/index.html
- ventana 5mo agoThe well-known algorithms book Cormen et al. describes a lot of algorithms using loop invariants. I must say I never really liked this approach but I admit it makes things easier to reason about.