Cohavit Taboch
Department of Mathematics & Computer Science
Ben-Gurion University of the Negev

Joint work with Michael Codish

Goal : Find a suitable semantics for "observing" termination.

Computed answers are in the S-semantics.

For each program P and goal G : solving G with P is the same as solving G with the of P.

This semantics was shown to capture call patterns and computed answers. (Gabbrielli and Giacobazzi 1994).




and are observables in the binary unfolding semantics.

  1. The computed answers for G with P are :

  2. The calls that arise in the computations of G with P are :


is non-terminating for P is non-terminating for .

iterate ,  fail.
iterate retract(flag),  iterate.
iterate.

cond_assert(F) in_database(F),  !.
cond_assert(F) assert(F),  cond_assert(flag).

in_database(G)
       functor(G,N,A),  functor(B,N,A), 
       call(B),  subsumes(B,G),  ! .

       user_clause(Head, Body),
       solve(Head, Body).

solve(Head,[ ]) cond_assert(fact(Head)).
solve(Head,
[B|_])cond_assert( bin(Head,B) ).
solve(Head,
[B|_])bin(B,C),   cond_assert(bin(Head,C)).
solve(Head,
[B|Bs]) fact(B),   solve(Head, Bs).

An infinite derivation with the binary clauses contains an infinite sub-chain of calls which can be described by one abstract binary clause and one abstract call description.

A symbolic norm is a function     such that


where

Can be obtained in two ways :

Both methods can be implemented using the entailment and projection mechanisms of the constraints solver.

  1. Selecting a Symbolic Norm for the abstraction.

  2. Absrtacting the program clauses.

  3. Computing the binary unfoldings of the abstract program.

  4. Given an initial abstract query, obtain an approximation of the calls.

  5. Test each binary clause and corresponding calls for termination condition.

Examples

(Sagiv and Lindenstrauss)