Skip to content

The Automata4j framework parts

pavl_g edited this page Aug 27, 2023 · 4 revisions

The Automata4j framework is an advanced finite-state-automaton API for JVM and Android applications featuring both the Deterministic and the Non-deterministic finite-state-automata patterns.

This page describes the different parts of the API, although you could instantiate them easily from the class paradigm on the Home page or the README.

Class Definition Inheritance hierarchy Design Implications
TransitionalManager Instantiates a non-deterministic finite-state-automaton pattern by creating Transitions from AutoStates - Assigning next states and transiting into them
DeterministicManager Instantiates a deterministic finite-state-automaton pattern by creating unique TransitionPaths from AutoStates TransitionalManager Assertion of TransitionPaths uniqueness
TransitionalListener Listens for the transition from a present state to the next state providing user command-state capabilities - Provides a Command-State pattern for the transition interface
Transition Encapsulates a next state to transit to upon the transit command - Describing the non-deterministic FSA transitions
TransitionPath Encapsulates an [a]-successor path between a present state and a next state that is significant for the DeterministicManager; where [a] is the input value Transition Describing the deterministic FSA transitions and helps in asserting their uniqueness
CascadedTransition Adapts the TransitionPath to accommodate more than 2 states in a Queue ADT to be utilized in a FIFO order by the TransitionalManager Transition -> TransitionPath Useful to pre-allocate a cascade of state transitions for the TransitionalManager
ConcurrentCascadedTransition A thread-safe implementation of the CascadedTransition to internally handle the non-concurrent queue implementation Transition -> TransitionPath -> CascadedTransition Recommended for non-concurrent Queue implementations.
AutoState The Actual finite-state interface that can be assigned via TransitionalManager and dispatched upon transitions - Represents the Stack that determines the behavior of the application upon transition
TransitionPathNotUniqueException A runtime exception that is thrown to assert the uniqueness of a transition path within a DeterministicManager RuntimeException Helps in asserting the uniqueness of an [a]-successor path between 2 states in a DFSA
Clone this wiki locally