From a0fcf3a3e8cd351c36b2f72cafd7c02f5874511c Mon Sep 17 00:00:00 2001 From: nganhkhoa Date: Fri, 29 Mar 2024 17:05:59 +0700 Subject: [PATCH] add notes for executor --- executor/src/lib.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/executor/src/lib.rs b/executor/src/lib.rs index 4f50438..7198085 100644 --- a/executor/src/lib.rs +++ b/executor/src/lib.rs @@ -19,5 +19,30 @@ pub fn run_program(module: Module) -> Result<()> { }; println!("main {:?}", main); + + // loop through all variables and check if + // runtime computation should be executed + // actually a big problem and should be done later + // this requires dependency tree (DAG) of lazy variables + + // in the mean time, we can use the logic of lazy evaluation + // (Haskell). By only execute the variable when a computation + // requires. However, we might not cache the result. + + // type checks, everything should be checked because this is + // a statically typed language. We do not tolerate any type errors. + // this will be implemented in another package "type" + + // the whole context will be intialized and passed through each + // computation. + + // We allow for callable objects, these include closure, partial + // application. This will be reflected in the runtime by replacing + // variable values into the Expression and when fully apply, + // the Expression is evaluated to get the result. + + // Advanced features will be designed and implemented at a later + // stage into development. + Ok(()) }