is there a formal algebra method to analyze programs?
- by Gabriel
Is there a formal/academic connection between an imperative program and algebra, and if so where would I learn about it?
The example I'm thinking of is:
if(C1) { A1(); A2(); }
if(C2) { A1(); A2(); }
Represented as a sum of terms:
(C1)(A1) + (C1)(A2) + (C2)(A1) + (C2)(A2) = (C1+C2)(A1+A2)
The idea being that manipulation could lead to programatic refactoring - "factoring" being the common concept in this example.