evanw / fsm

Finite State Machine Designer
293 stars 146 forks source link

Usage of this code in other work #35

Open daniel-wo opened 2 years ago

daniel-wo commented 2 years ago

Would it be permissable to use the code of the fsm in my bachelor's thesis? I aim to recognize handdraw finite automatons and then convert them to some object notation but it would also be great to display the recognized automaton.

Of course I will implement a visualization myself if it is not possible but it would be a nice hommage to my studies since we used your fsm in almost every semester for modeling all kinds of transition systems.

Thank you very much.

arlogy commented 2 years ago

The source code in the src/ directory belongs to the author of this repository but is released under the MIT license. So you can do whatever you want with it according to said license agreements: basically, you can not change the license of the original work, but changes to it can be released under specific license agreements. Also, the safest way to use this tool for your thesis needs would be to just mention it, state your changes, and provide instructions on how to merge them into (or run them using) the tool.

Besides, I have improved this tool in one of my Github repositories named nvc which stands for Network View Controller. It provides an API-like interface for developers to use, so you might want to take a look at it for your thesis work.

Hope this answer helps!

arlogy commented 1 year ago

Following our little discussion, I realized that you're using Network View Controller in your Finite Automaton Recognizer to render automata recognized from hand-drawn ones... Now that stable releases are available for nvc, I'd like to share a contextual approach to using the latest version of the tool in your project. Said version is currently 1.1.1 and provides stand-alone HTML examples (among other changes inherited from previous versions recorded in CHANGELOG.md). Please read on if you are interested.

'frontend' directory of your project

text begins here (you can ignore unnecessary newlines)

This directory contains standalone HTML examples taken from nvc version 1.1.1. Said examples were obtained as follows according to the documentation.

... # download or git clone/checkout nvc source code targeting the version stated above
cd nvc # navigate to the directory containing nvc source code
npm install
npm run examples:html:update # update HTML examples with latest dependencies
... # copy the content of examples/html_pages from nvc into this directory

text ends here

At this point, the following data should have been copied into the frontend directory of your project.

'recognition/IO/0_frontend.html' file of your project

what to replace

                    // allow the user to see all nodes and text items but not necessarily links

replacement

                    // load the JSON data generated for the previously recognized automaton (see output.js)
                    Nvc.quick.outputText(json);
                    Nvc.quick.loadJsonFromOutput();

                    // allow the user to see all nodes and text items but not necessarily links

What else?

The changes suggested above, which I figured out by following the latest Git commits regarding your project's frontend, assume that nvc is not used anywhere else in the project. If this is not the case, please take the necessary steps accordingly. All the best!