Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discussion] Long term design #1

Open
DrSensor opened this issue Aug 10, 2020 · 0 comments
Open

[Discussion] Long term design #1

DrSensor opened this issue Aug 10, 2020 · 0 comments
Labels
discussion Issue for discussing things

Comments

@DrSensor
Copy link
Member

Just dumping my quick notes from my phone
Need to elaborate more

Motivation

TBD

Design

Variant of DSL

eDSL (embedded DSL)

FSM, aliasing and import statement

xDSL (external DSL)

eDSL, Statecharts, Formal Verification, spec definition
Problem:> should parallel state be included 🤔

exDSL (extended DSL)

xDSL, embed another language (similar mechanism like in Julia or Markdown)

Compiler design

StateMachine as a runtime

  • compile to s-expr (wasm)
    universal runtime: wasm3

  • compile to bytecode (llvm)
    use cases: static or shared lib

  • standalone runtime
    use cases: custom rules engine utilizing exDSL

StateMachine as generated code

  • embedded compiler
    use cases: eDSL via procedural macro

  • integrated compiler
    use cases: build-system's plugin for xDSL

  • compile to C 🤔
    use cases: statically link to gcc microcontroller or just use it along with the main code

Construct

when prototyping a solution
(no particular order)

Develop - Design - Verify
eDSL + proglang -> xDSL -> test script + formal verification

Design - Verify - Develop
xDSL -> formal verification -> proglang + unit test

Design - Develop - Verify
xDSL -> proglang -> test script

Verify - Design - Develop
spec + test definition -> transition definition -> implemenration

  • Spec Definition - Describe available states, events, actions, etc. In short, it's like type declaration
  • Transition Definition - Describe the StateMachine itself
  • Test Definition - Describe rules that Transition Definiton must follow. In other words, this is the formal verification of statemachine
@DrSensor DrSensor added the discussion Issue for discussing things label Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Issue for discussing things
Projects
None yet
Development

No branches or pull requests

1 participant