Prolog Text eclipse

/**
* ECLiPSe Constraint Logic Programming System code for the test harness.
*
* Copyright 2013, XLOG Technologies GmbH, Switzerland
* Jekejeke Minlog 0.6.6 (minimal logic extension module)
*/

% ?- ['<base>/eclipse.p'].

uptime(X) :-
statistics(times, [_,_,T]),
X is round(T*1000).

gctime(X) :-
statistics(gc_time, T),
X is round(T*1000).

% So that double quoted strings denote character lists.
:- lib(iso).
:- lib(ic).

:- op(700, xfx, ins).
:- op(700, xfx, in).

disj_to_list(A \/ B) --> !,
disj_to_list(A),
disj_to_list(B).
disj_to_list(A) --> [A].

Vs ins S :- phrase(disj_to_list(S), L), Vs :: L.
label(Vs) :- labeling(Vs).
all_different(Vs) :- alldifferent(Vs).

:- ['<base>/common.p'].

:- ['<base>/grocery.p'].
:- ['<base>/pythago.p'].
:- ['<base>/queens.p'].
:- ['<base>/money.p'].
:- ['<base>/crypt.p'].
:- ['<base>/zebra.p'].
:- ['<base>/pigeon.p'].

:- ['<base>/grocery3.p'].
:- ['<base>/pythago3.p'].
:- ['<base>/queens3.p'].
:- ['<base>/money3.p'].
:- ['<base>/crypt3.p'].
:- ['<base>/zebra3.p'].
:- ['<base>/pigeon3.p'].

Kommentare