This paper establishes a finite axiomatization of possibly non-halting computer programs and tests, with the if-then-else operation. The model is a two-sorted algebra, with one sort being the programs and the other being the tests. The main operation on programs is composition, and 1 and 0 represent the programs skip and loop (i.e. never halts) respectively. Programs are modeled as partial functions on some state space [Formula: see text], with tests modeled as partial predicates on [Formula: see text]. The operations on the tests are the usual logical connectives ∧, ∨, [Formula: see text], [Formula: see text] and [Formula: see text]. In addition, there is the hybrid operation of if-then-else, and the test-valued operation [Formula: see text] on programs which is true when a program halts, and undefined otherwise. The halting operation [Formula: see text] implies that operations of domain [Formula: see text] and domain join ∨ may also be expressed. When tests are assumed to be possibly non-halting, the evaluation strategy of the logical connectives affects the result. Here we model parallel evaluation, as opposed to the common sequential (or short-circuit) evaluation strategy. For example, we view [Formula: see text] as false if either [Formula: see text] or [Formula: see text] is false, even if the other does not halt.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.