Skip to content

Commit b21b837

Browse files
merge loop to main for v0.11
1 parent 791b1ae commit b21b837

File tree

197 files changed

+30984
-15068
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+30984
-15068
lines changed

.readthedocs.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version and other tools you might need
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.12"
12+
# You can also specify other tool versions:
13+
# nodejs: "20"
14+
# rust: "1.70"
15+
# golang: "1.20"
16+
17+
# Build documentation in the "docs/" directory with Sphinx
18+
sphinx:
19+
configuration: docs/conf.py
20+
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
21+
# builder: "dirhtml"
22+
# Fail on all warnings to avoid broken references
23+
# fail_on_warning: true
24+
25+
# Optionally build your docs in additional formats such as PDF and ePub
26+
# formats:
27+
# - pdf
28+
# - epub
29+
30+
# Optional but recommended, declare the Python requirements required
31+
# to build your documentation
32+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
33+
# Explicitly set the version of Python and its requirements
34+
python:
35+
install:
36+
- requirements: docs/requirements.txt

Cargo.lock

Lines changed: 12 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 49 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,75 @@
11

2-
# Frame Language Transpiler v0.10.0
2+
# Frame Language Transpiler v0.11.0
33

4+
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 Python (more languages to come) as well as
5+
UML diagrams.
46

5-
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:
7+
## Frame Language Documentation
68

7-
* C++
8-
* C#
9-
* GDScript
10-
* Go
11-
* Java
12-
* JavaScript
13-
* Python
14-
* Rust
9+
To learn more about the Frame language, please find Frame's official documentation on [Read the Docs](https://docs.frame-lang.org).
1510

11+
## New in Recent Releases
1612

17-
## Purpose
13+
For details, see the [Release Notes](https://github.com/frame-lang/frame_transpiler/releases).
1814

19-
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.
15+
### Frame v0.11.0
2016

17+
Frame v0.11.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.
2118

22-
## New in Recent Releases
19+
#### New Language Features and Updates
2320

24-
For details, see the [Release Notes](https://github.com/frame-lang/frame_transpiler/releases).
21+
**Functions** -
2522

26-
### Frame v0.10.0
23+
With the introduction of functions to the Frame syntax, developers can now easily build simple Frame programs.
24+
Currently the syntax only permits a single **main()** function. The **v0.12** will permit general
25+
use of an unlimited number of functions.
2726

28-
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.
27+
See [Frame Functions](https://docs.frame-lang.org/en/latest/intermediate_frame/functions.html) for more information.
2928

30-
#### New Language Features
29+
**System Controller Instantiation** -
3130

32-
Note: The new language features are now supported in Golang, Javascript, Python3. Other languages will be supported in coming releases.
31+
With the introduction of Frame functions, developers can now create real Frame programs and instantiate
32+
and control Frame systems. This capability allows for full control over system initialization of state
33+
parameters, start state parameters and domain variables.
3334

34-
* **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).
35-
* **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.
36-
* **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.
37-
* **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.
38-
* **Persistance** - A new system attribute enables code generation for Marshaling and Unmarshaling system data as JSON.
35+
See [Frame Systems](https://docs.frame-lang.org/en/latest/intermediate_frame/systems.html#system-with-no-parameters).
3936

40-
#### Stdin support
41-
The CLI has been updated to support stdin:
37+
**Operations** -
4238

43-
`framec -language rust < HelloWorld.frm > HelloWorld.rs`
39+
Frame operations are publicly accessible methods that bypass the state machine and allow privileged access to the
40+
system domain data. In addition, operations can optionally be designated as **static**, enabling
41+
systems to provide libraries of associated functionality for complex or repetitive system management routines.
4442

45-
or
43+
See [Frame Operations](https://docs.frame-lang.org/en/latest/advanced_frame/operations.html)
4644

47-
`cat HellowWorld.frm | framec -language golang > HellowWorld.go`
45+
**Enums** -
4846

47+
Frame now supports system enumerated types.
4948

50-
## Resources
49+
See [Frame Enumerated Types](https://docs.frame-lang.org/en/latest/intermediate_frame/enums.html).
50+
51+
**Loops** -
5152

52-
The Frame project is still early days but there are some resources and communities to help. You can now download [VSCode](https://marketplace.visualstudio.com/items?itemName=frame-lang-org.frame-machine-maker) and [Atom](https://atom.io/packages/frame-machine-maker) extensions to work with Frame in these popular free development applications.
53+
Frame now supports two types of loops:
54+
55+
1. For-like loops
56+
2. Infinite loops
57+
58+
See [Frame Loops](https://docs.frame-lang.org/en/latest/intermediate_frame/loops.html).
59+
60+
61+
## Resources
5362

54-
An [online version of the Framepiler](https://framepiler.frame-lang.org) is also available and provides examples and links to other resources. You can learn more about the Frame language at [frame-lang.org](https://frame-lang.org) as well as find general resources about programming with automata at Reddit ![re](https://www.google.com/s2/favicons?domain_url=https://reddit.com) on the [r/statemachines](https://www.reddit.com/r/statemachines/) subreddit.
63+
The Frame project is still early days but there are some resources and communities to help. You can download the [VSCode](https://marketplace.visualstudio.com/items?itemName=frame-lang-org.frame-machine-maker) extension to develop
64+
Frame programs on your desktop or experiment with Frame online at the [Frame Playground](https://playground.frame-lang.org). You can learn more about the Frame language using the [online documentation ](https://docs.frame-lang.org) as well as find general resources about programming with automata at Reddit ![re](https://www.google.com/s2/favicons?domain_url=https://reddit.com) on the [r/statemachines](https://www.reddit.com/r/statemachines/) subreddit.
5565

56-
Communities exist at [Gitter](https://gitter.im/frame-language/community) and [Discord](https://discord.com/invite/CfbU4QCbSD).
66+
There is also a [Discord](https://discord.com/invite/CfbU4QCbSD) channel to connect with other Frame enthusiasts.
5767

5868
### Frame Examples
59-
The [Framepiler](https://framepiler.frame-lang.org/example/aHR0cHM6Ly9naXN0LmdpdGh1Yi5jb20vZnJhbWUtbGFuZy8wZGFmMDMzOGU0YTkyYjc1NWViMTQ2NGM3YzVjMTM3Zg==) itself has a number of examples baked into it but I also have started a [Gitter Frame Examples](https://gitter.im/frame-language/frame-examples) channel for contributions. The Framepiler supports links to Gists so please create and share!
6069

61-
The [Frame Solution Depot](https://github.com/frame-lang/frame_solution_depot) is a Github repo and growing body of examples and test specifications. This is useful in conjunction with the [VSCode](https://marketplace.visualstudio.com/items?itemName=frame-lang-org.frame-machine-maker) and [Atom](https://atom.io/packages/frame-machine-maker) extensions.
70+
The [Frame Solution Depot](https://github.com/frame-lang/frame_solution_depot) is a Github repo and contains a growing body of examples and test specifications.
6271

63-
## Bugs and Problems
72+
## Reporting Bugs and Problems
6473

6574
For now please report issues to the [Gitter Bug Channel](https://gitter.im/frame-language/bug-reports) while we get a better system in place. If you have a recommendation please let me know there!
6675

@@ -77,20 +86,15 @@ These instructions will get you a copy of the project up and running on your loc
7786
2. Navigate to the framepiler/framec directory.
7887
3. Type `cargo build`.
7988
3.a You will see a bunch of warnings. Apologies but this is pre-alpha code.
80-
4. Type `./target/debug/framec ../examples/HelloWorld.frm c_sharp`.
89+
4. Type `./target/debug/framec ../examples/HelloWorld.frm python_3`.
8190
4.a You should see a base class for a Frame controller generated to stdout.
8291
5. If you want to generate a release build:
8392
5.a Type `cargo build --release`
84-
5.b Type `./target/release/framec ../examples/HelloWorld.frm c_sharp`
93+
5.b Type `./target/release/framec ../examples/HelloWorld.frm python_3`
8594
6. You now have working debug and release Framepilers. Congratulations!
86-
7. You can try 6 other languages + Plant UML. Replace the `c_sharp` above with any of these:
87-
7.a `javascript`
88-
7.b `cpp`
89-
7.c `gdscript`
90-
7.d `java_8`
91-
7.e `plantuml` (try output at [PlantUml site](http://www.plantuml.com/))
92-
7.f `python_3`
93-
7.g `rust` (experimental - only partially implemented)
95+
7. You can try 6 other languages + Plant UML. Replace the `python_3` above with any of these:
96+
7.a `python_3`
97+
7.b `plantuml` (try output at [PlantUml site](http://www.plantuml.com/))
9498

9599
#### Linux
96100

docs/conf.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
3+
# -- Project information
4+
5+
project = 'Frame Transpiler'
6+
copyright = '2021, Mark Truluck'
7+
author = 'Mark Truluck'
8+
9+
release = '0.1'
10+
version = '0.1.0'
11+
12+
# -- General configuration
13+
14+
extensions = [
15+
'sphinx.ext.duration',
16+
'sphinx.ext.doctest',
17+
'sphinx.ext.autodoc',
18+
'sphinx.ext.autosummary',
19+
'sphinx.ext.intersphinx',
20+
'sphinx_rtd_theme',
21+
]
22+
23+
intersphinx_mapping = {
24+
'python': ('https://docs.python.org/3/', None),
25+
'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
26+
}
27+
intersphinx_disabled_domains = ['std']
28+
29+
templates_path = ['_templates']
30+
31+
# -- Options for HTML output
32+
33+
html_theme = "sphinx_rtd_theme"
34+
35+
# -- Options for EPUB output
36+
epub_show_urls = 'footnote'

docs/source/index.rst renamed to docs/index.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Frame v0.10.0 Documentation
1+
Frame v0.11.0 Documentation
22
=======================================================
3-
Welcome! Here you will find the official v0.10.0 documentation for the **Frame System Design Language**.
3+
Welcome! Here you will find the official v0.11.0 documentation for the **Frame System Design Language**.
44

55
What is Frame?
66
--------------
@@ -102,28 +102,28 @@ The true power of Frame, however, is realized by the ability to generate both do
102102
:caption: General
103103
:name: sec-about
104104

105-
about/introduction
105+
source/about/introduction
106106

107107
.. toctree::
108108
:caption: Getting Started
109109
:name: sec-getting-started
110110

111-
getting_started/introduction/index
111+
source/getting_started/introduction/index
112112

113113
.. toctree::
114114
:caption: Intermediate Frame
115115
:name: sec-intermediate-frame
116116

117-
intermediate_frame/index
117+
source/intermediate_frame/index
118118

119119
.. toctree::
120120
:caption: Advanced Frame
121121
:name: sec-advanced-frame
122122

123-
advanced_frame/index
123+
source/advanced_frame/index
124124

125125
.. toctree::
126126
:caption: Language
127127
:name: sec-language
128128

129-
language/index
129+
source/language/index

docs/requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Defining the exact version will make sure things don't break
2+
sphinx==5.3.0
3+
sphinx_rtd_theme==1.1.1
4+
readthedocs-sphinx-search==0.1.1

frame_build/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "frame_build"
3-
version = "0.8.0"
3+
version = "0.11.0"
44
authors = ["Eric Walkingshaw <[email protected]>"]
55
edition = "2018"
66

frame_build/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ impl FrameBuild {
252252
let entry = entry?;
253253
let input_path = entry.path();
254254
if input_path.extension().unwrap_or_default() == "frm"
255-
&& (&self.input_filter)(input_path)
255+
&& (self.input_filter)(input_path)
256256
{
257257
// tell Cargo this is a source file
258258
println!("cargo:rerun-if-changed={:?}", &input_path);

frame_runtime/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "frame_runtime"
3-
version = "0.10.0"
3+
version = "0.11.0"
44
authors = ["Eric Walkingshaw <[email protected]>"]
55
edition = "2018"
66

frame_runtime/src/smcat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ impl<S: Style> Renderer<S> {
247247
) {
248248
let mut state_iter = states.iter().peekable();
249249
while let Some(state) = state_iter.next() {
250-
let style = self.style.node(*state, active == Some(state.name));
250+
let style = self.style.node(state, active == Some(state.name));
251251
let children = state.children();
252252
output.push_str(&" ".repeat(indent));
253253
output.push_str(&format!("{}{}", state.name, style));

0 commit comments

Comments
 (0)