• R/O
  • SSH

Joypy: Commit

This repo is not current. Development has moved from Hg to Git. For the latest code use the "Source Code" tab above to go to the "Thun" git repo or navigate to:
https://osdn.net/projects/joypy/scm/git/Thun


Commit MetaInfo

Revisione572abf9735ffb6759158ada559c8bc059d53ab9 (tree)
Time2019-05-04 22:57:14
AuthorSimon Forman <sforman@hush...>
CommiterSimon Forman

Log Message

Change name from alpha to tmi.

Change Summary

Incremental Difference

diff -r 81f5dd52c508 -r e572abf9735f thun/metalogical.pl
--- a/thun/metalogical.pl Fri May 03 15:21:29 2019 -0700
+++ b/thun/metalogical.pl Sat May 04 06:57:14 2019 -0700
@@ -1,19 +1,19 @@
11 % A Tracing Meta-Interpreter for Thun
22
3-alpha(true).
4-alpha((A, B)) :- alpha(A), alpha(B).
5-alpha(number(A)) :- !, number(A).
6-alpha(var(A)) :- !, var(A).
7-alpha(!) :- !.
3+tmi(true).
4+tmi((A, B)) :- tmi(A), tmi(B).
5+tmi(number(A)) :- !, number(A).
6+tmi(var(A)) :- !, var(A).
7+tmi(!) :- !.
88
99 % Meta-logical print trace.
1010 % (Could also be captured in a list or something instead.)
11-alpha(thun(E, Si, _)) :- portray_clause(Si-E), fail.
11+tmi(thun(E, Si, _)) :- portray_clause(Si-E), fail.
1212
13-alpha(Goal) :-
13+tmi(Goal) :-
1414 checky(Goal),
1515 clause(Goal, Body), % doesn't work for e.g. +
16- alpha(Body).
16+ tmi(Body).
1717
1818 checky(Goal) :-
1919 Goal \= true,
@@ -24,7 +24,7 @@
2424
2525 /*
2626
27-[debug] ?- alpha(thun([1, 2, swap], Si, So)).
27+[debug] ?- tmi(thun([1, 2, swap], Si, So)).
2828 _-[1, 2, swap].
2929 [1|_]-[2, swap].
3030 [2, 1|_]-[swap].
@@ -32,7 +32,7 @@
3232 So = [1, 2|Si] ;
3333 false.
3434
35-[debug] ?- alpha(thun([[1], 2, swons], Si, So)).
35+[debug] ?- tmi(thun([[1], 2, swons], Si, So)).
3636 _-[[1], 2, swons].
3737 [[1]|_]-[2, swons].
3838 [2, [1]|_]-[swons].
@@ -41,7 +41,7 @@
4141 [[2, 1]|_]-[].
4242 So = [[2, 1]|Si] .
4343
44-[debug] ?- alpha(thun([[1], 2, [swons], i], Si, So)).
44+[debug] ?- tmi(thun([[1], 2, [swons], i], Si, So)).
4545 _-[[1], 2, [swons], i].
4646 [[1]|_]-[2, [swons], i].
4747 [2, [1]|_]-[[swons], i].
Show on old repository browser