So you want to build a mainstream formally verifiable language (opens external site)
View full thread · View on Hacker News
To get push notifications on iPhone or iPad, add Hack and Chat to your Home Screen: tap Share → Add to Home Screen, then open the installed app and enable push in Settings.
View full thread · View on Hacker News
The state space of a program is given by the cartesian product of all the types (i.e. sets) of its variables (global+those in current frame/scope). If you know your Relational Algebra (from RDBMS theory) you can see that this program state space is a relational table of n-ary tuples. You then write out predicates (i.e. precondition) which select a subset of the above tuples based on relationships between the variables. Your program statement acts on this subset to produce another subset of tuples which is asserted by another predicate (i.e. postcondition). Your program statement between the pre and post simply maps between the two subsets (either pre to post or post to pre). So mathematically your program is just a sequence of predicates (pre and post) asserting subsets from the global state space which is progressively transformed to give you your final result.
To understand how logical deduction is used to verify programs in a "correct-by-construction" approach (the above state space predicate transformer), see the seminal papers; Assigning Meanings to Programs by Floyd, An Axiomatic Basis for Computer Programming by Hoare and Guarded commands, Nondeterminacy and Formal derivation of Programs by Dijkstra.
For understanding how abstract algebra maps to programming see From Mathematics to Generic Programming by Stepanov and Rose. Basically your program implements a "Model" of an algebraic "Theory" - https://www.fm2gp.com/