16 releases
0.1.15 | Jul 7, 2024 |
---|---|
0.1.14 | Jun 4, 2023 |
0.1.12 | May 31, 2023 |
0.1.3 | Apr 27, 2023 |
#303 in Algorithms
Used in autour_process
205KB
2K
SLoC
Generic loggers for graph_process_manager_core
4 types of loggers to log processes implemented/tooled with graph_process_manager_core :
- a GraphViz logger to produce graphical representations of the processes
- a nodesPrint logger to print in files intermediate objects build during the process
- a stepsTrace logger to print in files traces i.e. sequences of steps taken during the process
- a NFAIT logger to build a Non Deterministic Finite Automaton (with Immediate Transitions)
Trivial example uses are given in the test module. We shortly describe them in the following.
Fibonacci sequence
In this example, we explore the Fibonacci sequence. A maximum depth is set to 10 for this example.
Applying a simple GraphViz logger to this example process gives the following representation:
The following Automata can be build from this exploration :
A nodesPrint logger is used here to print the numbers in the Fibonacci sequence in text files and a stepsTrace logger is used to print the sequence of 'next' steps (here it is a trivial application but for other processes there may be various kinds of steps etc.).
Below is represented the files generated by the two loggers for the example toy process:
Binary Tree
In this example we explore words built incrementally from 'O' by appending letters 'A' and 'B' to the right. For the exploration we set a maximum depth of 4 and a maximum number of nodes (words) of 8.
Depending on the heuristic we use for the exploration, we do not reach the same set of words.
Using a BFS (Breadth First Search) we get the following:
Using a DFS (Depth First Search) we get the following:
Using a HCS (High Coverage Search, which favors branches with the least common prefixes) we get the following:
Explorations can be further specialized using more detailed filters and priorities for the selection of the next steps to take. Randomization of the next steps to take is also possible.
Dependencies
~2.5MB
~46K SLoC