blob: bff17bfa77c884d8a1cdd63c85d2b81e96ca2eb1 [file] [log] [blame]
/* VAX C-Prolog Benchmark Package */
/* Copyright 1985 by Tektronix, Inc., and Portland State University */
:- dynamic n/1.
/*********************************************************/
/* Prolog fragment that demonstrates how much time is */
/* consumed in the loop housekeeping alone that is */
/* being used in some of the benchmarks. */
/*************************************************RLA*****/
loop(Max) :-
asserta(n(0)),
repeat,
retract(n(N)),
N1 is N+1,
asserta(n(N1)),
N1>=Max, !.