GithubHelp home page GithubHelp logo

yepengding / seniz Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 919 KB

Seniz is a domain-specific language designed for Formalism-Driven Development (FDD).

License: MIT License

Java 98.37% ANTLR 1.63%
fdd formal-methods generative-programming modeling-language formalism-driven-development

seniz's Introduction

Seniz

Seniz is a framework for Formalism-Driven Development (FDD). This repository holds a sample implementation.

Usage

Standalone

usage: java -jar Seniz.jar [options] <source>
 -h,--help               print help.
 -n,--name <namespace>   Java root namespace.
 -o,--output <path>      output directory path.
 -v,--version            print current version.

Generate from a single source file

java -jar Seniz.jar -n org.veritasopher.seniz.generation example/Simple0.sz

Generate from a source directory

java -jar Seniz.jar -n org.veritasopher.seniz.generation example/Semaphore

Library

  1. Include Seniz.jar into a project
  2. Initialize a set of source file paths
String path="path_to_source";
        Set<String> sourceFilePaths=new HashSet<>();
// Parse Seniz source file paths into sourceFilePaths
  1. Build global environment
MasterController masterController=new MasterController();
        GlobalEnvironment env=masterController.compile(sourceFilePaths);
  1. Generate Java programs
JavaGenerator javaGenerator=new JavaGenerator(env);
        javaGenerator.generateToDir("namespace","output_path");

Build

Environment

  • Java 17

Compile

mvn clean compile assembly:single

Related Project

Reference

Ding, Y., & Sato, H. (2022). Formalism-Driven Development: Concepts, Taxonomy, and Practice. Applied Sciences, 12(7), 3415. MDPI


This open-source project under MIT License is only for educational purposes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.