275 lines
9.9 KiB
HTML
275 lines
9.9 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content=
|
|
"HTML Tidy for FreeBSD (vers 1st March 2002), see www.w3.org">
|
|
<title>Vx-Scheme Download Page</title>
|
|
<link rel="stylesheet" type="text/css" href="css.css">
|
|
</head>
|
|
<body>
|
|
<table class="doctable" border="0" cellspacing="0" summary=
|
|
"this table is just for layout">
|
|
<tr class="toprow">
|
|
<td class="leftcol"></td>
|
|
<td class="maintitle">
|
|
<h2>vx-scheme</h2>
|
|
|
|
<h4>A Scheme interpreter for VxWorks.</h4>
|
|
|
|
<p align="right">[ <a href="index.html">Home</a> ]</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="leftedge"></td> <td class="body">
|
|
|
|
<h3>Release History</h3>
|
|
|
|
|
|
|
|
<table><tr><td class="announce">Announcing the fifth public release,
|
|
<b>0.7</b>. The long-awaited (by me, anyway) bytecode compiler is
|
|
here, with some cool featurs described on
|
|
the <a href="compiler.html">compiler page</a>. The compiler is
|
|
written in Scheme and bootstraps itself using the interpreter. By the
|
|
way, the 0.7 interpreter is faster too, as you can see on
|
|
the <a href="benchmark.html">benchmark page</a>. Other enhancements:
|
|
<ul>
|
|
<li><b><font color="#cc0000">14% faster</font> interpreter and
|
|
<font color="#cc0000">47% faster</font> compiler:</b> The interpreter
|
|
got faster due to just general tuning. The compiler helps a great
|
|
deal for computationally-bound programs.</li>
|
|
|
|
<li><b>New functions:</b> By analogy with Common LISP, <code>bound?</code>,
|
|
<code>nconc</code> and <code>symbol-value</code>. For utility purposes,
|
|
<code>getcwd</code>, <code>chdir</code>, <code>display*</code> (which
|
|
displays each of its arguments in turn,
|
|
and <code>primitive-procedure?</code> (for recognizing procedures
|
|
produced by compilation).</li>
|
|
<li><b>Hosted by Google!</b> I was maintaining the project with CVS,
|
|
but decided to try my current employer's new
|
|
<a href="http://code.google.com/hosting/"code hosting</a>ne facility,
|
|
based on <a href="http://subversion.tigris.org/">Subversion</a>.
|
|
Click for the <a href="http://code.google.com/p/vx-scheme/">vx-scheme
|
|
project page</a>. You can get my current working source from the
|
|
trunk or work with version 0.7, which as been tagged as
|
|
<a href="http://vx-scheme.googlecode.com/svn/tags/v0.7/">v0.7</a>.
|
|
<li><b>Compatibility?</b> I can't really say that this version runs
|
|
with VxWorks since I haven't tried
|
|
it. <a href="http://www.windriver.com/">Wind River</a>, my former
|
|
employer, used to have a Tornado Prototyper you could download to
|
|
experiment with things like this, but they haven't done that in a
|
|
while. Likewise, I don't have any Win32 machines in the house any
|
|
more, having switched to Mac. The code does run fine on Mac OS X,
|
|
Fedora, and Ubuntu.</li>
|
|
</ul>
|
|
Consult the change log for more information.
|
|
</td></tr></table>
|
|
<p><p>
|
|
<table><tr><td class="announce">Announcing the fourth public release,
|
|
<b>0.6</b>. Improvements from 0.5 involve some performance enhancements
|
|
achieved by tweaking the VM.
|
|
<ul>
|
|
<li><b><font color="#cc0000">39% faster</font>:</b> This release was
|
|
motivated by noticing that the test suite was spending most of its
|
|
time collecting garbage. Obviously, reducing garbage generation and
|
|
simplifying garbage collection would improve performance, and that was
|
|
done in this release, with the following two (internal) changes: </li>
|
|
|
|
<li><b>Win32 port:</b> Project files are provided so vx-scheme can
|
|
compile ith Visual Studio .NET.</li>
|
|
|
|
<li><b>Short Integers:</b> Internally, an integer that can fit in 24
|
|
bits is now stored as a special kind of pointer with no cell space
|
|
allocated. This means that computations with small integers can
|
|
proceed with much less garbage generated. (Many classic LISP systems
|
|
use this trick.) The short arithmetic automatically expands to 32
|
|
bits when necessary, preserving the full range of 32-bit arithmetic
|
|
with no programmer intervention needed. Still no arbitrary-precision
|
|
arithmetic, though.</li>
|
|
|
|
<li><b>Uniform cell-size:</b> Versions before this one had the
|
|
concept of single- and double-size cells. While this saved a
|
|
small amount of memory, it greatly complicated the garbage collector.</li>
|
|
</ul>
|
|
Consult the change log for more information.
|
|
</td></tr></table>
|
|
<p><p>
|
|
<table><tr><td class="announce">Changes from <b>0.4</b> to <b>0.5</b>:
|
|
<ul> <li><b>Property
|
|
lists:</b> You can now say <code>(put 'symbol 'key value)</code> to
|
|
make a property association "key->value" on the given symbol, and
|
|
<code>(get 'symbol 'key)</code> to retrieve the value. (NB: getting
|
|
a property that doesn't exist will return <code>#f</code>, rather
|
|
than <code>()</code> as in Common Lisp.)</li>
|
|
|
|
<li><b>Perl-style vector operations:</b> New functions
|
|
<code>vector-shift!, vector-unshift!, vector-push!,</code> and
|
|
<code>vector-pop!</code> are provided. Shift and unshift work at the
|
|
left side of a vector, push and pop at the right. Vectors will
|
|
grow and shrink as needed.</li>
|
|
|
|
<li><b>More testcases:</b>Three new testcases, adding 500 more lines
|
|
to the suite.</li>
|
|
</ul>
|
|
</td></tr></table>
|
|
|
|
<p>I've started writing a <b>bytecode compiler</b>, which has been an
|
|
interesting exercise. If that interests you drop me a
|
|
<a href="mailto:colin.smith@gmail.com">note</a>!</p>
|
|
|
|
|
|
<h3>Download</h3>
|
|
|
|
The easy-to-build source distribution is available here:
|
|
<ul>
|
|
<li>Tar/gzip format: <code><a href=
|
|
"//files.scheme.org/vx-scheme-0.7.tgz">vx-scheme-0.7.tgz</a></code></li>
|
|
</ul>
|
|
|
|
Previous versions can be downloaded as well, but I don't recommend
|
|
them. Newer releases always pass a stronger test suite than older
|
|
ones. The previous releases are 0.6
|
|
[<a href="//files.scheme.org/vx-scheme-0.6.tgz">tgz</a>],
|
|
0.5
|
|
[<a href="//files.scheme.org/vx-scheme-0.5.tgz">tgz</a>],
|
|
0.4
|
|
[<a href="//files.scheme.org/vx-scheme-0.4.tgz">tgz</a>],
|
|
and 0.3 (the first release)
|
|
[<a href="//files.scheme.org/vx-scheme-0.3.tgz">tgz</a>].
|
|
|
|
<p>You can contact me at <a href=
|
|
"mailto:colin.smith@gmail.com">colin.smith@gmail.com</a> with any
|
|
questions or observations. For all I know, I'm the only person out
|
|
there who's interested in Scheme and VxWorks simultaneously. If you
|
|
are too, drop me a note!</p>
|
|
|
|
<h3>Documentation</h3>
|
|
<p>See the <a href="index.html">main page</a>.</p>
|
|
|
|
<h3>A word about the coding convention</h3>
|
|
|
|
<p>This code uses the VxWorks coding convention, used extensively at
|
|
Wind River. The brace indenting is a bit unorthodox. At Wind, the
|
|
party line was always "they're nobody's favorite indenting rules, but
|
|
we all use them, and therein lies the value." True enough. Now that
|
|
I've left WR to work at
|
|
<a href="http://www.google.com/"><font color="#0000ff"><b>G</font><font color="#ff0000">o</font><font color="#cccc00">o</font><font color="#0000ff">g</font><font color="#009900">l</font><font color="#ff0000">e</font></a></b>,
|
|
I've been tempted to reformat the code in a more mainstream style,
|
|
though. Maybe next version.</p>
|
|
|
|
<h3>Installation Notes</h3>
|
|
|
|
<p class="section">For VxWorks:</p>
|
|
|
|
<p>Just unpack the archive anywhere you like. A Tornado workspace
|
|
containing two projects is provided in tornado/vx-scheme.wsp. The
|
|
first project, "target-shell", will build a VxSim executable that
|
|
has enough C++ features selected to host the Scheme interpreter.
|
|
The second is the interpreter itself. Build them both.</p>
|
|
|
|
<p><b>Note:</b> For the present, vx-scheme only runs on the target
|
|
shell: starting it from <code>windsh</code> will only confuse
|
|
things.</p>
|
|
|
|
<p>Start the simulator you just built. Once it's launched you can
|
|
use a script in ../startup that will load the Scheme image. (The
|
|
startup script is in the parent directory of the directory where
|
|
the sim starts in case you define new builds on your own.)</p>
|
|
|
|
<blockquote>
|
|
<pre>
|
|
<code><font class="output">-></font> <../startup
|
|
<font class="output">cd "../../vx-scheme/SIMNTgnu"
|
|
value = 0 = 0x0
|
|
ld < vx-scheme.out
|
|
value = 30727944 = 0x1d4df08 = _dtors + 0x14
|
|
cd "../../../testcases"
|
|
value = 0 = 0x0
|
|
-></font>
|
|
</code>
|
|
</pre>
|
|
</blockquote>
|
|
|
|
<p class="section">For UNIX:</p>
|
|
|
|
<p>For UNIX-like systems (FreeBSD, Cygwin, etc.) there's an
|
|
ordinary Makefile in the <code>src</code> directory of the
|
|
distribution. Just say make or gmake (whatever it takes to launch
|
|
GNU make on your system) in that directory. This will build a
|
|
"vx-scheme" executable configured for use on your host system.</p>
|
|
|
|
<h3>Test Suite</h3>
|
|
|
|
<p class="section">For VxWorks:</p>
|
|
|
|
<p>To run the test suite on VxWorks, follow the installation steps
|
|
above and then, in your simulator window, do</p>
|
|
|
|
<blockquote>
|
|
<pre>
|
|
<code><font class="output">-></font> scheme
|
|
<font class="output">=></font>
|
|
</code>
|
|
</pre>
|
|
</blockquote>
|
|
|
|
<p>The prompt changes to <code>=></code> when reading Scheme
|
|
expressions. The startup script set the working directory to the
|
|
place where the test suite lies so now we need only say:</p>
|
|
|
|
<blockquote>
|
|
<pre>
|
|
<code><font class="output">=></font> (load "vx-test.scm")
|
|
<font class="output">PASS: sort
|
|
PASS: factor
|
|
PASS: object->string
|
|
PASS: r4rstest
|
|
PASS: pi
|
|
PASS: sieve
|
|
PASS: cf
|
|
PASS: series
|
|
PASS: ack
|
|
PASS: scheme
|
|
PASS: dynamic
|
|
PASS: earley
|
|
PASS: maze
|
|
PASS: dderiv
|
|
PASS: boyer
|
|
PASS: puzzle
|
|
</font>
|
|
</pre>
|
|
</blockquote>
|
|
|
|
<p><b>Note:</b> Running the test suite defines a lot of symbols. In
|
|
particular, "i" is defined, which masks the VxWorks definition.
|
|
It's probably best to ^X the simulator and start over after running
|
|
the suite.</p>
|
|
|
|
<p class="section">For UNIX:</p>
|
|
|
|
<p>To run the test suite for UNIX: after building with make (or
|
|
gmake) in the unix directory, just do a <code>"make test"</code>.
|
|
|
|
<p><b>Note:</b> The "good" files are slightly different for
|
|
VxWorks: in that case, expected to fail the "mult-float-print-test"
|
|
on VxWorks and the "good" file contains these failures, so the
|
|
suite will "pass". But as explained elsewhere we just take what the
|
|
native I/O system gives us.</p>
|
|
|
|
<h3>Roadmap</h3>
|
|
|
|
<p>Now that the bytecode compiler (whose design is
|
|
indebted to that given by Peter Norvig in <a
|
|
href="http://www.norvig.com/paip.html">Paradigms of Artificial
|
|
Intelligence Programming</a>) is complete, I don't have any big plans.
|
|
Feel free to write if you're thinking of using this code for anything
|
|
at all!
|
|
|
|
<p class="quiet">Copyright © 2002 Colin Smith.</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|