From ce572ca8818ff32738ab980b9f01f1df15796297 Mon Sep 17 00:00:00 2001 From: kostis Date: Sat, 10 Mar 2007 10:52:40 +0000 Subject: [PATCH] Version with left-recursive points_to/2 predicate. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1820 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- docs/index/Benchmarks/pta.P | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/index/Benchmarks/pta.P b/docs/index/Benchmarks/pta.P index a453c79f4..67a513790 100644 --- a/docs/index/Benchmarks/pta.P +++ b/docs/index/Benchmarks/pta.P @@ -1,4 +1,15 @@ -%:- set_prolog_flag(index,single). +/* +** This is a benchmark that implements Andersen's Points To Analysis +** using tabling. +** +** To bypass a problem in XXX the code has been slightly modified. +** The original version used a right-recursive tabled predicate +** for points_to/2; this version uses a left-recursive predicate. +** Note that this gives significantly less answers, but it is a +** tabled benchmark nonetheless. +**/ + +%% :- set_prolog_flag(index,single). %% :- yap_flag(tabling_mode, local). time :- @@ -35,9 +46,12 @@ get_var(X) :- var(true,X). % pointer variables :- table pointed_to_by/2. :- table aux2/2. +%% ORIGINAL VERSION +%% points_to --> fa. +%% points_to --> aux1, points_to. +%% points_to --> fa. -points_to(X,Y) :- points_to(Z,Y), aux1(X,Z). -% points_to --> aux1, points_to. +points_to --> points_to, aux1. aux1 --> f. aux1 --> aux11.