Mercurial > hg > Applications > Lite
view cppl.c @ 20:07d6c4c5654b iso-prolog
SICStus v4 (ISO prolog syntax)
author | kono |
---|---|
date | Thu, 30 Aug 2007 14:16:36 +0900 |
parents | 1c57a78f1d98 |
children |
line wrap: on
line source
/* Copyright (C) 1988, Shinji Kono Everyone is permitted to copy and distribute verbatim copies of this license, but changing it is not allowed. You can also use this wording to make the terms for other programs. send your comments to kono@csl.sony.co.jp */ /* support routine for compatibilities */ #if defined(SBPROLOG) || defined(XSB) lite_start :- ['op.pl'], assert((define(_,_):-fail)), assert((verbose:-fail)), assert((variable(_):-fail)). start :- lite_start, load('../Tokio/tokio'), ['../Tokio/ts.pl'], com('../Tokio/tm.pl',user), r_header. r_cputime(X) :- cputime(X0),X is X0/1000. ttyflush. #endif #if defined(SBPROLOG) '\+'(X) :- call(X),!,fail. '\+'(_). #endif #if ! defined(XSB) && ! defined(SICSTUSV4) A '\=' A :-!,fail. _ '\=' _. #endif #if defined (XSB) ':-'(X) :- call(X),!;true. #endif #if defined(CPROLOG) :-abolish(r_cputime,1). r_cputime(X) :- X is cputime. #endif #if defined(SICSTUS) r_cputime(X) :- statistics(runtime,[X1,_]),X is X1/1000. #if defined(SICSTUSV3) A '\=' A :-!,fail. _ '\=' _. #endif #endif #if defined(SICSTUSV4) r_cputime(X) :- statistics(runtime,[X1,_]),X is X1/1000. #endif #if defined(CPROLOG) #if CPROLOG15 term_expansion(X,X). :-unknown(X,trace). #endif :- (ttyflush;assert((ttyflush))). #endif #if !defined(SICSTUSV4) append([],X,X). append([H|X],Y,[H|Z]) :- append(X,Y,Z). member(H,[H|_]). member(H,[_|T]):-member(H,T). #endif #if !defined(SICSTUSV4) r_abolish(A,B) :- abolish(A,B). #else r_abolish(A,B) :- abolish(A/B). put(C) :- char_code(Char,C),put_char(Char). ttyflush :- flush_output. #endif /* end */