From: Thomas Walker Lynch Date: Sat, 21 Dec 2024 15:35:54 +0000 (+0000) Subject: updating to match Mosaic project structure, also some doc tweaks X-Git-Url: https://git.reasoningtechnology.com/usr/lib/python2.7/encodings/cp850.py?a=commitdiff_plain;h=79b49095c1ca91f2f4ec06a03e00ec8d293e8ea2;p=Ariadne updating to match Mosaic project structure, also some doc tweaks --- diff --git a/README.txt b/README.txt index bf5978e..5e7234b 100644 --- a/README.txt +++ b/README.txt @@ -1,80 +1,105 @@ +-------------------------------------------------------------------------------- +Documents + +Note the directories: Ariadne/document🖉, Ariadne/developer/document🖉, and Ariadne/tester/document🖉. Also not documents in the RT-project-share/document🖉 directory. + -------------------------------------------------------------------------------- Ariadne Ariadne is a graph based build tool. -Tying to build a project is a lot like trying to find your way out of -Daedalus's impossible to solve maze. Ariadne hands you a ball of string. +When you are tasked with a project build that is as complex as Daedalus's impossible to solve maze, modern Ariadne hands you a piece of chalk to draw arrows with. It works even better than a ball of string. --------------------------------------------------------------------------------- -Documents +A tool like Ariadne is useful for projects that have compiled languages, where there are many steps in getting from source code to a loadable set of instructions. At is able to handle complex cases with generation of sources from ANTLR grammars, and the implied dependencies of Java programs. -Note the directories: Ariadne/document, Ariadne/developer/document, -and Ariadne/tester/document. +Ariadne can also be used to describe dependencies on libraries or other programs used by a given program. This is useful with both compiled and interpreted languages. +In the Java implementation of Ariadne, everything is coded in Java, including the developer's description of the dependency graph. + +If a developer were to compare `Ariadne` with `make`, the file corresponding to the 'make file' is a dynamically loaded Java program known as the 'graph definition'. Whereas a make file for a complex project will contain a lot of shell code, the Ariadne graph definition is all Java code. Where a make file has 'pattern rules' Ariadne will typically has regular expressions. Make can not backwards chain through pattern rules, Ariadne can. + +Ariadne is more procedural than Maven, which is more descriptive. Ariadne allows for finer grain description of dependencies and finer grain decision making than with Gradle task dependencies. -------------------------------------------------------------------------------- -How It Works +General Comments about Graphs + +Conceptually a graph is a set with two members, nodes and edges, both also being sets. In turn, each edge is a pair of nodes. In a directed graph, one of the nodes of such a pair is said to be the tail, while the other is said to be the head. -Everything is coded in Java, including the developers description of the -dependency graph. +A leaf node is unusual in that it is not the tail of any edge. -A graph is made of nodes and edges. +When a node is selected, a set is implied that contains each and every edge that has the selected node as its tail, if any. These are the outgoing edges for the selected node. Each outgoing edge then has a head. We say that the set of head nodes are distance one from the selected node. (The selected node itself is at distance zero.) Distance one nodes are said to be 'neighbor' nodes. -A node is dictionary. Each node has a 'label', a 'build' function, and a -'neighbor' list. The neighbor list holds the edges. +Deterministic traversal is an algorithm that is given two arguments when it is started, a graph definition, and a start node. The start node is then assigned to a state variable. At each step of the algorithm, the node in the state variable is selected on the graph, then the state variable is re-assigned to be one of the distance one nodes. -Using Java, the developer puts the nodes in a map, keyed on the node label, or -writes functions that when given a label, return either a node or null. +Deterministic search for a node is an example of an algorithm that makes use of traversal. Deterministic search begins with a graph, a start node, a predicate that is said to recognize the searched for node, and a function that guides the traversal. -A node map looks a lot like classic make file. Each node label is a target file -path, the neighbor list can be listed next, and then we have the build code. +A self cycle in a graph consists of a node and an edge, where said edge has the node as both its tail and its head. There is no change in the traversal state variable when taking a traversal step through such an edge. In general, a cycle consists of a start node and all nodes and edges traversed up until arriving back at said start node. -Function defined nodes are very flexible. They are more powerful, and more -flexible than make's pattern rules. If a developer wants a function to act like -a pattern rule, the developer can use a regular expression match on the given -label. However, unlike make, pattern rules defined in this manner, will -backwards chain potentially through other pattern rules. +It is a bad thing to have cycles in a build graph, as cycles will correspond to circular dependencies. Hence Ariadne looks for these and reports them. + +-------------------------------------------------------------------------------- +The Ariadne Build Graph -The Build function is one of the graph traversal programs. It is given a graph -and a list of top level market targets. It traverses the graph to find leaf -while unwinding its proverbial ball of string. Upon finding leaf nodes, it then -follows the string back until building the targets. +An Ariadne graph definition contains a 'graph definition function' list. A graph definition function is given a node label, and returns a node, or null if it can not find a node with such a label. A common graph definition function contains a map where each entry is a node label and a node. -It is possible to define other graph traversal functions. In fact, Ariadne can -be used to do anything where a directed graph of functions is useful. +An Ariadne node is dictionary that maps a string key to a value. The type of the value is implied by the string key. Depending on the Ariadne tool being used, each node map will typically have entries for the keys "label", "build", and "neighbor". +A "label" value is a string that is unique among the nodes in the graph. The "build" value is a function that a build tool will call when a file corresponding to a node is to be built. The "neighbor" value is a list of neighbor nodes. + +The Ariadne graph definition is optimized to be a run time data structure used for traversal, so the neighbor list is held directly in the node. Also, there is only one edge property, that of 'dependency'. As a consequence, there is no need for a separate edge table. -------------------------------------------------------------------------------- -Entering the Project +Ariadne Build Tool + +For the default Ariadne build tool, each node label is either symbolic, or is a file path. The tool descends into the graph, based on file modification dates, and builds nodes that are modified less recently than their dependencies. + +-------------------------------------------------------------------------------- +For Developers/Testers + +The project has three entry points, one for each project role: developer, tester, and administrator. To enter the project, source the environment appropriate for the role, either `env_developer`, `env_tester`, or `env_administrator`. + +1. Production + + 1.1. development + + cd Ariadne + . env_developer + + [do work] + + make + release -The project has three entry points, one for each project role: developer, -tester, and administrator. To enter the project, source the environment -appropriate for the role, either `env_developer`, `env_tester`, or -`env_administrator`. + 1.2 regression testing -For example, to work on the code as a developer, start a fresh shell and: + cd Ariadne + . env_tester + make + run -> cd Ariadne -> . env_developer -> +2. Debugging -[do work] + cd Ariadne + . env_developer + make + # puts links to source files on the `scratchpad` + gather_source_links -> make -> release + [change to tester module] -[change to tester role] + cd Ariadne + # the developer parameter links in the actual source in the developer module + . env_tester developer + make + run -The `make` command you see above is a bash script. Version 1.0 of Ariadne uses a -direct 'build it all every time' approach. Perhaps in version 2.0 or so, we will -use a prior version of Ariadne for the build environment. +The `make` command you see above is a bash script. Version 1.0 of Ariadne uses a direct 'build it all every time' approach. Perhaps in version 2.0 or so, we will use a prior version of Ariadne for the build environment. +In IntelliJ IDEA there are two modules, developer and tester. The output for each module is 'scratchpad' tests are added through the `run edit-configuration` menu. See tool_shared/third_party/document🖉 directory for more information. Using Ariadne ------------- -After it is built and released the tool will appear in the Ariadne/release -directory where it can be tested or imported into another project. +After it is built and released the tool will appear in the Ariadne/release directory where it can be regression tested or imported into another project. diff --git "a/developer/document\360\237\226\211/GraphDirectedAcyclic.txt" "b/developer/document\360\237\226\211/GraphDirectedAcyclic.txt" deleted file mode 100644 index 3da0b12..0000000 --- "a/developer/document\360\237\226\211/GraphDirectedAcyclic.txt" +++ /dev/null @@ -1,77 +0,0 @@ -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. - -*/ diff --git "a/developer/document\360\237\226\211/build.txt" "b/developer/document\360\237\226\211/build.txt" deleted file mode 100644 index fa1fc0b..0000000 --- "a/developer/document\360\237\226\211/build.txt" +++ /dev/null @@ -1,23 +0,0 @@ - -1. start with a clean release directory - - wipe_release - -2a. if including sources in the .jar: - - clean_build_directories - distribute_source - make - release - - -2b. if not including the sources: - - clean_build_directories - make - release - -3. check - - jar -tf ../release/Ariadne.jar - diff --git "a/developer/document\360\237\226\211/build_Ariadne.txt" "b/developer/document\360\237\226\211/build_Ariadne.txt" new file mode 100644 index 0000000..adbb344 --- /dev/null +++ "b/developer/document\360\237\226\211/build_Ariadne.txt" @@ -0,0 +1,29 @@ + +Ariadne is itself a build tool. Plans are that once there is a stable +version, that version will be used to build later versions of Ariadne. +For now, we use naive build scripts. When run, they build everything, +edited or not. + +1. start with a clean release directory + + wipe_release + +2a. when including sources in the .jar, or when debugging sources +via the `env_tester developer` environment, or through an IDE. + + clean + gather_source_links + make + release + + +2b. when not including the sources: + + clean + make + release + +3. check to see what was released: + + jar -tf ../release/Ariadne.jar + diff --git "a/developer/document\360\237\226\211/is_there_a_time_bound.txt" "b/developer/document\360\237\226\211/is_there_a_time_bound.txt" new file mode 100644 index 0000000..5db2b4b --- /dev/null +++ "b/developer/document\360\237\226\211/is_there_a_time_bound.txt" @@ -0,0 +1,71 @@ + + +Each node in the build graph + + +Our build tool graph is directed from targets to dependencies. + +If: + + 1. The production functions produce the same output given the + same input. + + 2. There are a finite number of nodes + + 3. At some point, stay t0, the graph no longer changes. + -input values + + 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. + +*/ diff --git "a/developer/javac\360\237\226\211/Ariadne_Graph.java" "b/developer/javac\360\237\226\211/Ariadne_Graph.java" index 2dd28b6..6b54394 100644 --- "a/developer/javac\360\237\226\211/Ariadne_Graph.java" +++ "b/developer/javac\360\237\226\211/Ariadne_Graph.java" @@ -3,60 +3,71 @@ package com.ReasoningTechnology.Ariadne; import java.util.HashMap; import java.util.Map; -public class Ariadne_Graph { +public class Ariadne_Graph{ - /*-------------------------------------------------------------------------------- - constructors - */ - - public Ariadne_Graph(Map node_map, Ariadne_ProductionList recognizer_f_list) { - if (node_map == null && recognizer_f_list == null) { - System.err.println("Ariadne_Graph: At least one of 'node_map' (Map) or 'recognizer_f_list' (List) must be provided."); - System.exit(1); + // Test messaging + // + private static boolean test = false; + public static void test_switch(boolean test){ + if (Ariadne_Graph.test && !test){ + test_print("Ariadne_Graph:: test messages off"); + } + if (!Ariadne_Graph.test && test){ + test_print("Ariadne_Graph:: test messages on"); + } + } + private static void test_print(String message){ + if(test){ + System.out.println(message); + } } - // Initialize each of node_map and recognizer_f_list to empty collections if null - this.node_map = (node_map != null) ? node_map : new HashMap<>(); - this.recognizer_f_list = (recognizer_f_list != null) ? recognizer_f_list : new Ariadne_ProductionList(); - } - - /*-------------------------------------------------------------------------------- - instance data - */ + // Class data (static data) + // - private static boolean debug = true; - private Map node_map; - private Ariadne_ProductionList recognizer_f_list; - /*-------------------------------------------------------------------------------- - interface - */ + // Instance data and access + // + private Map node_map; + private Ariadne_ProductionList recognizer_f_list; - // Lookup method to find a node by its label - public Ariadne_Node lookup(Ariadne_Label node_label, boolean verbose) { - if (node_label == null || node_label.isEmpty()) { - if (verbose) { - System.out.println("lookup:: given node_label is null or empty."); + // Constructors + // + public Ariadne_Graph(Map node_map, Ariadne_ProductionList recognizer_f_list){ + if (node_map == null && recognizer_f_list == null){ + System.err.println("Ariadne_Graph: At least one of 'node_map' (Map) or 'recognizer_f_list' (List) must be provided."); + System.exit(1); } - return null; + + // Initialize each of node_map and recognizer_f_list to empty collections if null + this.node_map = (node_map != null) ? node_map : new HashMap<>(); + this.recognizer_f_list = (recognizer_f_list != null) ? recognizer_f_list : new Ariadne_ProductionList(); } - // Try to retrieve the node from the map - Ariadne_Node node = this.node_map.get(node_label); + // Interface methods + // - if (verbose) { - if (node != null) { - System.out.println("lookup:: found node: " + node); - } else { - System.out.println("lookup:: node not found for label: " + node_label); + // Lookup by label + public Ariadne_Node lookup(Ariadne_Label node_label){ + if (node_label == null || node_label.isEmpty()){ + if (verbose){ + System.out.println("lookup:: given node_label is null or empty."); + } + return null; } + + // Try to retrieve the node from the map + Ariadne_Node node = this.node_map.get(node_label); + + if(test) + if(node == null) test_print("lookup:: node not found for label: " + node_label); + else test_print("lookup:: found node: " + node); + + return node; } - return node; - } + // standard interface + // + // need a toString ... - // Overloaded lookup method with default verbosity (true) - public Ariadne_Node lookup(Ariadne_Label node_label) { - return lookup(node_label, true); - } } diff --git "a/developer/javac\360\237\226\211/Ariadne_GraphDirectedAcyclic.java" "b/developer/javac\360\237\226\211/Ariadne_GraphDirectedAcyclic.java" index 3a8e9e2..948dc47 100644 --- "a/developer/javac\360\237\226\211/Ariadne_GraphDirectedAcyclic.java" +++ "b/developer/javac\360\237\226\211/Ariadne_GraphDirectedAcyclic.java" @@ -11,6 +11,10 @@ public class Ariadne_GraphDirectedAcyclic extends Ariadne_Graph { Constructors */ + public Ariadne_GraphDirectedAcyclic() { + super(new HashMap<>(), null); + } + public Ariadne_GraphDirectedAcyclic(Map node_map, Ariadne_ProductionList recognizer_f_list, Ariadne_LabelList root_node_list, int max_depth, boolean verbose) { super(node_map, recognizer_f_list); Ariadne_TokenSet cycle_detection_result = graph_mark_cycles(root_node_list, max_depth, verbose); diff --git "a/developer/javac\360\237\226\211/Ariadne_Node.java" "b/developer/javac\360\237\226\211/Ariadne_Node.java" index 41d8ccd..0c49ac2 100644 --- "a/developer/javac\360\237\226\211/Ariadne_Node.java" +++ "b/developer/javac\360\237\226\211/Ariadne_Node.java" @@ -1,30 +1,30 @@ package com.ReasoningTechnology.Ariadne; import java.util.HashMap; -public class Ariadne_Node extends HashMap { +public class Ariadne_Node extends HashMap{ private static String mark_property_name = "mark"; private static String neighbor_property_name = "neighbor"; - public Ariadne_Node() { + public Ariadne_Node(){ super(); this.put(neighbor_property_name, new Ariadne_LabelList()); } - public void mark(Ariadne_Token token) { - if (this.get(mark_property_name) == null) { + public void mark(Ariadne_Token token){ + if(this.get(mark_property_name) == null){ this.put(mark_property_name, new Ariadne_TokenSet()); } ((Ariadne_TokenSet) this.get(mark_property_name)).add(token); } - public boolean has_mark(Ariadne_Token token) { - Ariadne_TokenSet mark = (Ariadne_TokenSet) this.get(mark_property_name); + public boolean has_mark(Ariadne_Token token){ + Ariadne_TokenSet mark =(Ariadne_TokenSet) this.get(mark_property_name); return mark != null && mark.contains(token); } - public Ariadne_LabelList neighbor_LabelList() { - return (Ariadne_LabelList) this.get(neighbor_property_name); + public Ariadne_LabelList neighbor_LabelList(){ + return(Ariadne_LabelList) this.get(neighbor_property_name); } } diff --git "a/developer/tool\360\237\226\211/clean" "b/developer/tool\360\237\226\211/clean" new file mode 100755 index 0000000..a32578f --- /dev/null +++ "b/developer/tool\360\237\226\211/clean" @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +script_afp=$(realpath "${BASH_SOURCE[0]}") + +# Removes all files found in the build directories. It asks no questions as to +# how or why the files got there. Be especially careful with the 'bash' +# directory if you have authored scripts for release, add a `bash🖉` +# directory instead of putting them in `bash`. + +# input guards + env_must_be="developer/tool🖉/env" + if [ "$ENV" != "$env_must_be" ]; then + echo "$(script_fp):: error: must be run in the $env_must_be environment" + exit 1 + fi + +# remove files + set -x + cd "$REPO_HOME"/developer + + # rm_na currently does not handle links correctly + rm -r scratchpad/* + + rm_na jvm/* + rm_na bash/* + set +x + +echo "$(script_fn) done." + diff --git "a/developer/tool\360\237\226\211/clean_build_directories" "b/developer/tool\360\237\226\211/clean_build_directories" deleted file mode 100755 index 2414a1c..0000000 --- "a/developer/tool\360\237\226\211/clean_build_directories" +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") - -# Removes all files found in the build directories. It asks no questions as to -# how or why the files got there. Be especially careful with the 'bash' -# directory if you have authored scripts for release, add a `bash🖉` -# directory instead of putting them in `bash`. - -# input guards - env_must_be="developer/tool🖉/env" - if [ "$ENV" != "$env_must_be" ]; then - echo "$(script_fp):: error: must be run in the $env_must_be environment" - exit 1 - fi - -# remove files - set -x - cd "$REPO_HOME"/developer - rm -r scratchpad/* - rm jvm/* - rm bash/* - set +x - -echo "$(script_fn) done." - diff --git "a/developer/tool\360\237\226\211/clean_javac_output" "b/developer/tool\360\237\226\211/clean_javac_output" deleted file mode 100755 index 82835c7..0000000 --- "a/developer/tool\360\237\226\211/clean_javac_output" +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") -# remove all files created by make's call to `javac` - -# input guards - env_must_be="developer/tool🖉/env" - if [ "$ENV" != "$env_must_be" ]; then - echo "$(script_fp):: error: must be run in the $env_must_be environment" - exit 1 - fi - -# remove files - set -x - cd "$REPO_HOME"/developer - rm -r scratchpad/com/ReasoningTechnology/"$PROJECT" - set +x - -echo "$(script_fn) done." diff --git "a/developer/tool\360\237\226\211/clean_make_output" "b/developer/tool\360\237\226\211/clean_make_output" deleted file mode 100755 index 094552b..0000000 --- "a/developer/tool\360\237\226\211/clean_make_output" +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") -# remove all files made by `make` - -# input guards - - env_must_be="developer/tool🖉/env" - if [ "$ENV" != "$env_must_be" ]; then - echo "$(script_fp):: error: must be run in the $env_must_be environment" - exit 1 - fi - -# wrappers to clean (this list space separated list will grow) - - wrapper=$(bash_wrapper_list) - -# remove files - - set -x - cd "$REPO_HOME"/developer - rm -r scratchpad/com/ReasoningTechnology/"$PROJECT" - rm jvm/"$PROJECT".jar - rm bash/{$wrapper} - set +x - -echo "$(script_fn) done." diff --git "a/developer/tool\360\237\226\211/clean_release" "b/developer/tool\360\237\226\211/clean_release" deleted file mode 100755 index 8744730..0000000 --- "a/developer/tool\360\237\226\211/clean_release" +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") -# remove files made by `make` and by `release` - -# input guards - - env_must_be="developer/tool🖉/env" - if [ "$ENV" != "$env_must_be" ]; then - echo "$(script_fp):: error: must be run in the $env_must_be environment" - exit 1 - fi - -# things to clean - - release_dir="$REPO_HOME"/release - wrapper=$(bash_wrapper_list) - -# remove files - set -x - cd "$REPO_HOME"/developer - rm -r scratchpad/com/ReasoningTechnology/"$PROJECT" - rm jvm/"$PROJECT".jar - rm bash/{$wrapper} - rm -f "$release_dir"/"$PROJECT".jar - rm -f "$release_dir"/{$wrapper} - set +x - -echo "$(script_fn) done." - diff --git "a/developer/tool\360\237\226\211/distribute_source" "b/developer/tool\360\237\226\211/distribute_source" deleted file mode 100755 index c0a9874..0000000 --- "a/developer/tool\360\237\226\211/distribute_source" +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") - -# This script links the sources in javac🖉 into the directory tree that parallels -# the package name in scratch_pad. If the `-nolink` option is specified, -# it makes a copy instead of a link. - -# Input guards -env_must_be="developer/tool🖉/env" -if [ "$ENV" != "$env_must_be" ]; then - echo "$script_afp:: error: must be run in the $env_must_be environment" - exit 1 -fi - -cd "$REPO_HOME"/developer || exit 1 - -# Parse options -nolink=false -while [[ "$1" == -* ]]; do - case "$1" in - -nolink) nolink=true ;; - *) echo "$script_afp:: error: unknown option $1" && exit 1 ;; - esac - shift -done - -# Set up package tree -package_tree="scratchpad/com/ReasoningTechnology/$PROJECT" -mkdir -p "$package_tree" -echo "Package: $package_tree" - -# Process files -echo -n "$([[ $nolink == true ]] && echo "Copying" || echo "Linking"):" -for source_file in javac🖉/*.java; do - echo -n " $(basename "$source_file")" - link_target="$package_tree/$(basename "$source_file")" - # Copy the file if -nolink option is provided, otherwise create a link - if [[ $nolink == true ]]; then - # Remove link if present, otherwise copy will try to overwrite the link target (and fail). - rm -f "$link_target" - cp "$source_file" "$link_target" - else - # Create a symbolic link if -nolink is not provided - if [ ! -L "$link_target" ]; then - ln -s "$(realpath --relative-to="$package_tree" "$source_file")" "$link_target" - fi - fi -done -echo "." - -echo "$script_afp done." - - diff --git "a/developer/tool\360\237\226\211/gather_source_links" "b/developer/tool\360\237\226\211/gather_source_links" new file mode 100755 index 0000000..c0a9874 --- /dev/null +++ "b/developer/tool\360\237\226\211/gather_source_links" @@ -0,0 +1,53 @@ +#!/bin/env bash +script_afp=$(realpath "${BASH_SOURCE[0]}") + +# This script links the sources in javac🖉 into the directory tree that parallels +# the package name in scratch_pad. If the `-nolink` option is specified, +# it makes a copy instead of a link. + +# Input guards +env_must_be="developer/tool🖉/env" +if [ "$ENV" != "$env_must_be" ]; then + echo "$script_afp:: error: must be run in the $env_must_be environment" + exit 1 +fi + +cd "$REPO_HOME"/developer || exit 1 + +# Parse options +nolink=false +while [[ "$1" == -* ]]; do + case "$1" in + -nolink) nolink=true ;; + *) echo "$script_afp:: error: unknown option $1" && exit 1 ;; + esac + shift +done + +# Set up package tree +package_tree="scratchpad/com/ReasoningTechnology/$PROJECT" +mkdir -p "$package_tree" +echo "Package: $package_tree" + +# Process files +echo -n "$([[ $nolink == true ]] && echo "Copying" || echo "Linking"):" +for source_file in javac🖉/*.java; do + echo -n " $(basename "$source_file")" + link_target="$package_tree/$(basename "$source_file")" + # Copy the file if -nolink option is provided, otherwise create a link + if [[ $nolink == true ]]; then + # Remove link if present, otherwise copy will try to overwrite the link target (and fail). + rm -f "$link_target" + cp "$source_file" "$link_target" + else + # Create a symbolic link if -nolink is not provided + if [ ! -L "$link_target" ]; then + ln -s "$(realpath --relative-to="$package_tree" "$source_file")" "$link_target" + fi + fi +done +echo "." + +echo "$script_afp done." + + diff --git "a/developer/tool\360\237\226\211/gather_third_party" "b/developer/tool\360\237\226\211/gather_third_party" new file mode 100755 index 0000000..5941b9a --- /dev/null +++ "b/developer/tool\360\237\226\211/gather_third_party" @@ -0,0 +1,45 @@ +#!/bin/env bash +script_afp=$(realpath "${BASH_SOURCE[0]}") + +# Ariadne does not currently package any third party tools with the .jar +# release, so this script does nothing. + +# This script expands Mosaic third party projects onto the scratchpad. This is done before releasing or running local ad hoc tests, so that the third party tools will be present. I.e. this is for creating a 'fat' jar. + +# Input guards + + env_must_be="developer/tool🖉/env" + if [ "$ENV" != "$env_must_be" ]; then + echo "$(script_fp):: error: must be run in the $env_must_be environment" + exit 1 + fi + + cd "$REPO_HOME"/developer + +# Expand the third party tools into the package tree + + # echo "Expanding .jar files to be included with Mosaic into scratchpad." + + # third_party_jars=( + # "$LOGGER_FACADE" + # "$LOGGER_CLASSIC" + # "$LOGGER_CORE" + # ) + + # pushd scratchpad >& /dev/null + + # for jar in "${third_party_jars[@]}"; do + # if [ -f "$jar" ]; then + # echo "including $jar" + # jar -xf "$jar" + # else + # echo "Warning: JAR file not found: $jar" + # fi + # done + + # # we are not currently using modules + # rm -rf module-info.class + + + +echo "$(script_fp) done." diff --git "a/developer/tool\360\237\226\211/release" "b/developer/tool\360\237\226\211/release" index 81966ad..c8c32fe 100755 --- "a/developer/tool\360\237\226\211/release" +++ "b/developer/tool\360\237\226\211/release" @@ -1,6 +1,8 @@ #!/usr/bin/env bash script_afp=$(realpath "${BASH_SOURCE[0]}") +# before running this script, gather everything needed for the release on the scratchpad + # input guards if [ -z "$REPO_HOME" ]; then @@ -10,23 +12,24 @@ script_afp=$(realpath "${BASH_SOURCE[0]}") env_must_be="developer/tool🖉/env" if [ "$ENV" != "$env_must_be" ]; then - echo "$(script_fp):: error: must be run in the $env_must_be environment" + echo "$(script_fp):: must be run in the $env_must_be environment" exit 1 fi -# script local environment + cd "$REPO_HOME"/developer - release_dir="$REPO_HOME/release" - bash_dir="$REPO_HOME/developer/bash" - project_jar_fp="$REPO_HOME/developer/jvm/"$PROJECT".jar" - wrapper=$(bash_wrapper_list) + if [ ! -d scratchpad ]; then + echo "$(script_fp):: no scratchpad directory" + exit 1 + fi - if [ ! -d "$release_dir" ]; then - mkdir -p "$release_dir" - fi +# Inform the user + + echo "The pwd for this script is `pwd`." + +# Function to copy and set permissions - # Function to copy and set permissions install_file() { source_fp="$1" target_dp="$2" @@ -46,17 +49,33 @@ script_afp=$(realpath "${BASH_SOURCE[0]}") echo "Installed $(basename "$source_fp") to $target_dp with permissions $perms" fi } - -# do the release - echo "Starting release process..." +# scratchpad --> .jar file + + mkdir -p jvm + jar_file=$(realpath jvm/"$PROJECT".jar) + + pushd scratchpad + + echo "scratchpad -> $jar_file" + jar cf $jar_file * + if [ $? -ne 0 ]; then + echo "Failed to create $jar_file file." + exit 1 + fi + + popd + +# move files to the release dir + + release_dir="$REPO_HOME/release" + bash_dir="$REPO_HOME/developer/bash" + wrapper=$(bash_wrapper_list) - # Install the JAR file - install_file "$project_jar_fp" "$release_dir" "ug+r" + install_file "$jar_file" "$release_dir" "ug+r" - # Install bash wrappers for wrapper in $wrapper; do - install_file "$bash_dir/$wrapper" "$release_dir" "ug+r+x" + install_file "$bash_dir"/"$wrapper" "$release_dir" "ug+r+x" done echo "$(script_fp) done." diff --git "a/document\360\237\226\211/LICENSE.txt" "b/document\360\237\226\211/LICENSE.txt" new file mode 120000 index 0000000..4ab4373 --- /dev/null +++ "b/document\360\237\226\211/LICENSE.txt" @@ -0,0 +1 @@ +../LICENSE.txt \ No newline at end of file diff --git "a/document\360\237\226\211/README.txt" "b/document\360\237\226\211/README.txt" new file mode 120000 index 0000000..ecfa029 --- /dev/null +++ "b/document\360\237\226\211/README.txt" @@ -0,0 +1 @@ +../README.txt \ No newline at end of file diff --git a/env_run b/env_run index c2bd006..dc80084 120000 --- a/env_run +++ b/env_run @@ -1 +1 @@ -tool_shared/third_party/RT-project-share/release/bash/env_run \ No newline at end of file +tool_shared/third_party/RT-project-share//release/bash/env_run \ No newline at end of file diff --git a/release/Ariadne.jar b/release/Ariadne.jar index b9fcac5..b077223 100644 Binary files a/release/Ariadne.jar and b/release/Ariadne.jar differ diff --git a/tester/bash/.githolder b/tester/bash/.githolder deleted file mode 100644 index e69de29..0000000 diff --git a/tester/bash/Test_File_0 b/tester/bash/Test_File_0 deleted file mode 100755 index 39c1f2a..0000000 --- a/tester/bash/Test_File_0 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/env bash -java Test_File_0 diff --git a/tester/bash/Test_Graph_0 b/tester/bash/Test_Graph_0 deleted file mode 100755 index 7653d09..0000000 --- a/tester/bash/Test_Graph_0 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/env bash -java Test_Graph_0 diff --git a/tester/bash/Test_LabelList_0 b/tester/bash/Test_LabelList_0 deleted file mode 100755 index 15a0da6..0000000 --- a/tester/bash/Test_LabelList_0 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/env bash -java Test_LabelList_0 diff --git a/tester/bash/Test_Label_0 b/tester/bash/Test_Label_0 deleted file mode 100755 index 6b61242..0000000 --- a/tester/bash/Test_Label_0 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/env bash -java Test_Label_0 diff --git a/tester/bash/Test_NodeList_0 b/tester/bash/Test_NodeList_0 deleted file mode 100755 index 8970446..0000000 --- a/tester/bash/Test_NodeList_0 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/env bash -java Test_NodeList_0 diff --git a/tester/bash/Test_Node_0 b/tester/bash/Test_Node_0 deleted file mode 100755 index 7901f30..0000000 --- a/tester/bash/Test_Node_0 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/env bash -java Test_Node_0 diff --git a/tester/bash/Test_TokenSet_0 b/tester/bash/Test_TokenSet_0 deleted file mode 100755 index 05d37d4..0000000 --- a/tester/bash/Test_TokenSet_0 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/env bash -java Test_TokenSet_0 diff --git a/tester/bash/Test_Token_0 b/tester/bash/Test_Token_0 deleted file mode 100755 index 842f673..0000000 --- a/tester/bash/Test_Token_0 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/env bash -java Test_Token_0 diff --git a/tester/bash/Test_Util_0 b/tester/bash/Test_Util_0 deleted file mode 100755 index 6157abe..0000000 --- a/tester/bash/Test_Util_0 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/env bash -java Test_Util_0 diff --git "a/tester/bash\360\237\226\211/TF0" "b/tester/bash\360\237\226\211/TF0" deleted file mode 100755 index af784e6..0000000 --- "a/tester/bash\360\237\226\211/TF0" +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/env bash - -echo $ENV - -vl echo "CLASSPATH: $CLASSPATH" - -set -x -java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005 Test_File_0 - - diff --git a/tester/data_File_0/I_exist b/tester/data_File_0/I_exist new file mode 100644 index 0000000..e69de29 diff --git a/tester/data_File_0/file_0 b/tester/data_File_0/file_0 new file mode 100644 index 0000000..e69de29 diff --git a/tester/data_File_0/file_1 b/tester/data_File_0/file_1 new file mode 100644 index 0000000..e69de29 diff --git a/tester/data_File_0/file_2 b/tester/data_File_0/file_2 new file mode 100644 index 0000000..e69de29 diff --git a/tester/data_File_0/file_3 b/tester/data_File_0/file_3 new file mode 100644 index 0000000..e69de29 diff --git a/tester/data_Test_File_0/I_exist b/tester/data_Test_File_0/I_exist deleted file mode 100644 index e69de29..0000000 diff --git a/tester/data_Test_File_0/file_0 b/tester/data_Test_File_0/file_0 deleted file mode 100644 index e69de29..0000000 diff --git a/tester/data_Test_File_0/file_1 b/tester/data_Test_File_0/file_1 deleted file mode 100644 index e69de29..0000000 diff --git a/tester/data_Test_File_0/file_2 b/tester/data_Test_File_0/file_2 deleted file mode 100644 index e69de29..0000000 diff --git a/tester/data_Test_File_0/file_3 b/tester/data_Test_File_0/file_3 deleted file mode 100644 index e69de29..0000000 diff --git "a/tester/document\360\237\226\211/debug_with_sources.txt" "b/tester/document\360\237\226\211/debug_with_sources.txt" deleted file mode 100644 index e2ee8e0..0000000 --- "a/tester/document\360\237\226\211/debug_with_sources.txt" +++ /dev/null @@ -1,78 +0,0 @@ - -How to tie sources into debugging - -

Option 1: so sources can be edited then checked into the repo:

- - It is not typical to desire to be able edit upstream libraries, but maybe you - are developer on the upstream code, or want to leave the option open. Who - knows? - - 1. distribute the source files into the package tree - - cd $REPO_HOME/tool_shared//developer - . env_developer - distribute_source - - This will put links into developer/scratchpad that point back into original - sources. Hence, after making changes they can be checked in. - - If on a release branch, the sources will be in sync with the classes found - in the .jvm in the release directory, or at least they are supposed to be. - - If not on a release branch, then follow the directions for making and - releasing the project, and spin up a new released `.jvm` file and they - will be in sync. - - - 2. edit $REPO_HOME/tester/tool🖉/env and make sure the developer/scratchpad is - in the SOURCEPATH - - export SOURCEPATH=\ - ... - :"$REPO_HOME"/tool_shared/third_party/Mosaic/developer/scratchpad\ - ... - -

Option 2: you do not plan to edit the third party library:

- - This is more typical. - - 1. If your `.jar` file has sources included, expand it into the tester/scratchapd - - jar -xf .jar> $REPO_HOME/tester/scratchpad. - - The debugger should now have access to the sources. - - 2. If your `.jar` does not have sources included. Go build them, see the directions in - the first option. - -

Option 3: don't debug a third party library. - - This is the most typical. Step over calls to the library. If results are not as expected, - read docs, discuss with others, make bug reports. - --------------------------------------------------------------------------------- - -Examples: - -export CLASSPATH=\ -"$JAVA_HOME"/lib\ -:"$MOSAIC_HOME"/developer/scratchpad\ -:"$REPO_HOME"/developer/scratchpad\ -:"$REPO_HOME"/tester/scratchpad\ -:"$CLASSPATH" - -First line gets the class files most recently built by Mosaic developer. -Second line gets the class files most recently built by Ariadne developer. -Third line gets class files most recently built by the tester. - -export SOURCEPATH=\ -"$JAVA_HOME"/lib\ -:"$MOSAIC_HOME"/developer/scratchpad\ -:"$REPO_HOME"/developer/scratchpad\ -:"$REPO_HOME"/tester/javac🖉\ -:"$SOURCEPATH" - -In each case the developer must run `distribute_source` before building the project. -First line gets the source files most recently built by Mosaic developer. -Second line gets the source files most recently built by Ariadne developer. -Third line gets source files most recently built by the tester. diff --git "a/tester/javac\360\237\226\211/File_0.java" "b/tester/javac\360\237\226\211/File_0.java" new file mode 100644 index 0000000..cf56c38 --- /dev/null +++ "b/tester/javac\360\237\226\211/File_0.java" @@ -0,0 +1,107 @@ + +import java.io.IOException; +import java.lang.reflect.Method; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.FileTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.ReasoningTechnology.Mosaic.Mosaic_IO; +import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; +import com.ReasoningTechnology.Mosaic.Mosaic_Util; + +import com.ReasoningTechnology.Ariadne.Ariadne_File; + + +public class File_0 { + + public class TestSuite { + + public Boolean unpack_file_path_0(Mosaic_IO io) { + Boolean[] conditions = new Boolean[5]; + int i = 0; + + String test_fp = "/home/user/test.txt"; + String expected_dp = "/home/user/"; + String expected_fn = "test.txt"; + String expected_fn_base = "test"; + String expected_fn_ext = "txt"; + + try { + Map result = Ariadne_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 Mosaic_Util.all(conditions); + } catch (Exception e) { + e.printStackTrace(); + return false; + } + } + + public Boolean file_exists_q_0(Mosaic_IO io) { + Boolean[] conditions = new Boolean[2]; + int i = 0; + + String repoHome = System.getenv("REPO_HOME"); + String existingFilePath = repoHome + "/tester/data_File_0/I_exist"; + String nonExistentFilePath = repoHome + "/tester/data_File_0/I_do_not_exist"; + + conditions[i++] = Ariadne_File.file_exists_q(existingFilePath); + conditions[i++] = !Ariadne_File.file_exists_q(nonExistentFilePath); + + return Mosaic_Util.all(conditions); + } + + public Boolean newer_than_all_0(Mosaic_IO io) throws IOException { + Boolean[] conditions = new Boolean[5]; + int i = 0; + + String repoHome = System.getenv("REPO_HOME"); + String file_0 = repoHome + "/tester/data_File_0/file_0"; + String file_1 = repoHome + "/tester/data_File_0/file_1"; + String file_2 = repoHome + "/tester/data_File_0/file_2"; + String file_3 = repoHome + "/tester/data_File_0/file_3"; + String missing_file_0 = repoHome + "/tester/data_File_0/missing_file_0"; + + // Setting modification times + Files.setLastModifiedTime(Path.of(file_3), FileTime.fromMillis(System.currentTimeMillis() - 20000)); + Files.setLastModifiedTime(Path.of(file_2), FileTime.fromMillis(System.currentTimeMillis() - 15000)); + Files.setLastModifiedTime(Path.of(file_1), FileTime.fromMillis(System.currentTimeMillis() - 10000)); + Files.setLastModifiedTime(Path.of(file_0), FileTime.fromMillis(System.currentTimeMillis() - 5000)); + + conditions[i++] = Ariadne_File.newer_than_all(file_0, List.of(file_1, file_2, file_3)); + + // Updating times and repeating checks + Files.setLastModifiedTime(Path.of(file_2), FileTime.fromMillis(System.currentTimeMillis() + 10000)); + conditions[i++] = !Ariadne_File.newer_than_all(file_0, List.of(file_1, file_2, file_3)); + + Files.setLastModifiedTime(Path.of(file_1), FileTime.fromMillis(System.currentTimeMillis() + 15000)); + conditions[i++] = !Ariadne_File.newer_than_all(file_0, List.of(file_1, file_2, file_3)); + + conditions[i++] = !Ariadne_File.newer_than_all(missing_file_0, List.of(file_1, file_2, file_3)); + + conditions[i++] = !Ariadne_File.newer_than_all(file_0, List.of(file_1, missing_file_0)); + + return Mosaic_Util.all(conditions); + } + } + + public static void main(String[] args) { + try { + TestSuite suite = new File_0().new TestSuite(); + int result = Mosaic_Testbench.run(suite); + System.exit(result); + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + } +} diff --git "a/tester/javac\360\237\226\211/Graph_0.java" "b/tester/javac\360\237\226\211/Graph_0.java" new file mode 100644 index 0000000..bfb5dcc --- /dev/null +++ "b/tester/javac\360\237\226\211/Graph_0.java" @@ -0,0 +1,72 @@ +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.lang.reflect.Method; + +import com.ReasoningTechnology.Mosaic.Mosaic_Dispatch; +import com.ReasoningTechnology.Mosaic.Mosaic_IO; +import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; +import com.ReasoningTechnology.Mosaic.Mosaic_Util; + +import com.ReasoningTechnology.Ariadne.Ariadne_Graph; +import com.ReasoningTechnology.Ariadne.Ariadne_GraphDirectedAcyclic; +import com.ReasoningTechnology.Ariadne.Ariadne_Label; +import com.ReasoningTechnology.Ariadne.Ariadne_LabelList; +import com.ReasoningTechnology.Ariadne.Ariadne_Node; +import com.ReasoningTechnology.Ariadne.Ariadne_ProductionList; + +public class Graph_0 { + + public class TestSuite { + private final Object GraphDirectedAcyclic_proxy; + + public TestSuite() { + this.GraphDirectedAcyclic_proxy = + Mosaic_Util.make_all_public_methods_proxy( Ariadne_GraphDirectedAcyclic.class ); + } + + public Boolean path_find_cycle_0( Mosaic_IO io ) { + Boolean[] conditions = new Boolean[1]; + Mosaic_Util.all_set_false( conditions ); + int i = 0; + try { + Ariadne_LabelList path = new Ariadne_LabelList( + List.of( + new Ariadne_Label( "A" ) + ,new Ariadne_Label( "B" ) + ,new Ariadne_Label( "A" ) + ) + ); + // @SuppressWarnings("unchecked") + List cycle_indices = (List) GraphDirectedAcyclic_proxy.getClass().getMethod( + "path_find_cycle" + ,Ariadne_LabelList.class + ).invoke( GraphDirectedAcyclic_proxy ,path ); + /* + + conditions[i++] = cycle_indices != null && cycle_indices.size() == 2; + */ + } catch (Exception e) { + Mosaic_Util.log_message("path_find_cycle_0", "Test logic error: " + e.getMessage()); + return false; + } + + return true; +// return Mosaic_Util.all( conditions ); + } + + public Boolean lookup_0( Mosaic_IO io ) { + Boolean[] conditions = new Boolean[1]; + Mosaic_Util.all_set_false( conditions ); + int i = 0; + return true; + } + } + + public static void main(String[] args) { + // no command line arguments, nor options to be parsed. + TestSuite suite = new Graph_0().new TestSuite(); + int result = Mosaic_Testbench.run(suite); + System.exit(result); + } +} diff --git "a/tester/javac\360\237\226\211/LabelList_0.java" "b/tester/javac\360\237\226\211/LabelList_0.java" new file mode 100644 index 0000000..6b11de6 --- /dev/null +++ "b/tester/javac\360\237\226\211/LabelList_0.java" @@ -0,0 +1,39 @@ +import java.util.Arrays; +import java.util.List; + +import com.ReasoningTechnology.Mosaic.Mosaic_IO; +import com.ReasoningTechnology.Mosaic.Mosaic_Util; +import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; + +import com.ReasoningTechnology.Ariadne.Ariadne_Label; +import com.ReasoningTechnology.Ariadne.Ariadne_LabelList; + +public class LabelList_0 { + + public class TestSuite { + + public Boolean labelList_creation_0(Mosaic_IO io) { + Boolean[] conditions = new Boolean[2]; + int i = 0; + + // Test the default constructor + Ariadne_LabelList emptyList = new Ariadne_LabelList(); + conditions[i++] = emptyList.isEmpty(); // Expect true for an empty list + + // Test the constructor with a list of labels + List labels = Arrays.asList(new Ariadne_Label("label1"), new Ariadne_Label("label2")); + Ariadne_LabelList labelList = new Ariadne_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 Mosaic_Util.all(conditions); + } + + } + + public static void main(String[] args) { + TestSuite suite = new LabelList_0().new TestSuite(); + int result = Mosaic_Testbench.run(suite); + System.exit(result); + } +} diff --git "a/tester/javac\360\237\226\211/Label_0.java" "b/tester/javac\360\237\226\211/Label_0.java" new file mode 100644 index 0000000..817e232 --- /dev/null +++ "b/tester/javac\360\237\226\211/Label_0.java" @@ -0,0 +1,40 @@ + +import com.ReasoningTechnology.Mosaic.Mosaic_IO; +import com.ReasoningTechnology.Mosaic.Mosaic_Util; +import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; + +import com.ReasoningTechnology.Ariadne.Ariadne_Label; + + +public class Label_0 { + + public class TestSuite { + + public Boolean label_creation_0(Mosaic_IO io) { + Boolean[] conditions = new Boolean[4]; + int i = 0; + + // Test input + Ariadne_Label label1 = new Ariadne_Label("test"); + Ariadne_Label label2 = new Ariadne_Label(""); + Ariadne_Label label3 = new Ariadne_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 Mosaic_Util.all(conditions); + } + + } + + public static void main(String[] args) { + TestSuite suite = new Label_0().new TestSuite(); + int result = Mosaic_Testbench.run(suite); + System.exit(result); + } + +} diff --git "a/tester/javac\360\237\226\211/NodeList_0.java" "b/tester/javac\360\237\226\211/NodeList_0.java" new file mode 100644 index 0000000..21dc2a4 --- /dev/null +++ "b/tester/javac\360\237\226\211/NodeList_0.java" @@ -0,0 +1,35 @@ +import com.ReasoningTechnology.Mosaic.Mosaic_IO; +import com.ReasoningTechnology.Mosaic.Mosaic_Util; +import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; + +import com.ReasoningTechnology.Ariadne.Ariadne_Node; +import com.ReasoningTechnology.Ariadne.Ariadne_NodeList; + +public class NodeList_0 { + + public class TestSuite { + + public Boolean nodeList_creation_0(Mosaic_IO io) { + Boolean[] conditions = new Boolean[2]; + int i = 0; + + // Test default constructor (expecting an empty NodeList) + Ariadne_NodeList nodeList = new Ariadne_NodeList(); + conditions[i++] = nodeList.isEmpty(); // Expect true for empty list + + // Add a node and verify presence + Ariadne_Node node = new Ariadne_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 Mosaic_Util.all(conditions); + } + } + + public static void main(String[] args) { + TestSuite suite = new NodeList_0().new TestSuite(); + int result = Mosaic_Testbench.run(suite); + System.exit(result); + } +} diff --git "a/tester/javac\360\237\226\211/Node_0.java" "b/tester/javac\360\237\226\211/Node_0.java" new file mode 100644 index 0000000..a8754b6 --- /dev/null +++ "b/tester/javac\360\237\226\211/Node_0.java" @@ -0,0 +1,74 @@ + +import com.ReasoningTechnology.Mosaic.Mosaic_IO; +import com.ReasoningTechnology.Mosaic.Mosaic_Util; +import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; + +import com.ReasoningTechnology.Ariadne.Ariadne_Node; +import com.ReasoningTechnology.Ariadne.Ariadne_Label; +import com.ReasoningTechnology.Ariadne.Ariadne_LabelList; +import com.ReasoningTechnology.Ariadne.Ariadne_Token; +import com.ReasoningTechnology.Ariadne.Ariadne_TokenSet; + + +public class Node_0 { + + public class TestSuite { + + public Boolean node_creation_0(Mosaic_IO io) { + Boolean[] conditions = new Boolean[2]; + int i = 0; + + // Test that neighbor list is initialized + Ariadne_Node node = new Ariadne_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 Mosaic_Util.all(conditions); + } + + public Boolean node_marking_0(Mosaic_IO io) { + Boolean[] conditions = new Boolean[3]; + int i = 0; + + Ariadne_Node node = new Ariadne_Node(); + Ariadne_Token token1 = new Ariadne_Token("token1"); + Ariadne_Token token2 = new Ariadne_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 + Ariadne_TokenSet markSet = (Ariadne_TokenSet) node.get("mark"); + conditions[i++] = markSet != null && markSet.contains(token1); // Expect true + + // Return true if all conditions are met + return Mosaic_Util.all(conditions); + } + + public Boolean node_neighbor_0(Mosaic_IO io) { + Boolean[] conditions = new Boolean[1]; + int i = 0; + + // Test adding and retrieving neighbors + Ariadne_Node node = new Ariadne_Node(); + Ariadne_LabelList neighbors = node.neighbor_LabelList(); + neighbors.add(new Ariadne_Label("neighbor1")); + neighbors.add(new Ariadne_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 Mosaic_Util.all(conditions); + } + } + + public static void main(String[] args) { + TestSuite suite = new Node_0().new TestSuite(); + int result = Mosaic_Testbench.run(suite); + System.exit(result); + } +} diff --git "a/tester/javac\360\237\226\211/Test_File_0.java" "b/tester/javac\360\237\226\211/Test_File_0.java" deleted file mode 100644 index e3bb697..0000000 --- "a/tester/javac\360\237\226\211/Test_File_0.java" +++ /dev/null @@ -1,107 +0,0 @@ - -import java.io.IOException; -import java.lang.reflect.Method; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.attribute.FileTime; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.ReasoningTechnology.Mosaic.Mosaic_IO; -import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; -import com.ReasoningTechnology.Mosaic.Mosaic_Util; - -import com.ReasoningTechnology.Ariadne.Ariadne_File; - - -public class Test_File_0 { - - public class TestSuite { - - public Boolean unpack_file_path_0(Mosaic_IO io) { - Boolean[] conditions = new Boolean[5]; - int i = 0; - - String test_fp = "/home/user/test.txt"; - String expected_dp = "/home/user/"; - String expected_fn = "test.txt"; - String expected_fn_base = "test"; - String expected_fn_ext = "txt"; - - try { - Map result = Ariadne_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 Mosaic_Util.all(conditions); - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - public Boolean file_exists_q_0(Mosaic_IO io) { - Boolean[] conditions = new Boolean[2]; - int i = 0; - - 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"; - - conditions[i++] = Ariadne_File.file_exists_q(existingFilePath); - conditions[i++] = !Ariadne_File.file_exists_q(nonExistentFilePath); - - return Mosaic_Util.all(conditions); - } - - public Boolean newer_than_all_0(Mosaic_IO io) throws IOException { - Boolean[] conditions = new Boolean[5]; - int i = 0; - - String repoHome = System.getenv("REPO_HOME"); - 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"; - - // Setting modification times - Files.setLastModifiedTime(Path.of(file_3), FileTime.fromMillis(System.currentTimeMillis() - 20000)); - Files.setLastModifiedTime(Path.of(file_2), FileTime.fromMillis(System.currentTimeMillis() - 15000)); - Files.setLastModifiedTime(Path.of(file_1), FileTime.fromMillis(System.currentTimeMillis() - 10000)); - Files.setLastModifiedTime(Path.of(file_0), FileTime.fromMillis(System.currentTimeMillis() - 5000)); - - conditions[i++] = Ariadne_File.newer_than_all(file_0, List.of(file_1, file_2, file_3)); - - // Updating times and repeating checks - Files.setLastModifiedTime(Path.of(file_2), FileTime.fromMillis(System.currentTimeMillis() + 10000)); - conditions[i++] = !Ariadne_File.newer_than_all(file_0, List.of(file_1, file_2, file_3)); - - Files.setLastModifiedTime(Path.of(file_1), FileTime.fromMillis(System.currentTimeMillis() + 15000)); - conditions[i++] = !Ariadne_File.newer_than_all(file_0, List.of(file_1, file_2, file_3)); - - conditions[i++] = !Ariadne_File.newer_than_all(missing_file_0, List.of(file_1, file_2, file_3)); - - conditions[i++] = !Ariadne_File.newer_than_all(file_0, List.of(file_1, missing_file_0)); - - return Mosaic_Util.all(conditions); - } - } - - public static void main(String[] args) { - try { - TestSuite suite = new Test_File_0().new TestSuite(); - int result = Mosaic_Testbench.run(suite); - System.exit(result); - } catch (Exception e) { - e.printStackTrace(); - System.exit(1); - } - } -} diff --git "a/tester/javac\360\237\226\211/Test_Graph_0.java" "b/tester/javac\360\237\226\211/Test_Graph_0.java" deleted file mode 100644 index ba28304..0000000 --- "a/tester/javac\360\237\226\211/Test_Graph_0.java" +++ /dev/null @@ -1,71 +0,0 @@ -import java.util.HashMap; -import java.util.Map; -import java.util.List; -import java.lang.reflect.Method; - -import com.ReasoningTechnology.Mosaic.Mosaic_IO; -import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; -import com.ReasoningTechnology.Mosaic.Mosaic_Util; - -import com.ReasoningTechnology.Ariadne.Ariadne_Graph; -import com.ReasoningTechnology.Ariadne.Ariadne_GraphDirectedAcyclic; -import com.ReasoningTechnology.Ariadne.Ariadne_Label; -import com.ReasoningTechnology.Ariadne.Ariadne_LabelList; -import com.ReasoningTechnology.Ariadne.Ariadne_Node; -import com.ReasoningTechnology.Ariadne.Ariadne_ProductionList; - -public class Test_Graph_0 { - - public class TestSuite { - private final Object GraphDirectedAcyclic_proxy; - - public TestSuite() { - this.GraphDirectedAcyclic_proxy = - Mosaic_Util.make_all_public_methods_proxy( Ariadne_GraphDirectedAcyclic.class ); - } - - public Boolean path_find_cycle_0( Mosaic_IO io ) { - Boolean[] conditions = new Boolean[1]; - Mosaic_Util.all_set_false( conditions ); - int i = 0; - try { - Ariadne_LabelList path = new Ariadne_LabelList( - List.of( - new Ariadne_Label( "A" ) - ,new Ariadne_Label( "B" ) - ,new Ariadne_Label( "A" ) - ) - ); - // @SuppressWarnings("unchecked") - List cycle_indices = (List) GraphDirectedAcyclic_proxy.getClass().getMethod( - "path_find_cycle" - ,Ariadne_LabelList.class - ).invoke( GraphDirectedAcyclic_proxy ,path ); - /* - - conditions[i++] = cycle_indices != null && cycle_indices.size() == 2; - */ - } catch (Exception e) { - Mosaic_Util.log_message("path_find_cycle_0", "Test logic error: " + e.getMessage()); - return false; - } - - return true; -// return Mosaic_Util.all( conditions ); - } - - public Boolean lookup_0( Mosaic_IO io ) { - Boolean[] conditions = new Boolean[1]; - Mosaic_Util.all_set_false( conditions ); - int i = 0; - return true; - } - } - - public static void main(String[] args) { - // no command line arguments, nor options to be parsed. - TestSuite suite = new Test_Graph_0().new TestSuite(); - int result = Mosaic_Testbench.run(suite); - System.exit(result); - } -} diff --git "a/tester/javac\360\237\226\211/Test_LabelList_0.java" "b/tester/javac\360\237\226\211/Test_LabelList_0.java" deleted file mode 100644 index 258362e..0000000 --- "a/tester/javac\360\237\226\211/Test_LabelList_0.java" +++ /dev/null @@ -1,39 +0,0 @@ -import java.util.Arrays; -import java.util.List; - -import com.ReasoningTechnology.Mosaic.Mosaic_IO; -import com.ReasoningTechnology.Mosaic.Mosaic_Util; -import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; - -import com.ReasoningTechnology.Ariadne.Ariadne_Label; -import com.ReasoningTechnology.Ariadne.Ariadne_LabelList; - -public class Test_LabelList_0 { - - public class TestSuite { - - public Boolean labelList_creation_0(Mosaic_IO io) { - Boolean[] conditions = new Boolean[2]; - int i = 0; - - // Test the default constructor - Ariadne_LabelList emptyList = new Ariadne_LabelList(); - conditions[i++] = emptyList.isEmpty(); // Expect true for an empty list - - // Test the constructor with a list of labels - List labels = Arrays.asList(new Ariadne_Label("label1"), new Ariadne_Label("label2")); - Ariadne_LabelList labelList = new Ariadne_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 Mosaic_Util.all(conditions); - } - - } - - public static void main(String[] args) { - TestSuite suite = new Test_LabelList_0().new TestSuite(); - int result = Mosaic_Testbench.run(suite); - System.exit(result); - } -} diff --git "a/tester/javac\360\237\226\211/Test_Label_0.java" "b/tester/javac\360\237\226\211/Test_Label_0.java" deleted file mode 100644 index e304150..0000000 --- "a/tester/javac\360\237\226\211/Test_Label_0.java" +++ /dev/null @@ -1,40 +0,0 @@ - -import com.ReasoningTechnology.Mosaic.Mosaic_IO; -import com.ReasoningTechnology.Mosaic.Mosaic_Util; -import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; - -import com.ReasoningTechnology.Ariadne.Ariadne_Label; - - -public class Test_Label_0 { - - public class TestSuite { - - public Boolean label_creation_0(Mosaic_IO io) { - Boolean[] conditions = new Boolean[4]; - int i = 0; - - // Test input - Ariadne_Label label1 = new Ariadne_Label("test"); - Ariadne_Label label2 = new Ariadne_Label(""); - Ariadne_Label label3 = new Ariadne_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 Mosaic_Util.all(conditions); - } - - } - - public static void main(String[] args) { - TestSuite suite = new Test_Label_0().new TestSuite(); - int result = Mosaic_Testbench.run(suite); - System.exit(result); - } - -} diff --git "a/tester/javac\360\237\226\211/Test_NodeList_0.java" "b/tester/javac\360\237\226\211/Test_NodeList_0.java" deleted file mode 100644 index cb7f5a6..0000000 --- "a/tester/javac\360\237\226\211/Test_NodeList_0.java" +++ /dev/null @@ -1,35 +0,0 @@ -import com.ReasoningTechnology.Mosaic.Mosaic_IO; -import com.ReasoningTechnology.Mosaic.Mosaic_Util; -import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; - -import com.ReasoningTechnology.Ariadne.Ariadne_Node; -import com.ReasoningTechnology.Ariadne.Ariadne_NodeList; - -public class Test_NodeList_0 { - - public class TestSuite { - - public Boolean nodeList_creation_0(Mosaic_IO io) { - Boolean[] conditions = new Boolean[2]; - int i = 0; - - // Test default constructor (expecting an empty NodeList) - Ariadne_NodeList nodeList = new Ariadne_NodeList(); - conditions[i++] = nodeList.isEmpty(); // Expect true for empty list - - // Add a node and verify presence - Ariadne_Node node = new Ariadne_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 Mosaic_Util.all(conditions); - } - } - - public static void main(String[] args) { - TestSuite suite = new Test_NodeList_0().new TestSuite(); - int result = Mosaic_Testbench.run(suite); - System.exit(result); - } -} diff --git "a/tester/javac\360\237\226\211/Test_Node_0.java" "b/tester/javac\360\237\226\211/Test_Node_0.java" deleted file mode 100644 index ae85d64..0000000 --- "a/tester/javac\360\237\226\211/Test_Node_0.java" +++ /dev/null @@ -1,74 +0,0 @@ - -import com.ReasoningTechnology.Mosaic.Mosaic_IO; -import com.ReasoningTechnology.Mosaic.Mosaic_Util; -import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; - -import com.ReasoningTechnology.Ariadne.Ariadne_Node; -import com.ReasoningTechnology.Ariadne.Ariadne_Label; -import com.ReasoningTechnology.Ariadne.Ariadne_LabelList; -import com.ReasoningTechnology.Ariadne.Ariadne_Token; -import com.ReasoningTechnology.Ariadne.Ariadne_TokenSet; - - -public class Test_Node_0 { - - public class TestSuite { - - public Boolean node_creation_0(Mosaic_IO io) { - Boolean[] conditions = new Boolean[2]; - int i = 0; - - // Test that neighbor list is initialized - Ariadne_Node node = new Ariadne_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 Mosaic_Util.all(conditions); - } - - public Boolean node_marking_0(Mosaic_IO io) { - Boolean[] conditions = new Boolean[3]; - int i = 0; - - Ariadne_Node node = new Ariadne_Node(); - Ariadne_Token token1 = new Ariadne_Token("token1"); - Ariadne_Token token2 = new Ariadne_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 - Ariadne_TokenSet markSet = (Ariadne_TokenSet) node.get("mark"); - conditions[i++] = markSet != null && markSet.contains(token1); // Expect true - - // Return true if all conditions are met - return Mosaic_Util.all(conditions); - } - - public Boolean node_neighbor_0(Mosaic_IO io) { - Boolean[] conditions = new Boolean[1]; - int i = 0; - - // Test adding and retrieving neighbors - Ariadne_Node node = new Ariadne_Node(); - Ariadne_LabelList neighbors = node.neighbor_LabelList(); - neighbors.add(new Ariadne_Label("neighbor1")); - neighbors.add(new Ariadne_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 Mosaic_Util.all(conditions); - } - } - - public static void main(String[] args) { - TestSuite suite = new Test_Node_0().new TestSuite(); - int result = Mosaic_Testbench.run(suite); - System.exit(result); - } -} diff --git "a/tester/javac\360\237\226\211/Test_TokenSet_0.java" "b/tester/javac\360\237\226\211/Test_TokenSet_0.java" deleted file mode 100644 index 53399e1..0000000 --- "a/tester/javac\360\237\226\211/Test_TokenSet_0.java" +++ /dev/null @@ -1,52 +0,0 @@ -import com.ReasoningTechnology.Mosaic.Mosaic_IO; -import com.ReasoningTechnology.Mosaic.Mosaic_Util; -import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; - -import com.ReasoningTechnology.Ariadne.Ariadne_Token; -import com.ReasoningTechnology.Ariadne.Ariadne_TokenSet; - -public class Test_TokenSet_0 { - - public class TestSuite { - - public Boolean tokenSet_creation_0(Mosaic_IO io) { - Boolean[] conditions = new Boolean[2]; - int i = 0; - - // Test default constructor (expecting an empty TokenSet) - Ariadne_TokenSet tokenSet = new Ariadne_TokenSet(); - conditions[i++] = tokenSet.isEmpty(); // Expect true for empty set - - // Add a token and verify presence - Ariadne_Token token = new Ariadne_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 Mosaic_Util.all(conditions); - } - - public Boolean tokenSet_uniqueness_0(Mosaic_IO io) { - Boolean[] conditions = new Boolean[1]; - int i = 0; - - Ariadne_TokenSet tokenSet = new Ariadne_TokenSet(); - Ariadne_Token token1 = new Ariadne_Token("error"); - Ariadne_Token token2 = new Ariadne_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 Mosaic_Util.all(conditions); - } - } - - public static void main(String[] args) { - TestSuite suite = new Test_TokenSet_0().new TestSuite(); - int result = Mosaic_Testbench.run(suite); - System.exit(result); - } -} diff --git "a/tester/javac\360\237\226\211/Test_Token_0.java" "b/tester/javac\360\237\226\211/Test_Token_0.java" deleted file mode 100644 index 2fe9c48..0000000 --- "a/tester/javac\360\237\226\211/Test_Token_0.java" +++ /dev/null @@ -1,50 +0,0 @@ -import com.ReasoningTechnology.Mosaic.Mosaic_IO; -import com.ReasoningTechnology.Mosaic.Mosaic_Util; -import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; - -import com.ReasoningTechnology.Ariadne.Ariadne_Token; - -public class Test_Token_0 { - - public class TestSuite { - - public Boolean token_creation_0(Mosaic_IO io) { - Boolean[] conditions = new Boolean[4]; - int i = 0; - - // Test input - Ariadne_Token token1 = new Ariadne_Token("error"); - Ariadne_Token token2 = new Ariadne_Token("warning"); - Ariadne_Token token3 = new Ariadne_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 Mosaic_Util.all(conditions); - } - - public Boolean token_hashCode_0(Mosaic_IO io) { - Boolean[] conditions = new Boolean[1]; - int i = 0; - - Ariadne_Token token1 = new Ariadne_Token("error"); - Ariadne_Token token2 = new Ariadne_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 Mosaic_Util.all(conditions); - } - } - - public static void main(String[] args) { - TestSuite suite = new Test_Token_0().new TestSuite(); - int result = Mosaic_Testbench.run(suite); - System.exit(result); - } -} diff --git "a/tester/javac\360\237\226\211/Test_Util_0.java" "b/tester/javac\360\237\226\211/Test_Util_0.java" deleted file mode 100644 index 15d9821..0000000 --- "a/tester/javac\360\237\226\211/Test_Util_0.java" +++ /dev/null @@ -1,55 +0,0 @@ -import com.ReasoningTechnology.Mosaic.Mosaic_IO; -import com.ReasoningTechnology.Mosaic.Mosaic_Util; -import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; - -import com.ReasoningTechnology.Ariadne.Ariadne_Label; -import com.ReasoningTechnology.Ariadne.Ariadne_Util; - -import java.util.List; -import java.util.Arrays; - -public class Test_Util_0 { - - public class TestSuite { - - public Boolean print_list_0(Mosaic_IO io) { - Boolean[] conditions = new Boolean[3]; - int i = 0; - - // Test with a non-empty list and a prefix - List itemList1 = Arrays.asList(new Ariadne_Label("first"), new Ariadne_Label("second"), new Ariadne_Label("third")); - Ariadne_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 itemList2 = Arrays.asList(); - Ariadne_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) - Ariadne_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 Mosaic_Util.all(conditions); - } - } - - public static void main(String[] args) { - TestSuite suite = new Test_Util_0().new TestSuite(); - int result = Mosaic_Testbench.run(suite); - System.exit(result); - } - -} diff --git "a/tester/javac\360\237\226\211/TokenSet_0.java" "b/tester/javac\360\237\226\211/TokenSet_0.java" new file mode 100644 index 0000000..7eecb83 --- /dev/null +++ "b/tester/javac\360\237\226\211/TokenSet_0.java" @@ -0,0 +1,52 @@ +import com.ReasoningTechnology.Mosaic.Mosaic_IO; +import com.ReasoningTechnology.Mosaic.Mosaic_Util; +import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; + +import com.ReasoningTechnology.Ariadne.Ariadne_Token; +import com.ReasoningTechnology.Ariadne.Ariadne_TokenSet; + +public class TokenSet_0 { + + public class TestSuite { + + public Boolean tokenSet_creation_0(Mosaic_IO io) { + Boolean[] conditions = new Boolean[2]; + int i = 0; + + // Test default constructor (expecting an empty TokenSet) + Ariadne_TokenSet tokenSet = new Ariadne_TokenSet(); + conditions[i++] = tokenSet.isEmpty(); // Expect true for empty set + + // Add a token and verify presence + Ariadne_Token token = new Ariadne_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 Mosaic_Util.all(conditions); + } + + public Boolean tokenSet_uniqueness_0(Mosaic_IO io) { + Boolean[] conditions = new Boolean[1]; + int i = 0; + + Ariadne_TokenSet tokenSet = new Ariadne_TokenSet(); + Ariadne_Token token1 = new Ariadne_Token("error"); + Ariadne_Token token2 = new Ariadne_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 Mosaic_Util.all(conditions); + } + } + + public static void main(String[] args) { + TestSuite suite = new TokenSet_0().new TestSuite(); + int result = Mosaic_Testbench.run(suite); + System.exit(result); + } +} diff --git "a/tester/javac\360\237\226\211/Token_0.java" "b/tester/javac\360\237\226\211/Token_0.java" new file mode 100644 index 0000000..e248f6f --- /dev/null +++ "b/tester/javac\360\237\226\211/Token_0.java" @@ -0,0 +1,50 @@ +import com.ReasoningTechnology.Mosaic.Mosaic_IO; +import com.ReasoningTechnology.Mosaic.Mosaic_Util; +import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; + +import com.ReasoningTechnology.Ariadne.Ariadne_Token; + +public class Token_0 { + + public class TestSuite { + + public Boolean token_creation_0(Mosaic_IO io) { + Boolean[] conditions = new Boolean[4]; + int i = 0; + + // Test input + Ariadne_Token token1 = new Ariadne_Token("error"); + Ariadne_Token token2 = new Ariadne_Token("warning"); + Ariadne_Token token3 = new Ariadne_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 Mosaic_Util.all(conditions); + } + + public Boolean token_hashCode_0(Mosaic_IO io) { + Boolean[] conditions = new Boolean[1]; + int i = 0; + + Ariadne_Token token1 = new Ariadne_Token("error"); + Ariadne_Token token2 = new Ariadne_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 Mosaic_Util.all(conditions); + } + } + + public static void main(String[] args) { + TestSuite suite = new Token_0().new TestSuite(); + int result = Mosaic_Testbench.run(suite); + System.exit(result); + } +} diff --git "a/tester/javac\360\237\226\211/Util_0.java" "b/tester/javac\360\237\226\211/Util_0.java" new file mode 100644 index 0000000..8e814ea --- /dev/null +++ "b/tester/javac\360\237\226\211/Util_0.java" @@ -0,0 +1,55 @@ +import com.ReasoningTechnology.Mosaic.Mosaic_IO; +import com.ReasoningTechnology.Mosaic.Mosaic_Util; +import com.ReasoningTechnology.Mosaic.Mosaic_Testbench; + +import com.ReasoningTechnology.Ariadne.Ariadne_Label; +import com.ReasoningTechnology.Ariadne.Ariadne_Util; + +import java.util.List; +import java.util.Arrays; + +public class Util_0 { + + public class TestSuite { + + public Boolean print_list_0(Mosaic_IO io) { + Boolean[] conditions = new Boolean[3]; + int i = 0; + + // Test with a non-empty list and a prefix + List itemList1 = Arrays.asList(new Ariadne_Label("first"), new Ariadne_Label("second"), new Ariadne_Label("third")); + Ariadne_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 itemList2 = Arrays.asList(); + Ariadne_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) + Ariadne_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 Mosaic_Util.all(conditions); + } + } + + public static void main(String[] args) { + TestSuite suite = new Util_0().new TestSuite(); + int result = Mosaic_Testbench.run(suite); + System.exit(result); + } + +} diff --git "a/tester/javac\360\237\226\211/log.txt" "b/tester/javac\360\237\226\211/log.txt" new file mode 100644 index 0000000..e2ec965 --- /dev/null +++ "b/tester/javac\360\237\226\211/log.txt" @@ -0,0 +1,12 @@ + +2024-12-09T04:25:18.053085602Z ----------------------------------------------------------- +Test: path_find_cycle_0 +Message: +Test logic error: jdk.proxy1.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) + +2024-12-09T04:25:18.061014789Z ----------------------------------------------------------- +Test: path_find_cycle_0 +Stream: stdout +Output: +path_find_cycle_0 method called + diff --git "a/tester/javac\360\237\226\211/test_log.txt" "b/tester/javac\360\237\226\211/test_log.txt" deleted file mode 100644 index e2ec965..0000000 --- "a/tester/javac\360\237\226\211/test_log.txt" +++ /dev/null @@ -1,12 +0,0 @@ - -2024-12-09T04:25:18.053085602Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: jdk.proxy1.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-09T04:25:18.061014789Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - diff --git a/tester/jdwp_server/.gitignore b/tester/jdwp_server/.gitignore new file mode 100644 index 0000000..120f485 --- /dev/null +++ b/tester/jdwp_server/.gitignore @@ -0,0 +1,2 @@ +* +!/.gitignore diff --git a/tester/jvm/.githolder b/tester/jvm/.githolder deleted file mode 100644 index e69de29..0000000 diff --git a/tester/jvm/.gitignore b/tester/jvm/.gitignore new file mode 100644 index 0000000..120f485 --- /dev/null +++ b/tester/jvm/.gitignore @@ -0,0 +1,2 @@ +* +!/.gitignore diff --git a/tester/jvm/Test_Ariadne.jar b/tester/jvm/Test_Ariadne.jar deleted file mode 100644 index 4e2f384..0000000 Binary files a/tester/jvm/Test_Ariadne.jar and /dev/null differ diff --git a/tester/log/logback.xml b/tester/log/logback.xml new file mode 100644 index 0000000..80b0fef --- /dev/null +++ b/tester/log/logback.xml @@ -0,0 +1,22 @@ + + + + + + + + /var/user_data/Thomas-developer/Mosaic/tester/log/log.txt + true + + %d{yyyy-MM-dd'T'HH:mm:ss.SSS'Z'} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + diff --git a/tester/test_log.txt b/tester/test_log.txt deleted file mode 100644 index f9fe542..0000000 --- a/tester/test_log.txt +++ /dev/null @@ -1,234 +0,0 @@ -Test: test_pass -Stream: stderr -Output: -wrong number of arguments ----------------------------------------- -Test: test_fail_0 -Stream: stderr -Output: -wrong number of arguments ----------------------------------------- - -2024-12-02T05:55:58.032644Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-02T06:02:01.242181Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-02T06:04:46.092722Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-02T06:10:34.729080Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-02T06:12:34.226099Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-02T06:12:34.237210Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - - -2024-12-02T06:22:30.107089Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-02T06:22:30.119855Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - - -2024-12-02T06:22:58.368281Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-02T06:22:58.381072Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - - -2024-12-02T06:26:59.743703Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-02T06:26:59.756441Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - - -2024-12-02T06:35:07.484479Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-02T06:35:07.497273Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - - -2024-12-02T14:13:43.621612Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-02T14:13:43.635546Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - - -2024-12-02T14:19:11.142646Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-02T14:19:11.154358Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - - -2024-12-02T14:19:52.526559Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-02T14:19:52.538420Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - - -2024-12-03T02:59:57.307803Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-03T02:59:57.319918Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - - -2024-12-03T11:14:06.700856Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-03T11:14:06.713717Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - - -2024-12-03T11:15:02.833069Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-03T11:15:02.845364Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - - -2024-12-03T11:16:50.971751Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-03T11:16:50.983957Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - - -2024-12-03T11:22:09.342877Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-03T11:22:09.354854Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - - -2024-12-03T11:27:07.988412Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-03T11:27:08.001723Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - - -2024-12-09T04:07:54.684532266Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: jdk.proxy1.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-09T04:07:54.695557006Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - - -2024-12-09T04:20:55.682148373Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: jdk.proxy1.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-09T04:24:22.045170508Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - - -2024-12-09T07:16:25.530710606Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Message: -Test logic error: jdk.proxy1.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) - -2024-12-09T07:16:25.539373169Z ----------------------------------------------------------- -Test: path_find_cycle_0 -Stream: stdout -Output: -path_find_cycle_0 method called - diff --git "a/tester/tool\360\237\226\211/bash_wrapper_list" "b/tester/tool\360\237\226\211/bash_wrapper_list" deleted file mode 100755 index 0fef9b2..0000000 --- "a/tester/tool\360\237\226\211/bash_wrapper_list" +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") - -# input guards -env_must_be="tester/tool🖉/env" -if [ "$ENV" != "$env_must_be" ]; then - echo "$(script_fp):: error: must be run in the $env_must_be environment" - exit 1 -fi - -# space separated list of bash interface wrappers -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 \ - Test_Graph_0 \ - "" - - diff --git "a/tester/tool\360\237\226\211/clean" "b/tester/tool\360\237\226\211/clean" new file mode 100755 index 0000000..989b007 --- /dev/null +++ "b/tester/tool\360\237\226\211/clean" @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +script_afp=$(realpath "${BASH_SOURCE[0]}") + +# input guards + env_must_be="tester/tool🖉/env" + if [ "$ENV" != "$env_must_be" ]; then + echo "$(script_fp):: error: must be run in the $env_must_be environment" + exit 1 + fi + +# remove files + set -x + cd "$REPO_HOME"/tester + rm_na log/log.txt + rm_na -r scratchpad/* + rm_na jvm/* + rm_na jdwp_server/* + set +x + +echo "$(script_fn) done." diff --git "a/tester/tool\360\237\226\211/clean_build_directories" "b/tester/tool\360\237\226\211/clean_build_directories" deleted file mode 100755 index cf16126..0000000 --- "a/tester/tool\360\237\226\211/clean_build_directories" +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") - -# Caveat: the 'bash' directory is for built wrapper -# functions. `clean_build_directories` will remove all the files in this -# directory. For bespoke scripts used by the tester, put them in the `tool` -# directory. - -# input guards - env_must_be="tester/tool🖉/env" - if [ "$ENV" != "$env_must_be" ]; then - echo "$(script_fp):: error: must be run in the $env_must_be environment" - exit 1 - fi - -# remove files - set -x - cd "$REPO_HOME"/tester - rm -r scratchpad/* - rm jvm/* - rm bash/* - set +x - -echo "$(script_fn) done." diff --git "a/tester/tool\360\237\226\211/env" "b/tester/tool\360\237\226\211/env" index 07ba8ec..6f8c26b 100644 --- "a/tester/tool\360\237\226\211/env" +++ "b/tester/tool\360\237\226\211/env" @@ -17,88 +17,125 @@ script_afp=$(realpath "${BASH_SOURCE[0]}") if $error_not_sourced; then exit 1; fi if $error_bad_env; then return 1; fi +#-------------------------------------------------------------------------------- +# arguments + + if [[ -x "$1" ]]; then MODE=$1; else MODE=release; fi + export MODE + echo "MODE: $MODE" + +#-------------------------------------------------------------------------------- # so we can do testing export PATH=\ "$REPO_HOME"/tester/tool🖉/\ +:"$MOSAIC_HOME"/release/\ :"$JAVA_HOME"/bin\ -:"$MOSAIC_HOME"\ :"$PATH" -# Use this when leaving open the option to check in edits to the third party project -# sources. (after cloning/pulling the project, build it with sources, the -# classes and links to the sources will be in the scratchpad directory) +# so we can run individual built tests wrappers +export PATH=\ +"$REPO_HOME"/tester/jvm\ +:"$PATH" + +#-------------------------------------------------------------------------------- +# class/source paths + +BASE_CLASSPATH=\ +"$JAVA_HOME"/lib\ +:"$MOSAIC_HOME"/release/Mosaic.jar\ +:"$REPO_HOME"/tester/log\ +"" + +BASE_SOURCEPATH=\ +"$REPO_HOME"/tester/javac🖉\ +"" + +case "$MODE" in + +# Classes, and other-than-tester sources if present, come from the release candidate. This is the normal MODE for regression testing. +# +# Release candidate sources, if present, are for viewing only. If sources are present in the release, but can not be read directly from the jar file, expand the jar file onto the scratchpad and replace that include line with this one: # -# And, when leaving open the option to edit Ariadne sources directly (some -# development workflows might not accommodate this. Be sure that Ariadne was built -# with sources and the scratchpad directory has not been cleaned) +# :$REPO_HOME/release/scratchpad\ # + release) + export CLASSPATH=\ -"$JAVA_HOME"/lib\ -:"$MOSAIC_HOME"/developer/scratchpad\ -:"$REPO_HOME"/developer/scratchpad\ -:"$REPO_HOME"/tester/scratchpad\ -:"$CLASSPATH" +"$BASE_CLASSPATH\ +:$REPO_HOME/tester/scratchpad\ +:$REPO_HOME/release/${PROJECT}.jar\ +:$CLASSPATH" export SOURCEPATH=\ -"$JAVA_HOME"/lib\ -:"$MOSAIC_HOME"/developer/scratchpad\ -:"$REPO_HOME"/developer/scratchpad\ -:"$REPO_HOME"/tester/javac🖉\ -:"$SOURCEPATH" +"$BASE_SOURCEPATH\ +:$REPO_HOME/release/${PROJECT}.jar\ +:$SOURCEPATH" -# For projects who's sources are not be edited, directly expand the project into -# $REPO_HOME/tester/scratchpad before testing. -# -# When Mosaic sources are not to edited then checked back in. -# Be sure to use `Mosaic.jar` that has sources included. -# (cd tester/scratchpad && jar -xf $REPO_HOME/tool_shared/third_party/Mosaic.jar) -# When Ariadne developers source are not to be edited directly -# Be sure to use `release Ariadne.jar` has sources included. -# (cd scratchpad && jar xf $REPO_HOME/release/Ariadne.jar) + ;; + + +# Classes and other-than-tester sources come from developer/scratchpad. This is the normal MODE for the developer when debugging test failures. # -# export CLASSPATH=\ -# "$JAVA_HOME"/lib\ -# :"$REPO_HOME"/tester/javac🖉\ -# :"$REPO_HOME"/tester/scratchpad\ -# :"$CLASSPATH" - -# export SOURCEPATH=\ -# "$JAVA_HOME"/lib\ -# :"$REPO_HOME"/tester/javac🖉\ -# :"$REPO_HOME"/tester/scratchpad\ -# :"$SOURCEPATH" - -# The 'normal' case When outside sources are not viewed in the debugger. This is -# common when the tester's responsibility is to find failed tests, and the -# tester is not debugging anything but the test code. +# While in env_developer, the developer must make the project and gather third party +# tools and sources into the scratchpad for this to work. # -# export CLASSPATH=\ -# "$JAVA_HOME"/lib\ -# :"$MOSAIC_HOME"/Mosaic.jar\ -# :"$REPO_HOME"/release/"$PROJECT".jar\ -# :"$REPO_HOME"/tester/jvm/Test_"$PROJECT".jar\ -# :"$CLASSPATH" + developer) -# export SOURCEPATH=\ -# "$REPO_HOME"/tester/javac🖉\ -# :"$SOURCEPATH" +export CLASSPATH=\ +"$BASE_CLASSPATH\ +:$REPO_HOME/tester/scratchpad\ +:$REPO_HOME/developer/scratchpad\ +:$CLASSPATH" +export SOURCEPATH=\ +"$BASE_SOURCEPATH\ +:$REPO_HOME/developer/scratchpad\ +:$SOURCEPATH" -# so we can run individual built test wrappers -export PATH=\ -"$REPO_HOME"/tester/bash🖉\ -"$REPO_HOME"/tester/bash\ -:"$PATH" + ;; +# Classes and other-than-tester sources come from tester/scratchpad. This MODE gives the tester complete control over what to include in the test environment. +# +# Tester expands everything to be included into the test environment into the scratchpad. +# +# Any changes made to must be exported to the environment the files came from if they are to persist. +# + local) + +export CLASSPATH=\ +"$BASE_CLASSPATH +:$REPO_HOME/tester/scratchpad\ +:$CLASSPATH" +export SOURCEPATH=\ +"$BASE_SOURCEPATH\ +:$REPO_HOME/tester/scratchpad\ +:$SOURCEPATH" + + ;; + +# default + + *) + echo "Unknown MODE: $MODE" + return 1 + ;; + + esac + +echo CLASSPATH: +vl echo "$CLASSPATH" +echo SOURCEPATH: +vl echo "$SOURCEPATH" +echo PATH: +vl echo $PATH + +#-------------------------------------------------------------------------------- # misc # make .githolder and .gitignore visible - alias ls="ls -a --time-style=full-iso" - -# some feedback to show all went well - + alias ls="ls -a" export PROMPT_DECOR="$PROJECT"_tester export ENV=$(script_fp) echo ENV "$ENV" diff --git "a/tester/tool\360\237\226\211/list" "b/tester/tool\360\237\226\211/list" new file mode 100755 index 0000000..63c55e8 --- /dev/null +++ "b/tester/tool\360\237\226\211/list" @@ -0,0 +1,23 @@ +#!/bin/env bash +script_afp=$(realpath "${BASH_SOURCE[0]}") + +# input guards +env_must_be="tester/tool🖉/env" +if [ "$ENV" != "$env_must_be" ]; then + echo "$(script_fp):: error: must be run in the $env_must_be environment" + exit 1 +fi + +# space separated list of bash interface wrappers +echo \ + File_0 \ + Label_0 \ + LabelList_0 \ + Node_0 \ + NodeList_0 \ + Token_0 \ + TokenSet_0 \ + Util_0 \ +"" + + diff --git "a/tester/tool\360\237\226\211/make" "b/tester/tool\360\237\226\211/make" index 9f86f68..947d919 100755 --- "a/tester/tool\360\237\226\211/make" +++ "b/tester/tool\360\237\226\211/make" @@ -1,32 +1,52 @@ #!/bin/env bash +set -x script_afp=$(realpath "${BASH_SOURCE[0]}") # input guards - env_must_be="tester/tool🖉/env" - if [ "$ENV" != "$env_must_be" ]; then - echo "$(script_fp):: error: must be run in the $env_must_be environment" - exit 1 - fi +env_must_be="tester/tool🖉/env" +if [ "$ENV" != "$env_must_be" ]; then + echo "$(script_fp):: error: must be run in the $env_must_be environment" + exit 1 +fi echo "Compiling files..." - set -x - cd $REPO_HOME/tester - javac -g -d scratchpad javac🖉/*.java - jar cf jvm/Test_"$PROJECT".jar -C scratchpad . - set +x - -echo "Creating bash wrappers..." - mkdir -p bash - # wrapper is a space separated list - wrapper=$(bash_wrapper_list) - for file in $wrapper;do - cat > bash/$file << EOL +set -x +cd $REPO_HOME/tester + +# Get the list of tests to compile +# wrapper is a space-separated list +list=$(list) + +# make class files +for file in $list; do + javac -g -d scratchpad "javac🖉/$file.java" +done +set +x + +echo "Making jvm scripts ..." +mkdir -p jvm +for file in $list; do + cat > jvm/$file << EOL #!/bin/env bash java $file EOL - chmod +x bash/$file + chmod +x jvm/$file + done + +echo "Making jdwp debug server scripts..." +mkdir -p jdwp_server +for file in $list; do + cat > jdwp_server/$file << EOL +#!/bin/env bash +java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005 $file +EOL + chmod +x jdwp_server/$file done echo "$(script_fp) done." + + + +set +x diff --git "a/tester/tool\360\237\226\211/run" "b/tester/tool\360\237\226\211/run" new file mode 100755 index 0000000..a3bcf3a --- /dev/null +++ "b/tester/tool\360\237\226\211/run" @@ -0,0 +1,25 @@ +#!/bin/env bash + +# Ensure REPO_HOME is set +if [ -z "$REPO_HOME" ]; then + echo "Error: REPO_HOME is not set." + exit 1 +fi + +# Navigate to the bash directory +cd "$REPO_HOME/tester/jvm" || exit + +# Get the list of test scripts in the specific order from bash_wrapper_list +list=$(list) +echo list: $list + +# Execute each test in the specified order +for file in $list; do + echo + if [[ -x "$file" && ! -d "$file" ]]; then + echo "... Running $file" + ./"$file" + else + echo "Skipping $file (not executable or is a directory)" + fi +done diff --git "a/tester/tool\360\237\226\211/run_jdb" "b/tester/tool\360\237\226\211/run_jdb" deleted file mode 100755 index 8334c1b..0000000 --- "a/tester/tool\360\237\226\211/run_jdb" +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") - -# input guards -env_must_be="tester/tool🖉/env" -if [ "$ENV" != "$env_must_be" ]; then - echo "$(script_fp):: error: must be run in the $env_must_be environment" - exit 1 -fi - -jdb -sourcepath "$SOURCEPATH" "$@" - diff --git "a/tester/tool\360\237\226\211/run_tests" "b/tester/tool\360\237\226\211/run_tests" deleted file mode 100755 index a27f28a..0000000 --- "a/tester/tool\360\237\226\211/run_tests" +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/env bash - -# Ensure REPO_HOME is set -if [ -z "$REPO_HOME" ]; then - echo "Error: REPO_HOME is not set." - exit 1 -fi - -# Navigate to the bash directory -cd "$REPO_HOME/tester/bash" || exit - -# Get the list of test scripts in the specific order from bash_wrapper_list -test_list=$(bash_wrapper_list) - -# Execute each test in the specified order -for file in $test_list; do - if [[ -x "$file" && ! -d "$file" ]]; then - echo - echo "Running $file..." - ./"$file" - else - echo "Skipping $file (not executable or is a directory)" - fi -done diff --git "a/tool_shared/bespoke\360\237\226\211/env" "b/tool_shared/bespoke\360\237\226\211/env" index c7829f1..18d2060 100644 --- "a/tool_shared/bespoke\360\237\226\211/env" +++ "b/tool_shared/bespoke\360\237\226\211/env" @@ -37,6 +37,10 @@ fi PATH="$REPO_HOME/tool_shared/third_party/RT-project-share/release/bash:$PATH" PATH="$REPO_HOME/tool_shared/third_party/RT-project-share/release/amd64:$PATH" PATH="$REPO_HOME/tool_shared/third_party/emacs/bin:$PATH" + + # after having installed Itellij IDEA + PATH="$REPO_HOME/tool_shared/third_party/idea-IC-243.21565.193/bin:$PATH" + JAVA_HOME="$REPO_HOME/tool_shared/third_party/jdk-23.0.1" MOSAIC_HOME="$REPO_HOME/tool_shared/third_party/Mosaic" diff --git "a/tool_shared/document\360\237\226\211/Eclipse.txt" "b/tool_shared/document\360\237\226\211/Eclipse.txt" deleted file mode 100644 index 167d14e..0000000 --- "a/tool_shared/document\360\237\226\211/Eclipse.txt" +++ /dev/null @@ -1,22 +0,0 @@ - -The project is originally configured to be used with Emacs as an IDE. The tools -can all be run from a shell inside of emacs. Even when using an IDE what the -shell environment scripts and tools do should be understood. - -I have added a working IntelliJ IDEA configuration, so if you want a modern IDE -it is probably best to go with this. See ItelliJ_IDEA.txt in this directory. - -I've not run Eclipse on the project, if you do, perhaps you can update the notes -here. These things will probably increase your odds of making it work: - 1. open a shell - 2. cd to Ariadne, and source the env_developer - 3. run the tool 'distribute_source' - 3. run eclipse from the command line - 4. give eclipse the 'scratchpad' directory as its source - -Be sure to run `release` after development to update what the tester sees. - -Do the analogous steps if you contribute as a 'tester'. I.e. from -the shell source env_tester instead. Also, you will need to add -distribute_source to tester/tool, as it is currently not there. - diff --git "a/tool_shared/document\360\237\226\211/Emacs.txt" "b/tool_shared/document\360\237\226\211/Emacs.txt" deleted file mode 100644 index 19398de..0000000 --- "a/tool_shared/document\360\237\226\211/Emacs.txt" +++ /dev/null @@ -1,45 +0,0 @@ - -System requirements: - -dnf install libX11-devel libXpm-devel libjpeg-devel libpng-devel libtiff-devel -dnf install gtk3-devel giflib-devel gnutls-devel -dnf install ncurses-devel texinfo -dnf install libacl-devel libattr-devel libgccjit libgccjit-devel - -# install and build script: - -cd "$REPO_HOME"/tool_shared/third_party -mkdir -p emacs/{src,build,bin} - -# We sought stability, and now this. What can I say? It has 'visual-wrap-prefix-mode'. -pushd upstream -curl -L -O https://alpha.gnu.org/gnu/emacs/pretest/emacs-30.0.92.tar.xz -popd - -tar -xf upstream/emacs-30.0.92.tar.xz -C emacs/src --strip-components=1 - -# need to clear the environment -env -i bash - -pushd emacs/src -./configure --prefix="$REPO_HOME"/tool_shared/third_party/emacs - - I gather this warning is unavaoidable? - "configure: WARNING: Your version of Gtk+ will have problems with" - - -# replace nproc with number of processors: -make -j$(nproc) - -# make install installs locally due to the `--prefix` option `./configure` above -make install -make clean - -popd -rm -r emacs/{src,build} - -# Find emacs in the emacs/in directory. Be sure to add it to the path -# in the tool_shared/bespoke/env file: -# PATH="$REPO_HOME/tool_shared/third_party/emacs/bin:$PATH" - - diff --git "a/tool_shared/document\360\237\226\211/IntelliJ_IDEA.txt" "b/tool_shared/document\360\237\226\211/IntelliJ_IDEA.txt" deleted file mode 100644 index 82b21cc..0000000 --- "a/tool_shared/document\360\237\226\211/IntelliJ_IDEA.txt" +++ /dev/null @@ -1,252 +0,0 @@ - -This file describes the local install and configuration of IntelliJ_IDEA for -the Ariadne project. - -The project was/is originally configured to be used with Emacs as an IDE. The tools -can all be run from a shell inside of emacs. Even when using an IDE what the -shell environment scripts and tools do should be understood. - --------------------------------------------------------------------------------- -Some notes - -'project directory' - the directory with the .git file in it. Called $REPO_HOME in - RT scripts. Called $PROJECT_DIR$ (doesn't seem to be reliable) in IntelliJ - file paths. - -'module directory' - for RT projects examples include `~/Ariadne/developer' - `~/Ariadne/tester`. These are independent build environments. - - Careful, if Intellij scans directories it will not hesitate to pull things - from `tool_shared`/third_party or wherever else it finds things, and it will - make a big mess. - -IntelliJ paths on forms: - - I tried using $PROJECT_DIR$ as a variable standing for the project directory, - as this was suggested by an AI. However IntelliJ simply made a directory - with the literal variable name. - - Also tried using $REPO_HOME, as that was defined in the environment IntelliJ was run from. - It had the same effect as $PROJECT_DIR$. - - It will work with `~` for the home directory. So I have been using - `~/Ariadne/...` when typing out paths. - - There will be a browser icon at the right of a form entry boxes that take - paths. The browser tool starts from either /home or at / rather than at the - project. It inserts absolute path names. - -A GUI bug: - - There is a Gnome Linux bug where the drop down menu can stay on top no matter - what other window, application, or what virtual desktop a person is on. You - must go back to the IDEA application window and hit to make it go - away. - -The [OK] button at the bottom of dialogs: - - This closes the dialog. - - To apply changes hit [Apply]. - - [OK] will not save what is on the dialog if [Apply] would fail, but - it still closes it. - --------------------------------------------------------------------------------- -To install ItelliJ - - Download the tar file from - `https://www.jetbrains.com/idea/download/?section=linux` - into the - `$REPO_HOME/tool_shared/third_party/upstream` - directory. - - Expand it into - `$REPO_HOME/tool_shared/third_party` - - cd into the expanded directory, into `bin`, then `chmod u+x` and run `idea_inst`. - - set the env path to include - `$REPO_HOME/tool_shared/third_party/idea-IC*/bin` - - The executable is called `idea`. - - Consider setting a desktop short cut. Consider instead installing it in your - own bin directory. Easily done, just move the directory created by the tar - file expansion there. - - I prefer a user mode install, as there is no reason this tool should need - admin privileges. - --------------------------------------------------------------------------------- -Startup - - ./tool_shared/third_party/idea-IC-243.21565.193/bin/idea & - - Shows: Welcome screen - select "Open" as Ariadne already exists - - Shows: Open File or Project Browser - In top dialog box put full path to project directory. - - Hit [OK] at the bottom. Unlikely, but might be scrolled off the bottom of the screen. - - Shows: main window - Appears after hitting OK from the "Open File or Project" [ok]. - - Has a tool bar at the top. There is a double meat hamburger menu icon - at the left. Hitting this will replace the top bar with a vertical - menu for drop down menus. - - Careful, after the hamburger icon is pressed, the first drop down - menu instantly appears. Slide over to get the other drop downs. - Don't click, slide! - - Under tool bar: - Far left is an icon bar. Then a file browser. And then a big box - describing hot keys. - --------------------------------------------------------------------------------- -Configuration - -If you cloned the Ariadne project, the modules will already be configured, and -also probably some of the run configuration will already be configured. - - ------------- - Setup Project - Hamburger icon > File dop-down > Project Structure > Project - - select project SDK from disk: - ~/Ariadne/tool_shared/third_party/jdk-11 - - ------------- - Setup Modules - - Hamburger icon > File dop-down > Project Structure > Modules - - Shows: "Project Structure" dialog - - Hit the '+' option that shows at the top of the second panel. - - New Module. - - Dialog pop-up - - Name: developer - - Location: (browse to the developer directory) - - alternatively enter the full path, ~/Ariadne, e.g. - - $PROJECT_DIR$ instead of, ~/Ariadne, worked when - entering the first module, but not the second. - - Dependencies: - Select the "Project SDK" from the drop down. - - Careful, the module won't be made until hitting [Create] at the bottom. - - As far as I can tell you can't get this panel again, rather delete and add - a new module if you need to change the entries. - - Shows: "Project Structure" dialog, again, now the third panel with information about the - developer module. - Third panel shows three choices: [Source] [Paths] [Dependencies] - - [Sources] is already selected. - - With Sources there are two panels. - - In second panel, on right side, the module root should show at the top. - Under if it lists any sources, use the button at the far right of the - listing to x it out. - - The first panel now shows a file browser for the module. - - Select the `javac` directory with a single click. Then, and only - after, look immediately the directory lists and click on [Sources] - - "Source Folders" will now appear in the second panel. The - javac folder will be listed. - - hit: [apply] at the bottom (or the form will reset to defaults next time) - - - Slide over to [Paths] - Copmiler Output - select [Use Module Compile Output Path] - Output Path: $PROJECT_DIR$/developer/scratchpad - Test Path: $PROJECT_DIR$/developer/test - - leave the exclude output checkbox, that means to exclude from repo - and from indexing for search - - hit: [apply] at the bottom - - ------------- - To add an external tool, for example tester/tool/make: - - This is how we integrate the local tools. - - Note, even if a shell script runs then runs a java program, that jave program - was compiled with debug flags, and run in debug mode, it can't be debugged. It - won't stop at break points, etc. For that an 'application' must be added see - the next section. - - Hamburger> Run > edit configurations - Shows Run/Debug configurations dialog - Upper left hit '+' - Shows drop down - chose [Shell Script] second from bottom - Shows dialog, for example: - Name: tester make - Script Path: ~/Ariadne/tester/tool/make (better to chose with the browser tool) - Script Options: tester make - Working Directory: ~/Ariadne (location of the env source scripts that env_run uses) - Environment variabls: (none, env_run will source env_tester) - Interpreter: /bin/bash (left to default) - - ------------- - To add a program for debugging. - - Humburger > Run > edit configurations - Shows Run/Debug configurations dialog - Upper left hit '+' - Shows drop down - chose [Application] first choice - Shows dialog, for example: - Name: Test_Graph_0 - - next line are two boxes, they are not labeled, the defaults show: - [ module not specified ] [ -cp no module ] - I selected:: - [ java 11 SDk of 'tester' module] [ -cp tester ] - This can be confusing, as the modules are 'tester' and 'developer', but - here it asks for an SDK! Then the next box says it wants a class path, - but it wants a module name! - - next line one box, not labeled - [ main class [] ] - Note icon at right, it will give a list of class names, here in the tester module, - that have main calls, select one. - - next line, again not labeled - [ Program Arguments ] - Test_Graph_0 has no arguments so I left it blank. - - Working Directory: ~/Ariadne - - Environment Variables: - Left blank because the executable itself does not make use of any. I do - know at this point if variables set in the environment IDEA ran in are - inherited. - - 'Modify Options' with a drop down menu. (At the top right of the configuration dialog) - Scan down for the `Java` section. - Check: 'Do not build before run' - (To build this example, go to the Run menu and run `tester make'. Or run make directly - from a console prompt. Be sure to source env_tester first.) - - Next go to main window file browser, click on the file you want to debug, click on the line - to set a break point. Right click to get a menu, and - diff --git "a/tool_shared/document\360\237\226\211/install.txt" "b/tool_shared/document\360\237\226\211/install.txt" index 1e387cb..0f6496e 100644 --- "a/tool_shared/document\360\237\226\211/install.txt" +++ "b/tool_shared/document\360\237\226\211/install.txt" @@ -21,47 +21,10 @@ into RT-icommon, so this is not optional. ln -s "$REPO_HOME/tool_shared/third_party/resource/document" see_also ---------------------------------------- -jdk-23 - - cd "$REPO_HOME/tool_shared/third_party/upstream" - - # source for the 11 version used before, now upgraded to 23 - #curl -C - -o OpenJDK11U-jdk_x64_linux_hotspot_11.0.16_8.tar.gz https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.16+8/OpenJDK11U-jdk_x64_linux_hotspot_11.0.16_8.tar.gz - curl -L -C - -b "oraclelicense=accept-securebackup-cookie" -O https://download.oracle.com/java/23/latest/jdk-23_linux-x64_bin.tar.gz - - cd .. - tar -xzf upstream/jdk-23_linux-x64_bin.tar.gz - - edit $REPO_HOME/tool_shared/bespoke/env, and update JAVA_HOME: - export JAVA_HOME="$REPO_HOME/tool_shared/third_party/jdk-23.0.1" - - ----------------------------------------- -Mosaic - for testing - - > cd $REPO_HOME/tool_shared/third_party - > git clone https://github.com/Thomas-Walker-Lynch/Mosaic.git - - This will have already been done: - - $REPO_HOME/tool_shared/bespoke/env will have: - export MOSAIC_HOME="$REPO_HOME/tool_shared/third_party/Mosaic/release" - - $REPO_HOME/tester/tool/env, will have Mosaic - - export PATH=\ - "$REPO_HOME"/tester/tool/\ - :"$JAVA_HOME"/bin\ - :"$MOSAIC_HOME"\ - :"$PATH" - - export CLASSPATH=\ - "$JAVA_HOME"/lib\ - :"$MOSAIC_HOME"/Mosaic.jar\ - :"$REPO_HOME"/release/"$PROJECT".jar\ - :"$REPO_HOME"/tester/jvm/Test_"$PROJECT".jar\ - :"$CLASSPATH" +see ~/RT-project-share/document🖉 for: + jdk-23; and one or more IDEs: IntelliJ IDEA, Eclipse, Emacs +