I found a nice, simple solution to the higher-order-function bug - when a function reference is passed to another function, a binding record is placed on the stack. This record basically links the function parameter to an actual function; this record is how the code knows which function to call.
Safety-checking this is simply a matter of having the stack instruction do validation, rather than the function call instruction. Since the stack instruction knows what function it's placing on the stack, we can simply follow that reference and go validate the function itself.
This means that we literally can cover more code during the validation traversal than is actually executable. For instance, even if you do an unspeakable thing inside an if(false) block, the validator will walk into that block and catch you red-handed. You filthy little devil.
The validator puts out some nice contextual information that indicates how and where things went wrong. Here's an example output:
EXEGEN - Epoch development toolkitParsing: first pass...Parsing: second pass...Performing static safety validations...VALIDATION FAILURE: Task performs an unsafe operationCall stack: entrypoint() pi()File: .\scratch.epoch Line: 38 Column: 13 debugwritestring("Uh oh! I am illegal!") ^ERROR: Program failed validation.0 of 1 programs executed successfully.
So we can immediately see why the function failed validation (filename and code position are displayed) as well as the situation under which the failure occurred (call stack). The combination of these two facts should make it very convenient to fix task issues.
With this bit officially done, there's only one major item left on my GDC checklist: message passing. I will spend a few minutes thinking about this as I drift off to sleep, and hopefully tomorrow I can get a finalized design and start banging out the implementation.
From there, it's mostly a matter of documentation and a bit of double-checking to make sure all the examples and test programs work correctly. Once that's done, it's time to start burning CDs with the GDC distribution on them [smile]
It seems to me that you have limited tasks to the mere crunching of numbers...