A matrix model for the flow of control in prolog programs with applications to profiling
Armando B. Matos · Software Practice and Experience · 1994
Abstract In Prolog the flow of control is relatively complex; four counts (which we call currents)—call, fail, succeed and redo—and two intrinsic properties—the failure and the ‘alternative’ probabilities—can be associated with every literal in a clause body. In this work we describe a new matrix model where those currents and properties are related at the literal, clause and predicate definition levels. This model is useful for predicate classification, execution profiling and program debugging. The application to profilers is discussed in detail.