SEMIGROUPS WITH if–then–else AND HALTING PROGRAMS

MARCEL JACKSON, TIM STOKES
2009 International journal of algebra and computation  
Communicated by [editor] The "if-then-else" construction is one of the most elementary programming commands, and its abstract laws have been widely studied, starting with McCarthy. Possibly the most obvious extension of this is to include the operation of composition of programs, which gives a semigroup of functions (total, partial or possibly general binary relations) that can be recombined using if-then-else. We show that this particular extension admits no finite complete axiomatization and
more » ... axiomatization and instead focus on the case where composition of functions with predicates is also allowed (and we argue there is good reason to take this approach). In the case of total functions-modelling halting programs-we give a complete axiomatization for the theory in terms of a finite system of equations. We obtain a similar result when an operation of equality test and/or fixed point test is included.
doi:10.1142/s0218196709005354 fatcat:5a2tfbfnnjgi5mzigymubllstm