Expand description
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
- rules
- state
- the state module implements the
State
type and its associated traits and types - traits
- types
- the
types
module provides various types used throughout the library, includingDirection
,Head
, andTail
.
Macros§
Structs§
- Actor
- An Actor is an implementation of a Turing machine with a moving head (TMH).
- Direction
Iter - An iterator over the variants of Direction
- Executor
- The Executor handles the execution of a given program. The structure works as an iterator, where each iteration represents a step in the program. The executor is responsible for reading the current symbol at the head of the tape, executing the program, and updating the tape accordingly. The executor will continue to iterate until the actor is halted or the program is completed.
- Halt
- Head
- The Head is formally defined to be a 2-tuple consisting of a state / symbol pair.
- Rule
- RuleSet
- State
- State is a generalized state implementation, representing the state of a system or object.
- Tail
- The Tail is a 3-tuple containing the direction, state, and symbol that an actor is instructed to execute whenever it assumes the head configuration assigned to the tail.
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.
- Decrement
Assign - DecrementAssign is a trait that provides a common interface for decrementing values in place.
- Handle
- Handle describes the step-by-step execution of a program; the trait is generalized
with the introduction of a single generic parameter,
T
, capable of sufficiently representing any possible object that may be passed to the [handle] method. - Increment
- Increment is a trait that provides a common interface for incrementing values; i.e., adding one to a value.
- Increment
Assign - 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.
- Into
Direction - 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.- Stated
- The
Stated
trait defines the interface for stateful implementations in the library. - 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,.