another Core refactorying
authorThomas Walker Lynch <eknp9n@reasoningtechnology.com>
Tue, 11 Mar 2025 11:52:34 +0000 (11:52 +0000)
committerThomas Walker Lynch <eknp9n@reasoningtechnology.com>
Tue, 11 Mar 2025 11:52:34 +0000 (11:52 +0000)
developer/cc🖉/Core.lib.c
developer/cc🖉/Core_scratch.c [new file with mode: 0644]
document🖉/Manifold_interpretation.org [deleted file]

index 3be49b7..244894f 100644 (file)
@@ -1,4 +1,4 @@
-/*
+ /*
   Core - core memory operations.
 
   'ATP'  Used in comments. 'At This Point' in the code. 
     // given an AU is an 8 bit byte, 4AU is 32 bits, and 8 AU is 64 bits.
     #define AU uint8_t;
 
-    void *offset(void *p ,size_t Δ);
-    void *offset_8AU(void *p ,size_t Δ);
-    bool is_aligned_8AU(void *p);
+    // latent link call convention
+    typedef struct Core·Link;
 
-    // given an 8AU aligned window, return the AU pointer to the least and greatest index
-    void *floor_within_aligned_8AU(void *p);
-    void *ceiling_within_aligned_8AU(void *p);
+    // as this is a macro the fields are not typed, so no casts are needed
+    #define Core·call(fn ,link) (link->action.##fn##(link->tableau))
 
-  //----------------------------------------
-  // Sequencer
-
-    typedef struct Core·Node;
-
-    typedef Core·Node *(*Core·Function)(Core·Node *node);
-
-    typedef struct{
-      Core·Function function;
-    } Core·Node;
+    struct{
+      void *offset(void *p ,size_t Δ);
+      void *offset_8AU(void *p ,size_t Δ);
 
-    void call(Core·Node *node){
-      while(node) node = node->function(node));
-    }
+      // given an 8AU window aligned on an 8AU boundary
+      bool is_aligned_on_8AU(void *p);
+      void *floor_within_aligned_8AU(void *p);
+      void *ceiling_within_aligned_8AU(void *p);
+    } Core;
 
   //----------------------------------------
-  // Tape Machine
-
-    // tape
+  // Area
 
-    typedef struct{
-      uint8_t *position;
-      extent_t extent;
-    } Core·Area;
+    typedef struct Core·Tape;
 
-    // tape machine
+    typedef enum{
+      Core·Area·Topology·mu
+      ,Core·Area·Topology·nonexistent // pointer to area is NULL
+      ,Core·Area·Topology·empty      // pointer to are is non-null but position pointer is NULL
+      ,Core·Area·Topology·singleton  // extent is zero
+      ,Core·Area·Topology·segment    // none of the above
+      ,Core·Area·Topology·circle     // could be forced by a special read function
+      ,Core·Area·Topology·cyclic     // cycle does not include leftmost
+      ,Core·Area·Topology·infinite   // could happen for a function abstraction of the interface
+    }Core·Tape·Topology;
 
     typedef struct{
-      Core·Area *tape;
-      AU *hd;
-    } Core·TM;
+      Core·Tape·Topology (*topology)(Core·Tape *tape);
+    }Core·Tape·Face;
 
-    // Step
+    typedef struct Core·Area; // extends Tape
 
     typedef struct{
-      Core·Node node;
-      Core·Node *next;
-      Core·TM *tm;
-    } Core·Step·Node;
+      Core·Tape·Face tape;
 
-    Local Node *Core·step_AU(Node *node){
-      Core·Step·Node *step_node = (Core·Step·Node *)node;
-      step_node->hd = Core·offset(step_node->tm->hd ,1);
-      return node->next;
-    }
-
-    Local Node *Core·step_8AU(Node *node){
-      Core·Step·Node *step_node = (Core·Step·Node *)node;
-      step_node->hd = Core·offset_8AU(step_node->tm->hd ,1);
-      return node->next;
-    }
-
-    // Status
+      void init_pe(Core·Area *area ,void *position ,extent_t extent);
+      void init_pp(Core·Area *area ,void *position_left ,void *position_right);
+      void set_position(Core·Area *area ,AU *new_position);
+      void set_position_left(Core·Area *area ,AU *new_position); // synonym
+      void set_position_right(Core·Area *area ,AU *new_position_right);
+      void set_extent(Core·Area *area ,extent_t extent); 
 
-    typedef struct{
-      Core·Node node;
-      Core·Node *not_on_tape;
-      Core·Node *interim;
-      Core·Node *rightmost;
-      Core·TM *tm;
-    } Core·Status·Node;
+      // read area properties
+      AU *position(Core·Area *area);
+      AU *position_left(Core·Area *area); // synonym
+      AU *position_right(Core·Area *area);
+      extent_t extent(Core·Area *area); 
 
-    // Copy Cell
+      AU *complement(Core·Area *area ,AU *r);
 
-    typedef struct{
-      Core·Node node;
-      Core·Node *not_on_tape;
-      Core·Node *interim;
-      Core·Node *rightmost;
-      Core·TM *tm;
-    } Core·CopyCell·Node;
+      // area relationships
+      bool encloses_pt(AU *pt ,Core·Area *area);
+      bool encloses_pt_strictly(AU *pt ,Core·Area *area);
+      bool encloses_area(Core·Area *outer ,Core·Area *inner);
+      bool encloses_area_strictly(Core·Area *outer ,Core·Area *inner);
+      bool overlap(Core·Area *a ,Core·Area *b);
+      void largest_aligned_64(Core·Area *outer ,Core·Area *inner_64);
 
-    uint8_t Area·read_8_zero(Core·Area *area ,void *r);
-    uint8_t Area·read_8_fwd(Core·Area *area ,void *r);
-    uint8_t Area·read_8_rev(Core·Area *area ,uint8_t *r);
+    } Core·Area·Face;
 
-typedef struct{
-  Core·TM read;
-  Core·TM write;
-  Core·Function init;
-  Core·Function copy_cell;
-  Core·Function step;
-  Core·Function status;
-} Core·Copy·Tableau
 
+  //----------------------------------------
+  // Tape Machine
 
+    typedef struct Core·TM_NX;
 
+    // if tape machine does not support step left, then Status·leftmost will be reported as Status·interim
+    typedef enum{
+      Core·TM·Head·Status·mu = 0
+      ,Core·TM·Head·Status·not_on_tape = 1
+      ,Core·TM·Head·Status·leftmost    = 1 << 1
+      ,Core·TM·Head·Status·interim     = 1 << 2
+      ,Core·TM·Head·Status·rightmost   = 1 << 3
+    }Core·TM·Head·Status;
 
-// wire these in advance, on the tableau, then insert critical functions before call
-void wire_loop_AU(Core·TM *tm_read ,Core·TM *tm_write){
-  CopyCell·Node copy_cell;
+    const uint Core·TM·Head·Status·bad =
+      Core·TM·Head·Status·mu 
+      | Core·TM·Head·Status·not_on_tape
+      ;
 
-  Status·Node read_status_node;
+    const uint Core·TM·Head·Status·good =
+      Core·TM·Head·Status·leftmost   
+      | Core·TM·Head·Status·interim   
+      | Core·TM·Head·Status·rightmost 
+      ;
 
-  Step·Node read_step_node;
-  Step·Node write_step_node;
+    typedef struct{
+      Core·Tableau tableau;
+      Core·TM *tm;
+      Core·Area·M *a;
+      Core·TM·Head·Status status;
+      Core·Tape·Topology topology;
+    }Core·TM_NX·Tableau;
 
-  copy_cell.node.function = Core·copy_AU;
-  copy_cell.next = &read_status_node;
+    // default Tableau
+    Local Core·TM_NX·Tableau Core·TM_NX·t;
 
-  read_status.node.function = Core·status;
-  read_status.not_on_tape = NULL; // needs to be an error node
-  read_status.interim = &step_node;
-  read_status.rightmost = NULL;
-  
-  read_step_node.node.function = Core·stepAU;
-  read_step_node.next = &write_step_node;
+    typedef struct{
+      void mount(Core·TM_NX·Tableau *);
+      void rewind(Core·TM_NX·Tableau *);
+      void step(Core·TM_NX·Tableau *);
+      void step_left(Core·TM_NX·Tableau *);
+      void status(Core·TM_NX·Tableau *);
+      void topology(Core·TM_NX·Tableau *);
+    } Core·TM_NX·Action;
+    // default actions table
+    Local Core·TM_NX·Action Core·TM_NX·action;
 
-  write_step_node.node.function = Core·stepAU;
-  write_step_node.next = &write_step_node;
+    // default link
+    Core·Link Core·TM_NX·link;
 
-}
 
   //----------------------------------------
-  // Tape
+  // Map
+
+    typedef enum{
+      Core·Map·Status·mu = 0
+      ,Core·Map·Status·no_tape
+      ,Core·Map·Status·not_computable
+      ,Core·Map·Status·complete
+    } Core·Map·Status;
+
+    typedef enum{
+      Core·Map·Completion·mu = 0
+      ,Core·Map·Completion·no_tape                
+      ,Core·Map·Completion·not_computable         
+      ,Core·Map·Completion·failed                 
+      ,Core·Map·Completion·perfect_fit            
+      ,Core·Map·Completion·read_surplus           
+      ,Core·Map·Completion·read_surplus_write_gap 
+      ,Core·Map·Completion·write_available        
+      ,Core·Map·Completion·write_gap              
+    } Core·Map·Completion;
+
+    const uint Core·Map·Completion·bad =
+      Core·Map·Completion·no_tape                
+      | Core·Map·Completion·not_computable         
+      | Core·Map·Completion·failed
+      ;
+
+    const uint Core·Map·Completion·good =
+      Core·Map·Completion·perfect_fit            
+      | Core·Map·Completion·read_surplus           
+      | Core·Map·Completion·read_surplus_write_gap 
+      | Core·Map·Completion·write_available        
+      | Core·Map·Completion·write_gap              
+      ;
+
+    typedef Core·Map·Fn (*Core·Map·Fn)();
+
+    // Link for Map
+    typedef struct{
+        Core·Link *domain;
+        Core·Link *range;
+        Core·Map·Fn *fn;
+        Core·Map·Status status;
+    } Core·Map·Tableau;
+
+    void Core·map(Core·Map·Tableau t);
+
+    // true if function enters the map loop, otherwise false.
+    void Core·map(Core·Map·Tableau *t){
+      #ifdef Core·DEBUG
+        if(!t){
+          fprintf(stderr, "Core·Map·Tableau:: given NULL t");
+          return;
+        }
+        uint error = 0;
+        if( t->status & Core·Map·Completion·bad != 0 ){
+          fprintf(stderr, "Core·Map:: prior map completion status is bad.");
+        }
+        call(status ,t->domain);
+        if(t->domain->tableau->status & Core·TM·Head·Status·good == 0){ 
+          fprintf(stderr, "Core·Map:: domain is not good.");
+          error++;
+        }
+        call(status ,t->range);
+        if(t->range->tableau->status & Core·TM·Head·Status·good == 0){ 
+          fprintf(stderr, "Core·Map:: range is not good.");
+          error++;
+        }
+        if(error > 0) return;
+      #endif
+      
 
-    typedef struct Core·Area;
+    }
 
-    typedef enum {
-      Core·Area·Topology·nonexistent  // TapeMachine is unmounted (tape pointer is NULL)
-      ,Core·Area·Topology·empty       // Tape exists but contains no elements (extent == 0)
-      ,Core·Area·Topology·singleton   // Tape has exactly one element (extent == 1)
-      ,Core·Area·Topology·finite      // Tape has a fixed, finite length (extent > 1)
-      ,Core·Area·Topology·unbounded   // Tape conceptually extends infinitely
-      ,Core·Area·Topology·cycles      // Tape has a repeating pattern but no explicit wraparound
-      ,Core·Area·Topology·circular    // Tape is explicitly circular (head can wrap around)
-    } Core·Area·Topology;
+  //----------------------------------------
+  // Copy
+
+    typedef enum{
+      Core·Copy·Status·mu = 0
+      ,Core·Copy·Status·argument_guard = 1
+      ,Core·Copy·Status·perfect_fit = 2
+      ,Core·Copy·Status·read_surplus = 4
+      ,Core·Copy·Status·read_surplus_write_gap = 8
+      ,Core·Copy·Status·write_available = 16
+      ,Core·Copy·Status·write_gap = 32
+    } Core·Copy·Status;
 
     typedef struct{
-      Core·Area.Topology (*topology)(Tape *tape);
-    } Core·Area·M
+      Core·TM read;
+      Core·TM write;
+      Core·Function init;
+      Core·Function copy_cell;
+      Core·Function step;
+      Core·Function status;
+    } Core·Copy·Link;
 
     typedef struct{
-      Core·Area·M tape_m;
-      void init_ppe(Core·Area *area ,void *position ,extent_t extent);
-      void init_pp(Core·Area *area ,void *position_left ,void *position_right);
-      void set_position(Core·Area *area ,uint8_t *new_position);
-      void set_position_left(Core·Area *area ,uint8_t *new_position); // synonym
-      extent_t set_extent(Core·Area *area);
-      void set_position_right(Core·Area *area ,uint8_t *new_position_right);
-
-      // read area properties
-      bool empty(Core·Area *area);
-      uint8_t *position(Core·Area *area);
-      uint8_t *position_left(Core·Area *area); // synonym
-      uint8_t *position_right(Core·Area *area);
-      extent_t extent(Core·Area *area);
-      uint8_t length_Kung(Core·Area *area); // saturates at 3
-
-      // area relationships
-      bool encloses_pt(uint8_t *pt ,Core·Area *area);
-      bool encloses_pt_strictly(uint8_t *pt ,Core·Area *area);
-      bool encloses_area(Core·Area *outer ,Core·Area *inner);
-      bool encloses_area_strictly(Core·Area *outer ,Core·Area *inner);
-      bool overlap(Core·Area *a ,Core·Area *b);
-      void largest_aligned_64(Core·Area *outer ,Core·Area *inner_64);
-      uint8_t *complement(Core·Area *area ,uint8_t *r);
-    } Core·Area·M
 
+      uint8AU_t Area·read_8AU_zero(Core·Area *area ,void *r);
+      uint8AU_t Area·read_8AU_fwd(Core·Area *area ,void *r);
+      uint8AU_t Area·read_8AU_rev(Core·Area *area_8AU ,void *r);
 
+      // hex conversion
+      uint16_t byte_to_hex(uint8_t byte);
+      uint8_t hex_to_byte(uint16_t hex);
 
+      // copy one area to another, possibly with a transformation
+      Map·Status Core·map(Core·Map·Fn fn);
+      Map·Fn Map·AU_by_AU;
+      Map·Fn Map·by_8AU;
+      Map·Fn Map·write_hex;
+      Map·Fn Map·read_hex;
 
+    } Core·MapFn·Face;
 
-typedef enum {
-  Core·Head·Status·uinitialied 
-  ,Core·Head·Status·debug
-  ,Core·Head·Status·production
-} Core·Head·Status;
 
-typedef struct{
-  Core·Node parent;
-  uint8_t *pt;
-} Core·Node·Head;
+#endif
 
+//--------------------------------------------------------------------------------
+// Implementation
 
+  typedef AU (*ReadFn8)(Area * ,AU *);
+  typedef uint64_t (*ReadFn64)(Area * ,uint64_t *);
 
 
 Local·Topology Area·topology_byte_array(Area *area){
@@ -237,85 +296,35 @@ Local·Topology Area·topology_byte_array(Area *area){
 }
 
 
-  typedef uint8_t (*ReadFn8)(Area * ,uint8_t *);
-  typedef uint64_t (*ReadFn64)(Area * ,uint64_t *);
-
-  typedef enum {
-    Core·Copy·Read·Status·argument_guard=0     // No data available (invalid read)
-    ,Core·Copy·Read·Status·empty     // No data available (invalid read)
-    ,Core·Copy·Read·Status·singleton // Only one value exists
-    ,Core·Copy·Read·Status·first     // First value in a sequence
-    ,Core·Copy·Read·Status·interim   // Not first, not last  
-    ,Core·Copy·Read·Status·last       // Last value in a sequence
-  } Core·Copy·Read·Status;
-
-  typedef enum{
-    Core·Copy·Status·uninitialized = 0
-    ,Core·Copy·Status·argument_guard = 1
-    ,Core·Copy·Status·perfect_fit = 2
-    ,Core·Copy·Status·read_surplus = 4
-    ,Core·Copy·Status·read_surplus_write_gap = 8
-    ,Core·Copy·Status·write_available = 16
-    ,Core·Copy·Status·write_gap = 32
-  } Core·Copy·Status;
-
-
+    typedef struct{
+      AU *position;
+      extent_t extent;
+    } Core·Area;
 
 
-  struct{
-    struct{
-      Core·Area *read;
-      Core·Area *write;
-      ReadFn8 read_fn_8;
-      ReadFn64 read_fn_64;
-      uint8_t *read_pt;
-      uint8_t *write_pt;
-      Core·Copy·Status status;
-    }copy;
-  } Core·TableauFace
-  Core·TableauFace Core·tf;
-
-  typedef Core·Copy·Fn (*Core·Copy·Fn)();
-
-  typedef struct{
-
-    // void * pointer operations
-    void *offset_8(void *p ,size_t Δ);
-    void *offset_64(void *p ,size_t Δ);
-    bool is_aligned_64(void *p);
-    void *floor_64(void *p);
-    void *ceiling_64(void *p);
 
-    // initialize an area
+    typedef struct{
+      Core·Area *area;
+      AU *hd;
+    } Core·TM·Array;
 
-    // read from an area
-    uint8_t Area·read_8_zero(Core·Area *area ,void *r);
-    uint8_t Area·read_8_fwd(Core·Area *area ,void *r);
-    uint8_t Area·read_8_rev(Core·Area *area ,uint8_t *r);
 
-    uint64_t Area·read_64_zero(Core·Area *area ,void *r);
-    uint64_t Area·read_64_fwd(Core·Area *area ,void *r);
-    uint64_t Area·read_64_rev(Core·Area *area_64 ,uint8_t *r);
+    Local Node *Core·step_AU(Node *node){
+      Core·Step·Node *step_node = (Core·Step·Node *)node;
+      step_node->hd = Core·offset(step_node->tm->hd ,1);
+      return node->next;
+    }
 
-    // hex conversion
-    uint16_t byte_to_hex(uint8_t byte);
-    uint8_t hex_to_byte(uint16_t hex);
+    Local Node *Core·step_8AU(Node *node){
+      Core·Step·Node *step_node = (Core·Step·Node *)node;
+      step_node->hd = Core·offset_8AU(step_node->tm->hd ,1);
+      return node->next;
+    }
 
-    // copy one area to another, possibly with a transformation
-    Copy·Status Core·copy(Core·Copy·Fn fn);
-    Copy·Fn Copy·byte_by_byte;
-    Copy·Fn Copy·by_word_64;
-    Copy·Fn Copy·write_hex;
-    Copy·Fn Copy·read_hex;
 
-  } Core·M;
-  Core·M m; // initialized in the implementation;
 
 
-#endif
 
-//--------------------------------------------------------------------------------
-// Implementation
 
 #ifdef Core·IMPLEMENTATION
   // declarations available to all of the IMPLEMENTATION go here
@@ -325,7 +334,7 @@ Local·Topology Area·topology_byte_array(Area *area){
     #endif
 
     typedef struct{
-      uint8_t *position;
+      AU *position;
       extent_t extent;
     } Core·Area;
 
@@ -342,7 +351,7 @@ Local·Topology Area·topology_byte_array(Area *area){
         } write_hex;
     } Core·TableauLocal;
 
-  // this part goes into Copylib.a
+  // this part goes into Maplib.a
   #ifndef LOCAL
   #endif 
 
@@ -358,7 +367,7 @@ Local·Topology Area·topology_byte_array(Area *area){
         return NULL;
       }
       #endif
-      return (void *)((uint8_t *)p) + Δ;
+      return (void *)((AU *)p) + Δ;
     }
 
     Local void *Core·offset_64(void *p ,size_t Δ){
@@ -371,10 +380,10 @@ Local·Topology Area·topology_byte_array(Area *area){
       return (void *)((uint64_t *)p) + Δ;
     }
 
-    Local bool Core·is_aligned_64(void *p){
+    Local bool Core·is_aligned_on_64(void *p){
       #ifdef Core·Debug
       if(!p){
-        fprintf(stderr,"Core·is_aligned_64:: given NULL `p'");
+        fprintf(stderr,"Core·is_aligned_on_64:: given NULL `p'");
         return false;
       }
       #endif
@@ -419,7 +428,7 @@ Local·Topology Area·topology_byte_array(Area *area){
     Local void Core·Area·set_position_right(Core·Area *area ,void *new_position_right){
       Core·Area·set_extent(new_position_right - area->position);
     }
-    Local void Core·Area·init_pe(Core·Area *area ,uint8_t *position ,extent_t extent){
+    Local void Core·Area·init_pe(Core·Area *area ,AU *position ,extent_t extent){
       Core·Area·set_position(position);
       Core·Area·set_extent(extent);
     }
@@ -443,7 +452,7 @@ Local·Topology Area·topology_byte_array(Area *area){
     // Requesting a NULL position is a logical error, because a NULL position
     // means the Area is empty and has no position. Instead, use the `empty`
     // predicate.
-    Local uint8_t *Core·Area·position(Core·Area *area){
+    Local AU *Core·Area·position(Core·Area *area){
       #ifdef Core·Debug
       if(!area){
         fprintf(stderr,"Core·Area·position:: given NULL area");
@@ -457,7 +466,7 @@ Local·Topology Area·topology_byte_array(Area *area){
     }
 
 
-    Local uint8_t *Core·Area·position_right(Core·Area *area){
+    Local AU *Core·Area·position_right(Core·Area *area){
       #ifdef Core·Debug
       if(!area){
         fprintf(stderr,"Core·Area·position_right:: given NULL area");
@@ -475,18 +484,18 @@ Local·Topology Area·topology_byte_array(Area *area){
       #endif
       return area->extent;
     }
-    Local uint8_t Core·Area·length_Kung(Core·Area *area){
+    Local AU Core·Area·length_Kung(Core·Area *area){
       if(!Core·Area·position_left(area)) return 0;
       if(Core·Area·extent(area) >= 2) return 3;
       return Core·Area·extent(area) + 1;
     }
 
-    Local bool Core·Area·encloses_pt(Core·Area *area ,uint8_t *pt){
+    Local bool Core·Area·encloses_pt(Core·Area *area ,AU *pt){
       return 
         (pt >= Core·Area·position_left(area)) 
         && (pt <= Core·Area·position_right(area));
     }
-    Local bool Core·Area·encloses_pt_strictly(Core·Area *area ,uint8_t *pt){
+    Local bool Core·Area·encloses_pt_strictly(Core·Area *area ,AU *pt){
       return 
         (pt > Core·Area·position_left(area)) 
         && (pt < Core·Area·position_right(area));
@@ -518,8 +527,8 @@ Local·Topology Area·topology_byte_array(Area *area){
       uintptr_t p0 = (uintptr_t)Core·Area·position_left(outer);
       uintptr_t p1 = (uintptr_t)Core·Area·position_right(outer);
 
-      uint8_t *p0_64 = (uint8_t *)( (p0 + 0x7) & ~(uintptr_t)0x7 );
-      uint8_t *p1_64 = (uint8_t *)( (p1 - 0x7) & ~(uintptr_t)0x7 );
+      AU *p0_64 = (AU *)( (p0 + 0x7) & ~(uintptr_t)0x7 );
+      AU *p1_64 = (AU *)( (p1 - 0x7) & ~(uintptr_t)0x7 );
 
       if(p1_64 < p0_64){
         Core·Area·set_position(inner_64 ,NULL);
@@ -531,7 +540,7 @@ Local·Topology Area·topology_byte_array(Area *area){
     // complement against the extent of the area (reverse direction)
     // works for byte pointer
     // works for aligned word pointer
-    Local uint8_t *Core·Area·complement(Core·Area *area ,uint8_t *r){
+    Local AU *Core·Area·complement(Core·Area *area ,AU *r){
       return Core·Area·position_left(area) + (Core·Area·position_right(area) - r);
     }
 
@@ -539,30 +548,30 @@ Local·Topology Area·topology_byte_array(Area *area){
     // read functions
 
     // consider instead using `copy_zero`
-    Local uint8_t Core·Area·read_8_zero(Core·Area *area ,void *r){
+    Local AU Core·Area·read_8_zero(Core·Area *area ,void *r){
       return 0;
     }
     Local uint64_t Core·Area·read_64_zero(Core·Area *area ,void *r){
       return 0;
     }
 
-    Local uint8_t Core·Area·read_8_fwd(){
+    Local AU Core·Area·read_8_fwd(){
       Core·Area a = Core·tf.read;
-      uint8_t **r = &Core·tf.read_pt;
+      AU **r = &Core·tf.read_pt;
 
       #ifdef Core·Debug
         if(!a || !*r){
           fprintf(stderr ,"Core·Area·read_8_fwd:: read read_pt: %p %p\n" ,a ,*r); 
-          return Core·Copy·Read·Status·argument_guard;
+          return Core·Map·Read·Status·argument_guard;
         }
         if( !Core·Area·enclose_pt(area ,r) ){
           fprintf(stderr,"Core·Area·read_8_fwd:: out of interval read\n");
         }
       #endif
-      return *(uint8_t *)r;
+      return *(AU *)r;
     }
 
-    Local uint8_t Core·Area·read_8_fwd(Core·Area *area ,void *r){
+    Local AU Core·Area·read_8_fwd(Core·Area *area ,void *r){
       #ifdef Core·Debug
       if(!area || !r){
         fprintf(stderr,"Core·Area·read_8_fwd:: area r: %p %p\n" ,area ,r);
@@ -572,7 +581,7 @@ Local·Topology Area·topology_byte_array(Area *area){
         fprintf(stderr,"Core·Area·read_8_fwd:: out of interval read\n");
       }
       #endif
-      return *(uint8_t *)r;
+      return *(AU *)r;
     }
 
     // Given a pointer to the least address byte of a uint64_t, return the value
@@ -589,33 +598,33 @@ Local·Topology Area·topology_byte_array(Area *area){
       return *(uint64_t *)r;
     }
 
-    Local uint8_t Core·Area·read_8_rev(Core·Area *area ,uint8_t *r){
+    Local AU Core·Area·read_8_rev(Core·Area *area ,AU *r){
       return *(Core·complement(area ,r));
     }
 
-    Local uint64_t Core·Area·read_64_rev(Core·Area *area_64 ,uint8_t *r){
+    Local uint64_t Core·Area·read_64_rev(Core·Area *area_64 ,AU *r){
       return __builtin_bswap64( *(uint64_t *)Core·floor_64(Core·complement(area_64 ,r)) );
     }
 
     //----------------------------------------
-    // Copy
+    // Map
 
-    // Copy function using trampoline execution model
-    Local Core·Copy·Status Core·copy(Core·Copy·Fn fn){
+    // Map function using trampoline execution model
+    Local Core·Map·Status Core·map(Core·Map·Fn fn){
       #ifdef Core·Debug
       if(!fn){
-        fprintf(stderr,"Core·copy:: given null function");
-        return Core·Copy·argument_guard;
+        fprintf(stderr,"Core·map:: given null function");
+        return Core·Map·argument_guard;
       }
       if(
          true
-         && fn != Core·Copy·by_word_64
-         && fn != Core·Copy·byte_by_byte
+         && fn != Core·Map·by_8AU
+         && fn != Core·Map·AU_by_AU
          && fn != Core·write_hex
          && fn != Core·read_hex
       ){
-        fprintf(stderr,"Core·copy:: unrecognized copy function\n");
-        return Core·Copy·argument_guard;
+        fprintf(stderr,"Core·map:: unrecognized copy function\n");
+        return Core·Map·argument_guard;
       ) 
       #endif
 
@@ -626,24 +635,24 @@ Local·Topology Area·topology_byte_array(Area *area){
     //----------------------------------------
     // copy byte_by_byte 
 
-    Core·Copy·Fn Core·Copy·Copy·ByteByByte·perfect_fit;
-    Core·Copy·Fn Core·Copy·Copy·ByteByByte·read_surplus;
-    Core·Copy·Fn Core·Copy·Copy·ByteByByte·write_available;
+    Core·Map·Fn Core·Map·Map·ByteByByte·perfect_fit;
+    Core·Map·Fn Core·Map·Map·ByteByByte·read_surplus;
+    Core·Map·Fn Core·Map·Map·ByteByByte·write_available;
 
-    Local Core·Copy·Fn Core·Copy·byte_by_byte(){
+    Local Core·Map·Fn Core·Map·AU_by_AU(){
       if(Core·Area·extent(Core·tf.copy.read) == Core·Area·extent(Core·tf.copy.write))
-        return Core·Copy·ByteByByte·perfect_fit;
+        return Core·Map·ByteByByte·perfect_fit;
 
       if(Core·Area·extent(Core·tf.copy.read) > Core·Area·extent(Core·tf.copy.write))
-        return Core·Copy·ByteByByte·read_surplus;
+        return Core·Map·ByteByByte·read_surplus;
 
-      return Core·Copy·ByteByByte·write_available;
+      return Core·Map·ByteByByte·write_available;
     }
 
-    Local Core·Copy·Fn Core·Copy·ByteByByte·perfect_fit(){
-      uint8_t **r = &Core·tf.copy.read_pt;
-      uint8_t *r1 = Core·Area·position_right(Core·tf.copy.read);
-      uint8_t **w = &Core·tf.copy.write_pt;
+    Local Core·Map·Fn Core·Map·ByteByByte·perfect_fit(){
+      AU **r = &Core·tf.copy.read_pt;
+      AU *r1 = Core·Area·position_right(Core·tf.copy.read);
+      AU **w = &Core·tf.copy.write_pt;
 
       do{
         **w = Core·tf.copy.read_fn_8(Core·tf.copy.read ,*r);
@@ -652,15 +661,15 @@ Local·Topology Area·topology_byte_array(Area *area){
         (*w)++;
       }while(true);
 
-      Core·tf.copy.status = Core·Copy·Status·perfect_fit;
+      Core·tf.copy.status = Core·Map·Status·perfect_fit;
       return NULL;
     }
 
-    Local Core·Copy·Fn Core·Copy·ByteByByte·read_surplus(){
-      uint8_t **r = &Core·tf.copy.read_pt;
-      uint8_t *r1 = Core·Area·position_right(Core·tf.copy.read);
-      uint8_t **w = &Core·tf.copy.write_pt;
-      uint8_t *w1 = Core·Area·position_right(Core·tf.copy.write);
+    Local Core·Map·Fn Core·Map·ByteByByte·read_surplus(){
+      AU **r = &Core·tf.copy.read_pt;
+      AU *r1 = Core·Area·position_right(Core·tf.copy.read);
+      AU **w = &Core·tf.copy.write_pt;
+      AU *w1 = Core·Area·position_right(Core·tf.copy.write);
 
       do{
         **w = Core·tf.copy.read_fn_8(Core·tf.copy.read ,*r);
@@ -669,14 +678,14 @@ Local·Topology Area·topology_byte_array(Area *area){
         (*w)++;
       }while(true);
 
-      Core·tf.copy.status = Core·Copy·Status·write_available;
+      Core·tf.copy.status = Core·Map·Status·write_available;
       return NULL;
     }
 
-    Local Core·Copy·Fn Core·Copy·ByteByByte·write_avalable(){
-      uint8_t **r = &Core·tf.copy.read_pt;
-      uint8_t *r1 = Core·Area·position_right(Core·tf.copy.read);
-      uint8_t **w = &Core·tf.copy.write_pt;
+    Local Core·Map·Fn Core·Map·ByteByByte·write_avalable(){
+      AU **r = &Core·tf.copy.read_pt;
+      AU *r1 = Core·Area·position_right(Core·tf.copy.read);
+      AU **w = &Core·tf.copy.write_pt;
 
       do{
         **w = Core·tf.copy.read_fn_8(Core·tf.copy.read ,*r);
@@ -685,7 +694,7 @@ Local·Topology Area·topology_byte_array(Area *area){
         (*w)++;
       }while(true);
 
-      Core·tf.copy.status = Core·Copy·Status·read_surplus;
+      Core·tf.copy.status = Core·Map·Status·read_surplus;
       return NULL;
     }
 
@@ -693,27 +702,27 @@ Local·Topology Area·topology_byte_array(Area *area){
     // copy copy_64
 
     // 64-bit copy function with updated TableauFace terminology
-    Core·Copy·Fn Core·Copy·by_word_64;
-    Core·Copy·Fn Core·Copy·ByWord64·leadin;
-    Core·Copy·Fn Core·Copy·ByWord64·bulk;
-    Core·Copy·Fn Core·Copy·ByWord64·tail;
+    Core·Map·Fn Core·Map·by_8AU;
+    Core·Map·Fn Core·Map·ByWord64·leadin;
+    Core·Map·Fn Core·Map·ByWord64·bulk;
+    Core·Map·Fn Core·Map·ByWord64·tail;
 
     // Initialize the copy_64 process
-    Local Core·Copy·Fn Core·Copy·by_word_64(){
+    Local Core·Map·Fn Core·Map·by_8AU(){
       // Determine the largest 64-bit aligned region within the read area
       Core·Area·largest_aligned_64(Core·tf.copy.read ,&Core·tl.copy_64.area_64);
 
       // Choose the correct function based on alignment
-      if(Core·Area·empty(&Core·tl.copy_64.area_64)) return Core·Copy·ByWord64·tail;
-      if(Core·is_aligned_64(Core·Area·position(Core·tf.copy.read))) return Core·Copy·ByWord64·bulk;
-      return Core·Copy·ByWord64·leadin;
+      if(Core·Area·empty(&Core·tl.copy_64.area_64)) return Core·Map·ByWord64·tail;
+      if(Core·is_aligned_on_64(Core·Area·position(Core·tf.copy.read))) return Core·Map·ByWord64·bulk;
+      return Core·Map·ByWord64·leadin;
     }
 
     // Lead-in byte copy (until alignment)
-    Local Core·Copy·Fn Core·Copy·ByWord64·leadin(){
-      uint8_t **r = &Core·tf.copy.read_pt;
-      uint8_t *r0_64 = Core·Area·position(&Core·tl.copy_64.area_64);
-      uint8_t **w = &Core·tf.copy.write_pt;
+    Local Core·Map·Fn Core·Map·ByWord64·leadin(){
+      AU **r = &Core·tf.copy.read_pt;
+      AU *r0_64 = Core·Area·position(&Core·tl.copy_64.area_64);
+      AU **w = &Core·tf.copy.write_pt;
 
       do{
         **w = Core·tf.copy.read_fn_8(Core·tf.copy.read ,r0_64 ,*r);
@@ -722,11 +731,11 @@ Local·Topology Area·topology_byte_array(Area *area){
         (*w)++;
       }while(true);
 
-      return Core·Copy·ByWord64·bulk;
+      return Core·Map·ByWord64·bulk;
     }
 
     // Bulk word copy
-    Local Core·Copy·Fn Core·Copy·ByWord64·bulk(){
+    Local Core·Map·Fn Core·Map·ByWord64·bulk(){
       uint64_t **r = (uint64_t **)&Core·tf.copy.read_pt;
       uint64_t **w = (uint64_t **)&Core·tf.copy.write_pt;
       uint64_t *r1_64 = Core·Area·position_right(&Core·tl.copy_64.area_64);
@@ -738,14 +747,14 @@ Local·Topology Area·topology_byte_array(Area *area){
         (*w)++;
       }while(true);
 
-      return Core·Copy·ByWord64·tail;
+      return Core·Map·ByWord64·tail;
     }
 
     // Tail byte copy (unaligned trailing bytes)
-    Local Core·Copy·Fn Core·Copy·ByWord64·tail(){
-      uint8_t **r = &Core·tf.copy.read_pt;
-      uint8_t *r1 = Core·Area·position_right(&Core·tl.copy_64.area_64);
-      uint8_t **w = &Core·tf.copy.write_pt;
+    Local Core·Map·Fn Core·Map·ByWord64·tail(){
+      AU **r = &Core·tf.copy.read_pt;
+      AU *r1 = Core·Area·position_right(&Core·tl.copy_64.area_64);
+      AU **w = &Core·tf.copy.write_pt;
 
       do{
         **w = Core·tf.copy.read_fn_8(Core·tf.copy.read ,r1 ,*r);
@@ -754,14 +763,14 @@ Local·Topology Area·topology_byte_array(Area *area){
         (*w)++;
       }while(true);
 
-      Core·tf.copy.status = Core·Copy·Status·perfect_fit;
+      Core·tf.copy.status = Core·Map·Status·perfect_fit;
       return NULL;
     }
 
     //----------------------------------------
     // copy write hex
 
-    Local uint16_t Core·byte_to_hex(uint8_t byte){
+    Local uint16_t Core·byte_to_hex(AU byte){
       static const char hex_digits[] = "0123456789ABCDEF";
       return 
           (hex_digits[byte >> 4] << 8) 
@@ -769,26 +778,26 @@ Local·Topology Area·topology_byte_array(Area *area){
     }
 
     // Forward Declarations
-    Core·Copy·Fn Core·Copy·write_hex;
-    Core·Copy·Fn Core·Copy·WriteHex·perfect_fit;
-    Core·Copy·Fn Core·Copy·WriteHex·read_surplus;
-    Core·Copy·Fn Core·Copy·WriteHex·write_available;
+    Core·Map·Fn Core·Map·write_hex;
+    Core·Map·Fn Core·Map·WriteHex·perfect_fit;
+    Core·Map·Fn Core·Map·WriteHex·read_surplus;
+    Core·Map·Fn Core·Map·WriteHex·write_available;
 
-    // Hex Encoding: Initialize Copy
-    Local Core·Copy·Fn Core·Copy·write_hex(){
+    // Hex Encoding: Initialize Map
+    Local Core·Map·Fn Core·Map·write_hex(){
       if(Core·Area·extent(Core·tf.copy.read) == (Core·Area·extent(Core·tf.copy.write) >> 1)){
-        return Core·Copy·WriteHex·perfect_fit;
+        return Core·Map·WriteHex·perfect_fit;
       }
       if(Core·Area·extent(Core·tf.copy.read) > (Core·Area·extent(Core·tf.copy.write) >> 1)){
-        return Core·Copy·WriteHex·read_surplus;
+        return Core·Map·WriteHex·read_surplus;
       }
-      return Core·Copy·WriteHex·write_available;
+      return Core·Map·WriteHex·write_available;
     }
 
-    Local Core·Copy·Fn Core·Copy·WriteHex·perfect_fit(){
-      uint8_t **r = &Core·tf.copy.read_pt;
-      uint8_t *r1 = Core·Area·position_right(Core·tf.copy.read);
-      uint8_t **w = &Core·tf.copy.write_pt;
+    Local Core·Map·Fn Core·Map·WriteHex·perfect_fit(){
+      AU **r = &Core·tf.copy.read_pt;
+      AU *r1 = Core·Area·position_right(Core·tf.copy.read);
+      AU **w = &Core·tf.copy.write_pt;
 
       do {
         *(uint16_t *)*w = Core·hex.byte_to_hex(**r);
@@ -797,15 +806,15 @@ Local·Topology Area·topology_byte_array(Area *area){
         (*w) += 2;
       } while(true);
 
-      Core·tf.copy.status = Core·Copy·Status·perfect_fit;
+      Core·tf.copy.status = Core·Map·Status·perfect_fit;
       return NULL;
     }
 
     // Hex Encoding: Read Surplus
-    Local Core·Copy·Fn Core·Copy·WriteHex·read_surplus(){
-      uint8_t **r = &Core·tf.copy.read_pt;
-      uint8_t *r1 = Core·Area·position_right(Core·tf.copy.write);
-      uint8_t **w = &Core·tf.copy.write_pt;
+    Local Core·Map·Fn Core·Map·WriteHex·read_surplus(){
+      AU **r = &Core·tf.copy.read_pt;
+      AU *r1 = Core·Area·position_right(Core·tf.copy.write);
+      AU **w = &Core·tf.copy.write_pt;
 
       do {
         *(uint16_t *)*w = Core·write_hex.byte_to_hex(**r);
@@ -814,16 +823,16 @@ Local·Topology Area·topology_byte_array(Area *area){
         (*w) += 2;
       } while(true);
 
-      Core·tf.copy.status = Core·Copy·Status·read_surplus;
+      Core·tf.copy.status = Core·Map·Status·read_surplus;
       return NULL;
     }
 
     // Hex Encoding: Write Available
-    Local Core·Copy·Fn Core·Copy·WriteHex·write_available(){
-      uint8_t **r = &Core·tf.copy.read_pt;
-      uint8_t *r1 = Core·Area·position_right(Core·tf.copy.read);
-      uint8_t **w = &Core·tf.copy.write_pt;
-      uint8_t *w1 = Core·Area·position_right(Core·tf.copy.write);
+    Local Core·Map·Fn Core·Map·WriteHex·write_available(){
+      AU **r = &Core·tf.copy.read_pt;
+      AU *r1 = Core·Area·position_right(Core·tf.copy.read);
+      AU **w = &Core·tf.copy.write_pt;
+      AU *w1 = Core·Area·position_right(Core·tf.copy.write);
 
       do {
         *(uint16_t *)*w = Core·write_hex.byte_to_hex(**r);
@@ -832,16 +841,16 @@ Local·Topology Area·topology_byte_array(Area *area){
         (*w) += 2;
       } while(true);
 
-      Core·tf.copy.status = Core·Copy·Status·write_available;
+      Core·tf.copy.status = Core·Map·Status·write_available;
       return NULL;
     }
 
     //----------------------------------------
     // copy read hex
 
-    Local uint8_t Core·hex_to_byte(uint16_t hex){
-      uint8_t high = hex >> 8;
-      uint8_t low = hex & 0xFF;
+    Local AU Core·hex_to_byte(uint16_t hex){
+      AU high = hex >> 8;
+      AU low = hex & 0xFF;
 
       high = 
           (high >= '0' && high <= '9') ? (high - '0')
@@ -858,25 +867,25 @@ Local·Topology Area·topology_byte_array(Area *area){
       return (high << 4) | low;
     }
 
-    Core·Copy·Fn Core·Copy·read_hex;
-    Core·Copy·Fn Core·Copy·ReadHex·perfect_fit;
-    Core·Copy·Fn Core·Copy·ReadHex·read_surplus;
-    Core·Copy·Fn Core·Copy·ReadHex·write_available;
+    Core·Map·Fn Core·Map·read_hex;
+    Core·Map·Fn Core·Map·ReadHex·perfect_fit;
+    Core·Map·Fn Core·Map·ReadHex·read_surplus;
+    Core·Map·Fn Core·Map·ReadHex·write_available;
 
-    Local Core·Copy·Fn Core·Copy·read_hex(){
+    Local Core·Map·Fn Core·Map·read_hex(){
       if((Core·Area·extent(Core·tf.copy.read) >> 1) == Core·Area·extent(Core·tf.copy.write)){
-        return Core·Copy·ReadHex·perfect_fit;
+        return Core·Map·ReadHex·perfect_fit;
       }
       if((Core·Area·extent(Core·tf.copy.read) >> 1) > Core·Area·extent(Core·tf.copy.write)){
-        return Core·Copy·ReadHex·read_surplus;
+        return Core·Map·ReadHex·read_surplus;
       }
-      return Core·Copy·ReadHex·write_available;
+      return Core·Map·ReadHex·write_available;
     }
 
-    Local Core·Copy·Fn Core·Copy·ReadHex·perfect_fit(){
-      uint8_t **r = &Core·tf.copy.read_pt;
-      uint8_t *r1 = Core·Area·position_right(Core·tf.copy.read);
-      uint8_t **w = &Core·tf.copy.write_pt;
+    Local Core·Map·Fn Core·Map·ReadHex·perfect_fit(){
+      AU **r = &Core·tf.copy.read_pt;
+      AU *r1 = Core·Area·position_right(Core·tf.copy.read);
+      AU **w = &Core·tf.copy.write_pt;
 
       do {
         **w = Core·hex_to_byte(*(uint16_t *)*r);
@@ -885,14 +894,14 @@ Local·Topology Area·topology_byte_array(Area *area){
         (*w)++;
       } while(true);
 
-      Core·tf.copy.status = Core·Copy·Status·perfect_fit;
+      Core·tf.copy.status = Core·Map·Status·perfect_fit;
       return NULL;
     }
 
-    Local Core·Copy·Fn Core·Copy·ReadHex·read_surplus(){
-      uint8_t **r = &Core·tf.copy.read_pt;
-      uint8_t *r1 = Core·Area·position_right(Core·tf.copy.write);
-      uint8_t **w = &Core·tf.copy.write_pt;
+    Local Core·Map·Fn Core·Map·ReadHex·read_surplus(){
+      AU **r = &Core·tf.copy.read_pt;
+      AU *r1 = Core·Area·position_right(Core·tf.copy.write);
+      AU **w = &Core·tf.copy.write_pt;
 
       do {
         **w = Core·tf.read_hex.hex_to_byte(*(uint16_t *)*r);
@@ -901,15 +910,15 @@ Local·Topology Area·topology_byte_array(Area *area){
         (*w)++;
       } while(true);
 
-      Core·tf.copy.status = Core·Copy·Status·read_surplus;
+      Core·tf.copy.status = Core·Map·Status·read_surplus;
       return NULL;
     }
 
-    Local Core·Copy·Fn Core·Copy·ReadHex·write_available(){
-      uint8_t **r = &Core·tf.copy.read_pt;
-      uint8_t *r1 = Core·Area·position_right(Core·tf.copy.read);
-      uint8_t **w = &Core·tf.copy.write_pt;
-      uint8_t *w1 = Core·Area·position_right(Core·tf.copy.write);
+    Local Core·Map·Fn Core·Map·ReadHex·write_available(){
+      AU **r = &Core·tf.copy.read_pt;
+      AU *r1 = Core·Area·position_right(Core·tf.copy.read);
+      AU **w = &Core·tf.copy.write_pt;
+      AU *w1 = Core·Area·position_right(Core·tf.copy.write);
 
       do {
         **w = Core·tf.read_hex.hex_to_byte(*(uint16_t *)*r);
@@ -918,32 +927,32 @@ Local·Topology Area·topology_byte_array(Area *area){
         (*w)++;
       } while(true);
 
-      Core·tf.copy.status = Core·Copy·Status·write_available;
+      Core·tf.copy.status = Core·Map·Status·write_available;
       return NULL;
     }
 
     //----------------------------------------
     // copy read hex
 
-    Core·Copy·Fn Core·Copy·read_hex;
-    Core·Copy·Fn Core·Copy·ReadHex·perfect_fit;
-    Core·Copy·Fn Core·Copy·ReadHex·read_surplus;
-    Core·Copy·Fn Core·Copy·ReadHex·write_available;
+    Core·Map·Fn Core·Map·read_hex;
+    Core·Map·Fn Core·Map·ReadHex·perfect_fit;
+    Core·Map·Fn Core·Map·ReadHex·read_surplus;
+    Core·Map·Fn Core·Map·ReadHex·write_available;
 
-    Local Core·Copy·Fn Core·Copy·read_hex(){
+    Local Core·Map·Fn Core·Map·read_hex(){
       if((Core·Area·extent(Core·tf.copy.read) >> 1) == Core·Area·extent(Core·tf.copy.write)){
-        return Core·Copy·ReadHex·perfect_fit;
+        return Core·Map·ReadHex·perfect_fit;
       }
       if((Core·Area·extent(Core·tf.copy.read) >> 1) > Core·Area·extent(Core·tf.copy.write)){
-        return Core·Copy·ReadHex·read_surplus;
+        return Core·Map·ReadHex·read_surplus;
       }
-      return Core·Copy·ReadHex·write_available;
+      return Core·Map·ReadHex·write_available;
     }
 
-    Local Core·Copy·Fn Core·Copy·ReadHex·perfect_fit(){
-      uint8_t **r = &Core·tf.copy.read_pt;
-      uint8_t *r1 = Core·Area·position_right(Core·tf.copy.read);
-      uint8_t **w = &Core·tf.copy.write_pt;
+    Local Core·Map·Fn Core·Map·ReadHex·perfect_fit(){
+      AU **r = &Core·tf.copy.read_pt;
+      AU *r1 = Core·Area·position_right(Core·tf.copy.read);
+      AU **w = &Core·tf.copy.write_pt;
 
       do {
         **w = Core·hex_to_byte(*(uint16_t *)*r);
@@ -952,14 +961,14 @@ Local·Topology Area·topology_byte_array(Area *area){
         (*w)++;
       } while(true);
 
-      Core·tf.copy.status = Core·Copy·Status·perfect_fit;
+      Core·tf.copy.status = Core·Map·Status·perfect_fit;
       return NULL;
     }
 
-    Local Core·Copy·Fn Core·Copy·ReadHex·read_surplus(){
-      uint8_t **r = &Core·tf.copy.read_pt;
-      uint8_t *r1 = Core·Area·position_right(Core·tf.copy.write);
-      uint8_t **w = &Core·tf.copy.write_pt;
+    Local Core·Map·Fn Core·Map·ReadHex·read_surplus(){
+      AU **r = &Core·tf.copy.read_pt;
+      AU *r1 = Core·Area·position_right(Core·tf.copy.write);
+      AU **w = &Core·tf.copy.write_pt;
 
       do {
         **w = Core·hex_to_byte(*(uint16_t *)*r);
@@ -968,15 +977,15 @@ Local·Topology Area·topology_byte_array(Area *area){
         (*w)++;
       } while(true);
 
-      Core·tf.copy.status = Core·Copy·Status·read_surplus;
+      Core·tf.copy.status = Core·Map·Status·read_surplus;
       return NULL;
     }
 
-    Local Core·Copy·Fn Core·Copy·ReadHex·write_available(){
-      uint8_t **r = &Core·tf.copy.read_pt;
-      uint8_t *r1 = Core·Area·position_right(Core·tf.copy.read);
-      uint8_t **w = &Core·tf.copy.write_pt;
-      uint8_t *w1 = Core·Area·position_right(Core·tf.copy.write);
+    Local Core·Map·Fn Core·Map·ReadHex·write_available(){
+      AU **r = &Core·tf.copy.read_pt;
+      AU *r1 = Core·Area·position_right(Core·tf.copy.read);
+      AU **w = &Core·tf.copy.write_pt;
+      AU *w1 = Core·Area·position_right(Core·tf.copy.write);
 
       do {
         **w = Core·hex_to_byte(*(uint16_t *)*r);
@@ -985,7 +994,7 @@ Local·Topology Area·topology_byte_array(Area *area){
         (*w)++;
       } while(true);
 
-      Core·tf.copy.status = Core·Copy·Status·write_available;
+      Core·tf.copy.status = Core·Map·Status·write_available;
       return NULL;
     }
 
@@ -1003,7 +1012,7 @@ Local·Topology Area·topology_byte_array(Area *area){
           ,.read_fn_64 = Core·Area·read_64_fwd
           ,.read_pt = NULL
           ,.write_pt = NULL
-          ,.status = Core·Copy·Status·uninitialized
+          ,.status = Core·Map·Status·uninitialized
        }
     };
 
@@ -1042,7 +1051,7 @@ Local·Topology Area·topology_byte_array(Area *area){
       ,.Area·read_64_fwd = Core·Area·read_64_fwd
       ,.Area·read_64_rev = Core·Area·read_64_rev
 
-      ,.is_aligned_64 = Core·is_aligned_64
+      ,.is_aligned_on_64 = Core·is_aligned_on_64
       ,.floor_64 = Core·floor_64
       ,.ceiling_64 = Core·ceiling_64
       ,.offset_8 = Core·offset_8
@@ -1051,11 +1060,11 @@ Local·Topology Area·topology_byte_array(Area *area){
       ,.byte_to_hex = Core·byte_to_hex
       ,.hex_to_byte = Core·hex_to_byte
 
-      ,.copy = Core·copy
-      ,.Copy·byte_by_byte = Core·Copy·byte_by_byte
-      ,.Copy·by_word_64 = Core·Copy·by_word_64
-      ,.Copy·write_hex = Core·Copy·write_hex
-      ,.Copy·read_hex = Core·Copy·read_hex
+      ,.copy = Core·map
+      ,.Map·AU_by_AU = Core·Map·AU_by_AU
+      ,.Map·by_8AU = Core·Map·by_8AU
+      ,.Map·write_hex = Core·Map·write_hex
+      ,.Map·read_hex = Core·Map·read_hex
     };
 
   #endif // LOCAL
diff --git a/developer/cc🖉/Core_scratch.c b/developer/cc🖉/Core_scratch.c
new file mode 100644 (file)
index 0000000..755a897
--- /dev/null
@@ -0,0 +1,141 @@
+-----
+    typedef struct{
+      Core·Tableau *tableau;
+      Core·Action *action;
+    }Core·Link;
+
+
+    typedef void (*Core·Fn)(Core·Tableau *);
+
+
+
+    typedef struct{
+                           void mount(Core·TM *tm ,Core·Area·M *a);
+                          void rewind(Core·TM *tm);
+                            void step(Core·TM *tm);
+                       void step_left(Core·TM *tm);
+                      void step_right(Core·TM *tm); // synonym for step
+           Core·TM·Head·Status status(Core·TM *tm);
+          Core·Tape·Topology topology(Core·TM *tm); // tape machine can abstract the tape
+    } Core·TM_NX·FTable;
+
+
+
+
+
+#include <stddef.h> // for offsetof
+#include <stdio.h>  // for printf, etc.
+
+typedef struct Core·TM Core·TM;
+
+// Example of a Head Status enum
+typedef enum {
+    Core·TM·Head·Status·mu,
+    Core·TM·Head·Status·not_on_tape,
+    Core·TM·Head·Status·leftmost,
+    Core·TM·Head·Status·interim,
+    Core·TM·Head·Status·rightmost
+} Core·TM·Head·Status;
+
+// Some placeholders for unknown types
+typedef struct Core·Area·M { /* ... */ } Core·Area·M;
+typedef enum   Core·Tape·Topology { /* ... */ } Core·Tape·Topology;
+
+// The "tableau" struct: holds data relevant to an instance
+typedef struct {
+    Core·TM *tm;                  // a pointer to some machine
+    Core·Area·M *a;               // some area pointer
+    Core·TM·Head·Status status;   // the machine's current head status
+    Core·Tape·Topology topology;  // tape topology
+} Core·TM_NX·Tableau;
+
+// Define a function-pointer type: it operates on a Tableau
+typedef void (*Core·TM_NX·Fn)(Core·TM_NX·Tableau *t);
+
+// A table (struct) of function pointers—akin to a “vtable” or dictionary of methods
+typedef struct {
+    Core·TM_NX·Fn mount;
+    Core·TM_NX·Fn rewind;
+    Core·TM_NX·Fn step;
+    Core·TM_NX·Fn step_left;
+    Core·TM_NX·Fn step_right;
+    Core·TM_NX·Fn status;
+    Core·TM_NX·Fn topology;
+} Core·TM_NX·FnTable;
+
+/*
+ * A macro to create named enumeration constants that hold
+ * the byte offset of each field within Core·TM_NX·FnTable.
+ *
+ * Example usage inside an enum:
+ *   enum {
+ *       offset(Core·TM_NX·FnTable, mount),
+ *       offset(Core·TM_NX·FnTable, rewind),
+ *       ...
+ *   };
+ */
+#define offset(Type, field)  offset_##field = offsetof(Type, field)
+
+// Create an enum with an entry for each function-pointer field.
+// Each enumerator will hold the byte offset of that field in the struct.
+enum {
+    offset(Core·TM_NX·FnTable, mount),
+    offset(Core·TM_NX·FnTable, rewind),
+    offset(Core·TM_NX·FnTable, step),
+    offset(Core·TM_NX·FnTable, step_left),
+    offset(Core·TM_NX·FnTable, step_right),
+    offset(Core·TM_NX·FnTable, status),
+    offset(Core·TM_NX·FnTable, topology)
+};
+
+// An example “global” or “default” FnTable (you would define real function pointers here)
+static const Core·TM_NX·FnTable defaultFnTable = {
+    .mount     = NULL, // or mount_impl,
+    .rewind    = NULL, // or rewind_impl,
+    .step      = NULL,
+    .step_left = NULL,
+    .step_right= NULL,
+    .status    = NULL,
+    .topology  = NULL
+};
+
+/*
+ * Dispatcher: given a byte offset (one of the offset_XXX enum values)
+ * and a tableau, find the correct function pointer in defaultFnTable and call it.
+ */
+void Core·TM_MX(Core·TM_NX·Tableau *t, size_t fnOffset)
+{
+    // We know each field in Core·TM_NX·FnTable is of type Core·TM_NX·Fn
+    // (i.e. a pointer-to-function). We'll do pointer arithmetic on a
+    // (Core·TM_NX·Fn *) pointer, but we must convert the byte offset to an index.
+    
+    // Point a function-pointer array at the start of defaultFnTable:
+    const Core·TM_NX·Fn *fnArray = (const Core·TM_NX·Fn *)&defaultFnTable;
+    
+    // Convert the byte offset to an index in the function-pointer array.
+    // Each element is the size of (Core·TM_NX·Fn).
+    // Typically (Core·TM_NX·Fn) is just a pointer, so we do:
+    size_t index = fnOffset / sizeof(Core·TM_NX·Fn);
+
+    // Grab the function pointer
+    Core·TM_NX·Fn fn = fnArray[index];
+    if (!fn) {
+        // Handle the case if the pointer is NULL (not implemented)
+        printf("Function pointer at offset %zu is not implemented.\n", fnOffset);
+        return;
+    }
+
+    // Invoke it
+    fn(t);
+}
+
+// Example usage
+int main(void)
+{
+    Core·TM_NX·Tableau myTableau = { 0 };
+    // Suppose we want to call "step" from the table:
+    Core·TM_MX(&myTableau, offset_step);
+
+    // If it's NULL, the dispatcher prints a message. If not, it would call the function.
+    return 0;
+}
diff --git a/document🖉/Manifold_interpretation.org b/document🖉/Manifold_interpretation.org
deleted file mode 100644 (file)
index ad85f35..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-#+TITLE: Manifold Interpretation
-#+AUTHOR: Thomas
-
-* Concept
-
-The general idea is to use non-standard analysis to formalize the Arithmetic grid of
-Kulisch and Miranker.
-
-The increment on K&M's grid is then the epsilon of non-standard analysis, or a high enough power of epsilon such that the analysis will standardize to zero.
-
-When at a first point located from input X, one can reach a second point by incrementing X, the two points are said to be neighbors, which might or might not be mutual.  Neighbors are said to be connected, neighborliness is not mutual, then connection is directed.
-
-In this manner we can claim that our discrete work is non-standard analysis of continuous functions.  We can then pull in terminology from topology and analysis.
-
-Well at least this establishes a framework for naming some variables.
-
-* Definition of a Manifold in this context.
-
-Given a tableau.
-
-Given a function space of commutable functions of N natural numbers.
-
-Define a mathematical object that consists of a subset of the functions that have
-some of their inputs bound to come from the given tableau.
-
-Curry away the free variable inputs to each functions and build in a direct
-reference to the shared tableau.
-
-Call this object a manifold.
-
-Consider the value of the tableau to be a location on the manifold.  The set
-of functions then behave differently depending where on the manifold we look.
-
-* Nonstandard extension
-
-Define a vector function as the values of the functions on the manifold, say F.  This defines the local space.  Our location in the local space is X, the inputs to the functions.
-
-There is incremental change in F with incremental change in X. Consider F to be describing a Hyperreal space. Standardization leads to differential behavior in the corresponding real space.
-
-
-* Space and Hyperreal Local Space
-
-Space is defined from the variables on the tableau taken as natural numbers. There are as many dimensions as variables on the tableau.
-
-A vector-valued function is defined with components being the values of all the functions in the dictionary.
-
-Hyperreal local space is then defined as this vector. Incremental changes in the function parameters determine the distance between points in the local space. It follows that local space is only Euclidean when the functions are arithmetic.
-
-* Reasoned Explanation
-
-** Proposed Setup
-
-*** Tableau Variables as Coordinates
-
-You have a tableau \( t \) whose variables are all natural-number-valued (in standard or nonstandard sense). The dimension of the "space" is the number of these variables. Each point in that space, therefore, is a tuple \( (t_0, t_1, ..., t_{n-1}) \) of naturals (or hypernaturals).
-
-*** Dictionary of Functions
-
-Suppose you have a "function dictionary" \( m \) with some finite number of function pointers \( \{ f_0, f_1, ..., f_{k-1} \} \). If you collect these into a vector-valued function, then for each point \( t \) (your tableau), you get:
-\[
-F(t) = ( f_0(t), f_1(t), ..., f_{k-1}(t) )
-\]
-
-*** Hyperreal Local Space
-
-Locally, if you allow infinitesimal changes \( \Delta t_i \) to the tableau's coordinates, you look at how \( F(t) \) changes to \( F(t + \Delta t) \) with \( \Delta t \) in the (hyper)natural domain. The difference \( F(t + \Delta t) - F(t) \) is, from an external perspective, a vector of infinitesimal increments—provided each \( f_i \) is sufficiently "nice" (like a function admitting a finite-difference or nonstandard derivative).
-
-*** When is Local Space Euclidean?
-
-You say: "Local space is only Euclidean when the functions are arithmetic." Indeed:
-- If each \( f_i \) is a linear or affine function of the tableau variables, then small increments in \( \Delta t \) produce changes in \( F(t) \) that mimic linear transformations in \( \mathbb{R}^n \).
-- If the functions are more general (e.g., polynomial or nonlinear), then locally the geometry might not be "flat Euclidean," but you can still define a tangent space or local linear approximations (in the sense of finite differences or a "nonstandard derivative").
-
-** Observations & Comments
-
-*** Discrete vs. Continuous
-
-- If all tableau variables are standard natural numbers (with no nonstandard extension), you get a purely discrete grid. Usually, that grid won’t be “locally Euclidean” in the classical sense—each point is isolated.
-- If you incorporate nonstandard analysis with hypernatural indices, you can have infinitesimal increments \( \Delta t \). Externally, it “looks continuous,” internally it’s still a large discrete set.
-- Hence, you can get a scenario that feels like \( \mathbb{R}^n \) locally, if your increments are infinitesimals.
-
-*** Manifold vs. Arithmetic
-
-- In classical manifold theory, local charts map open sets of your manifold to open sets of \( \mathbb{R}^n \). That can hold even if the manifold is nonlinear (like a sphere, which is “locally Euclidean” but globally curved).
-- Being “arithmetic” or “linear” is not required for local Euclideanness in the manifold sense; you only need the ability to map small neighborhoods to an open set in \( \mathbb{R}^n \). Nonlinear functions can still do so, provided you track a smooth structure.
-- You might need a “smoothness” assumption in your difference approach so that \( F \) locally has something akin to a Jacobian, letting you define a tangent space.
-
-*** When is it Exactly Euclidean?
-
-- If the manifold is globally flat (like \( \mathbb{R}^n \) itself), then yes, the structure is Euclidean.
-- In your approach: if the dictionary of functions is linear in the tableau coordinates, you get a global linear map. That indeed yields a globally Euclidean geometry (assuming you define distance in a certain consistent way).
-- If the dictionary is more complicated, you might only get local linear approximations—like expansions used in nonstandard or standard differential geometry.
-
-*** Distance Metric
-
-You mention “incremental changes in the function parameters determine the distance between points in local space.” This suggests you define a metric like:
-\[
-d(t, t + \Delta t) = \| F(t + \Delta t) - F(t) \|
-\]
-or something analogous.
-- If each \( f_i \) is linear, that metric can reduce to something Euclidean.
-- If the \( f_i \) are nonlinear, you get a more complicated geometry (like a Riemannian structure if you handle second-order expansions).
-
-** Conclusion from o1:
-
-- Yes, with a hyperreal or hypernatural approach, you can treat a discrete set of tableau variables as “infinitesimally spaced.”
-- Yes, you can define a vector of function outputs as your local coordinate system.
-- Yes, if the dictionary’s functions are purely arithmetic/linear, you get a globally Euclidean structure in that local space.
-- If the functions are more general, you can still have a “manifold” in the sense of local Euclideanness (via expansions or finite-difference approximations), but it may not be globally Euclidean.
-
-Your statement *“Space is only Euclidean if the functions are arithmetic”* can be rephrased:
-
-- *Globally Euclidean* if your function dictionary is linear or affine.
-- *Locally you might still approximate Euclideanness* if you assume finite differences behave like differentials.
-
-Ultimately, you’re using nonstandard analysis to unify discrete and continuous perspectives on the tableau. This is a well-known strategy in internal hyperreal approaches to “smooth” or “manifold-like” structures.
-
-
-