![]() |
VOOZH | about |
dotnet add package Automata.Visualization --version 1.1.4
NuGet\Install-Package Automata.Visualization -Version 1.1.4
<PackageReference Include="Automata.Visualization" Version="1.1.4" />
<PackageVersion Include="Automata.Visualization" Version="1.1.4" />Directory.Packages.props
<PackageReference Include="Automata.Visualization" />Project file
paket add Automata.Visualization --version 1.1.4
#r "nuget: Automata.Visualization, 1.1.4"
#:package Automata.Visualization@1.1.4
#addin nuget:?package=Automata.Visualization&version=1.1.4Install as a Cake Addin
#tool nuget:?package=Automata.Visualization&version=1.1.4Install as a Cake Tool
👁 NuGet Version
Automata.Core - Core library (zero-dependency library, optimal if you do not need visualization).
👁 NuGet Version
Automata.Visualization - Full library that also includes visualization and rendering of automata.
👁 Documentation
Documentation
The Automata library provides functionality for working with finite-state automata. The library is highly optimized and ideal for very large automata.
⭐ Example Features:
The core library all provides essential tools for finite-state automata operations. It offers a fast, lightweight and clean solution without visualization features.
The following example utilizes regular expressions written in Alang.
Alang (Automata Language) is a language for defining automata using regular operations.
Read more about Alang in the Automata documentation.
// Compile a regex to a FSA (all sequences of {a, b, c} where any 'a' must be followed by 'b' or 'c')
var fsa = AlangRegex.Compile("(a? (b | c) )+");
// Compile two other automata
var test1 = AlangRegex.Compile("a b b c b");
var test2 = AlangRegex.Compile("a b a a b");
// Test the language overlap of the FSA with the two test regexes
Console.WriteLine(fsa.Overlaps(test1)); //output: true
Console.WriteLine(fsa.Overlaps(test2)); //output: false
The Automata.Visualization library extends the core Automata functionality with visualization capabilities, utilizing MSAGL (Microsoft Automatic Graph Library) for layout.
🔑 Key Features:
var fsa = AlangRegex.Compile("(a? (b | c) )+"); // Create an FSA from a regex
Console.WriteLine("Creating a minimal FSA and displaying it."); // Write some info to the console
Graph graph = fsa.CreateGraph(displayStateIDs: true); // Create a graph object (FSA with layout)
GraphView graphView = GraphView.OpenNew(graph); // Open a new non-modal window that displays the graph
Console.WriteLine("FSA is displayed."); // Write some info to the console
Install the packages via the .NET CLI or Package Manager in Visual Studio.
dotnet add package Automata.Core
dotnet add package Automata.Visualization
<TargetFramework>net9.0-windows</TargetFramework>Automata.Core:
Automata.Visualization:
These dependencies will be automatically installed when you install Automata.Visualization via NuGet.
This project is licensed under the MIT License.
This repository uses the following libraries and tools:
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0-windows7.0 net9.0-windows7.0 is compatible. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
Improvements and bug fixes