All Projects → frame-lang → frame_transpiler

frame-lang / frame_transpiler

Licence: MIT license
Frame is a markdown language for creating state machines (automata) in 8 programming languages as well as generating UML documentation.

Programming Languages

rust
11053 projects
javascript
184084 projects - #8 most used programming language
go
31211 projects - #10 most used programming language
python
139335 projects - #7 most used programming language
Visual Basic 6.0
7 projects
vba
158 projects

Projects that are alternatives of or similar to frame transpiler

guile-smc
GNU Guile State Machine Compiler
Stars: ✭ 15 (-57.14%)
Mutual labels:  state-machines
PySimpleAutomata
Academic Python Library to manage DFA, NFA and AFW automata.
Stars: ✭ 17 (-51.43%)
Mutual labels:  automata
NTUA-slp-nlp
💻Speech and Natural Language Processing (SLP & NLP) Lab Assignments for ECE NTUA
Stars: ✭ 19 (-45.71%)
Mutual labels:  automata
ember
@microstates/ember - Official Microstates bindings for Ember.js
Stars: ✭ 68 (+94.29%)
Mutual labels:  state-machines
libvata
VATA Tree Automata Library
Stars: ✭ 23 (-34.29%)
Mutual labels:  automata
conway
Conway's game of life
Stars: ✭ 27 (-22.86%)
Mutual labels:  automata
Stateless-Designer
Visual Studio extension to support visual design of stateless state machines. Support for Visual Studio 2012/2013/2015/2017.
Stars: ✭ 47 (+34.29%)
Mutual labels:  state-machines
Regex
An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.
Stars: ✭ 2,125 (+5971.43%)
Mutual labels:  automata
rustfst
Rust re-implementation of OpenFST - library for constructing, combining, optimizing, and searching weighted finite-state transducers (FSTs). A Python binding is also available.
Stars: ✭ 104 (+197.14%)
Mutual labels:  automata
AALpy
An Active Automata Learning Library Written in Python
Stars: ✭ 60 (+71.43%)
Mutual labels:  automata
StateNet
A small .Net Standard library used to model simple State Machines
Stars: ✭ 14 (-60%)
Mutual labels:  state-machines
typestate-rs
Proc-macro typestate DSL for Rust
Stars: ✭ 110 (+214.29%)
Mutual labels:  automata
FormaleSysteme
Unterlagen zur Vorlesung "Formale Systeme", Fakultät Informatik, TU Dresden
Stars: ✭ 31 (-11.43%)
Mutual labels:  automata
fea state machines
A Buffet Of C++17 State Machines
Stars: ✭ 19 (-45.71%)
Mutual labels:  state-machines
computation-py
Python implementation for Understanding Computation book.
Stars: ✭ 22 (-37.14%)
Mutual labels:  automata
triggerflow
Event-based Orchestration of Serverless Workflows
Stars: ✭ 38 (+8.57%)
Mutual labels:  state-machines
omega
Specify and synthesize systems using symbolic algorithms
Stars: ✭ 36 (+2.86%)
Mutual labels:  automata
glider
Generative music using conway's game of life
Stars: ✭ 38 (+8.57%)
Mutual labels:  automata
php aho corasick
Aho-Corasick string search algorithm PHP extension implementation.
Stars: ✭ 45 (+28.57%)
Mutual labels:  automata
kaliningraph
🕸️ Graphs, finite fields and discrete dynamical systems in Kotlin
Stars: ✭ 62 (+77.14%)
Mutual labels:  automata

Frame Language Transpiler v0.10.0

Frame is a language for designing systems. It is easy to learn and can generate both UML documentation as well as code in 8 programming languages:

  • C++
  • C#
  • GDScript
  • Go
  • Java
  • JavaScript
  • Python
  • Rust

Purpose

This project contains the code for building the Frame Language Transpiler - the Framepiler. The Framepiler is written in Rust and transpiles Frame specification documents into 8 programming languages (more to come) and UML documentation.

New in Recent Releases

For details, see the Release Notes.

Frame v0.10.0

Frame v0.10.0 brings a lot of exciting additions to the Frame language, adding both power and standardization to the notation. In addition, the transpiler now can read from stdin as well as still accepting file paths as in the past. This enables improved CI/CD processes involving Frame.

New Language Features

Note: The new language features are now supported in Golang, Javascript, Python3. Other languages will be supported in coming releases.

  • Compartments - v0.10 formalizes the idea of state closures called Compartments. Compartments are data structures that hold a state's local data as well as other metadata enabling new advanced features like Event Forwarding (see below).
  • Deferred transitions - deferred transitions address challenges with the previous approach of executing a transition immediately when called. Each immediate transition makes a function call and under certain situations, can blow up the stack if too many occur before returning to the caller. Deferred transitions avoid this situation and enable Frame controllers to make any number of sequential transitions. This architecture change enables Frame controllers to be launched as background daemons that run indefinitely until stopped as well as to be used to solve iterative problems.
  • System parameters - system parameters enable initializing the system in a more standardized, flexible and direct manner. This includes syntax for setting the start state parameters, the start state's enter parameters as well as override domain variable initialization. This change normalizes the start state to behave like all other states in the machine.
  • Event forwarding - event forwarding syntax enables passing events from one state to another. This capability enables system designers to easily receive events in one state and forward them on to other states that can handle them appropriately.
  • Persistance - A new system attribute enables code generation for Marshaling and Unmarshaling system data as JSON.

Stdin support

The CLI has been updated to support stdin:

framec -language rust < HelloWorld.frm > HelloWorld.rs

or

cat HellowWorld.frm | framec -language golang > HellowWorld.go

Resources

The Frame project is still early days but there are some resources and communities to help. You can now download VSCode and Atom extensions to work with Frame in these popular free development applications.

An online version of the Framepiler is also available and provides examples and links to other resources. You can learn more about the Frame language at frame-lang.org as well as find general resources about programming with automata at Reddit re on the r/statemachines subreddit.

Communities exist at Gitter and Discord.

Frame Examples

The Framepiler itself has a number of examples baked into it but I also have started a Gitter Frame Examples channel for contributions. The Framepiler supports links to Gists so please create and share!

The Frame Solution Depot is a Github repo and growing body of examples and test specifications. This is useful in conjunction with the VSCode and Atom extensions.

Bugs and Problems

For now please report issues to the Gitter Bug Channel while we get a better system in place. If you have a recommendation please let me know there!

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Installing

MacOS

  1. Install Rust.
  2. Navigate to the framepiler/framec directory.
  3. Type cargo build. 3.a You will see a bunch of warnings. Apologies but this is pre-alpha code.
  4. Type ./target/debug/framec ../examples/HelloWorld.frm c_sharp. 4.a You should see a base class for a Frame controller generated to stdout.
  5. If you want to generate a release build: 5.a Type cargo build --release 5.b Type ./target/release/framec ../examples/HelloWorld.frm c_sharp
  6. You now have working debug and release Framepilers. Congratulations!
  7. You can try 6 other languages + Plant UML. Replace the c_sharp above with any of these: 7.a javascript 7.b cpp 7.c gdscript 7.d java_8 7.e plantuml (try output at PlantUml site) 7.f python_3 7.g rust (experimental - only partially implemented)

Linux

  1. Install Rust.
  2. Probably the same as MacOS but guessing you can figure it out if you know Linux and Rust. Still - please send me instructions on Gitter Bug Channel and I will add to next release notes. Thanks!

Windows

  1. Install Rust.
  2. Help needed. Please send me instructions on Gitter Bug Channel and I will add to next release notes. Thanks!

Built With

  • Rust - Rust language

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Author

  • Mark Truluck - Creator of Frame - LinkedIn

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].