I am using the DLR within a small part of a larger C# project, IronPython being the language in question.
For some parts of the system the user is able to enter a small script to customise behaviour for them. What I would like to do is to be able to restrict them to using side-effect free pure functions or in some sort of sandbox so that their function cannot touch anything outside.
Also, the user only can enter a function body, the function header and argument specification is automatically pre-pended in code before being passed to the Python DLR engine so that the C# side of the system that calls it knows exactly the args to pass and what is coming back. The users will only ever require to do simple operations and tests based purely on values supplied as arguments.
e.g.
this is ok: return (a * 100) > b;
this is not ok: delete_file_system(); return (a * 100) > b;
How might this be achieved? Is there a more appropriate language or technology choice?