Skip to content

Commit

Permalink
Adding TR7 interpreter to the set (#66)
Browse files Browse the repository at this point in the history
* Clean importation of compiler.scm

The compiler doesn't need (scheme complex) for itself.
So requiring it would avoid implementations not offering
that library to run the test.

* Add TR7 interpreter
  • Loading branch information
jobol authored Jul 3, 2024
1 parent ea82bc3 commit ffcd6eb
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Makefile.schemes
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ scheme48:
tinyscheme:
./bench tinyscheme all

tr7:
./bench tr7 all

# vicare:
# ./bench vicare all

Expand Down Expand Up @@ -168,6 +171,8 @@ results.Stalin: stalin

results.TinyScheme: tinyscheme

results.TR7: tr7

results.Vicare: vicare

results.Ypsilon: ypsilon
Expand Down
1 change: 1 addition & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Schemes that should work:
- [[https://bitbucket.org/ktakashi/sagittarius-scheme/wiki/Home][Sagittarius]] (=sagittarius=)
- [[http://s48.org][Scheme48]] (=scheme48=)
- [[http://t3x.org/s9fes/][Scheme 9 from Empty Space]] (=s9fes=)
- [[https://gitlab.com/jobol/tr7][TR7, tiny R7RS interpreter] (=TR7=)
- [[http://marcomaggi.github.io/vicare.html][Vicare]] (=vicare=)
- [[http://www.littlewingpinball.net/mediawiki/index.php/Ypsilon][Ypsilon]] (=ypsilon=)
This should result in a file =./results.<scheme>=.
Expand Down
27 changes: 26 additions & 1 deletion bench
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ SYNTH_BENCHMARKS="equal bv2string"

ALL_BENCHMARKS="$GABRIEL_BENCHMARKS $NUM_BENCHMARKS $KVW_BENCHMARKS $IO_BENCHMARKS $OTHER_BENCHMARKS $GC_BENCHMARKS $SYNTH_BENCHMARKS"

ALL_SYSTEMS="bigloo bones chez chibi chicken5 chicken5csi cyclone femtolisp foment gambitc gauche gerbil guile guile3 ironscheme kawa larceny loko mit owllisp petite picrin racket rhizome rscheme s7 s9fes sagittarius scheme48 stklos vicare ypsilon" # chicken4 chicken4csi
ALL_SYSTEMS="bigloo bones chez chibi chicken5 chicken5csi cyclone femtolisp foment gambitc gauche gerbil guile guile3 ironscheme kawa larceny loko mit owllisp petite picrin racket rhizome rscheme s7 s9fes sagittarius scheme48 stklos tr7 vicare ypsilon" # chicken4 chicken4csi
################################################################

NB_RUNS=1
Expand Down Expand Up @@ -151,6 +151,7 @@ setup ()
STALIN=${STALIN:-"chicken-stalin"}
STKLOS=${STKLOS:-"stklos"}
TINYSCHEME=${TINYSCHEME:-"tinyscheme"}
TR7I=${TR7I:-"tr7i"}
VICARE=${VICARE:-"vicare"}
YPSILON=${YPSILON:-"ypsilon"}
}
Expand Down Expand Up @@ -204,6 +205,7 @@ Usage: bench [-r runs] <system> <benchmark>
stalin for Stalin
stklos for STklos
tinyscheme for TinyScheme
tr7 for TR7
vicare for Vicare
ypsilon for Ypsilon
all for all of the above
Expand Down Expand Up @@ -514,6 +516,19 @@ tinyscheme_exec ()
time ( ${TINYSCHEME} -1 "$1" "$2" )
}

# -----------------------------------------------------------------------------
# Definitions specific to TR7

tr7_comp ()
{
true
}

tr7_exec ()
{
time ${TR7I} "$1" < "$2"
}

# -----------------------------------------------------------------------------
# Definitions specific to RScheme

Expand Down Expand Up @@ -1123,6 +1138,16 @@ for system in $systems ; do
EXECCOMMANDS=""
;;

tr7) NAME='TR7'
COMP=tr7_comp
EXEC=tr7_exec
COMPOPTS=""
EXTENSION="scm"
EXTENSIONCOMP="scm"
COMPCOMMANDS=""
EXECCOMMANDS=""
;;

rscheme) NAME='RScheme'
COMP=rscheme_comp
EXEC=rscheme_exec
Expand Down
1 change: 1 addition & 0 deletions src/TR7-prelude.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(define (this-scheme-implementation-name) "tr7")

0 comments on commit ffcd6eb

Please sign in to comment.