Explorar el Código

ncd: NCDInterpBlock: rename to NCDInterpProcess

ambrop7 hace 13 años
padre
commit
18a9a5b7bc

+ 1 - 1
ncd/CMakeLists.txt

@@ -81,7 +81,7 @@ add_executable(badvpn-ncd
     NCDModuleIndex.c
     NCDIfConfig.c
     NCDObject.c
-    NCDInterpBlock.c
+    NCDInterpProcess.c
     NCDInterpProg.c
     NCDPlaceholderDb.c
     NCDMethodIndex.c

+ 29 - 29
ncd/NCDInterpBlock.c → ncd/NCDInterpProcess.c

@@ -1,5 +1,5 @@
 /**
- * @file NCDInterpBlock.c
+ * @file NCDInterpProcess.c
  * @author Ambroz Bizjak <ambrop7@gmail.com>
  * 
  * @section LICENSE
@@ -39,14 +39,14 @@
 #include <misc/strdup.h>
 #include <base/BLog.h>
 
-#include "NCDInterpBlock.h"
+#include "NCDInterpProcess.h"
 
 #include <generated/blog_channel_ncd.h>
 
-#include "NCDInterpBlock_trie.h"
+#include "NCDInterpProcess_trie.h"
 #include <structure/CStringTrie_impl.h>
 
-static int compute_prealloc (NCDInterpBlock *o)
+static int compute_prealloc (NCDInterpProcess *o)
 {
     int size = 0;
     
@@ -145,7 +145,7 @@ fail:
     return 0;
 }
 
-int NCDInterpBlock_Init (NCDInterpBlock *o, NCDBlock *block, NCDProcess *process, NCDPlaceholderDb *pdb, NCDModuleIndex *module_index, NCDMethodIndex *method_index)
+int NCDInterpProcess_Init (NCDInterpProcess *o, NCDBlock *block, NCDProcess *process, NCDPlaceholderDb *pdb, NCDModuleIndex *module_index, NCDMethodIndex *method_index)
 {
     ASSERT(block)
     ASSERT(process)
@@ -164,7 +164,7 @@ int NCDInterpBlock_Init (NCDInterpBlock *o, NCDBlock *block, NCDProcess *process
         goto fail0;
     }
     
-    if (!NCDInterpBlock__Trie_Init(&o->trie)) {
+    if (!NCDInterpProcess__Trie_Init(&o->trie)) {
         BLog(BLOG_ERROR, "BStringTrie_Init failed");
         goto fail1;
     }
@@ -175,7 +175,7 @@ int NCDInterpBlock_Init (NCDInterpBlock *o, NCDBlock *block, NCDProcess *process
     
     for (NCDStatement *s = NCDBlock_FirstStatement(block); s; s = NCDBlock_NextStatement(block, s)) {
         ASSERT(NCDStatement_Type(s) == NCDSTATEMENT_REG)
-        struct NCDInterpBlock__stmt *e = &o->stmts[o->num_stmts];
+        struct NCDInterpProcess__stmt *e = &o->stmts[o->num_stmts];
         
         e->name = NCDStatement_Name(s);
         e->cmdname = NCDStatement_RegCmdName(s);
@@ -224,14 +224,14 @@ int NCDInterpBlock_Init (NCDInterpBlock *o, NCDBlock *block, NCDProcess *process
         }
         
         if (e->name) {
-            int next_idx = NCDInterpBlock__Trie_Get(&o->trie, e->name);
+            int next_idx = NCDInterpProcess__Trie_Get(&o->trie, e->name);
             ASSERT(next_idx >= -1)
             ASSERT(next_idx < o->num_stmts)
             
             e->trie_next = next_idx;
             
-            if (!NCDInterpBlock__Trie_Set(&o->trie, e->name, o->num_stmts)) {
-                BLog(BLOG_ERROR, "NCDInterpBlock__Trie_Set failed");
+            if (!NCDInterpProcess__Trie_Set(&o->trie, e->name, o->num_stmts)) {
+                BLog(BLOG_ERROR, "NCDInterpProcess__Trie_Set failed");
                 goto loop_fail3;
             }
         }
@@ -256,47 +256,47 @@ int NCDInterpBlock_Init (NCDInterpBlock *o, NCDBlock *block, NCDProcess *process
     
 fail2:
     while (o->num_stmts-- > 0) {
-        struct NCDInterpBlock__stmt *e = &o->stmts[o->num_stmts];
+        struct NCDInterpProcess__stmt *e = &o->stmts[o->num_stmts];
         free(e->objnames);
         BFree(e->arg_data);
         NCDValReplaceProg_Free(&e->arg_prog);
     }
-    NCDInterpBlock__Trie_Free(&o->trie);
+    NCDInterpProcess__Trie_Free(&o->trie);
 fail1:
     BFree(o->stmts);
 fail0:
     return 0;
 }
 
-void NCDInterpBlock_Free (NCDInterpBlock *o)
+void NCDInterpProcess_Free (NCDInterpProcess *o)
 {
     DebugObject_Free(&o->d_obj);
     
     while (o->num_stmts-- > 0) {
-        struct NCDInterpBlock__stmt *e = &o->stmts[o->num_stmts];
+        struct NCDInterpProcess__stmt *e = &o->stmts[o->num_stmts];
         free(e->objnames);
         BFree(e->arg_data);
         NCDValReplaceProg_Free(&e->arg_prog);
     }
     
-    NCDInterpBlock__Trie_Free(&o->trie);
+    NCDInterpProcess__Trie_Free(&o->trie);
     
     BFree(o->stmts);
 }
 
-int NCDInterpBlock_FindStatement (NCDInterpBlock *o, int from_index, const char *name)
+int NCDInterpProcess_FindStatement (NCDInterpProcess *o, int from_index, const char *name)
 {
     DebugObject_Access(&o->d_obj);
     ASSERT(from_index >= 0)
     ASSERT(from_index <= o->num_stmts)
     ASSERT(name)
     
-    int stmt_idx = NCDInterpBlock__Trie_Get(&o->trie, name);
+    int stmt_idx = NCDInterpProcess__Trie_Get(&o->trie, name);
     ASSERT(stmt_idx >= -1)
     ASSERT(stmt_idx < o->num_stmts)
     
     while (stmt_idx >= 0) {
-        struct NCDInterpBlock__stmt *e = &o->stmts[stmt_idx];
+        struct NCDInterpProcess__stmt *e = &o->stmts[stmt_idx];
         
         if (!strcmp(e->name, name) && stmt_idx < from_index) {
             return stmt_idx;
@@ -310,7 +310,7 @@ int NCDInterpBlock_FindStatement (NCDInterpBlock *o, int from_index, const char
     return -1;
 }
 
-const char * NCDInterpBlock_StatementCmdName (NCDInterpBlock *o, int i)
+const char * NCDInterpProcess_StatementCmdName (NCDInterpProcess *o, int i)
 {
     DebugObject_Access(&o->d_obj);
     ASSERT(i >= 0)
@@ -319,7 +319,7 @@ const char * NCDInterpBlock_StatementCmdName (NCDInterpBlock *o, int i)
     return o->stmts[i].cmdname;
 }
 
-void NCDInterpBlock_StatementObjNames (NCDInterpBlock *o, int i, const char **out_objnames, size_t *out_num_objnames)
+void NCDInterpProcess_StatementObjNames (NCDInterpProcess *o, int i, const char **out_objnames, size_t *out_num_objnames)
 {
     DebugObject_Access(&o->d_obj);
     ASSERT(i >= 0)
@@ -331,7 +331,7 @@ void NCDInterpBlock_StatementObjNames (NCDInterpBlock *o, int i, const char **ou
     *out_num_objnames = o->stmts[i].num_objnames;
 }
 
-const struct NCDModule * NCDInterpBlock_StatementGetSimpleModule (NCDInterpBlock *o, int i)
+const struct NCDModule * NCDInterpProcess_StatementGetSimpleModule (NCDInterpProcess *o, int i)
 {
     DebugObject_Access(&o->d_obj);
     ASSERT(i >= 0)
@@ -341,7 +341,7 @@ const struct NCDModule * NCDInterpBlock_StatementGetSimpleModule (NCDInterpBlock
     return o->stmts[i].binding.simple_module;
 }
 
-const struct NCDModule * NCDInterpBlock_StatementGetMethodModule (NCDInterpBlock *o, int i, const char *obj_type, NCDMethodIndex *method_index)
+const struct NCDModule * NCDInterpProcess_StatementGetMethodModule (NCDInterpProcess *o, int i, const char *obj_type, NCDMethodIndex *method_index)
 {
     DebugObject_Access(&o->d_obj);
     ASSERT(i >= 0)
@@ -353,7 +353,7 @@ const struct NCDModule * NCDInterpBlock_StatementGetMethodModule (NCDInterpBlock
     return NCDMethodIndex_GetMethodModule(method_index, obj_type, o->stmts[i].binding.method_name_id);
 }
 
-int NCDInterpBlock_CopyStatementArgs (NCDInterpBlock *o, int i, NCDValMem *out_valmem, NCDValRef *out_val, NCDValReplaceProg *out_prog)
+int NCDInterpProcess_CopyStatementArgs (NCDInterpProcess *o, int i, NCDValMem *out_valmem, NCDValRef *out_val, NCDValReplaceProg *out_prog)
 {
     DebugObject_Access(&o->d_obj);
     ASSERT(i >= 0)
@@ -362,7 +362,7 @@ int NCDInterpBlock_CopyStatementArgs (NCDInterpBlock *o, int i, NCDValMem *out_v
     ASSERT(out_val)
     ASSERT(out_prog)
     
-    struct NCDInterpBlock__stmt *e = &o->stmts[i];
+    struct NCDInterpProcess__stmt *e = &o->stmts[i];
     
     if (!NCDValMem_InitImport(out_valmem, e->arg_data, e->arg_len)) {
         return 0;
@@ -373,7 +373,7 @@ int NCDInterpBlock_CopyStatementArgs (NCDInterpBlock *o, int i, NCDValMem *out_v
     return 1;
 }
 
-void NCDInterpBlock_StatementBumpAllocSize (NCDInterpBlock *o, int i, int alloc_size)
+void NCDInterpProcess_StatementBumpAllocSize (NCDInterpProcess *o, int i, int alloc_size)
 {
     DebugObject_Access(&o->d_obj);
     ASSERT(i >= 0)
@@ -386,7 +386,7 @@ void NCDInterpBlock_StatementBumpAllocSize (NCDInterpBlock *o, int i, int alloc_
     }
 }
 
-int NCDInterpBlock_StatementPreallocSize (NCDInterpBlock *o, int i)
+int NCDInterpProcess_StatementPreallocSize (NCDInterpProcess *o, int i)
 {
     DebugObject_Access(&o->d_obj);
     ASSERT(i >= 0)
@@ -395,7 +395,7 @@ int NCDInterpBlock_StatementPreallocSize (NCDInterpBlock *o, int i)
     return o->stmts[i].alloc_size;
 }
 
-int NCDInterpBlock_PreallocSize (NCDInterpBlock *o)
+int NCDInterpProcess_PreallocSize (NCDInterpProcess *o)
 {
     DebugObject_Access(&o->d_obj);
     ASSERT(o->prealloc_size == -1 || o->prealloc_size >= 0)
@@ -407,7 +407,7 @@ int NCDInterpBlock_PreallocSize (NCDInterpBlock *o)
     return o->prealloc_size;
 }
 
-int NCDInterpBlock_StatementPreallocOffset (NCDInterpBlock *o, int i)
+int NCDInterpProcess_StatementPreallocOffset (NCDInterpProcess *o, int i)
 {
     DebugObject_Access(&o->d_obj);
     ASSERT(i >= 0)
@@ -417,7 +417,7 @@ int NCDInterpBlock_StatementPreallocOffset (NCDInterpBlock *o, int i)
     return o->stmts[i].prealloc_offset;
 }
 
-NCDProcess * NCDInterpBlock_Process (NCDInterpBlock *o)
+NCDProcess * NCDInterpProcess_Process (NCDInterpProcess *o)
 {
     DebugObject_Access(&o->d_obj);
     

+ 19 - 19
ncd/NCDInterpBlock.h → ncd/NCDInterpProcess.h

@@ -1,5 +1,5 @@
 /**
- * @file NCDInterpBlock.h
+ * @file NCDInterpProcess.h
  * @author Ambroz Bizjak <ambrop7@gmail.com>
  * 
  * @section LICENSE
@@ -42,10 +42,10 @@
 #include <ncd/NCDModuleIndex.h>
 #include <ncd/NCDMethodIndex.h>
 
-#include "NCDInterpBlock_trie.h"
+#include "NCDInterpProcess_trie.h"
 #include <structure/CStringTrie_decl.h>
 
-struct NCDInterpBlock__stmt {
+struct NCDInterpProcess__stmt {
     const char *name;
     const char *cmdname;
     char *objnames;
@@ -64,26 +64,26 @@ struct NCDInterpBlock__stmt {
 };
 
 typedef struct {
-    struct NCDInterpBlock__stmt *stmts;
+    struct NCDInterpProcess__stmt *stmts;
     int num_stmts;
     int prealloc_size;
-    NCDInterpBlock__Trie trie;
+    NCDInterpProcess__Trie trie;
     NCDProcess *process;
     DebugObject d_obj;
-} NCDInterpBlock;
+} NCDInterpProcess;
 
-int NCDInterpBlock_Init (NCDInterpBlock *o, NCDBlock *block, NCDProcess *process, NCDPlaceholderDb *pdb, NCDModuleIndex *module_index, NCDMethodIndex *method_index) WARN_UNUSED;
-void NCDInterpBlock_Free (NCDInterpBlock *o);
-int NCDInterpBlock_FindStatement (NCDInterpBlock *o, int from_index, const char *name);
-const char * NCDInterpBlock_StatementCmdName (NCDInterpBlock *o, int i);
-void NCDInterpBlock_StatementObjNames (NCDInterpBlock *o, int i, const char **out_objnames, size_t *out_num_objnames);
-const struct NCDModule * NCDInterpBlock_StatementGetSimpleModule (NCDInterpBlock *o, int i);
-const struct NCDModule * NCDInterpBlock_StatementGetMethodModule (NCDInterpBlock *o, int i, const char *obj_type, NCDMethodIndex *method_index);
-int NCDInterpBlock_CopyStatementArgs (NCDInterpBlock *o, int i, NCDValMem *out_valmem, NCDValRef *out_val, NCDValReplaceProg *out_prog) WARN_UNUSED;
-void NCDInterpBlock_StatementBumpAllocSize (NCDInterpBlock *o, int i, int alloc_size);
-int NCDInterpBlock_StatementPreallocSize (NCDInterpBlock *o, int i);
-int NCDInterpBlock_PreallocSize (NCDInterpBlock *o);
-int NCDInterpBlock_StatementPreallocOffset (NCDInterpBlock *o, int i);
-NCDProcess * NCDInterpBlock_Process (NCDInterpBlock *o);
+int NCDInterpProcess_Init (NCDInterpProcess *o, NCDBlock *block, NCDProcess *process, NCDPlaceholderDb *pdb, NCDModuleIndex *module_index, NCDMethodIndex *method_index) WARN_UNUSED;
+void NCDInterpProcess_Free (NCDInterpProcess *o);
+int NCDInterpProcess_FindStatement (NCDInterpProcess *o, int from_index, const char *name);
+const char * NCDInterpProcess_StatementCmdName (NCDInterpProcess *o, int i);
+void NCDInterpProcess_StatementObjNames (NCDInterpProcess *o, int i, const char **out_objnames, size_t *out_num_objnames);
+const struct NCDModule * NCDInterpProcess_StatementGetSimpleModule (NCDInterpProcess *o, int i);
+const struct NCDModule * NCDInterpProcess_StatementGetMethodModule (NCDInterpProcess *o, int i, const char *obj_type, NCDMethodIndex *method_index);
+int NCDInterpProcess_CopyStatementArgs (NCDInterpProcess *o, int i, NCDValMem *out_valmem, NCDValRef *out_val, NCDValReplaceProg *out_prog) WARN_UNUSED;
+void NCDInterpProcess_StatementBumpAllocSize (NCDInterpProcess *o, int i, int alloc_size);
+int NCDInterpProcess_StatementPreallocSize (NCDInterpProcess *o, int i);
+int NCDInterpProcess_PreallocSize (NCDInterpProcess *o);
+int NCDInterpProcess_StatementPreallocOffset (NCDInterpProcess *o, int i);
+NCDProcess * NCDInterpProcess_Process (NCDInterpProcess *o);
 
 #endif

+ 1 - 1
ncd/NCDInterpBlock_trie.h → ncd/NCDInterpProcess_trie.h

@@ -1,4 +1,4 @@
-#define CSTRINGTRIE_PARAM_NAME NCDInterpBlock__Trie
+#define CSTRINGTRIE_PARAM_NAME NCDInterpProcess__Trie
 #define CSTRINGTRIE_PARAM_VALUE int
 #define CSTRINGTRIE_PARAM_DEFAULT ((int)-1)
 #define CSTRINGTRIE_PARAM_SIGNIFICANT_BITS 3

+ 6 - 6
ncd/NCDInterpProg.c

@@ -73,15 +73,15 @@ int NCDInterpProg_Init (NCDInterpProg *o, NCDProgram *prog, NCDPlaceholderDb *pd
         e->name = NCDProcess_Name(p);
         e->proc = p;
         
-        if (!NCDInterpBlock_Init(&e->iblock, NCDProcess_Block(p), p, pdb, module_index, method_index)) {
-            BLog(BLOG_ERROR, "NCDInterpBlock_Init failed");
+        if (!NCDInterpProcess_Init(&e->iblock, NCDProcess_Block(p), p, pdb, module_index, method_index)) {
+            BLog(BLOG_ERROR, "NCDInterpProcess_Init failed");
             goto fail2;
         }
         
         NCDInterpProg__HashRef ref = {e, o->num_procs};
         if (!NCDInterpProg__Hash_Insert(&o->hash, o->procs, ref, NULL)) {
             BLog(BLOG_ERROR, "duplicate process or template name: %s", e->name);
-            NCDInterpBlock_Free(&e->iblock);
+            NCDInterpProcess_Free(&e->iblock);
             goto fail2;
         }
         
@@ -95,7 +95,7 @@ int NCDInterpProg_Init (NCDInterpProg *o, NCDProgram *prog, NCDPlaceholderDb *pd
     
 fail2:
     while (o->num_procs-- > 0) {
-        NCDInterpBlock_Free(&o->procs[o->num_procs].iblock);
+        NCDInterpProcess_Free(&o->procs[o->num_procs].iblock);
     }
     NCDInterpProg__Hash_Free(&o->hash);
 fail1:
@@ -109,7 +109,7 @@ void NCDInterpProg_Free (NCDInterpProg *o)
     DebugObject_Free(&o->d_obj);
     
     while (o->num_procs-- > 0) {
-        NCDInterpBlock_Free(&o->procs[o->num_procs].iblock);
+        NCDInterpProcess_Free(&o->procs[o->num_procs].iblock);
     }
     
     NCDInterpProg__Hash_Free(&o->hash);
@@ -117,7 +117,7 @@ void NCDInterpProg_Free (NCDInterpProg *o)
     BFree(o->procs);
 }
 
-int NCDInterpProg_FindProcess (NCDInterpProg *o, const char *name, NCDProcess **out_proc, NCDInterpBlock **out_iblock)
+int NCDInterpProg_FindProcess (NCDInterpProg *o, const char *name, NCDProcess **out_proc, NCDInterpProcess **out_iblock)
 {
     DebugObject_Access(&o->d_obj);
     ASSERT(name)

+ 3 - 3
ncd/NCDInterpProg.h

@@ -33,13 +33,13 @@
 #include <misc/debug.h>
 #include <base/DebugObject.h>
 #include <ncd/NCDAst.h>
-#include <ncd/NCDInterpBlock.h>
+#include <ncd/NCDInterpProcess.h>
 #include <structure/CHash.h>
 
 struct NCDInterpProg__process {
     const char *name;
     NCDProcess *proc;
-    NCDInterpBlock iblock;
+    NCDInterpProcess iblock;
     int hash_next;
 };
 
@@ -59,6 +59,6 @@ typedef struct {
 
 int NCDInterpProg_Init (NCDInterpProg *o, NCDProgram *prog, NCDPlaceholderDb *pdb, NCDModuleIndex *module_index, NCDMethodIndex *method_index) WARN_UNUSED;
 void NCDInterpProg_Free (NCDInterpProg *o);
-int NCDInterpProg_FindProcess (NCDInterpProg *o, const char *name, NCDProcess **out_proc, NCDInterpBlock **out_iblock) WARN_UNUSED;
+int NCDInterpProg_FindProcess (NCDInterpProg *o, const char *name, NCDProcess **out_proc, NCDInterpProcess **out_iblock) WARN_UNUSED;
 
 #endif

+ 2 - 2
ncd/NCDPlaceholderDb.h

@@ -41,12 +41,12 @@ struct NCDPlaceholderDb__entry {
 
 /**
  * Associates variable placeholder numbers to variable names.
- * This is populated by {@link NCDInterpBlock_Init} when converting the {@link NCDValue}
+ * This is populated by {@link NCDInterpProcess_Init} when converting the {@link NCDValue}
  * objects in the AST to compact representations in {@link NCDValMem}. Variables are
  * replaced with placeholder identifiers (integers), which this object associates
  * with their names.
  * During interpretation, when a statement is being initialized, the compact form held
- * by {@link NCDInterpBlock} is byte-copied, and placeholders are replaced with the
+ * by {@link NCDInterpProcess} is byte-copied, and placeholders are replaced with the
  * values of corresponding variables using {@link NCDVal_ReplacePlaceholders}.
  */
 typedef struct {

+ 20 - 20
ncd/ncd.c

@@ -85,7 +85,7 @@ struct statement {
 };
 
 struct process {
-    NCDInterpBlock *iblock;
+    NCDInterpProcess *iblock;
     NCDModuleProcess *module_process;
     BTimer wait_timer;
     BPending work_job;
@@ -156,7 +156,7 @@ static void print_version (void);
 static int parse_arguments (int argc, char *argv[]);
 static void signal_handler (void *unused);
 static void start_terminate (int exit_code);
-static int process_new (NCDProcess *proc_ast, NCDInterpBlock *iblock, NCDModuleProcess *module_process);
+static int process_new (NCDProcess *proc_ast, NCDInterpProcess *iblock, NCDModuleProcess *module_process);
 static void process_free (struct process *p, NCDModuleProcess **out_mp);
 static int process_mem_is_preallocated (struct process *p, char *mem);
 static void process_start_terminating (struct process *p);
@@ -373,7 +373,7 @@ int main (int argc, char **argv)
         
         // find iblock
         NCDProcess *f_proc;
-        NCDInterpBlock *iblock;
+        NCDInterpProcess *iblock;
         int res = NCDInterpProg_FindProcess(&iprogram, NCDProcess_Name(p), &f_proc, &iblock);
         ASSERT(res)
         ASSERT(f_proc == p)
@@ -645,7 +645,7 @@ void start_terminate (int exit_code)
     }
 }
 
-int process_new (NCDProcess *proc_ast, NCDInterpBlock *iblock, NCDModuleProcess *module_process)
+int process_new (NCDProcess *proc_ast, NCDInterpProcess *iblock, NCDModuleProcess *module_process)
 {
     // get num statements
     size_t num_statements = NCDBlock_NumStatements(NCDProcess_Block(proc_ast));
@@ -655,9 +655,9 @@ int process_new (NCDProcess *proc_ast, NCDInterpBlock *iblock, NCDModuleProcess
     }
     
     // calculate size of preallocated statement memory
-    int mem_size = NCDInterpBlock_PreallocSize(iblock);
+    int mem_size = NCDInterpProcess_PreallocSize(iblock);
     if (mem_size < 0 || mem_size > SIZE_MAX) {
-        BLog(BLOG_ERROR, "NCDInterpBlock_PreallocSize failed");
+        BLog(BLOG_ERROR, "NCDInterpProcess_PreallocSize failed");
         goto fail0;
     }
     
@@ -695,8 +695,8 @@ int process_new (NCDProcess *proc_ast, NCDInterpBlock *iblock, NCDModuleProcess
         ps->p = p;
         ps->i = i;
         ps->state = SSTATE_FORGOTTEN;
-        ps->mem_size = NCDInterpBlock_StatementPreallocSize(iblock, i);
-        ps->mem = (ps->mem_size == 0 ? NULL : p->mem + NCDInterpBlock_StatementPreallocOffset(iblock, i));
+        ps->mem_size = NCDInterpProcess_StatementPreallocSize(iblock, i);
+        ps->mem = (ps->mem_size == 0 ? NULL : p->mem + NCDInterpProcess_StatementPreallocOffset(iblock, i));
     }
     
     // init timer
@@ -797,7 +797,7 @@ void process_assert_pointers (struct process *p)
 
 void process_logfunc (struct process *p)
 {
-    BLog_Append("process %s: ", NCDProcess_Name(NCDInterpBlock_Process(p->iblock)));
+    BLog_Append("process %s: ", NCDProcess_Name(NCDInterpProcess_Process(p->iblock)));
 }
 
 void process_log (struct process *p, int level, const char *fmt, ...)
@@ -994,14 +994,14 @@ void process_advance (struct process *p)
     // (or NULL if this is not a method statement)
     const char *objnames;
     size_t num_objnames;
-    NCDInterpBlock_StatementObjNames(p->iblock, p->ap, &objnames, &num_objnames);
+    NCDInterpProcess_StatementObjNames(p->iblock, p->ap, &objnames, &num_objnames);
     
     if (!objnames) {
-        // not a method; module is already known by NCDInterpBlock
-        module = NCDInterpBlock_StatementGetSimpleModule(p->iblock, p->ap);
+        // not a method; module is already known by NCDInterpProcess
+        module = NCDInterpProcess_StatementGetSimpleModule(p->iblock, p->ap);
         
         if (!module) {
-            statement_log(ps, BLOG_ERROR, "unknown simple statement: %s", NCDInterpBlock_StatementCmdName(p->iblock, p->ap));
+            statement_log(ps, BLOG_ERROR, "unknown simple statement: %s", NCDInterpProcess_StatementCmdName(p->iblock, p->ap));
             goto fail0;
         }
     } else {
@@ -1019,22 +1019,22 @@ void process_advance (struct process *p)
         }
         
         // find module based on type of object
-        module = NCDInterpBlock_StatementGetMethodModule(p->iblock, p->ap, object_type, &method_index);
+        module = NCDInterpProcess_StatementGetMethodModule(p->iblock, p->ap, object_type, &method_index);
         
         if (!module) {
-            statement_log(ps, BLOG_ERROR, "unknown method statement: %s::%s", object_type, NCDInterpBlock_StatementCmdName(p->iblock, p->ap));
+            statement_log(ps, BLOG_ERROR, "unknown method statement: %s::%s", object_type, NCDInterpProcess_StatementCmdName(p->iblock, p->ap));
             goto fail0;
         }
     }
     
     // register alloc size for future preallocations
-    NCDInterpBlock_StatementBumpAllocSize(p->iblock, p->ap, module->alloc_size);
+    NCDInterpProcess_StatementBumpAllocSize(p->iblock, p->ap, module->alloc_size);
     
     // copy arguments
     NCDValRef args;
     NCDValReplaceProg prog;
-    if (!NCDInterpBlock_CopyStatementArgs(p->iblock, ps->i, &ps->args_mem, &args, &prog)) {
-        statement_log(ps, BLOG_ERROR, "NCDInterpBlock_CopyStatementArgs failed");
+    if (!NCDInterpProcess_CopyStatementArgs(p->iblock, ps->i, &ps->args_mem, &args, &prog)) {
+        statement_log(ps, BLOG_ERROR, "NCDInterpProcess_CopyStatementArgs failed");
         goto fail0;
     }
     
@@ -1099,7 +1099,7 @@ int process_find_object (struct process *p, int pos, const char *name, NCDObject
     ASSERT(name)
     ASSERT(out_object)
     
-    int i = NCDInterpBlock_FindStatement(p->iblock, pos, name);
+    int i = NCDInterpProcess_FindStatement(p->iblock, pos, name);
     if (i >= 0) {
         struct statement *ps = &p->statements[i];
         ASSERT(i < p->num_statements)
@@ -1300,7 +1300,7 @@ int statement_instance_func_initprocess (struct statement *ps, NCDModuleProcess
     
     // find template
     NCDProcess *p_ast;
-    NCDInterpBlock *iblock;
+    NCDInterpProcess *iblock;
     if (!NCDInterpProg_FindProcess(&iprogram, template_name, &p_ast, &iblock) || !NCDProcess_IsTemplate(p_ast)) {
         statement_log(ps, BLOG_ERROR, "no template named %s", template_name);
         return 0;