adds tests for the utility classes, cleans up docs
authorThomas Walker Lynch <xtujpz@reasoningtechnology.com>
Tue, 5 Nov 2024 15:19:13 +0000 (15:19 +0000)
committerThomas Walker Lynch <xtujpz@reasoningtechnology.com>
Tue, 5 Nov 2024 15:19:13 +0000 (15:19 +0000)
81 files changed:
developer/document/GraphDirectedAcyclic.txt [new file with mode: 0644]
developer/document/dependency_graph.html
developer/document/unique_node_label_check.txt [deleted file]
developer/javac/File.java
developer/javac/GraphDirectedAcyclic.java
developer/scratchpad/com/ReasoningTechnology/Ariadne/File.class [new file with mode: 0644]
developer/scratchpad/com/ReasoningTechnology/Ariadne/Graph.class [new file with mode: 0644]
developer/scratchpad/com/ReasoningTechnology/Ariadne/GraphDirectedAcyclic$1.class [new file with mode: 0644]
developer/scratchpad/com/ReasoningTechnology/Ariadne/GraphDirectedAcyclic$2.class [new file with mode: 0644]
developer/scratchpad/com/ReasoningTechnology/Ariadne/GraphDirectedAcyclic.class [new file with mode: 0644]
developer/scratchpad/com/ReasoningTechnology/Ariadne/Label.class [new file with mode: 0644]
developer/scratchpad/com/ReasoningTechnology/Ariadne/LabelList.class [new file with mode: 0644]
developer/scratchpad/com/ReasoningTechnology/Ariadne/Node.class [new file with mode: 0644]
developer/scratchpad/com/ReasoningTechnology/Ariadne/NodeList.class [new file with mode: 0644]
developer/scratchpad/com/ReasoningTechnology/Ariadne/Production.class [new file with mode: 0644]
developer/scratchpad/com/ReasoningTechnology/Ariadne/ProductionList.class [new file with mode: 0644]
developer/scratchpad/com/ReasoningTechnology/Ariadne/Token.class [new file with mode: 0644]
developer/scratchpad/com/ReasoningTechnology/Ariadne/TokenSet.class [new file with mode: 0644]
developer/scratchpad/com/ReasoningTechnology/Ariadne/Util.class [new file with mode: 0644]
developer/shell/Build [new file with mode: 0755]
developer/shell/build [deleted file]
document/todo.txt
release/Ariadne.jar
release/Build [new file with mode: 0755]
release/build [deleted file]
tester/data_Test_File_0/I_exist [new file with mode: 0644]
tester/data_Test_File_0/file_0 [new file with mode: 0644]
tester/data_Test_File_0/file_1 [new file with mode: 0644]
tester/data_Test_File_0/file_2 [new file with mode: 0644]
tester/data_Test_File_0/file_3 [new file with mode: 0644]
tester/document/transcript_first_block_test.txt [deleted file]
tester/document/what_the_tests_do.txt [deleted file]
tester/javac/#Test2.javax# [new file with mode: 0644]
tester/javac/TestBench.java [deleted file]
tester/javac/TestTestBench.java [deleted file]
tester/javac/Test_File_0.java [new file with mode: 0644]
tester/javac/Test_LabelList_0.java [new file with mode: 0644]
tester/javac/Test_Label_0.java [new file with mode: 0644]
tester/javac/Test_NodeList_0.java [new file with mode: 0644]
tester/javac/Test_Node_0.java [new file with mode: 0644]
tester/javac/Test_TokenSet_0.java [new file with mode: 0644]
tester/javac/Test_Token_0.java [new file with mode: 0644]
tester/javac/Test_Util_0.java [new file with mode: 0644]
tester/javac/import_aliases.java [new file with mode: 0644]
tester/jvm/TestBench.jar [deleted file]
tester/jvm/Test_Ariadne.jar [new file with mode: 0644]
tester/scratchpad/MU.class [new file with mode: 0644]
tester/scratchpad/Test_File_0$TestSuite.class [new file with mode: 0644]
tester/scratchpad/Test_File_0.class [new file with mode: 0644]
tester/scratchpad/Test_LabelList_0$TestSuite.class [new file with mode: 0644]
tester/scratchpad/Test_LabelList_0.class [new file with mode: 0644]
tester/scratchpad/Test_Label_0$TestSuite.class [new file with mode: 0644]
tester/scratchpad/Test_Label_0.class [new file with mode: 0644]
tester/scratchpad/Test_NodeList_0$TestSuite.class [new file with mode: 0644]
tester/scratchpad/Test_NodeList_0.class [new file with mode: 0644]
tester/scratchpad/Test_Node_0$TestSuite.class [new file with mode: 0644]
tester/scratchpad/Test_Node_0.class [new file with mode: 0644]
tester/scratchpad/Test_TokenSet_0$TestSuite.class [new file with mode: 0644]
tester/scratchpad/Test_TokenSet_0.class [new file with mode: 0644]
tester/scratchpad/Test_Token_0$TestSuite.class [new file with mode: 0644]
tester/scratchpad/Test_Token_0.class [new file with mode: 0644]
tester/scratchpad/Test_Util_0$TestSuite.class [new file with mode: 0644]
tester/scratchpad/Test_Util_0.class [new file with mode: 0644]
tester/shell/TestTestBench [deleted file]
tester/shell/Test_File_0 [new file with mode: 0755]
tester/shell/Test_LabelList_0 [new file with mode: 0755]
tester/shell/Test_Label_0 [new file with mode: 0755]
tester/shell/Test_NodeList_0 [new file with mode: 0755]
tester/shell/Test_Node_0 [new file with mode: 0755]
tester/shell/Test_TokenSet_0 [new file with mode: 0755]
tester/shell/Test_Token_0 [new file with mode: 0755]
tester/shell/Test_Util_0 [new file with mode: 0755]
tester/test0/TestGraph.class [deleted file]
tester/test0/TestGraph.groovy [deleted file]
tester/test0/env_test [deleted file]
tester/test0/test.sh [deleted file]
tester/test0/transcript-tester.txt [deleted file]
tester/test0/transcript_dev.txt [deleted file]
tester/tool/env
tester/tool/shell_wrapper_list
tool_shared/bespoke/bashrc [new file with mode: 0644]

diff --git a/developer/document/GraphDirectedAcyclic.txt b/developer/document/GraphDirectedAcyclic.txt
new file mode 100644 (file)
index 0000000..3da0b12
--- /dev/null
@@ -0,0 +1,77 @@
+Comment that was on the cycle detector code. Was useful for defining
+the problem and limitations when defining the code. Might turn
+into a list of constraints the user needs to adhere for the algorithm
+to be guaranteed to function per spec.  Has potential
+to be turned into a proof of the algorithm.  Begins by laying
+out the assumptions the code is working under.
+
+
+/*
+Our build tool graph is directed from targets to dependencies.
+
+It must be cycle free. This class extends `Graph` by marking
+cycles that are found when descending from root nodes. Then
+`lookup` will not return these nodes.
+
+If:
+
+ 1. The production functions produce the same output given the
+ same input. (Which is a given for the map definition portion of
+ the graph).
+
+ 2. There are a finite number of states.
+
+ 3. Any input values that are used in the definition of the graph are not
+ changed after some point in time when the graph is said to have been 'defined'.
+
+ 4. No computed values are used for changing the graph definition.
+
+ 5. No computed values direct graph traversal.
+
+Then:
+
+  We can write an algorithm that in turn starts at each node
+  in the graph and searches for cycles, and will find all
+  cycles.
+
+  Our GraphDirectedAcyclic constructor would then not need
+  to know the root nodes of the traversal.
+
+However:
+
+  Had the graph definition been limited to the map object, and there is no
+  interaction with the build functions, we would meet the criteria.
+
+  However, our bestowed upon the user the ability to define 'production'
+  functions, which are used to build the graph dynamically at run time.
+
+  With such production functions is possible that a a graph definition would
+  emerge after a finite number of calls to the build function, and thus we still
+  meet the above criteria, and do not need to give a root node list to the
+  GraphDirectedAcyclic.
+
+  When a graph is to be used with the build tool, it is required that the graph
+  meet the criteria above ** when starting from the root nodes **.  However, it
+  is not generally required. Hence, we provide the root nodes to this function.
+
+  It is possible that the user defines one or more production functions,
+  intentionally nor not, that results in building an unbounded graph definition.
+  Further it is possible for a user to define a production that has an unbounded
+  nature that results in the cycle marking method of this class from never
+  finishing.
+
+  As examples, suppose that the a production follows the digits of pi, giving
+  a different node definition each time it is fed a label to recognize. Or
+  suppose that a production returns an ever longer node label each time it
+  is called. Such a production would cause the graph definition to be open,
+  and potentially for this cycle detection algorithm to never complete.
+
+  A production for a conventional build environment will not do these things,
+  However, a buggy production for build environment, or an unconventional
+  build environment not imagined at this time, could.
+
+  A breadth first search combined programmed as a generator would be able
+  to handle such cases without hanging. Where as this algorithm plunges
+  down depth first, and returns when it has the answer.
+
+*/
index 378c52d..a728d42 100644 (file)
 <!DOCTYPE html>
 <html>
 <head>
-  <title>Dependency Build Algorithm</title>
+  <title>Class and mature functions reference</title>
   <style>
     body {
-      background-color: hsl(0, 0%, 0%); /* Black background */
-      color: hsl(40, 100%, 85%); /* Wheatgrass color (offwhite with a tan hue) */
-      font-family: "Courier New", Courier, monospace;
+      font-family: 'Noto Sans JP', Arial, sans-serif;
+      background-color: hsl(0, 0%, 0%);
+      color: hsl(42, 100%, 80%);
+      padding: 2rem;
     }
-    code {
-      background-color: hsl(0, 0%, 15%); /* Dark gray background for code blocks */
-      border: 1px solid hsl(0, 0%, 25%); /* Slightly lighter gray for the border */
-      border-radius: 4px;
-      padding: 4px;
-      color: hsl(40, 100%, 85%); /* Wheatgrass-colored text */
-      display: block;
-      white-space: pre-wrap;
-      font-size: 14px;
+    .page {
+      padding: 3rem; /* 20px */
+      margin: 1.25rem auto; /* 20px */
+      max-width: 46.875rem; /* 750px */
+      background-color: hsl(0, 0%, 0%);
+      box-shadow: 0 0 0.625rem hsl(42, 100%, 50%); /* 10px */
+    }
+    h1 {
+      font-size: 1.5rem;
+      text-align: center;
+      color: hsl(42, 100%, 84%);
+      text-transform: uppercase;
+      margin-top: 1.5rem;
+    }
+    h2 {
+      font-size: 1.25rem;
+      color: hsl(42, 100%, 84%);
+      text-align: center;
+      margin-top: 2rem;
+    }
+    h3 {
+      font-size: 1.125rem;
+      color: hsl(42, 100%, 75%);
+      margin-top: 1.5rem;
     }
-    ol {
-      margin-left: 20px;
+    p, li {
+      color: hsl(42, 100%, 90%);
+      text-align: justify;
+      margin-bottom: 1rem;
+    }
+    .term {
+      font-family: 'Courier New', Courier, monospace;
+/*      background-color: hsl(0, 0%, 19%); */
+      padding: 0.125rem 0.25rem;
+      border-radius: 0.125rem;
+      text-decoration: underline;
+/*      font-style: italic;*/
+      color: hsl(42, 100%, 95%);
+    }
+    code {
+      font-family: 'Courier New', Courier, monospace;
+      background-color: hsl(0, 0%, 25%);
+      padding: 0.125rem 0.25rem;
+      color: hsl(42, 100%, 90%);
     }
-    li {
-      margin-bottom: 10px;
+
+    table {
+      border-collapse: collapse;
+      width: 100%;
     }
-    h1, h2 {
-      color: hsl(40, 100%, 75%); /* Lighter wheatgrass color for headers */
+
+    tr {
+      page-break-inside: avoid;
+      page-break-after: auto;
     }
-    a {
-      color: hsl(150, 100%, 65%); /* Light green for links */
+
+    th, td {
+      padding: 0.125rem;;
+/*      hsl(0, 0%, 86.7%) */
+      text-align: left;
     }
+
   </style>
+
 </head>
 <body>
-  <h2>Cycle Detection in Dependency Graph</h2>
-  <h3>Overview</h3>
-  <p>
-    The <code>is_acyclic_q</code> function is designed to detect cycles in a dependency graph using a depth-first search (DFS) algorithm. It starts from a list of root node labels and traverses the graph to ensure that there are no cycles. If a cycle is detected, the function marks the nodes involved and continues to explore other parts of the graph.
-  </p>
-  <h3>Key Concepts</h3>
-  <ul>
-    <li><strong>Dependency Graph</strong>: A graph where nodes represent build targets and edges represent dependencies between these targets.</li>
-    <li><strong>Depth-First Search (DFS)</strong>: An algorithm for traversing or searching tree or graph data structures. It starts at the root and explores as far as possible along each branch before backtracking.</li>
-    <li><strong>Cycle Detection</strong>: The process of identifying cycles (loops) in a graph, where a cycle is a path that starts and ends at the same node.</li>
-  </ul>
-  <h3>Functions</h3>
-  <h4>1. is_acyclic_q</h4>
-  <p>
-    <strong>Purpose</strong>: To determine if the dependency graph is acyclic (i.e., contains no cycles).
-  </p>
-  <p>
-    <strong>Parameters</strong>: 
-    <ul>
-      <li><code>root_node_labels</code>: A list of labels for the root nodes to start the cycle search.</li>
-      <li><code>verbose</code>: A boolean flag for enabling detailed output (default is <code>true</code>).</li>
-    </ul>
-  </p>
-  <p>
-    <strong>Returns</strong>: 
-    <ul>
-      <li><code>'acyclic'</code> if no cycles are found.</li>
-      <li><code>'cycle_found'</code> if cycles are detected.</li>
-    </ul>
-  </p>
-  <p>
-    <strong>Process</strong>:
-    <ul>
-      <li>Initializes a stack for DFS traversal.</li>
-      <li>Iteratively calls the <code>is_acyclic_q_descend</code> function to traverse the graph and detect cycles.</li>
-      <li>Updates the traversal state and continues exploring other paths until the stack is empty.</li>
-    </ul>
-  </p>
-  <h4>2. is_acyclic_q_descend</h4>
-  <p>
-    <strong>Purpose</strong>: To perform the actual DFS traversal and cycle detection for a given path.
-  </p>
-  <p>
-    <strong>Parameters</strong>: 
-    <ul>
-      <li><code>path_stack</code>: A stack representing the current path in the graph.</li>
-      <li><code>verbose</code>: A boolean flag for enabling detailed output (default is <code>true</code>).</li>
-    </ul>
-  </p>
-  <p>
-    <strong>Returns</strong>: 
-    <ul>
-      <li><code>'leaf_node'</code> if the current node has no children.</li>
-      <li><code>'cycle_found'</code> if a cycle is detected.</li>
-    </ul>
-  </p>
-  <p>
-    <strong>Process</strong>:
-    <ul>
-      <li>Collects the current path and node.</li>
-      <li>Checks for cycles by comparing the current node with nodes in the path.</li>
-      <li>Marks nodes involved in cycles and updates the stack to continue traversal.</li>
-    </ul>
-  </p>
-  <h3>Usage</h3>
-  <p>
-    The <code>is_acyclic_q</code> function is used to ensure that the dependency graph defined in the build file is free of cycles. This is crucial for preventing infinite loops and ensuring that the build process can proceed smoothly.
-  </p>
+  <div class="page">
 
-</body>
-</html>  
+    A very rough first draft of a reference to the classes.  
+
+    <h1>Cycle Detection on a Dependency Graph</h1>
+    <h2>Overview</h2>
 
-<h2>2. Run Build Scripts</h2>
-<ol>
-  <li>Traverse the queue starting from the tail (the most recently added nodes).</li>
-  <li>For each node, attempt to build it by checking the file dates of the target node and its dependencies:
-    <ol>
-      <li>If the target file is older than any dependency, execute the node’s build function.</li>
-      <li>After building, recheck the file dates. If the file date has been updated, mark the node as successfully built.</li>
-      <li>If the build fails or the file date is not updated, mark the node with an error in its property list.</li>
-    </ol>
-  </li>
-  <li>Nodes with dependencies marked with errors will not be built, and errors will propagate up the dependency tree.</li>
-</ol>
+    <p>A <span class="term">Dependency Graph</span>: Is a directed acyclic graph
+    where non-leaf nodes are build targets, which are either symbolic, or
+    correspond to files in the file system. Leave nodes correspond to files
+    in the file system, and the only edge property is 'dependency'.</p>
 
-<h2>3. Final Reporting and Status</h2>
-<ol>
-  <li>If the root node is successfully built, report the success and any other successfully built nodes.</li>
-  <li>If an error has propagated to the root, report the failure.</li>
-  <li>Keep a list of all successfully built nodes and provide a final summary of the build status.</li>
-</ol>
+    <h2>Functions</h2>
 
-<h2>4. Node Definitions</h2>
-<p>Each node in the dependency graph is defined by a property dictionary. A node is either a symbol or a path:</p>
-<ol>
-  <li>Symbol Nodes: These represent abstract concepts or commands and always trigger a build unless marked with an error.</li>
-  <li>Path Nodes: These represent file paths. A path node is considered built if its target file is newer than its dependencies.</li>
-</ol>
-<p>Both node types are identified by a label, and their dependencies are stored as a list of node labels. The presence of an error property indicates that the node has failed to build or encountered a problem during processing.</p>
+    <h3>1. is_acyclic_q</h3>
+    <p>
+      <strong>Purpose</strong>: To determine if the dependency graph is acyclovir.
+    </p>
+    <p>
+      <strong>Parameters</strong>: 
+      <ul>
+        <li><code>root_node_labels</code>: A list of labels for the root nodes to start the cycle search.</li>
+        <li><code>verbose</code>: A boolean flag for enabling detailed output (default is <code>true</code>).</li>
+      </ul>
+    </p>
+    <p>
+      <strong>Returns</strong>: 
+      <ul>
+        <li><code>'acyclic'</code> if no cycles are found.</li>
+        <li><code>'cycle_found'</code> if cycles are detected.</li>
+      </ul>
+    </p>
+    <p>
+      <strong>Process</strong>:
+      <ul>
+        <li>Initializes a stack for DFS traversal.</li>
+        <li>Iteratively calls the <code>is_acyclic_q_descend</code> function to traverse the graph and detect cycles.</li>
+        <li>Updates the traversal state and continues exploring other paths until the stack is empty.</li>
+      </ul>
+    </p>
+    <h3>2. is_acyclic_q_descend</h3>
+    <p>
+      <strong>Purpose</strong>: To perform the actual DFS traversal and cycle detection for a given path.
+    </p>
+    <p>
+      <strong>Parameters</strong>: 
+      <ul>
+        <li><code>path_stack</code>: A stack representing the current path in the graph.</li>
+        <li><code>verbose</code>: A boolean flag for enabling detailed output (default is <code>true</code>).</li>
+      </ul>
+    </p>
+    <p>
+      <strong>Returns</strong>: 
+      <ul>
+        <li><code>'leaf_node'</code> if the current node has no children.</li>
+        <li><code>'cycle_found'</code> if a cycle is detected.</li>
+      </ul>
+    </p>
+    <p>
+      <strong>Process</strong>:
+      <ul>
+        <li>Collects the current path and node.</li>
+        <li>Checks for cycles by comparing the current node with nodes in the path.</li>
+        <li>Marks nodes involved in cycles and updates the stack to continue traversal.</li>
+      </ul>
+    </p>
+    <h2>Usage</h2>
+    <p>
+      The <code>is_acyclic_q</code> function is used to ensure that the dependency graph defined in the build file is free of cycles. This is crucial for preventing infinite loops and ensuring that the build process can proceed smoothly.
+    </p>
+  </div>
 
 </body>
 </html>
diff --git a/developer/document/unique_node_label_check.txt b/developer/document/unique_node_label_check.txt
deleted file mode 100644 (file)
index b978a74..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-
-predicate == is_well_formed_q
-
-We can not check that the node labels are unique because the given value
-is a single node, and the code is stateless. Besides there is no contract with
-the programmer on how to use the predicated, so the programmer could call the
-predicate multiple times on the same node.  Now can we test this condition in
-our do_markup_graph routine because of the way lookup works, it will always
-return the same node for the same label.  This would be a truly difficult check
-to perform because the map does not given an error but just takes the second of
-the duplicate key definitions (is this really true?)  besides, it would require
-a formal proof of the recognizer functions that they do not return different
-definitions for different keys to match regexprs against.  I've been mulling
-this over.  As we currently the programmer provides the map and function
-definitions, we don't even know which nodes will be in the graph...
index b101ea8..109d7b6 100644 (file)
@@ -1,8 +1,11 @@
 package com.ReasoningTechnology.Ariadne;
 
-import java.io.*;
-import java.nio.file.*;
-import java.util.*;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.List;
+import com.ReasoningTechnology.Mosaic.IO;
 
 public class File {
   static boolean debug = false;
index 51950d8..c71a2b9 100644 (file)
@@ -1,75 +1,5 @@
 package com.ReasoningTechnology.Ariadne;
 
-/*
-Our build tool graph is directed from targets to dependencies.
-
-It must be cycle free. This class extends `Graph` by marking
-cycles that are found when descending from root nodes. Then
-`lookup` will not return these nodes.
-
-If:
-
- 1. The production functions produce the same output given the
- same input. (Which is a given for the map definition portion of
- the graph).
-
- 2. There are a finite number of states.
-
- 3. Any input values that are used in the definition of the graph are not
- changed after some point in time when the graph is said to have been 'defined'.
-
- 4. No computed values are used for changing the graph definition.
-
- 5. No computed values direct graph traversal.
-
-Then:
-
-  We can write an algorithm that in turn starts at each node
-  in the graph and searches for cycles, and will find all
-  cycles.
-
-  Our GraphDirectedAcyclic constructor would then not need
-  to know the root nodes of the traversal.
-
-However:
-
-  Had the graph definition been limited to the map object, and there is no
-  interaction with the build functions, we would meet the criteria.
-
-  However, our bestowed upon the user the ability to define 'production'
-  functions, which are used to build the graph dynamically at run time.
-
-  With such production functions is possible that a a graph definition would
-  emerge after a finite number of calls to the build function, and thus we still
-  meet the above criteria, and do not need to give a root node list to the
-  GraphDirectedAcyclic.
-
-  When a graph is to be used with the build tool, it is required that the graph
-  meet the criteria above ** when starting from the root nodes **.  However, it
-  is not generally required. Hence, we provide the root nodes to this function.
-
-  It is possible that the user defines one or more production functions,
-  intentionally nor not, that results in building an unbounded graph definition.
-  Further it is possible for a user to define a production that has an unbounded
-  nature that results in the cycle marking method of this class from never
-  finishing.
-
-  As examples, suppose that the a production follows the digits of pi, giving
-  a different node definition each time it is fed a label to recognize. Or
-  suppose that a production returns an ever longer node label each time it
-  is called. Such a production would cause the graph definition to be open,
-  and potentially for this cycle detection algorithm to never complete.
-
-  A production for a conventional build environment will not do these things,
-  However, a buggy production for build environment, or an unconventional
-  build environment not imagined at this time, could.
-
-  A breadth first search combined programmed as a generator would be able
-  to handle such cases without hanging. Where as this algorithm plunges
-  down depth first, and returns when it has the answer.
-
-*/
-
 import java.util.HashMap;
 import java.util.Map;
 import java.util.List;
diff --git a/developer/scratchpad/com/ReasoningTechnology/Ariadne/File.class b/developer/scratchpad/com/ReasoningTechnology/Ariadne/File.class
new file mode 100644 (file)
index 0000000..ff433cb
Binary files /dev/null and b/developer/scratchpad/com/ReasoningTechnology/Ariadne/File.class differ
diff --git a/developer/scratchpad/com/ReasoningTechnology/Ariadne/Graph.class b/developer/scratchpad/com/ReasoningTechnology/Ariadne/Graph.class
new file mode 100644 (file)
index 0000000..36d6001
Binary files /dev/null and b/developer/scratchpad/com/ReasoningTechnology/Ariadne/Graph.class differ
diff --git a/developer/scratchpad/com/ReasoningTechnology/Ariadne/GraphDirectedAcyclic$1.class b/developer/scratchpad/com/ReasoningTechnology/Ariadne/GraphDirectedAcyclic$1.class
new file mode 100644 (file)
index 0000000..f3158db
Binary files /dev/null and b/developer/scratchpad/com/ReasoningTechnology/Ariadne/GraphDirectedAcyclic$1.class differ
diff --git a/developer/scratchpad/com/ReasoningTechnology/Ariadne/GraphDirectedAcyclic$2.class b/developer/scratchpad/com/ReasoningTechnology/Ariadne/GraphDirectedAcyclic$2.class
new file mode 100644 (file)
index 0000000..9214c15
Binary files /dev/null and b/developer/scratchpad/com/ReasoningTechnology/Ariadne/GraphDirectedAcyclic$2.class differ
diff --git a/developer/scratchpad/com/ReasoningTechnology/Ariadne/GraphDirectedAcyclic.class b/developer/scratchpad/com/ReasoningTechnology/Ariadne/GraphDirectedAcyclic.class
new file mode 100644 (file)
index 0000000..e987c4b
Binary files /dev/null and b/developer/scratchpad/com/ReasoningTechnology/Ariadne/GraphDirectedAcyclic.class differ
diff --git a/developer/scratchpad/com/ReasoningTechnology/Ariadne/Label.class b/developer/scratchpad/com/ReasoningTechnology/Ariadne/Label.class
new file mode 100644 (file)
index 0000000..0bd129e
Binary files /dev/null and b/developer/scratchpad/com/ReasoningTechnology/Ariadne/Label.class differ
diff --git a/developer/scratchpad/com/ReasoningTechnology/Ariadne/LabelList.class b/developer/scratchpad/com/ReasoningTechnology/Ariadne/LabelList.class
new file mode 100644 (file)
index 0000000..40f1a97
Binary files /dev/null and b/developer/scratchpad/com/ReasoningTechnology/Ariadne/LabelList.class differ
diff --git a/developer/scratchpad/com/ReasoningTechnology/Ariadne/Node.class b/developer/scratchpad/com/ReasoningTechnology/Ariadne/Node.class
new file mode 100644 (file)
index 0000000..a00c7a5
Binary files /dev/null and b/developer/scratchpad/com/ReasoningTechnology/Ariadne/Node.class differ
diff --git a/developer/scratchpad/com/ReasoningTechnology/Ariadne/NodeList.class b/developer/scratchpad/com/ReasoningTechnology/Ariadne/NodeList.class
new file mode 100644 (file)
index 0000000..4897461
Binary files /dev/null and b/developer/scratchpad/com/ReasoningTechnology/Ariadne/NodeList.class differ
diff --git a/developer/scratchpad/com/ReasoningTechnology/Ariadne/Production.class b/developer/scratchpad/com/ReasoningTechnology/Ariadne/Production.class
new file mode 100644 (file)
index 0000000..8fb153c
Binary files /dev/null and b/developer/scratchpad/com/ReasoningTechnology/Ariadne/Production.class differ
diff --git a/developer/scratchpad/com/ReasoningTechnology/Ariadne/ProductionList.class b/developer/scratchpad/com/ReasoningTechnology/Ariadne/ProductionList.class
new file mode 100644 (file)
index 0000000..73b5e2c
Binary files /dev/null and b/developer/scratchpad/com/ReasoningTechnology/Ariadne/ProductionList.class differ
diff --git a/developer/scratchpad/com/ReasoningTechnology/Ariadne/Token.class b/developer/scratchpad/com/ReasoningTechnology/Ariadne/Token.class
new file mode 100644 (file)
index 0000000..9c65237
Binary files /dev/null and b/developer/scratchpad/com/ReasoningTechnology/Ariadne/Token.class differ
diff --git a/developer/scratchpad/com/ReasoningTechnology/Ariadne/TokenSet.class b/developer/scratchpad/com/ReasoningTechnology/Ariadne/TokenSet.class
new file mode 100644 (file)
index 0000000..ec7275e
Binary files /dev/null and b/developer/scratchpad/com/ReasoningTechnology/Ariadne/TokenSet.class differ
diff --git a/developer/scratchpad/com/ReasoningTechnology/Ariadne/Util.class b/developer/scratchpad/com/ReasoningTechnology/Ariadne/Util.class
new file mode 100644 (file)
index 0000000..4e01d3d
Binary files /dev/null and b/developer/scratchpad/com/ReasoningTechnology/Ariadne/Util.class differ
diff --git a/developer/shell/Build b/developer/shell/Build
new file mode 100755 (executable)
index 0000000..2a18026
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/bash
+java com.ReasoningTechnology."Ariadne".Build
diff --git a/developer/shell/build b/developer/shell/build
deleted file mode 100755 (executable)
index f4d3bbc..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-java com/ReasoningTechnology/Ariadne/build
index c8a6c76..1b081de 100644 (file)
@@ -1,7 +1,7 @@
 
 2024-10-16T07:12:41Z[Ariadne_tester]
 
-1. TestBench should be extracted as its own project. It holds the project independent
+[done] 1. TestBench should be extracted as its own project. It holds the project independent
 part of the TestBench.
 
 2. Project skeleton.
@@ -9,10 +9,27 @@ part of the TestBench.
   PaintIt is the current project skeleton, it needs to be updated to match the
   structure of this project.
 
-3. Because this is a Java Project
+  [Will circle back to PaintIt when Ariadne is done.]
 
-  'executables' have a standard form (the JVM) so I allowed the 'executable'
-  directories to be checked into the repo.
+3. Implementation in additional languges.
+
+  It is a one language build environment. Currently that language is Java.  The
+  graph definition is a Java map, the productions are Java functions, and the
+  triggered build functions are Java code.
+
+  The build code could build anything that can be built by running Java code, so
+  this could be projects in other languages. Still after doing everything else
+  in Java it feels natural to use the tool to build Java programs.
+
+  There is no reason this could not all be done in nodejs, for example, though
+  nodejs is not compiled, so there is no point in this.
+
+  I think it could be a C++ program, though there is a dynamic portion to it, as
+  the graph definition is read by the running program, and the running program
+  expects to read the map, and call the loaded production functions.
+
+  This would be an easy program to write to write in nodejs, or Lisp, but
+  development in those languages do not need this tool, as it already exists in
+  Java, it is not clear that benefits of having a 'cleaner' implementation would
+  justify the work.
 
-  In the future, if we want to allow binary release, there will be multiple
-  release directories with suffixes for the target platform. 
index e4b7b37..af08da9 100644 (file)
Binary files a/release/Ariadne.jar and b/release/Ariadne.jar differ
diff --git a/release/Build b/release/Build
new file mode 100755 (executable)
index 0000000..2a18026
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/bash
+java com.ReasoningTechnology."Ariadne".Build
diff --git a/release/build b/release/build
deleted file mode 100755 (executable)
index f4d3bbc..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-java com/ReasoningTechnology/Ariadne/build
diff --git a/tester/data_Test_File_0/I_exist b/tester/data_Test_File_0/I_exist
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tester/data_Test_File_0/file_0 b/tester/data_Test_File_0/file_0
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tester/data_Test_File_0/file_1 b/tester/data_Test_File_0/file_1
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tester/data_Test_File_0/file_2 b/tester/data_Test_File_0/file_2
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tester/data_Test_File_0/file_3 b/tester/data_Test_File_0/file_3
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tester/document/transcript_first_block_test.txt b/tester/document/transcript_first_block_test.txt
deleted file mode 100644 (file)
index 06d4db2..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-2024-10-16T07:05:25Z[]
-Thomas-developer@Blossac§/var/user_data/Thomas-developer§
-> cd Ariadne
-
-2024-10-16T07:05:29Z[]
-Thomas-developer@Blossac§/var/user_data/Thomas-developer/Ariadne§
-> source env_tester
-REPO_HOME /var/user_data/Thomas-developer/Ariadne/
-ENV tool_shared/bespoke/env
-PROJECT Ariadne
-ENV tester/tool/env
-
-2024-10-16T07:05:43Z[Ariadne_tester]
-Thomas-developer@Blossac§/var/user_data/Thomas-developer/Ariadne/tester§
-> clean_build_directories
-+ cd /var/user_data/Thomas-developer/Ariadne//tester
-+ rm -r scratch_pad/com
-+ rm jvm/TestBenchAriadne.jar
-+ rm shell/TestBenchAriadne
-+ set +x
-clean_build_directories done.
-
-2024-10-16T07:05:53Z[Ariadne_tester]
-Thomas-developer@Blossac§/var/user_data/Thomas-developer/Ariadne/tester§
-> make
-Compiling files...
-+ cd /var/user_data/Thomas-developer/Ariadne//tester
-+ javac -d scratch_pad javac/TestBenchAriadne.java javac/TestBench.java
-+ jar cf jvm/TestBenchAriadne.jar -C scratch_pad .
-+ set +x
-Creating shell wrappers...
-tester/tool/environment done.
-
-2024-10-16T07:05:57Z[Ariadne_tester]
-Thomas-developer@Blossac§/var/user_data/Thomas-developer/Ariadne/tester§
-> ./shell/TestBenchAriadne 
-Running Ariadne tests...
-Total test_map run: 1
-Total test_map passed: 1
-Total test_map failed: 0
-
-2024-10-16T07:06:00Z[Ariadne_tester]
-Thomas-developer@Blossac§/var/user_data/Thomas-developer/Ariadne/tester§
-> 
diff --git a/tester/document/what_the_tests_do.txt b/tester/document/what_the_tests_do.txt
deleted file mode 100644 (file)
index cba1483..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-
-test0 - see if the tool will compile when given an empty graph.
-
-test1 - see what happens with a single symbolic node
-
-javac/TestBenchAriadne - the remainder of the tests.
-
-
-
diff --git a/tester/javac/#Test2.javax# b/tester/javac/#Test2.javax#
new file mode 100644 (file)
index 0000000..c38d8d5
--- /dev/null
@@ -0,0 +1,216 @@
+package com.ReasoningTechnology.Ariadne.TestBench;
+
+/*
+Component smoke test. At least call each method of each class.
+
+*/
+
+
+import  com.ReasoningTechnology.Ariadne.*;
+import  com.ReasoningTechnology.TestBench.*;
+import java.util.List;
+import java.util.Map;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+
+
+public class Test2 extends TestBench{
+
+  public static boolean test_Label_0(){
+    boolean[] conditions = new boolean[2];
+    int i = 0;
+
+    // Test input
+    Label test_label = new Label("test");
+
+    // Expected output
+    String expected_value = "test";
+
+    // Actual output
+    conditions[i++] = test_label.get().equals(expected_value);
+    conditions[i++] = test_label.toString().equals(expected_value);
+
+    return all(conditions);
+  }
+
+  public static boolean test_Token_0(){
+    boolean[] conditions = new boolean[4];
+    int i = 0;
+
+    // Test input
+    Token token = new Token("test_value");
+
+    // Check if the value is correctly stored and retrieved
+    conditions[i++] = token.get().equals("test_value");
+
+    // Check if the string representation is correct
+    conditions[i++] = token.toString().equals("test_value");
+
+    // Check equality with another Token object with the same value
+    Token another_token = new Token("test_value");
+    conditions[i++] = token.equals( another_token );
+
+    // Check the hashCode consistency
+    conditions[i++] = token.hashCode() == another_token.hashCode();
+
+    return all(conditions);
+  }
+
+  public static boolean test_LabelList_0(){
+    LabelList label_list = new LabelList();  // Use the constructor
+
+    // Add a label and check the size
+    label_list.add(new Label("test"));
+    return label_list.size() == 1;
+  }
+
+  public static boolean test_Node_0(){
+    Node node = new Node();  // Use the constructor
+    node.put("key", new Object());
+    return node.containsKey("key");
+  }
+
+  public static boolean test_NodeList_0(){
+    NodeList node_list = new NodeList();  // Use the constructor
+
+    // Add a node and check the size
+    node_list.add(new Node());  // Use Node constructor
+    return node_list.size() == 1;
+  }
+
+  public static boolean test_Production_0(){
+    Production production = label -> new Node();  // Use the Node constructor
+
+    // Apply the production function
+    Node node = production.apply(new Label("test"));
+    return node != null;
+  }
+
+  public static boolean test_ProductionList_0(){
+    ProductionList production_list = new ProductionList();  // Use the constructor
+
+    // Add a production and check the size
+    production_list.add(label -> new Node());  // Use the Node constructor
+    return production_list.size() == 1;
+  }
+
+  public static boolean test_TokenSet_0(){
+    TokenSet token_set = new TokenSet();  // Use the constructor
+
+    // Add a token and check if it's contained in the set
+    token_set.add(new Token("test"));
+    return token_set.contains(new Token("test"));
+  }
+
+  public static boolean test_Graph_0() {
+    boolean[] conditions = new boolean[3];
+    int i = 0;
+
+    // Create an empty node map and a production list
+    Map<Label, Node> node_map = new HashMap<>();
+    ProductionList production_list = new ProductionList();
+
+    // Initialize the Graph
+    Graph graph = new Graph(node_map, production_list);
+
+    // Test that lookup returns null for a non-existent node
+    Label non_existent_label = new Label("non_existent");
+    conditions[i++] = graph.lookup(non_existent_label, false) == null;
+
+    // Add a node to the map and test lookup
+    Node test_node = new Node();
+    Label test_label = new Label("test");
+    node_map.put(test_label, test_node);
+    conditions[i++] = graph.lookup(test_label, false) == test_node;
+
+    // Test lookup with verbosity
+    conditions[i++] = graph.lookup(test_label).equals(test_node);
+
+    // Return true if all conditions are met
+    return all(conditions);
+  }
+  public static boolean test_Util_print_list_0(){
+    boolean[] conditions = new boolean[1];
+    int i = 0;
+
+    String prefix = "Test List:";
+    List<String> items = new ArrayList<>();
+    items.add("item1");
+    items.add("item2");
+    items.add("item3");
+
+    String expectedOutput = "Test List: 'item1', 'item2', 'item3'.\n";
+
+    ByteArrayOutputStream outContent = new ByteArrayOutputStream();
+    PrintStream originalOut = System.out;
+    System.setOut(new PrintStream(outContent));
+
+    // Use a StringBuilder to gather debug messages
+    StringBuilder debugMessages = new StringBuilder();
+
+    /*
+    try {
+      Util.print_list(prefix, items);
+      String result = outContent.toString();
+    
+      // Gather debug messages
+      debugMessages.append("Captured output: ").append(result).append("\n");
+      debugMessages.append("Expected output: ").append(expectedOutput).append("\n");
+    
+      conditions[i++] = result.equals(expectedOutput);
+    } catch (Exception e) {
+      conditions[i++] = false;
+    } finally {
+      System.setOut(originalOut);  // Restore System.out
+        
+      // Now print the gathered debug messages
+      System.out.print(debugMessages.toString());
+    }
+    */
+
+    try {
+      Util.print_list(prefix, items);
+      String result = outContent.toString();
+      conditions[i++] = result.equals(expectedOutput);
+    } catch (Exception e) {
+      conditions[i++] = false;
+    } finally {
+      System.setOut(originalOut);
+    }
+
+    return all(conditions);
+  }
+
+
+  // Method to run all tests
+  public static void test_Ariadne(){
+    Map<String, Boolean> test_map = new HashMap<>();
+
+    // Adding tests to the map
+    test_map.put( "test_File_unpack_file_path_0", test_File_unpack_file_path_0() );
+    test_map.put( "test_Label_0", test_Label_0() );
+    test_map.put( "test_Token_0", test_Label_0() );
+    test_map.put( "test_LabelList_0", test_LabelList_0() );
+    test_map.put( "test_Node_0", test_Node_0() );
+    test_map.put( "test_NodeList_0", test_NodeList_0() );
+    test_map.put( "test_Production_0", test_Production_0() );
+    test_map.put( "test_ProductionList_0", test_ProductionList_0() );
+    test_map.put( "test_TokenSet_0", test_TokenSet_0() );
+    test_map.put("test_Graph_0", test_Graph_0());
+    test_map.put("test_Util_print_list_0", test_Util_print_list_0());
+
+    // Run the tests using TestBench
+    TestBench.run( test_map );
+  }
+
+  // Main function to provide a shell interface for running tests
+  public static void main(String[] args){
+    System.out.println("Running Ariadne tests...");
+    test_Ariadne(); // Calls the method to run all tests
+  }
+
+}
+
diff --git a/tester/javac/TestBench.java b/tester/javac/TestBench.java
deleted file mode 100644 (file)
index 642d09f..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-package com.ReasoningTechnology.TestBench;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintStream;
-import java.lang.reflect.Method;
-import java.util.Map;
-
-public class TestBench{
-
-  /* --------------------------------------------------------------------------------
-    Static Data
-  */
-
-  private static PrintStream original_out;
-  private static PrintStream original_err;
-  private static InputStream original_in;
-  
-  private static ByteArrayOutputStream out_content;
-  private static ByteArrayOutputStream err_content;
-  private static InputStream in_content;
-
-  /* --------------------------------------------------------------------------------
-    Test utility methods
-  */
-
-  // typically used to gather results before a return
-  public static boolean all(boolean[] conditions){
-    for( boolean condition : conditions ){
-      if( !condition ){
-        return false;
-      }
-    }
-    return true;
-  }
-
-  /* --------------------------------------------------------------------------------
-    Test run helpers
-  */
-  public static void log_output(String test_name ,String stream ,String output_data){
-    try(FileWriter log_writer = new FileWriter("test_log.txt" ,true)){  // Append mode
-      log_writer.write("Test: " + test_name + "\n");
-      log_writer.write("Stream: " + stream + "\n");
-      log_writer.write("Output:\n" + output_data + "\n");
-      log_writer.write("----------------------------------------\n");
-    } catch(IOException e) {
-      System.err.println("Error writing to log for test: " + test_name + ", stream: " + stream);
-      e.printStackTrace(System.err);
-    }
-  }
-
-  public static boolean method_is_wellformed(Method method) {
-    // Check if the method returns boolean
-    if(!method.getReturnType().equals(boolean.class)){
-      System.out.println("Structural problem: " + method.getName() + " does not return boolean.");
-      return false;
-    }
-
-    // Check if the method has exactly three arguments
-    Class<?>[] parameterTypes = method.getParameterTypes();
-    if(parameterTypes == null || parameterTypes.length != 3){
-      System.out.println("Structural problem: " + method.getName() + " does not have three arguments.");
-      return false;
-    }
-
-    // Check that all parameters are ByteArrayOutputStream
-    if(
-       !parameterTypes[0].equals(ByteArrayOutputStream.class) // Check first parameter
-       || !parameterTypes[1].equals(ByteArrayOutputStream.class) // Check second parameter
-       || !parameterTypes[2].equals(ByteArrayOutputStream.class) // Check third parameter
-       ){
-      System.out.println("Structural problem: " + method.getName() + " has incorrect argument types.");
-      return false;
-    }
-
-    return true;
-  }
-  
-  public static void flush_stdin() throws IOException{
-    while(System.in.available() > 0){
-      System.in.read();
-    }
-  }
-
-  public static void set_test_input(String input_data){
-    ByteArrayInputStream test_in = new ByteArrayInputStream(input_data.getBytes());
-    System.setIn(test_in);
-  }
-
-
-  public static void run(Object test_suite){
-
-    int failed_test = 0;
-    int passed_test = 0;
-
-    Method[] methods = test_suite.getClass().getDeclaredMethods();
-
-    for(Method method : methods){
-
-      // Ways a test can fail ,not exclusive
-      boolean fail_testbench = false;
-      boolean fail_malformed = false;
-      boolean fail_reported = false;
-      boolean fail_exception = false;
-      boolean fail_extraneous_stdout = false;
-      boolean fail_extraneous_stderr = false;
-
-      if( !method_is_wellformed(method) ){
-        // the malformed check prints specific messages
-        System.out.println("TestBench: malformed test counted as a failure:\'" + method.getName() + "\'");
-        failed_test++;
-        continue;
-      }
-
-      PrintStream original_out = null;
-      PrintStream original_err = null;
-      InputStream original_in  = null;
-
-      ByteArrayOutputStream out_content = null;
-      ByteArrayOutputStream err_content = null;
-      ByteArrayInputStream in_content = null;
-
-      try{
-        // Redirect the I/O channels so the tests can manipulate them as data.
-        original_out = System.out;
-        original_err = System.err;
-        original_in = System.in;
-  
-        out_content = new ByteArrayOutputStream();
-        err_content = new ByteArrayOutputStream();
-        in_content = new ByteArrayInputStream();
-
-        System.setOut(new PrintStream(out_content));
-        System.setErr(new PrintStream(err_content));
-        System.setIn(in_content);
-
-      } catch(Throwable e){  // Catches both Errors and Exceptions
-        // Restore stdout ,stderr ,and stdin before reporting the error
-        System.setOut(original_out);
-        System.setErr(original_err);
-        System.setIn(original_in);
-
-        // Report the error
-        System.out.println("TestBench:: when redirecting i/o in preparation for running test \'" + method.getName() + "\' ,test bench itself throws error: " + e.toString());
-        failed_test++;
-        continue;
-      }
-
-      // Capture detritus 
-      String exception_string = "";
-      String stdout_string = "";
-      String stderr_string = "";
-
-      // Finally the gremlins run the test!
-      try{
-
-        Object result = method.invoke(test_suite ,in_content ,out_content ,err_content);
-        fail_reported = !Boolean.TRUE.equals(result); // test passes if ,and only if ,it returns exactly 'true'.
-
-        // A test fails when there is extraneous output
-        fail_extraneous_stdout = out_content.size() > 0;
-        fail_extraneous_stderr = err_content.size() > 0;
-
-        // We keep it to log it
-        if(fail_extraneous_stdout){ stdout_string = out_content.toString(); }
-        if(fail_extraneous_stderr){ stderr_string = err_content.toString(); }
-
-      } catch(Exception e){
-
-        // A test fails when there is an unhandled exception.
-        fail_exception = true;
-
-        // We keep it to report it
-        exception_string = e.toString();
-
-      } finally{
-        
-        // Restore original stdin ,stdout ,and stderr
-        System.setOut(original_out);
-        System.setErr(original_err);
-        System.setIn(original_in);
-      }
-
-      // Report the test result.
-      if(
-         fail_reported 
-         || fail_exception 
-         || fail_extraneous_stdout
-         || fail_extraneous_stderr
-         ){
-
-        failed_test++;
-
-        if(fail_reported) System.out.println("failed: \'" + method.getName() + "\' by report from test.");
-        if(fail_exception) System.out.println("failed: \'" + method.getName() + "\' due to unhandled exception: " + exception_string);
-        if(fail_extraneous_stdout){
-          System.out.println("failed: \'" + method.getName() + "\' due extraneous stdout output ,see log.");
-          log_output(method.getName() ,"stdout" ,stdout_string);
-        }
-        if(fail_extraneous_stderr){
-          System.out.println("failed: \'" + method.getName() + "\' due extraneous stderr output ,see log.");
-          log_output(method.getName() ,"stderr" ,stderr_string);
-        }
-
-      } else{
-        passed_test++;
-      }
-
-    }
-
-    // Summarize all the test results
-    System.out.println("Total tests run: " + (passed_test + failed_test));
-    System.out.println("Total tests passed: " + passed_test);
-    System.out.println("Total tests failed: " + failed_test);
-  }
-
-}
diff --git a/tester/javac/TestTestBench.java b/tester/javac/TestTestBench.java
deleted file mode 100644 (file)
index f9af752..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.ReasoningTechnology.TestBench;
-
-/*
-Component smoke test. At least call each method of each class.
-
-*/
-
-import com.ReasoningTechnology.Ariadne.*;
-import com.ReasoningTechnology.TestBench.*;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.lang.reflect.Method;
-import java.util.List;
-import java.util.Map;
-
-public class TestTestBench extends TestBench{
-
-  public static class TestSuite{
-
-    TestSuite(){
-    }
-
-    public boolean test_pass(ByteArrayOutputStream out_content, ByteArrayOutputStream err_content){
-      return true;
-    }
-
-    public boolean test_fail_0(ByteArrayOutputStream out_content, ByteArrayOutputStream err_content){
-      return false;
-    }
-
-    // Tests if exception uncaught by the test correctly causes a failure from the TestBench.
-    public static boolean test_fail_1() throws Exception {
-      int randomInt = (int) (Math.random() * 100);  // Generate a random integer
-      // Always returns true, but Java will not complain that following code is unreachable
-      if( 
-         (randomInt % 2 != 0 && ((randomInt * randomInt - 1) % 8 == 0))  
-         || (randomInt % 2 == 0 && (randomInt * randomInt) % 4 == 0) 
-      ){
-        throw new Exception("Condition met, error thrown.");
-      }
-    
-      return true;  // If the condition fails, return true
-    }
-
-  }  
-
-  // Method to run all tests
-  public static void test_TestBench(){
-    System.out.println("TestTestBench: running tests.  Note that two failures is normal");
-    TestSuite test_suite = new TestSuite();
-    TestBench.run( test_suite );
-  }
-
-  // Main function to provide a shell interface for running tests
-  public static void main(String[] args){
-    // tests currently takes no arguments or options
-    test_TestBench(); // Calls the method to run all tests
-  }
-
-}
-
diff --git a/tester/javac/Test_File_0.java b/tester/javac/Test_File_0.java
new file mode 100644 (file)
index 0000000..383544d
--- /dev/null
@@ -0,0 +1,109 @@
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.attribute.FileTime;
+import java.util.List;
+import java.util.Map;
+
+import com.ReasoningTechnology.Ariadne.File;
+import com.ReasoningTechnology.Mosaic.*;
+
+public class Test_File_0{
+
+  public class TestSuite{
+
+    public Boolean unpack_file_path_0(IO io){
+      Boolean[] conditions = new Boolean[5];
+      int i = 0;
+        
+      // Test input
+      String test_fp = "/home/user/test.txt";
+        
+      // Expected output
+      String expected_dp = "/home/user/";
+      String expected_fn = "test.txt";
+      String expected_fn_base = "test";
+      String expected_fn_ext = "txt";
+
+      // Actual output
+      Map<String, String> result = File.unpack_file_path( test_fp );
+        
+      conditions[i++] = result.get("dp").equals( expected_dp );
+      conditions[i++] = result.get("fn").equals( expected_fn );
+      conditions[i++] = result.get("fn_base").equals( expected_fn_base );
+      conditions[i++] = result.get("fn_ext").equals( expected_fn_ext );
+      conditions[i++] = result.size() == 4;
+
+      // Return true if all conditions are met
+      return MU.all( conditions );
+    }
+
+    public Boolean file_exists_q_0(IO io) {
+      Boolean[] conditions = new Boolean[2];
+      int i = 0;
+
+      // Test file paths, assuming $REPO_HOME is set in the environment
+      String repoHome = System.getenv("REPO_HOME");
+      String existingFilePath = repoHome + "/tester/data_Test_File_0/I_exist";
+      String nonExistentFilePath = repoHome + "/tester/data_Test_File_0/I_do_not_exist";
+
+      // Test cases
+      conditions[i++] = File.file_exists_q(existingFilePath); // Expect true for existing file
+      conditions[i++] = !File.file_exists_q(nonExistentFilePath); // Expect false for non-existent file
+
+      // Return true if both conditions are met
+      return MU.all(conditions);
+    }
+
+    public Boolean newer_than_all_0(IO io) throws IOException {
+      Boolean[] conditions = new Boolean[5];
+      int i = 0;
+
+      String repoHome = System.getenv("REPO_HOME");
+
+      // Define paths for existing and missing files
+      String file_0 = repoHome + "/tester/data_Test_File_0/file_0";
+      String file_1 = repoHome + "/tester/data_Test_File_0/file_1";
+      String file_2 = repoHome + "/tester/data_Test_File_0/file_2";
+      String file_3 = repoHome + "/tester/data_Test_File_0/file_3";
+      String missing_file_0 = repoHome + "/tester/data_Test_File_0/missing_file_0";
+    
+      // Set modification times: file_0 is the youngest, file_3 is the oldest
+      Files.setLastModifiedTime(Paths.get(file_3), FileTime.fromMillis(System.currentTimeMillis() - 20000));
+      Files.setLastModifiedTime(Paths.get(file_2), FileTime.fromMillis(System.currentTimeMillis() - 15000));
+      Files.setLastModifiedTime(Paths.get(file_1), FileTime.fromMillis(System.currentTimeMillis() - 10000));
+      Files.setLastModifiedTime(Paths.get(file_0), FileTime.fromMillis(System.currentTimeMillis() - 5000));
+
+      // Test case 1: file_0 is newer than all other files
+      conditions[i++] = File.newer_than_all(file_0, List.of(file_1, file_2, file_3)); // Expect true
+
+      // Test case 2: file_0 is newer than some, but not all (make file_2 newer)
+      Files.setLastModifiedTime(Paths.get(file_2), FileTime.fromMillis(System.currentTimeMillis() + 10000)); // file_2 is now newer
+      conditions[i++] = !File.newer_than_all(file_0, List.of(file_1, file_2, file_3)); // Expect false
+
+      // Test case 3: file_0 is not newer than any (make both file_1 and file_2 newer)
+      Files.setLastModifiedTime(Paths.get(file_1), FileTime.fromMillis(System.currentTimeMillis() + 15000));
+      conditions[i++] = !File.newer_than_all(file_0, List.of(file_1, file_2, file_3)); // Expect false
+
+      // Test case 4: file_0 does not exist
+      conditions[i++] = !File.newer_than_all(missing_file_0, List.of(file_1, file_2, file_3)); // Expect false
+
+      // Test case 5: Some files in the list are missing
+      conditions[i++] = !File.newer_than_all(file_0, List.of(file_1, missing_file_0)); // Expect false
+
+      // Return true if all conditions pass
+      return MU.all(conditions);
+    }
+
+  }
+
+  public static void main(String[] args) {
+    TestSuite suite = new Test_File_0().new TestSuite();
+    int result = TestBench.run(suite); 
+    System.exit(result);
+  }
+
+}
+
diff --git a/tester/javac/Test_LabelList_0.java b/tester/javac/Test_LabelList_0.java
new file mode 100644 (file)
index 0000000..ce17cd6
--- /dev/null
@@ -0,0 +1,37 @@
+import java.util.List;
+import java.util.Arrays;
+
+import com.ReasoningTechnology.Ariadne.Label;
+import com.ReasoningTechnology.Ariadne.LabelList;
+import com.ReasoningTechnology.Mosaic.*;
+
+public class Test_LabelList_0 {
+
+  public class TestSuite {
+
+    public Boolean labelList_creation_0(IO io) {
+      Boolean[] conditions = new Boolean[2];
+      int i = 0;
+
+      // Test the default constructor
+      LabelList emptyList = new LabelList();
+      conditions[i++] = emptyList.isEmpty(); // Expect true for an empty list
+
+      // Test the constructor with a list of labels
+      List<Label> labels = Arrays.asList(new Label("label1"), new Label("label2"));
+      LabelList labelList = new LabelList(labels);
+      conditions[i++] = labelList.size() == 2 && labelList.get(0).get().equals("label1") && labelList.get(1).get().equals("label2"); // Expect true for correct size and contents
+
+      // Return true if all conditions are met
+      return MU.all(conditions);
+    }
+
+  }
+
+  public static void main(String[] args) {
+    TestSuite suite = new Test_LabelList_0().new TestSuite();
+    int result = TestBench.run(suite); 
+    System.exit(result);
+  }
+
+}
diff --git a/tester/javac/Test_Label_0.java b/tester/javac/Test_Label_0.java
new file mode 100644 (file)
index 0000000..6392b18
--- /dev/null
@@ -0,0 +1,35 @@
+import com.ReasoningTechnology.Ariadne.Label;
+import com.ReasoningTechnology.Mosaic.*;
+
+public class Test_Label_0 {
+
+  public class TestSuite {
+
+    public Boolean label_creation_0(IO io) {
+      Boolean[] conditions = new Boolean[4];
+      int i = 0;
+
+      // Test input
+      Label label1 = new Label("test");
+      Label label2 = new Label("");
+      Label label3 = new Label("test");
+
+      // Check that the value is correctly set
+      conditions[i++] = label1.get().equals("test"); // Expect true
+      conditions[i++] = label2.isEmpty(); // Expect true
+      conditions[i++] = label1.equals(label3); // Expect true, as contents are identical
+      conditions[i++] = label1.hashCode() == label3.hashCode(); // Expect true, as hash should match for equal labels
+
+      // Return true if all conditions are met
+      return MU.all(conditions);
+    }
+
+  }
+
+  public static void main(String[] args) {
+    TestSuite suite = new Test_Label_0().new TestSuite();
+    int result = TestBench.run(suite); 
+    System.exit(result);
+  }
+
+}
diff --git a/tester/javac/Test_NodeList_0.java b/tester/javac/Test_NodeList_0.java
new file mode 100644 (file)
index 0000000..6c9af14
--- /dev/null
@@ -0,0 +1,34 @@
+import com.ReasoningTechnology.Ariadne.Node;
+import com.ReasoningTechnology.Ariadne.NodeList;
+import com.ReasoningTechnology.Mosaic.*;
+
+
+public class Test_NodeList_0 {
+
+  public class TestSuite {
+
+    public Boolean nodeList_creation_0(IO io) {
+      Boolean[] conditions = new Boolean[2];
+      int i = 0;
+
+      // Test default constructor (expecting an empty NodeList)
+      NodeList nodeList = new NodeList();
+      conditions[i++] = nodeList.isEmpty(); // Expect true for empty list
+
+      // Add a node and verify presence
+      Node node = new Node();
+      nodeList.add(node);
+      conditions[i++] = nodeList.size() == 1 && nodeList.contains(node); // Expect true for correct size and content
+
+      // Return true if all conditions are met
+      return MU.all(conditions);
+    }
+  }
+
+  public static void main(String[] args) {
+    TestSuite suite = new Test_NodeList_0().new TestSuite();
+    int result = TestBench.run(suite); 
+    System.exit(result);
+  }
+
+}
diff --git a/tester/javac/Test_Node_0.java b/tester/javac/Test_Node_0.java
new file mode 100644 (file)
index 0000000..3df3166
--- /dev/null
@@ -0,0 +1,69 @@
+import com.ReasoningTechnology.Ariadne.Node;
+import com.ReasoningTechnology.Ariadne.Label;
+import com.ReasoningTechnology.Ariadne.LabelList;
+import com.ReasoningTechnology.Ariadne.Token;
+import com.ReasoningTechnology.Ariadne.TokenSet;
+import com.ReasoningTechnology.Mosaic.*;
+
+public class Test_Node_0 {
+
+  public class TestSuite {
+
+    public Boolean node_creation_0(IO io) {
+      Boolean[] conditions = new Boolean[2];
+      int i = 0;
+
+      // Test that neighbor list is initialized
+      Node node = new Node();
+      conditions[i++] = node.neighbor_LabelList() != null && node.neighbor_LabelList().isEmpty(); // Expect true
+
+      // Test that the mark property is not initialized until used
+      conditions[i++] = node.get("mark") == null; // Expect true
+
+      // Return true if all conditions are met
+      return MU.all(conditions);
+    }
+
+    public Boolean node_marking_0(IO io) {
+      Boolean[] conditions = new Boolean[3];
+      int i = 0;
+
+      Node node = new Node();
+      Token token1 = new Token("token1");
+      Token token2 = new Token("token2");
+
+      // Test marking the node with token1
+      node.mark(token1);
+      conditions[i++] = node.has_mark(token1); // Expect true
+      conditions[i++] = !node.has_mark(token2); // Expect false for unmarked token
+
+      // Test that mark property is now initialized and contains token1
+      TokenSet markSet = (TokenSet) node.get("mark");
+      conditions[i++] = markSet != null && markSet.contains(token1); // Expect true
+
+      // Return true if all conditions are met
+      return MU.all(conditions);
+    }
+
+    public Boolean node_neighbor_0(IO io) {
+      Boolean[] conditions = new Boolean[1];
+      int i = 0;
+
+      // Test adding and retrieving neighbors
+      Node node = new Node();
+      LabelList neighbors = node.neighbor_LabelList();
+      neighbors.add(new Label("neighbor1"));
+      neighbors.add(new Label("neighbor2"));
+      conditions[i++] = neighbors.size() == 2 && neighbors.get(0).get().equals("neighbor1") && neighbors.get(1).get().equals("neighbor2"); // Expect true
+
+      // Return true if all conditions are met
+      return MU.all(conditions);
+    }
+  }
+
+  public static void main(String[] args) {
+    TestSuite suite = new Test_Node_0().new TestSuite();
+    int result = TestBench.run(suite); 
+    System.exit(result);
+  }
+}
diff --git a/tester/javac/Test_TokenSet_0.java b/tester/javac/Test_TokenSet_0.java
new file mode 100644 (file)
index 0000000..74d7a40
--- /dev/null
@@ -0,0 +1,50 @@
+import com.ReasoningTechnology.Ariadne.Token;
+import com.ReasoningTechnology.Ariadne.TokenSet;
+import com.ReasoningTechnology.Mosaic.*;
+
+public class Test_TokenSet_0 {
+
+  public class TestSuite {
+
+    public Boolean tokenSet_creation_0(IO io) {
+      Boolean[] conditions = new Boolean[2];
+      int i = 0;
+
+      // Test default constructor (expecting an empty TokenSet)
+      TokenSet tokenSet = new TokenSet();
+      conditions[i++] = tokenSet.isEmpty(); // Expect true for empty set
+
+      // Add a token and verify presence
+      Token token = new Token("error");
+      tokenSet.add(token);
+      conditions[i++] = tokenSet.size() == 1 && tokenSet.contains(token); // Expect true for correct size and content
+
+      // Return true if all conditions are met
+      return MU.all(conditions);
+    }
+
+    public Boolean tokenSet_uniqueness_0(IO io) {
+      Boolean[] conditions = new Boolean[1];
+      int i = 0;
+
+      TokenSet tokenSet = new TokenSet();
+      Token token1 = new Token("error");
+      Token token2 = new Token("error");
+
+      // Add two tokens with identical values and verify only one is stored
+      tokenSet.add(token1);
+      tokenSet.add(token2);
+      conditions[i++] = tokenSet.size() == 1 && tokenSet.contains(token1) && tokenSet.contains(token2); // Expect true for single entry despite duplicate addition
+
+      // Return true if all conditions are met
+      return MU.all(conditions);
+    }
+  }
+
+  public static void main(String[] args) {
+    TestSuite suite = new Test_TokenSet_0().new TestSuite();
+    int result = TestBench.run(suite); 
+    System.exit(result);
+  }
+
+}
diff --git a/tester/javac/Test_Token_0.java b/tester/javac/Test_Token_0.java
new file mode 100644 (file)
index 0000000..216078d
--- /dev/null
@@ -0,0 +1,48 @@
+import com.ReasoningTechnology.Ariadne.Token;
+import com.ReasoningTechnology.Mosaic.*;
+
+public class Test_Token_0 {
+
+  public class TestSuite {
+
+    public Boolean token_creation_0(IO io) {
+      Boolean[] conditions = new Boolean[4];
+      int i = 0;
+
+      // Test input
+      Token token1 = new Token("error");
+      Token token2 = new Token("warning");
+      Token token3 = new Token("error");
+
+      // Check that the value is correctly set
+      conditions[i++] = token1.get().equals("error"); // Expect true
+      conditions[i++] = token1.toString().equals("error"); // Expect true (toString should match value)
+      conditions[i++] = token1.equals(token3); // Expect true, as contents are identical
+      conditions[i++] = !token1.equals(token2); // Expect false, as values differ
+
+      // Return true if all conditions are met
+      return MU.all(conditions);
+    }
+
+    public Boolean token_hashCode_0(IO io) {
+      Boolean[] conditions = new Boolean[1];
+      int i = 0;
+
+      Token token1 = new Token("error");
+      Token token2 = new Token("error");
+
+      // Check that two identical tokens have the same hashCode
+      conditions[i++] = token1.hashCode() == token2.hashCode(); // Expect true
+
+      // Return true if all conditions are met
+      return MU.all(conditions);
+    }
+  }
+
+  public static void main(String[] args) {
+    TestSuite suite = new Test_Token_0().new TestSuite();
+    int result = TestBench.run(suite); 
+    System.exit(result);
+  }
+
+}
diff --git a/tester/javac/Test_Util_0.java b/tester/javac/Test_Util_0.java
new file mode 100644 (file)
index 0000000..8887067
--- /dev/null
@@ -0,0 +1,52 @@
+import com.ReasoningTechnology.Ariadne.Util;
+import com.ReasoningTechnology.Ariadne.Label;
+import com.ReasoningTechnology.Mosaic.IO;
+import com.ReasoningTechnology.Mosaic.*;
+import java.util.List;
+import java.util.Arrays;
+
+public class Test_Util_0 {
+
+  public class TestSuite {
+
+    public Boolean print_list_0(IO io) {
+      Boolean[] conditions = new Boolean[3];
+      int i = 0;
+
+      // Test with a non-empty list and a prefix
+      List<Label> itemList1 = Arrays.asList(new Label("first"), new Label("second"), new Label("third"));
+      Util.print_list("Items:", itemList1);
+
+      // Capture and check stdout content
+      String stdoutContent1 = io.get_out_content();
+      conditions[i++] = stdoutContent1.equals("Items: 'first', 'second', 'third'.\n"); // Expect correct format with prefix
+
+      // Clear streams for the next test
+      io.clear_buffers();
+
+      // Test with an empty list (no output expected)
+      List<Label> itemList2 = Arrays.asList();
+      Util.print_list("Empty:", itemList2);
+      String stdoutContent2 = io.get_out_content();
+      conditions[i++] = stdoutContent2.isEmpty(); // Expect no output for empty list
+
+      // Clear streams for the next test
+      io.clear_buffers();
+
+      // Test with a null list (no output expected)
+      Util.print_list("Null:", null);
+      String stdoutContent3 = io.get_out_content();
+      conditions[i++] = stdoutContent3.isEmpty(); // Expect no output for null list
+
+      // Return true if all conditions are met
+      return MU.all(conditions);
+    }
+  }
+
+  public static void main(String[] args) {
+    TestSuite suite = new Test_Util_0().new TestSuite();
+    int result = TestBench.run(suite); 
+    System.exit(result);
+  }
+
+}
diff --git a/tester/javac/import_aliases.java b/tester/javac/import_aliases.java
new file mode 100644 (file)
index 0000000..ef437d2
--- /dev/null
@@ -0,0 +1,4 @@
+
+import com.ReasoningTechnology.Mosaic.Util;
+class MU extends com.ReasoningTechnology.Mosaic.Util{};
+
diff --git a/tester/jvm/TestBench.jar b/tester/jvm/TestBench.jar
deleted file mode 100644 (file)
index fa385ca..0000000
Binary files a/tester/jvm/TestBench.jar and /dev/null differ
diff --git a/tester/jvm/Test_Ariadne.jar b/tester/jvm/Test_Ariadne.jar
new file mode 100644 (file)
index 0000000..bebaba1
Binary files /dev/null and b/tester/jvm/Test_Ariadne.jar differ
diff --git a/tester/scratchpad/MU.class b/tester/scratchpad/MU.class
new file mode 100644 (file)
index 0000000..b2aeb68
Binary files /dev/null and b/tester/scratchpad/MU.class differ
diff --git a/tester/scratchpad/Test_File_0$TestSuite.class b/tester/scratchpad/Test_File_0$TestSuite.class
new file mode 100644 (file)
index 0000000..dc0ffab
Binary files /dev/null and b/tester/scratchpad/Test_File_0$TestSuite.class differ
diff --git a/tester/scratchpad/Test_File_0.class b/tester/scratchpad/Test_File_0.class
new file mode 100644 (file)
index 0000000..dddf3c2
Binary files /dev/null and b/tester/scratchpad/Test_File_0.class differ
diff --git a/tester/scratchpad/Test_LabelList_0$TestSuite.class b/tester/scratchpad/Test_LabelList_0$TestSuite.class
new file mode 100644 (file)
index 0000000..750a839
Binary files /dev/null and b/tester/scratchpad/Test_LabelList_0$TestSuite.class differ
diff --git a/tester/scratchpad/Test_LabelList_0.class b/tester/scratchpad/Test_LabelList_0.class
new file mode 100644 (file)
index 0000000..faec228
Binary files /dev/null and b/tester/scratchpad/Test_LabelList_0.class differ
diff --git a/tester/scratchpad/Test_Label_0$TestSuite.class b/tester/scratchpad/Test_Label_0$TestSuite.class
new file mode 100644 (file)
index 0000000..743aac8
Binary files /dev/null and b/tester/scratchpad/Test_Label_0$TestSuite.class differ
diff --git a/tester/scratchpad/Test_Label_0.class b/tester/scratchpad/Test_Label_0.class
new file mode 100644 (file)
index 0000000..f1c75e9
Binary files /dev/null and b/tester/scratchpad/Test_Label_0.class differ
diff --git a/tester/scratchpad/Test_NodeList_0$TestSuite.class b/tester/scratchpad/Test_NodeList_0$TestSuite.class
new file mode 100644 (file)
index 0000000..bacaa74
Binary files /dev/null and b/tester/scratchpad/Test_NodeList_0$TestSuite.class differ
diff --git a/tester/scratchpad/Test_NodeList_0.class b/tester/scratchpad/Test_NodeList_0.class
new file mode 100644 (file)
index 0000000..d812d47
Binary files /dev/null and b/tester/scratchpad/Test_NodeList_0.class differ
diff --git a/tester/scratchpad/Test_Node_0$TestSuite.class b/tester/scratchpad/Test_Node_0$TestSuite.class
new file mode 100644 (file)
index 0000000..004d6f8
Binary files /dev/null and b/tester/scratchpad/Test_Node_0$TestSuite.class differ
diff --git a/tester/scratchpad/Test_Node_0.class b/tester/scratchpad/Test_Node_0.class
new file mode 100644 (file)
index 0000000..145bb2e
Binary files /dev/null and b/tester/scratchpad/Test_Node_0.class differ
diff --git a/tester/scratchpad/Test_TokenSet_0$TestSuite.class b/tester/scratchpad/Test_TokenSet_0$TestSuite.class
new file mode 100644 (file)
index 0000000..bebcd71
Binary files /dev/null and b/tester/scratchpad/Test_TokenSet_0$TestSuite.class differ
diff --git a/tester/scratchpad/Test_TokenSet_0.class b/tester/scratchpad/Test_TokenSet_0.class
new file mode 100644 (file)
index 0000000..f3a164c
Binary files /dev/null and b/tester/scratchpad/Test_TokenSet_0.class differ
diff --git a/tester/scratchpad/Test_Token_0$TestSuite.class b/tester/scratchpad/Test_Token_0$TestSuite.class
new file mode 100644 (file)
index 0000000..ad30308
Binary files /dev/null and b/tester/scratchpad/Test_Token_0$TestSuite.class differ
diff --git a/tester/scratchpad/Test_Token_0.class b/tester/scratchpad/Test_Token_0.class
new file mode 100644 (file)
index 0000000..2d59086
Binary files /dev/null and b/tester/scratchpad/Test_Token_0.class differ
diff --git a/tester/scratchpad/Test_Util_0$TestSuite.class b/tester/scratchpad/Test_Util_0$TestSuite.class
new file mode 100644 (file)
index 0000000..615fee9
Binary files /dev/null and b/tester/scratchpad/Test_Util_0$TestSuite.class differ
diff --git a/tester/scratchpad/Test_Util_0.class b/tester/scratchpad/Test_Util_0.class
new file mode 100644 (file)
index 0000000..6b52ead
Binary files /dev/null and b/tester/scratchpad/Test_Util_0.class differ
diff --git a/tester/shell/TestTestBench b/tester/shell/TestTestBench
deleted file mode 100755 (executable)
index 96276ca..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/env bash
-java com.ReasoningTechnology.TestBench.TestTestBench
diff --git a/tester/shell/Test_File_0 b/tester/shell/Test_File_0
new file mode 100755 (executable)
index 0000000..39c1f2a
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/env bash
+java Test_File_0
diff --git a/tester/shell/Test_LabelList_0 b/tester/shell/Test_LabelList_0
new file mode 100755 (executable)
index 0000000..15a0da6
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/env bash
+java Test_LabelList_0
diff --git a/tester/shell/Test_Label_0 b/tester/shell/Test_Label_0
new file mode 100755 (executable)
index 0000000..6b61242
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/env bash
+java Test_Label_0
diff --git a/tester/shell/Test_NodeList_0 b/tester/shell/Test_NodeList_0
new file mode 100755 (executable)
index 0000000..8970446
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/env bash
+java Test_NodeList_0
diff --git a/tester/shell/Test_Node_0 b/tester/shell/Test_Node_0
new file mode 100755 (executable)
index 0000000..7901f30
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/env bash
+java Test_Node_0
diff --git a/tester/shell/Test_TokenSet_0 b/tester/shell/Test_TokenSet_0
new file mode 100755 (executable)
index 0000000..05d37d4
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/env bash
+java Test_TokenSet_0
diff --git a/tester/shell/Test_Token_0 b/tester/shell/Test_Token_0
new file mode 100755 (executable)
index 0000000..842f673
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/env bash
+java Test_Token_0
diff --git a/tester/shell/Test_Util_0 b/tester/shell/Test_Util_0
new file mode 100755 (executable)
index 0000000..6157abe
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/env bash
+java Test_Util_0
diff --git a/tester/test0/TestGraph.class b/tester/test0/TestGraph.class
deleted file mode 100644 (file)
index 6b332c8..0000000
Binary files a/tester/test0/TestGraph.class and /dev/null differ
diff --git a/tester/test0/TestGraph.groovy b/tester/test0/TestGraph.groovy
deleted file mode 100644 (file)
index 528cc8c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-
-class TestGraph {
-    // Static method to define the node map
-    static def get_node_map(){
-        // Returning an empty node map for test0
-        return [:]
-    }
-
-    // Static method to define the function list
-    static def get_node_f_list(){
-        // Returning an empty function list for test0
-        return []
-    }
-}
diff --git a/tester/test0/env_test b/tester/test0/env_test
deleted file mode 100644 (file)
index 31113a7..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-
-if [ -z "$ENV_TESTER" ]; then
-  echo "env_test0:: script can only be run in the tester  environment"
-  env_error=true
-fi
-
-export CLASSPATH=\
-"$REPO_HOME"/release_candidate\
-:"$REPO_HOME"/tester/test0\
-:$CLASSPATH
-
diff --git a/tester/test0/test.sh b/tester/test0/test.sh
deleted file mode 100755 (executable)
index 39be135..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/env bash
-
-# smoke test, and yes, there was a lot of smoke
-
-source env_test
-build TestGraph
-echo "test0 complete"
-
diff --git a/tester/test0/transcript-tester.txt b/tester/test0/transcript-tester.txt
deleted file mode 100644 (file)
index 08d1f15..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-2024-10-05T12:09:05Z[]
-Thomas-developer@Blossac§/var/user_data/Thomas-developer§
-> cd Ariadne
-
-2024-10-05T12:09:24Z[]
-Thomas-developer@Blossac§/var/user_data/Thomas-developer/Ariadne§
-> source executor/env_tester
-REPO_HOME /var/user_data/Thomas-developer/Ariadne
-PROJECT Ariadne
-/var/user_data/Thomas-developer/Ariadne/executor/env_base complete
-executor/env_tester complete
-
-2024-10-05T12:09:33Z[Ariadne_TESTER]
-Thomas-developer@Blossac§/var/user_data/Thomas-developer/Ariadne/tester§
-> cd test0
-
-2024-10-05T12:09:38Z[Ariadne_TESTER]
-Thomas-developer@Blossac§/var/user_data/Thomas-developer/Ariadne/tester/test0§
-> make.sh
-
-2024-10-05T12:09:42Z[Ariadne_TESTER]
-Thomas-developer@Blossac§/var/user_data/Thomas-developer/Ariadne/tester/test0§
-> ./test0.sh 
-build:: loaded TestGraph.class
-test0 complete
-
-2024-10-05T12:09:51Z[Ariadne_TESTER]
-Thomas-developer@Blossac§/var/user_data/Thomas-developer/Ariadne/tester/test0§
-> 
diff --git a/tester/test0/transcript_dev.txt b/tester/test0/transcript_dev.txt
deleted file mode 100644 (file)
index 838cae8..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-2024-10-05T12:07:43Z[]
-Thomas-developer@Blossac§/var/user_data/Thomas-developer§
-> repo Ariadne
-REPO_HOME /var/user_data/Thomas-developer/Ariadne
-PROJECT Ariadne
-/var/user_data/Thomas-developer/Ariadne/executor/env_base complete
-/var/user_data/Thomas-developer/Ariadne/developer/executor/env_build complete
-/var/user_data/Thomas-developer/Ariadne/executor/env_dev complete
-
-2024-10-05T12:07:51Z[Ariadne]
-Thomas-developer@Blossac§/var/user_data/Thomas-developer/Ariadne/developer§
-> make.sh
-
-2024-10-05T12:08:11Z[Ariadne]
-Thomas-developer@Blossac§/var/user_data/Thomas-developer/Ariadne/developer§
-> release
-Installed build to /var/user_data/Thomas-developer/Ariadne/release_candidate with permissions ug+r,ug+x
-Installed AriadneGraph.class to /var/user_data/Thomas-developer/Ariadne/release_candidate with permissions ug+r
-Installed AriadneGraph$_wellformed_q_closure1.class to /var/user_data/Thomas-developer/Ariadne/release_candidate with permissions ug+r
-Installed AriadneGraph$_wellformed_q_closure2.class to /var/user_data/Thomas-developer/Ariadne/release_candidate with permissions ug+r
-Installed AriadneGraph$_run_build_scripts_f_closure3.class to /var/user_data/Thomas-developer/Ariadne/release_candidate with permissions ug+r
-Installed AriadneGraph$_mark_the_wellformed_f_closure3.class to /var/user_data/Thomas-developer/Ariadne/release_candidate with permissions ug+r
-Installed AriadneGraph$_mark_the_wellformed_f_closure3$_closure13.class to /var/user_data/Thomas-developer/Ariadne/release_candidate with permissions ug+r
-Installed AriadneGraph$_markup_graph_f_descend_closure4.class to /var/user_data/Thomas-developer/Ariadne/release_candidate with permissions ug+r
-Installed AriadneGraph$_markup_graph_f_descend_closure5.class to /var/user_data/Thomas-developer/Ariadne/release_candidate with permissions ug+r
-Installed AriadneGraph$_markup_graph_f_descend_closure6.class to /var/user_data/Thomas-developer/Ariadne/release_candidate with permissions ug+r
-Installed AriadneGraph$_all_DAG_DF_closure7.class to /var/user_data/Thomas-developer/Ariadne/release_candidate with permissions ug+r
-Installed AriadneGraph$_all_DAG_DF_closure8.class to /var/user_data/Thomas-developer/Ariadne/release_candidate with permissions ug+r
-Installed AriadneGraph$_all_DAG_DF_closure9.class to /var/user_data/Thomas-developer/Ariadne/release_candidate with permissions ug+r
-Installed AriadneGraph$_good_dependency_q_closure10.class to /var/user_data/Thomas-developer/Ariadne/release_candidate with permissions ug+r
-Installed AriadneGraph$_newer_than_all_closure11.class to /var/user_data/Thomas-developer/Ariadne/release_candidate with permissions ug+r
-Installed AriadneGraph$_run_build_scripts_f_closure12.class to /var/user_data/Thomas-developer/Ariadne/release_candidate with permissions ug+r
-
-2024-10-05T12:08:18Z[Ariadne]
-Thomas-developer@Blossac§/var/user_data/Thomas-developer/Ariadne/developer§
-> 
index ba029ae..fd66adb 100644 (file)
@@ -39,7 +39,7 @@ export SOURCEPATH=\
 # misc
 
   # make .githolder and .gitignore visible
-  alias ls="ls -a"
+  alias ls="ls -a --time-style=full-iso"
 
 # some feedback to show all went well
 
index 99bf5de..c186b41 100755 (executable)
@@ -9,5 +9,15 @@ if [ "$ENV" != "$env_must_be" ]; then
 fi
 
 # space separated list of shell interface wrappers
-echo Test0 Test_Util Test_IO Test_TestBench Test_MockClass
+echo \
+  Test_File_0 \
+  Test_Label_0 \
+  Test_LabelList_0 \
+  Test_Node_0 \
+  Test_NodeList_0 \
+  Test_Token_0 \
+  Test_TokenSet_0 \
+  Test_Util_0 \
+  ""
+
  
diff --git a/tool_shared/bespoke/bashrc b/tool_shared/bespoke/bashrc
new file mode 100644 (file)
index 0000000..0914cfc
--- /dev/null
@@ -0,0 +1,51 @@
+# ssh login will fail if .bashrc writes to stdout, so we write to "bash_error.txt"
+# set -x
+# in F37 something seems to be caching PATH, which can be annoying
+
+# If not running interactively, don't do anything
+  case $- in
+      *i*) ;;
+        *) return;;
+  esac
+
+# This should also be the default from login.defs, because gnome ignores 
+# .login, .profile, etc. and uses systemd to launch applications from the desktop,
+  umask 0077
+
+# - note the variable $PROMPT_DECOR, that is how the project name ends up in the prompt.
+# - without -i bash will clear PS1, just because, so we set PPS1, ,PPS2 to not lose the profit.
+# - use $(pwd) instead of \w or it will prefix '~' which confuses dirtrack when the
+#   user is changed using su
+  export PPS1='\n$($iseq/Z)[$PROMPT_DECOR]\n\u@\h§$(pwd)§\n> '
+  export PPS2='>> '
+  export PS1="$PPS1"
+  export PS2="$PPS2"
+
+# sort the output of printenv, show newlines as environment variable values as \n
+  alias printenv='printenv | awk '\''{gsub(/\n/, "\\n")}1'\'' | sort'
+
+# iso time in ls -l, show hidden files, human readable sizes
+  alias ls='ls -a -h --time-style=long-iso' 
+
+# iso time for all Linux programs, which they will all ignore, but at least we
+# tried, perhaps someday ...
+  export TZ=UTC
+  export TIME_STYLE=long-iso
+  export LC_ALL=en_DK.UTF-8
+
+# -l don't truncate long lins
+# -p show pids
+  alias pstree='pstree -lp'
+
+# - make bash gp to sleep, revealing the calling shell
+# - useful for job control of multiple bash shells from a controlling shell
+  alias zzz="kill -STOP \$\$"
+
+# The one true operating system.
+# Proof that an OS can be as small as an editor.
+  export EDITOR=emacs
+
+# check the window size after each command and, if necessary, update the values
+# of LINES and COLUMNS.
+  shopt -s checkwinsize
+