Automata.Core 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Automata.Core --version 1.0.0                
NuGet\Install-Package Automata.Core -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Automata.Core" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Automata.Core --version 1.0.0                
#r "nuget: Automata.Core, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Automata.Core as a Cake Addin
#addin nuget:?package=Automata.Core&version=1.0.0

// Install Automata.Core as a Cake Tool
#tool nuget:?package=Automata.Core&version=1.0.0                

NuGet Version
Automata.Core - Core library (if you do not need visualization).

NuGet Version
Automata.Visualization - Full library that also includes visualization and rendering of automata.

🔂 Automata: A lightweight library for Finite-State Automata

The Automata library provides functionality for working with finite-state automata.

⭐ Example Features:

  • Create NFAs (Non-deterministic Finite Automata) from sequences or other data.
  • Convert NFAs to DFAs (Deterministic Finite Automata).
  • Minimize Automata to reduce states while preserving functionality.

📝 Source Code and Contributions

Find the source code and contribute on GitHub:
Automata GitHub Repository


🔨 Automata.Core - Core Library

The core library provides essential tools for finite-state automata operations. It offers a lightweight and clean solution without visualization features.

💡 C# Example: Create and Manipulate Automata

// Generate random symbol sequences (numbers as symbols in this example)
var sequences = Enumerable.Range(0, 10)
    .Select(_ => Enumerable.Range(0, 8)
    .Select(_ => Random.Shared.Next(4).ToString()));

// Create an empty NFA.
NFA nfa = new NFA();  

// Add all sequences to the NFA
nfa.AddAll(sequences);

// Determinize the NFA to a DFA
DFA dfa = nfa.ToDFA();

// Minimize the DFA
DFA minDFA = dfa.Minimized();

🖼️ Automata.Visualization: Automata.Core + Visualization

The Automata.Visualization library extends the core Automata functionality with visualization capabilities, powered by MSAGL (Microsoft Automatic Graph Library).

🔑 Key Features:

  • Visualize automata as graphs.
  • Includes all core Automata functionality.

💡 C# Full example program: Automata Visualization

using Automata.Visualization;

// Creates the main console window.
ConsoleWindow consoleWindow = ConsoleWindow.Create();

// Write some colored text output to the console window
consoleWindow.WriteLine("Creating graph...", System.Drawing.Color.Blue);

//Create some random sequences
var sequences = Enumerable.Range(0, 10).Select(_ => Enumerable.Range(0, 8).Select(_ => Random.Shared.Next(4).ToString()));

// Create and display a minimized graph object from the sequences
var graph = GraphFactory.CreateGraph(sequences, minimize: true);

// Open a new non-modal window that displays the graph in it. 
consoleWindow.ShowGraph(graph);

// Write some more colored text output to the console window
consoleWindow.WriteLine("Graph created.", System.Drawing.Color.Green); 

📦 NuGet Package releases on Nuget.org

🔧 NuGet Installation

Install the packages via the .NET CLI or Package Manager in Visual Studio.

Automata.Core

dotnet add package Automata.Core

Automata.Visualization

dotnet add package Automata.Visualization

💻 Target Framework Compatibility

  • Automata.Core: .NET 9.0 and later
  • Automata.Visualization: .NET 9.0 and later

🔗 Dependencies

  • Automata.Core:

    • None
  • Automata.Visualization:

📜 License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Automata.Core:

Package Downloads
Automata.Visualization

A library for layout and visualization of Automata. Includes core library Automata.Core.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.1 36 1/19/2025
1.1.0 30 1/18/2025
1.0.4 89 12/31/2024
1.0.3 80 12/26/2024
1.0.2 76 12/23/2024
1.0.1 81 12/22/2024
1.0.0 100 12/17/2024