Re: guile??



   > Right.  It should, however, be fairly simple to add a checker for
   > safety that still lets useful code through.

   It's not completely impossible to achieve something like this (modulo
   bugs of course) but it certainly isn't "fairly simple". Especially if
   you want the result to be actually useful.

I actually did give it some thought.  I think Scheme is simple enough
that some variant of this will work:

1. Parse the string into an s-expression.
2. Check that all symbols are in a given safe set.

There are (at least) three level of function safety:

A. Functions that can affect your file system, network connection, etc.
   [We don't want these!]  Also in this class, would be functions that
   can construct new symbols from, say, strings.

B. Functions (and symtactic constructs) that can cause loops.  [That would
   include things like loop constructs.  We probably need these.]

C. Harmless stuff like '+.

Other checks would be applied, such as "no free variables" if needed.
(Thus making it impossible to obtain class A symbols from the enviroment.)

I believe you could do a lot of actually useful arithmetic in class B.

Morten



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]