Skip to content

Compiler for State Automata - tool for compiling Deterministic Finite Automata to machine code.

License

Notifications You must be signed in to change notification settings

mnurczynski/comsta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ComStA

Compiler for State Automata

This open-source tool allows for compiling Deterministic Finite Automata, to x86-64 or AArch64 machine code and executing them. Therefore, allowing for high performance execution of the automata.

ASMIOV library is utilized for generating machine code.

Project structure

The library is divided into 2 parts: compiler and runtime. Compiler will generate the machine code for an automata, described/generated using a C++ API. Runtime will execute the generated program, serving as it's overhead and an interface between the program and the environment (operating system).

The tool is intended for use on Linux.

Development roadmap

Below is a brief description of what development has been completed, and what development is planned as part of the project:

  1. Start. <- WE ARE HERE
  2. Support the basic use case - no-output automata on x86-64.
  3. Add support for Moore automata (output based on state).
  4. Add support for Mealy automata (output based on state and input).
  5. Support compilation for AArch64 (64-bit ARM)
  6. Enable using the runtime on bare-metal.
  7. Enable compiling (transpiling?) to Verilog.

DISCLAIMER: This roadmap will probably never be fully completed, and may change a lot.

Navigation

CMake targets:

  • comsta - Library target with both compiler and runtime.
  • comsta_compiler - Library target with the compiler (does not exist yet).
  • comsta_runtime - Library target with the runtime (does not exist yet).
  • tests - Executable with integration tests for the project.
  • samples.hello_world - Simple hello world executable (to check if the build system is working correctly).

File structure:

  • README.md - You are here.
  • LICENSE.txt - License for the project (spoiler: it's MIT.
  • CMakeLists.txt - Main project CMake (only includes all parts of the project as subdirectories).
  • tests/ - Integration tests.
    • CMakeLists.txt - CMake for the tests, links the test files and the library, downloads and links the VSTL testing framework. Home for the tests executable target.
    • global.cpp - Tests for the whole project.
  • samples/ - Demo applications for the library.
    • CMakeLists.txt - CMake for the samples (only includes all samples as subdirectories).
    • hello_world/ - Simple hello world program (to test if the build system works).
      • CMakeLists.txt - CMake file linking ComStA library and demo sources. samples.hello_world executable target is declared here.
      • main.cpp - Entry point, code printing "Hello, world!" to the standard output.
  • comsta/ - ComStA library files. Files for Compiler and Runtime are mixed up (not separated into directories).
    • CMakeLists.txt - CMake file with the main library target - comsta. Separate targets comsta-compiler and comsta-runtime will be added soon. ASMIOV library is downloaded and linked here.
    • lib/ - Source files (.cpp) of the library.
    • include/ - Header files (.h) of the library.

Contributing

Contributions are NOT welcome.

This is my project, please do not submit PRs to this repository. If you wish, create a fork and make changes there.

If you think your case is special please contact me and ask for permission before submitting a PR.

About

Compiler for State Automata - tool for compiling Deterministic Finite Automata to machine code.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published