Skip to content

Utilizing Automata4j

pavl_g edited this page Aug 14, 2023 · 19 revisions

This page describes the use of Automata4j to implement both forms of Finite-State-Automata, the Non-deterministic, and Deterministic patterns.

This tutorial discusses the following:

  • Create a Gradle project and add the dependencies.
  • The non-deterministic pattern (NDFSA).
  • The deterministic pattern (DFSA).
  • Injecting an NDFSA path into the DFSA pattern.
  1. Create a Gradle project and add the dependencies:
# initialize a gradle project and build
$ gradle init # select Java and JUnit
$ ./gradlew build
// add the Gradle dependency in build.gradle file
plugins {
    id 'application'
}

application {
    mainClass = 'com.example.Main'
}

repositories {
    // Use Maven Central for resolving dependencies.
    mavenCentral()
}

dependencies {
    implementation "io.github.software-hardware-codesign:automata4j:1.0.0-pre-alpha"
}
# download the binaries and re-build the project
$ ./gradlew build
  1. The non-deterministic pattern (NDFSA): Recall,
  1. The deterministic pattern (DFSA):

  2. Injecting an NDFSA path into the DFSA pattern:

Clone this wiki locally