steadfastness

Steadfastness: Definition and its relation to logical purity and termination

北城余情 提交于 2019-12-04 00:07:28
问题 So far, I have always taken steadfastness in Prolog programs to mean: If, for a query Q , there is a subterm S , such that there is a term T that makes ?- S=T, Q. succeed although ?- Q, S=T. fails , then one of the predicates invoked by Q is not steadfast. Intuitively, I thus took steadfastness to mean that we cannot use instantiations to "trick" a predicate into giving solutions that are otherwise not only never given, but rejected . Note the difference for nonterminating programs! In

Steadfastness: Definition and its relation to logical purity and termination

只谈情不闲聊 提交于 2019-12-01 02:58:35
So far, I have always taken steadfastness in Prolog programs to mean: If, for a query Q , there is a subterm S , such that there is a term T that makes ?- S=T, Q. succeed although ?- Q, S=T. fails , then one of the predicates invoked by Q is not steadfast. Intuitively, I thus took steadfastness to mean that we cannot use instantiations to "trick" a predicate into giving solutions that are otherwise not only never given, but rejected . Note the difference for nonterminating programs! In particular, at least to me, logical-purity always implied steadfastness. Example . To better understand the