Skip to main content

ssfsm is a constructive library implementing deterministic finite state machines. The fun thing is, that it has a stupidly simple API. Example:

# A FSM that accepts b*a(ab)*
import ssfsm
A = ssfsm.Machine()
A.One['a'] = A.Two
A.One['b'] = A.One
A.Two['ab'] = A.Two # a and b transition
A.Two = True # Set state Two to accepting
A().reset(A.One)

And transitions are done this way:

A('a') # a-Transition
A('ab') # a-Transition followed by b-Transition
bool(A) # is A in an accepting state

Some helpers to make construction even easier so the first example can be written as:

import ssfsm
A = ssfsm.Machine('One')
A().alphabet = 'ab'
A.One['b'] = A.One
A().polyfill(A.Two)
A.Two = True

Metadata

Release files for ssfsm 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ssfsm 0.6.0
File Size Uploaded
ssfsm-0.6.0.tar.gz 3.2 kB Details

Release files / ssfsm-0.6.0.tar.gz

Download URL ssfsm-0.6.0.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f93e65bcd7e4067707e9bc99ebc15fed7e9389de4b38b82d21e5b1431b016828
BLAKE2b-256 checksum
How to use checksums
13374f7438529ae5a7175b9e6e328baaeff6d42c456cc2b75274a7bd3d429c98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.6.0 This release

1 release file

0.5.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page