Premium
A matrix model for the flow of control in prolog programs with applications to profiling
Author(s) -
Matos Armando B.
Publication year - 1994
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.4380240804
Subject(s) - prolog , predicate (mathematical logic) , literal (mathematical logic) , profiling (computer programming) , computer science , debugging , control flow , programming language , copula (linguistics) , algorithm , mathematics , econometrics
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.