2
|
1 /*
|
|
2 Copyright (C) 1988, Shinji Kono
|
|
3 Everyone is permitted to copy and distribute verbatim copies
|
|
4 of this license, but changing it is not allowed. You can also
|
|
5 use this wording to make the terms for other programs.
|
|
6
|
|
7 send your comments to kono@csl.sony.co.jp
|
|
8 */
|
|
9 /*
|
|
10 support routine for compatibilities
|
|
11 */
|
|
12
|
|
13 #if defined(SBPROLOG) || defined(XSB)
|
|
14 lite_start :- ['op.pl'],
|
|
15 assert((define(_,_):-fail)),
|
|
16 assert((verbose:-fail)),
|
|
17 assert((variable(_):-fail)).
|
|
18
|
|
19 start :- lite_start,
|
|
20 load('../Tokio/tokio'),
|
|
21 ['../Tokio/ts.pl'],
|
|
22 com('../Tokio/tm.pl',user),
|
|
23 r_header.
|
|
24
|
|
25
|
|
26 r_cputime(X) :- cputime(X0),X is X0/1000.
|
|
27 ttyflush.
|
|
28 #endif
|
|
29
|
|
30 #if defined(SBPROLOG)
|
|
31
|
|
32 '\+'(X) :- call(X),!,fail.
|
|
33 '\+'(_).
|
|
34
|
|
35 #endif
|
|
36
|
20
|
37 #if ! defined(XSB) && ! defined(SICSTUSV4)
|
2
|
38 A '\=' A :-!,fail.
|
|
39 _ '\=' _.
|
|
40 #endif
|
|
41
|
|
42 #if defined (XSB)
|
|
43 ':-'(X) :- call(X),!;true.
|
|
44
|
|
45 #endif
|
|
46
|
|
47 #if defined(CPROLOG)
|
|
48 :-abolish(r_cputime,1).
|
|
49 r_cputime(X) :- X is cputime.
|
|
50 #endif
|
|
51
|
|
52 #if defined(SICSTUS)
|
|
53 r_cputime(X) :- statistics(runtime,[X1,_]),X is X1/1000.
|
|
54 #if defined(SICSTUSV3)
|
|
55 A '\=' A :-!,fail.
|
|
56 _ '\=' _.
|
|
57 #endif
|
|
58
|
|
59 #endif
|
20
|
60 #if defined(SICSTUSV4)
|
|
61 r_cputime(X) :- statistics(runtime,[X1,_]),X is X1/1000.
|
|
62 #endif
|
2
|
63
|
|
64 #if defined(CPROLOG)
|
|
65
|
|
66
|
|
67 #if CPROLOG15
|
|
68 term_expansion(X,X).
|
|
69 :-unknown(X,trace).
|
|
70 #endif
|
|
71
|
|
72 :- (ttyflush;assert((ttyflush))).
|
|
73 #endif
|
|
74
|
20
|
75 #if !defined(SICSTUSV4)
|
2
|
76 append([],X,X).
|
|
77 append([H|X],Y,[H|Z]) :- append(X,Y,Z).
|
|
78
|
20
|
79 member(H,[H|_]).
|
|
80 member(H,[_|T]):-member(H,T).
|
|
81
|
|
82 #endif
|
|
83
|
|
84 #if !defined(SICSTUSV4)
|
|
85 r_abolish(A,B) :- abolish(A,B).
|
|
86 #else
|
|
87 r_abolish(A,B) :- abolish(A/B).
|
|
88
|
|
89 put(C) :- char_code(Char,C),put_char(Char).
|
|
90
|
|
91 ttyflush :- flush_output.
|
|
92
|
|
93 #endif
|
2
|
94
|
|
95 /* end */
|