Thanks guys, I got lot of ideas already. I will try to implements that restricted mode.
I already implemented something that will help me to counter any infinite loops: http://img4.hostingpics.net/pics/726857capture1352736469.png
which can pose a problem as well.
Trying to precise an answer from a private emailOn Mon, Nov 12, 2012 at 12:47 AM, Peter Enerccio <firstname.lastname@example.org> wrote:
it should not be possible to break into another object's codeThis is only possible through the MP package, which allows interrupting other processes. If this package is not available for your code, this is solvedor environment from other objects
The "environment" in Common Lisp is made of1* global variable bindings2* special variable re-bindings (as in (let ((*my-special-var* foo)) ...)3* local variable bindings4* object slotsYou can either enforce that 1* is impossible in your code (global variables should be avoided if possible), or override all global bindings in code that runs using 2* as in (progv list-of-special-variables list-of-initial-assignments (eval user-code-to-be-evaluated)). 3* is not accessible from one running code to the other. 4* is accessible only if you provide other code with explicit references to those objects.Since there are no pointers in Common Lisp and your DSL does not have neither "eval" nor arbitrary symbols, there is no easy way you can overcome this simple-minded security scheme. But once again, this is not something ECL specific and you might get more information either in c.l.l, in the "pro" common lisp mailing list or in the #irc channel.Juanjo--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)