New JIt system, developed by George Oliveira and Anderson Faustino.

This commit is contained in:
Vítor Santos Costa
2014-07-12 23:30:14 -05:00
parent 95bbdc8a17
commit 0738fe0bd2
94 changed files with 110573 additions and 11 deletions

24
JIT/examples/tak.pl Normal file
View File

@@ -0,0 +1,24 @@
:- initialization(main).
tak(X,Y,Z,A) :- X =< Y,
Z = A.
tak(X,Y,Z,A) :- X > Y,
X1 is X - 1,
tak(X1,Y,Z,A1),
Y1 is Y - 1,
tak(Y1,Z,X,A2),
Z1 is Z - 1,
tak(Z1,X,Y,A3),
tak(A1,A2,A3,A).
main :-
unix( argv([H|_]) ),
number_atom(N,H),
R1 is N >> 3,
R2 is N / 2,
N2 is R2 - R1,
N3 is N - N2,
tak(N,N2,N3,_),
statistics,
statistics_jit.