logoalt Hacker News

fnord77today at 1:31 PM2 repliesview on HN

side question, which CS class(es) teach about invariants?


Replies

pramodbiligiritoday at 3:10 PM

Usually goes under Formal Methods: https://github.com/luigiapetre/Formal-Methods-Courses

There’s a book called Logic for Programmers: https://leanpub.com/logic#table-of-contents

ventanatoday at 4:26 PM

The 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.