Safe Scripting Syntax

From Adam Colton
Revision as of 15:18, 20 July 2018 by Adamcolton (talk | contribs) (Created page with "I've already done a first pass of this with the dist.ribut.us VM but the idea fascinates me so I may try and do a more advanced version. Being able to take arbitrary commands...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

I've already done a first pass of this with the dist.ribut.us VM but the idea fascinates me so I may try and do a more advanced version.

Being able to take arbitrary commands and execute them safely and bounded is interesting. The language should have no means to escape it's bounds. It should have base constructs that are guaranteed, language extension modules that can be provided by the environment and library modules.

I think the correct approach is a byte code. The lowest level is primitive but can be run fast.

A level up is a scripting language.

  • Data structures
  • associative array
  • array

VM Safety

This is kind of the whole point, so it's important. Most critical is that the script is fully sandboxed - no access to disk or network and memory access is controlled.

Memory is use bounded. So is computation.

Memoization

A detail, but interesting. The base language should be fully deterministic. Language extensions can set a non-deterministic bit. This way, we can run a deterministic script and record the starting state and the output and memoize the whole process.