Crate rstm

Crate rstm 

Source
Expand description

§rstm

rstm is a Rust library dedicated to the construction and execution of Turing Machines. The crate is designed to be flexible and easy to use while preserving the abstract nature of the models.

Re-exports§

pub use rstm_rules as rules;

Modules§

actors
This modules implements an Actor struct, which is a Turing machine with a moving head (TMH).
error
mem
Memory (mem)
ops
this modules defines additional operations used throughout the crate
prelude
state
The state module provides abstractions and implementations for managing state within the rstm framework.
traits
types
the types module provides various types used throughout the library, including Direction, [Head], and [Tail].

Macros§

program
The [program!] macro facilitates the generation of new InstructionSet instances using familiar syntax.
rule
The [rule!] macro enables the definition of a single, Turing compatible rule using the following syntax:
rulemap
a macro to create a HashMap of rules for a Turing machine. The macro takes a list of rules in the form of
rules
[rules!] is a macro that simplifies the creation of a vector of Rules.

Structs§

DirectionIter
An iterator over the variants of Direction
State
State is a generalized state implementation, representing the state of a system or object.

Enums§

Direction
Direction enumerates the various directions a head can move, namely: left, right, and stay.
Error
The Error implementation describes the various errors that can occur within the library

Traits§

Alphabet
Alphabet describes a finite set of symbols used to construct a formal language.
Apply
[ApplyOnce] describes objects capable of applying, or mapping, a function onto a value.
AsDirection
The AsDirection trait provides a convience method for converting a type into a Direction.
Decrement
Decrement is a trait that provides a common interface for decrementing values; i.e., subtracting one from a value.
DecrementAssign
DecrementAssign is a trait that provides a common interface for decrementing values in place.
Increment
Increment is a trait that provides a common interface for incrementing values; i.e., adding one to a value.
IncrementAssign
IncrementAssign is a trait that provides a common interface for incrementing values in place.
Incremental
Incremental is a trait that provides a common interface for incrementing and decrementing values.
IntoDirection
The IntoDirection trait provides a convience method for converting a type into a Direction.
RawState
RawState is a trait describing objects capable of being used as states in our library. The trait contains a single associated trait, the context, or inner value of the state.
Symbolic
Symbolic is a trait denoting types that can be used as symbols; this is useful for allowing symbols to represented with char or be a position on the tape, value mapping for an alphabet,.

Type Aliases§

Result
A type alias for a Result with our custom error type: Error