mirror of
https://git.cs.ou.nl/joshua.moerman/fsm-diff-vis.git
synced 2025-04-30 10:17:45 +02:00
Initial commit (2)
This commit is contained in:
parent
a4ab5d0566
commit
56a8b06f58
7 changed files with 529 additions and 91 deletions
92
README.md
92
README.md
|
@ -1,93 +1,3 @@
|
||||||
# fsm-diff-vis
|
# fsm-diff-vis
|
||||||
|
|
||||||
|
Kleine [https://dingen.joshuamoerman.nl/fsm-diff-vis/](demo).
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
|
||||||
|
|
||||||
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
|
||||||
|
|
||||||
## Add your files
|
|
||||||
|
|
||||||
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
|
||||||
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
|
||||||
|
|
||||||
```
|
|
||||||
cd existing_repo
|
|
||||||
git remote add origin https://git.cs.ou.nl/joshua.moerman/fsm-diff-vis.git
|
|
||||||
git branch -M main
|
|
||||||
git push -uf origin main
|
|
||||||
```
|
|
||||||
|
|
||||||
## Integrate with your tools
|
|
||||||
|
|
||||||
- [ ] [Set up project integrations](https://git.cs.ou.nl/joshua.moerman/fsm-diff-vis/-/settings/integrations)
|
|
||||||
|
|
||||||
## Collaborate with your team
|
|
||||||
|
|
||||||
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
|
|
||||||
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
|
||||||
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
|
||||||
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
|
||||||
- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
|
|
||||||
|
|
||||||
## Test and Deploy
|
|
||||||
|
|
||||||
Use the built-in continuous integration in GitLab.
|
|
||||||
|
|
||||||
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
|
|
||||||
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
|
|
||||||
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
|
||||||
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
|
|
||||||
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
# Editing this README
|
|
||||||
|
|
||||||
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
|
|
||||||
|
|
||||||
## Suggestions for a good README
|
|
||||||
|
|
||||||
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
|
||||||
|
|
||||||
## Name
|
|
||||||
Choose a self-explaining name for your project.
|
|
||||||
|
|
||||||
## Description
|
|
||||||
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
|
||||||
|
|
||||||
## Badges
|
|
||||||
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
|
||||||
|
|
||||||
## Visuals
|
|
||||||
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
|
||||||
|
|
||||||
## Support
|
|
||||||
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
|
||||||
|
|
||||||
## Roadmap
|
|
||||||
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
State if you are open to contributions and what your requirements are for accepting them.
|
|
||||||
|
|
||||||
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
|
||||||
|
|
||||||
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
|
||||||
|
|
||||||
## Authors and acknowledgment
|
|
||||||
Show your appreciation to those who have contributed to the project.
|
|
||||||
|
|
||||||
## License
|
|
||||||
For open source projects, say how it is licensed.
|
|
||||||
|
|
||||||
## Project status
|
|
||||||
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
|
||||||
|
|
2
d3.v7.min.js
vendored
Normal file
2
d3.v7.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
135
fsms/scandium-2.0.0_psk.dot
Normal file
135
fsms/scandium-2.0.0_psk.dot
Normal file
|
@ -0,0 +1,135 @@
|
||||||
|
digraph g {
|
||||||
|
|
||||||
|
s0 [shape="circle" label="s0"];
|
||||||
|
s1 [shape="circle" label="s1"];
|
||||||
|
s2 [shape="circle" label="s2"];
|
||||||
|
s3 [shape="circle" label="s3"];
|
||||||
|
s4 [shape="circle" label="s4"];
|
||||||
|
s5 [shape="circle" label="s5"];
|
||||||
|
s6 [shape="circle" label="s6"];
|
||||||
|
s7 [shape="circle" label="s7"];
|
||||||
|
s8 [shape="circle" label="s8"];
|
||||||
|
s9 [shape="circle" label="s9"];
|
||||||
|
s10 [shape="circle" label="s10"];
|
||||||
|
s11 [shape="circle" label="s11"];
|
||||||
|
s12 [shape="circle" label="s12"];
|
||||||
|
s13 [shape="circle" label="s13"];
|
||||||
|
s14 [shape="circle" label="s14"];
|
||||||
|
s15 [shape="circle" label="s15"];
|
||||||
|
s0 -> s2 [label="HELLO / HELLO_VERIFY_REQUEST"];
|
||||||
|
s0 -> s0 [label="KEX / TO"];
|
||||||
|
s0 -> s1 [label="CIPH / TO"];
|
||||||
|
s0 -> s0 [label="FIN / TO"];
|
||||||
|
s0 -> s0 [label="APP / TO"];
|
||||||
|
s0 -> s0 [label="AL_W / TO"];
|
||||||
|
s0 -> s0 [label="AL_F / TO"];
|
||||||
|
s1 -> s1 [label="HELLO / TO"];
|
||||||
|
s1 -> s1 [label="KEX / TO"];
|
||||||
|
s1 -> s1 [label="CIPH / TO"];
|
||||||
|
s1 -> s1 [label="FIN / TO"];
|
||||||
|
s1 -> s1 [label="APP / TO"];
|
||||||
|
s1 -> s1 [label="AL_W / TO"];
|
||||||
|
s1 -> s1 [label="AL_F / TO"];
|
||||||
|
s2 -> s3 [label="HELLO / SER_HELLO_DONE"];
|
||||||
|
s2 -> s2 [label="KEX / TO"];
|
||||||
|
s2 -> s1 [label="CIPH / TO"];
|
||||||
|
s2 -> s2 [label="FIN / TO"];
|
||||||
|
s2 -> s2 [label="APP / TO"];
|
||||||
|
s2 -> s2 [label="AL_W / TO"];
|
||||||
|
s2 -> s2 [label="AL_F / TO"];
|
||||||
|
s3 -> s3 [label="HELLO / SER_HELLO_DONE"];
|
||||||
|
s3 -> s4 [label="KEX / TO"];
|
||||||
|
s3 -> s1 [label="CIPH / TO"];
|
||||||
|
s3 -> s2 [label="FIN / INT_ERR"];
|
||||||
|
s3 -> s3 [label="APP / TO"];
|
||||||
|
s3 -> s2 [label="AL_W / AL_W"];
|
||||||
|
s3 -> s2 [label="AL_F / TO"];
|
||||||
|
s4 -> s8 [label="HELLO / SER_HELLO_DONE"];
|
||||||
|
s4 -> s2 [label="KEX / INT_ERR"];
|
||||||
|
s4 -> s6 [label="CIPH / TO"];
|
||||||
|
s4 -> s12 [label="FIN / CIPH,FIN"];
|
||||||
|
s4 -> s5 [label="APP / TO"];
|
||||||
|
s4 -> s2 [label="AL_W / AL_W"];
|
||||||
|
s4 -> s2 [label="AL_F / TO"];
|
||||||
|
s5 -> s14 [label="HELLO / SER_HELLO_DONE"];
|
||||||
|
s5 -> s2 [label="KEX / INT_ERR"];
|
||||||
|
s5 -> s6 [label="CIPH / TO"];
|
||||||
|
s5 -> s9 [label="FIN / CIPH,FIN,APP"];
|
||||||
|
s5 -> s5 [label="APP / TO"];
|
||||||
|
s5 -> s2 [label="AL_W / AL_W"];
|
||||||
|
s5 -> s2 [label="AL_F / TO"];
|
||||||
|
s6 -> s1 [label="HELLO / INT_ERR"];
|
||||||
|
s6 -> s1 [label="KEX / INT_ERR"];
|
||||||
|
s6 -> s6 [label="CIPH / TO"];
|
||||||
|
s6 -> s7 [label="FIN / CIPH,FIN"];
|
||||||
|
s6 -> s13 [label="APP / TO"];
|
||||||
|
s6 -> s1 [label="AL_W / AL_W"];
|
||||||
|
s6 -> s1 [label="AL_F / TO"];
|
||||||
|
s7 -> s7 [label="HELLO / NO_RENEGO"];
|
||||||
|
s7 -> s7 [label="KEX / TO"];
|
||||||
|
s7 -> s1 [label="CIPH / CIPH,FIN"];
|
||||||
|
s7 -> s7 [label="FIN / TO"];
|
||||||
|
s7 -> s10 [label="APP / APP"];
|
||||||
|
s7 -> s1 [label="AL_W / AL_W"];
|
||||||
|
s7 -> s1 [label="AL_F / TO"];
|
||||||
|
s8 -> s8 [label="HELLO / SER_HELLO_DONE"];
|
||||||
|
s8 -> s4 [label="KEX / TO"];
|
||||||
|
s8 -> s11 [label="CIPH / TO"];
|
||||||
|
s8 -> s2 [label="FIN / INT_ERR"];
|
||||||
|
s8 -> s14 [label="APP / TO"];
|
||||||
|
s8 -> s2 [label="AL_W / AL_W"];
|
||||||
|
s8 -> s2 [label="AL_F / TO"];
|
||||||
|
s9 -> s9 [label="HELLO / TO"];
|
||||||
|
s9 -> s9 [label="KEX / TO"];
|
||||||
|
s9 -> s1 [label="CIPH / TO"];
|
||||||
|
s9 -> s9 [label="FIN / TO"];
|
||||||
|
s9 -> s9 [label="APP / APP"];
|
||||||
|
s9 -> s2 [label="AL_W / AL_W"];
|
||||||
|
s9 -> s2 [label="AL_F / TO"];
|
||||||
|
s10 -> s10 [label="HELLO / NO_RENEGO"];
|
||||||
|
s10 -> s10 [label="KEX / TO"];
|
||||||
|
s10 -> s1 [label="CIPH / TO"];
|
||||||
|
s10 -> s10 [label="FIN / TO"];
|
||||||
|
s10 -> s10 [label="APP / APP"];
|
||||||
|
s10 -> s1 [label="AL_W / AL_W"];
|
||||||
|
s10 -> s1 [label="AL_F / TO"];
|
||||||
|
s11 -> s1 [label="HELLO / INT_ERR"];
|
||||||
|
s11 -> s6 [label="KEX / TO"];
|
||||||
|
s11 -> s11 [label="CIPH / TO"];
|
||||||
|
s11 -> s1 [label="FIN / INT_ERR"];
|
||||||
|
s11 -> s15 [label="APP / TO"];
|
||||||
|
s11 -> s1 [label="AL_W / AL_W"];
|
||||||
|
s11 -> s1 [label="AL_F / TO"];
|
||||||
|
s12 -> s12 [label="HELLO / TO"];
|
||||||
|
s12 -> s12 [label="KEX / TO"];
|
||||||
|
s12 -> s1 [label="CIPH / CIPH,FIN"];
|
||||||
|
s12 -> s12 [label="FIN / TO"];
|
||||||
|
s12 -> s9 [label="APP / APP"];
|
||||||
|
s12 -> s2 [label="AL_W / AL_W"];
|
||||||
|
s12 -> s2 [label="AL_F / TO"];
|
||||||
|
s13 -> s1 [label="HELLO / INT_ERR"];
|
||||||
|
s13 -> s1 [label="KEX / INT_ERR"];
|
||||||
|
s13 -> s6 [label="CIPH / TO"];
|
||||||
|
s13 -> s10 [label="FIN / CIPH,FIN,APP"];
|
||||||
|
s13 -> s13 [label="APP / TO"];
|
||||||
|
s13 -> s1 [label="AL_W / AL_W"];
|
||||||
|
s13 -> s1 [label="AL_F / TO"];
|
||||||
|
s14 -> s14 [label="HELLO / SER_HELLO_DONE"];
|
||||||
|
s14 -> s5 [label="KEX / TO"];
|
||||||
|
s14 -> s11 [label="CIPH / TO"];
|
||||||
|
s14 -> s2 [label="FIN / INT_ERR"];
|
||||||
|
s14 -> s14 [label="APP / TO"];
|
||||||
|
s14 -> s2 [label="AL_W / AL_W"];
|
||||||
|
s14 -> s2 [label="AL_F / TO"];
|
||||||
|
s15 -> s1 [label="HELLO / INT_ERR"];
|
||||||
|
s15 -> s13 [label="KEX / TO"];
|
||||||
|
s15 -> s11 [label="CIPH / TO"];
|
||||||
|
s15 -> s1 [label="FIN / INT_ERR"];
|
||||||
|
s15 -> s15 [label="APP / TO"];
|
||||||
|
s15 -> s1 [label="AL_W / AL_W"];
|
||||||
|
s15 -> s1 [label="AL_F / TO"];
|
||||||
|
|
||||||
|
__start0 [label="" shape="none" width="0" height="0"];
|
||||||
|
__start0 -> s0;
|
||||||
|
|
||||||
|
}
|
BIN
fsms/scandium-2.0.0_psk.png
Normal file
BIN
fsms/scandium-2.0.0_psk.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 559 KiB |
111
fsms/scandium_latest_psk.dot
Normal file
111
fsms/scandium_latest_psk.dot
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
digraph g {
|
||||||
|
|
||||||
|
s0 [shape="circle" label="s0"];
|
||||||
|
s1 [shape="circle" label="s1"];
|
||||||
|
s2 [shape="circle" label="s2"];
|
||||||
|
s3 [shape="circle" label="s3"];
|
||||||
|
s4 [shape="circle" label="s4"];
|
||||||
|
s5 [shape="circle" label="s5"];
|
||||||
|
s6 [shape="circle" label="s6"];
|
||||||
|
s7 [shape="circle" label="s7"];
|
||||||
|
s8 [shape="circle" label="s8"];
|
||||||
|
s9 [shape="circle" label="s9"];
|
||||||
|
s10 [shape="circle" label="s10"];
|
||||||
|
s11 [shape="circle" label="s11"];
|
||||||
|
s12 [shape="circle" label="s12"];
|
||||||
|
s0 -> s2 [label="HELLO / HELLO_VERIFY_REQUEST"];
|
||||||
|
s0 -> s0 [label="KEX / TO"];
|
||||||
|
s0 -> s1 [label="CIPH / TO"];
|
||||||
|
s0 -> s0 [label="FIN / TO"];
|
||||||
|
s0 -> s0 [label="APP / TO"];
|
||||||
|
s0 -> s0 [label="AL_W / TO"];
|
||||||
|
s0 -> s0 [label="AL_F / TO"];
|
||||||
|
s1 -> s1 [label="HELLO / TO"];
|
||||||
|
s1 -> s1 [label="KEX / TO"];
|
||||||
|
s1 -> s1 [label="CIPH / TO"];
|
||||||
|
s1 -> s1 [label="FIN / TO"];
|
||||||
|
s1 -> s1 [label="APP / TO"];
|
||||||
|
s1 -> s1 [label="AL_W / TO"];
|
||||||
|
s1 -> s1 [label="AL_F / TO"];
|
||||||
|
s2 -> s3 [label="HELLO / SER_HELLO_DONE"];
|
||||||
|
s2 -> s2 [label="KEX / TO"];
|
||||||
|
s2 -> s1 [label="CIPH / TO"];
|
||||||
|
s2 -> s2 [label="FIN / TO"];
|
||||||
|
s2 -> s2 [label="APP / TO"];
|
||||||
|
s2 -> s2 [label="AL_W / TO"];
|
||||||
|
s2 -> s2 [label="AL_F / TO"];
|
||||||
|
s3 -> s7 [label="HELLO / TO"];
|
||||||
|
s3 -> s4 [label="KEX / TO"];
|
||||||
|
s3 -> s1 [label="CIPH / TO"];
|
||||||
|
s3 -> s2 [label="FIN / INT_ERR"];
|
||||||
|
s3 -> s3 [label="APP / TO"];
|
||||||
|
s3 -> s2 [label="AL_W / AL_W"];
|
||||||
|
s3 -> s2 [label="AL_F / TO"];
|
||||||
|
s4 -> s8 [label="HELLO / TO"];
|
||||||
|
s4 -> s2 [label="KEX / INT_ERR"];
|
||||||
|
s4 -> s5 [label="CIPH / TO"];
|
||||||
|
s4 -> s2 [label="FIN / INT_ERR"];
|
||||||
|
s4 -> s4 [label="APP / TO"];
|
||||||
|
s4 -> s2 [label="AL_W / AL_W"];
|
||||||
|
s4 -> s2 [label="AL_F / TO"];
|
||||||
|
s5 -> s1 [label="HELLO / INT_ERR"];
|
||||||
|
s5 -> s1 [label="KEX / INT_ERR"];
|
||||||
|
s5 -> s1 [label="CIPH / INT_ERR"];
|
||||||
|
s5 -> s6 [label="FIN / CIPH,FIN"];
|
||||||
|
s5 -> s12 [label="APP / TO"];
|
||||||
|
s5 -> s1 [label="AL_W / AL_W"];
|
||||||
|
s5 -> s1 [label="AL_F / TO"];
|
||||||
|
s6 -> s6 [label="HELLO / NO_RENEGO"];
|
||||||
|
s6 -> s6 [label="KEX / TO"];
|
||||||
|
s6 -> s1 [label="CIPH / INT_ERR"];
|
||||||
|
s6 -> s6 [label="FIN / TO"];
|
||||||
|
s6 -> s11 [label="APP / APP"];
|
||||||
|
s6 -> s1 [label="AL_W / AL_W"];
|
||||||
|
s6 -> s1 [label="AL_F / TO"];
|
||||||
|
s7 -> s7 [label="HELLO / TO"];
|
||||||
|
s7 -> s7 [label="KEX / TO"];
|
||||||
|
s7 -> s1 [label="CIPH / TO"];
|
||||||
|
s7 -> s7 [label="FIN / TO"];
|
||||||
|
s7 -> s7 [label="APP / TO"];
|
||||||
|
s7 -> s2 [label="AL_W / AL_W"];
|
||||||
|
s7 -> s2 [label="AL_F / TO"];
|
||||||
|
s8 -> s8 [label="HELLO / TO"];
|
||||||
|
s8 -> s9 [label="KEX / TO"];
|
||||||
|
s8 -> s10 [label="CIPH / TO"];
|
||||||
|
s8 -> s9 [label="FIN / TO"];
|
||||||
|
s8 -> s8 [label="APP / TO"];
|
||||||
|
s8 -> s2 [label="AL_W / AL_W"];
|
||||||
|
s8 -> s2 [label="AL_F / TO"];
|
||||||
|
s9 -> s9 [label="HELLO / TO"];
|
||||||
|
s9 -> s9 [label="KEX / TO"];
|
||||||
|
s9 -> s1 [label="CIPH / HANDSHAKE_FAIL"];
|
||||||
|
s9 -> s9 [label="FIN / TO"];
|
||||||
|
s9 -> s9 [label="APP / TO"];
|
||||||
|
s9 -> s2 [label="AL_W / AL_W"];
|
||||||
|
s9 -> s2 [label="AL_F / TO"];
|
||||||
|
s10 -> s1 [label="HELLO / INT_ERR"];
|
||||||
|
s10 -> s10 [label="KEX / TO"];
|
||||||
|
s10 -> s1 [label="CIPH / INT_ERR"];
|
||||||
|
s10 -> s10 [label="FIN / TO"];
|
||||||
|
s10 -> s10 [label="APP / TO"];
|
||||||
|
s10 -> s1 [label="AL_W / AL_W"];
|
||||||
|
s10 -> s1 [label="AL_F / TO"];
|
||||||
|
s11 -> s11 [label="HELLO / NO_RENEGO"];
|
||||||
|
s11 -> s11 [label="KEX / TO"];
|
||||||
|
s11 -> s1 [label="CIPH / TO"];
|
||||||
|
s11 -> s11 [label="FIN / TO"];
|
||||||
|
s11 -> s11 [label="APP / APP"];
|
||||||
|
s11 -> s1 [label="AL_W / AL_W"];
|
||||||
|
s11 -> s1 [label="AL_F / TO"];
|
||||||
|
s12 -> s1 [label="HELLO / INT_ERR"];
|
||||||
|
s12 -> s1 [label="KEX / INT_ERR"];
|
||||||
|
s12 -> s1 [label="CIPH / INT_ERR"];
|
||||||
|
s12 -> s11 [label="FIN / CIPH,FIN,APP"];
|
||||||
|
s12 -> s12 [label="APP / TO"];
|
||||||
|
s12 -> s1 [label="AL_W / AL_W"];
|
||||||
|
s12 -> s1 [label="AL_F / TO"];
|
||||||
|
|
||||||
|
__start0 [label="" shape="none" width="0" height="0"];
|
||||||
|
__start0 -> s0;
|
||||||
|
|
||||||
|
}
|
BIN
fsms/scandium_latest_psk.png
Normal file
BIN
fsms/scandium_latest_psk.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 386 KiB |
280
index.html
Normal file
280
index.html
Normal file
|
@ -0,0 +1,280 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<body style="background:#fab;">
|
||||||
|
<div id="container" style="margin:auto;width:700px;background:#fff"></div>
|
||||||
|
<form style="margin:auto;width:700px;background:#eee;">distance: <input type="range" min="1" max="300" value="150" class="slider" id="distance">
|
||||||
|
<p>Bovenaan staat de begintoestand. Onderaan een sink-toestand. Lijnen van een toestand naar zichzelf kunnen niet getekend worden. Geel en blauw zijn voor de twee modellen. Toestanden die vergelijkbaar zijn worden vanzelf groen. Je kunt punten verslepen, daarna staan ze vast. Nog eens klikken en zo komen weer los. Dit maakt gebruikt van <a href="https://d3js.org">d3.js</a> met de "force-directed graph layout", het werkt eigenlijk niet zo heel goed voor dit soort modellen. <a href="https://git.cs.ou.nl/joshua.moerman/fsm-diff-vis/">Source</a>.</p>
|
||||||
|
</form>
|
||||||
|
<script src="d3.v7.min.js"></script>
|
||||||
|
<script type="module">
|
||||||
|
|
||||||
|
// De twee modellen van DTLS zetten we direct hier neer. Deze transities komen
|
||||||
|
// direct uit de .dot file. Het meeste hier is hard-coded.
|
||||||
|
const alphabet = ["HELLO", "KEX", "CIPH", "FIN", "APP", "AL_W", "AL_F"];
|
||||||
|
|
||||||
|
const states1 = ["s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12"];
|
||||||
|
const transitions1 = [["s0", "s2", "HELLO", "HELLO_VERIFY_REQUEST"], ["s0", "s0", "KEX", "TO"], ["s0", "s1", "CIPH", "TO"], ["s0", "s0", "FIN", "TO"], ["s0", "s0", "APP", "TO"], ["s0", "s0", "AL_W", "TO"], ["s0", "s0", "AL_F", "TO"], ["s1", "s1", "HELLO", "TO"], ["s1", "s1", "KEX", "TO"], ["s1", "s1", "CIPH", "TO"], ["s1", "s1", "FIN", "TO"], ["s1", "s1", "APP", "TO"], ["s1", "s1", "AL_W", "TO"], ["s1", "s1", "AL_F", "TO"], ["s2", "s3", "HELLO", "SER_HELLO_DONE"], ["s2", "s2", "KEX", "TO"], ["s2", "s1", "CIPH", "TO"], ["s2", "s2", "FIN", "TO"], ["s2", "s2", "APP", "TO"], ["s2", "s2", "AL_W", "TO"], ["s2", "s2", "AL_F", "TO"], ["s3", "s7", "HELLO", "TO"], ["s3", "s4", "KEX", "TO"], ["s3", "s1", "CIPH", "TO"], ["s3", "s2", "FIN", "INT_ERR"], ["s3", "s3", "APP", "TO"], ["s3", "s2", "AL_W", "AL_W"], ["s3", "s2", "AL_F", "TO"], ["s4", "s8", "HELLO", "TO"], ["s4", "s2", "KEX", "INT_ERR"], ["s4", "s5", "CIPH", "TO"], ["s4", "s2", "FIN", "INT_ERR"], ["s4", "s4", "APP", "TO"], ["s4", "s2", "AL_W", "AL_W"], ["s4", "s2", "AL_F", "TO"], ["s5", "s1", "HELLO", "INT_ERR"], ["s5", "s1", "KEX", "INT_ERR"], ["s5", "s1", "CIPH", "INT_ERR"], ["s5", "s6", "FIN", "CIPH,FIN"], ["s5", "s12", "APP", "TO"], ["s5", "s1", "AL_W", "AL_W"], ["s5", "s1", "AL_F", "TO"], ["s6", "s6", "HELLO", "NO_RENEGO"], ["s6", "s6", "KEX", "TO"], ["s6", "s1", "CIPH", "INT_ERR"], ["s6", "s6", "FIN", "TO"], ["s6", "s11", "APP", "APP"], ["s6", "s1", "AL_W", "AL_W"], ["s6", "s1", "AL_F", "TO"], ["s7", "s7", "HELLO", "TO"], ["s7", "s7", "KEX", "TO"], ["s7", "s1", "CIPH", "TO"], ["s7", "s7", "FIN", "TO"], ["s7", "s7", "APP", "TO"], ["s7", "s2", "AL_W", "AL_W"], ["s7", "s2", "AL_F", "TO"], ["s8", "s8", "HELLO", "TO"], ["s8", "s9", "KEX", "TO"], ["s8", "s10", "CIPH", "TO"], ["s8", "s9", "FIN", "TO"], ["s8", "s8", "APP", "TO"], ["s8", "s2", "AL_W", "AL_W"], ["s8", "s2", "AL_F", "TO"], ["s9", "s9", "HELLO", "TO"], ["s9", "s9", "KEX", "TO"], ["s9", "s1", "CIPH", "HANDSHAKE_FAIL"], ["s9", "s9", "FIN", "TO"], ["s9", "s9", "APP", "TO"], ["s9", "s2", "AL_W", "AL_W"], ["s9", "s2", "AL_F", "TO"], ["s10", "s1", "HELLO", "INT_ERR"], ["s10", "s10", "KEX", "TO"], ["s10", "s1", "CIPH", "INT_ERR"], ["s10", "s10", "FIN", "TO"], ["s10", "s10", "APP", "TO"], ["s10", "s1", "AL_W", "AL_W"], ["s10", "s1", "AL_F", "TO"], ["s11", "s11", "HELLO", "NO_RENEGO"], ["s11", "s11", "KEX", "TO"], ["s11", "s1", "CIPH", "TO"], ["s11", "s11", "FIN", "TO"], ["s11", "s11", "APP", "APP"], ["s11", "s1", "AL_W", "AL_W"], ["s11", "s1", "AL_F", "TO"], ["s12", "s1", "HELLO", "INT_ERR"], ["s12", "s1", "KEX", "INT_ERR"], ["s12", "s1", "CIPH", "INT_ERR"], ["s12", "s11", "FIN", "CIPH,FIN,APP"], ["s12", "s12", "APP", "TO"], ["s12", "s1", "AL_W", "AL_W"], ["s12", "s1", "AL_F", "TO"]];
|
||||||
|
|
||||||
|
const states2 = ["s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15"];
|
||||||
|
const transitions2 = [["s0", "s2", "HELLO", "HELLO_VERIFY_REQUEST"], ["s0", "s0", "KEX", "TO"], ["s0", "s1", "CIPH", "TO"], ["s0", "s0", "FIN", "TO"], ["s0", "s0", "APP", "TO"], ["s0", "s0", "AL_W", "TO"], ["s0", "s0", "AL_F", "TO"], ["s1", "s1", "HELLO", "TO"], ["s1", "s1", "KEX", "TO"], ["s1", "s1", "CIPH", "TO"], ["s1", "s1", "FIN", "TO"], ["s1", "s1", "APP", "TO"], ["s1", "s1", "AL_W", "TO"], ["s1", "s1", "AL_F", "TO"], ["s2", "s3", "HELLO", "SER_HELLO_DONE"], ["s2", "s2", "KEX", "TO"], ["s2", "s1", "CIPH", "TO"], ["s2", "s2", "FIN", "TO"], ["s2", "s2", "APP", "TO"], ["s2", "s2", "AL_W", "TO"], ["s2", "s2", "AL_F", "TO"], ["s3", "s3", "HELLO", "SER_HELLO_DONE"], ["s3", "s4", "KEX", "TO"], ["s3", "s1", "CIPH", "TO"], ["s3", "s2", "FIN", "INT_ERR"], ["s3", "s3", "APP", "TO"], ["s3", "s2", "AL_W", "AL_W"], ["s3", "s2", "AL_F", "TO"], ["s4", "s8", "HELLO", "SER_HELLO_DONE"], ["s4", "s2", "KEX", "INT_ERR"], ["s4", "s6", "CIPH", "TO"], ["s4", "s12", "FIN", "CIPH,FIN"], ["s4", "s5", "APP", "TO"], ["s4", "s2", "AL_W", "AL_W"], ["s4", "s2", "AL_F", "TO"], ["s5", "s14", "HELLO", "SER_HELLO_DONE"], ["s5", "s2", "KEX", "INT_ERR"], ["s5", "s6", "CIPH", "TO"], ["s5", "s9", "FIN", "CIPH,FIN,APP"], ["s5", "s5", "APP", "TO"], ["s5", "s2", "AL_W", "AL_W"], ["s5", "s2", "AL_F", "TO"], ["s6", "s1", "HELLO", "INT_ERR"], ["s6", "s1", "KEX", "INT_ERR"], ["s6", "s6", "CIPH", "TO"], ["s6", "s7", "FIN", "CIPH,FIN"], ["s6", "s13", "APP", "TO"], ["s6", "s1", "AL_W", "AL_W"], ["s6", "s1", "AL_F", "TO"], ["s7", "s7", "HELLO", "NO_RENEGO"], ["s7", "s7", "KEX", "TO"], ["s7", "s1", "CIPH", "CIPH,FIN"], ["s7", "s7", "FIN", "TO"], ["s7", "s10", "APP", "APP"], ["s7", "s1", "AL_W", "AL_W"], ["s7", "s1", "AL_F", "TO"], ["s8", "s8", "HELLO", "SER_HELLO_DONE"], ["s8", "s4", "KEX", "TO"], ["s8", "s11", "CIPH", "TO"], ["s8", "s2", "FIN", "INT_ERR"], ["s8", "s14", "APP", "TO"], ["s8", "s2", "AL_W", "AL_W"], ["s8", "s2", "AL_F", "TO"], ["s9", "s9", "HELLO", "TO"], ["s9", "s9", "KEX", "TO"], ["s9", "s1", "CIPH", "TO"], ["s9", "s9", "FIN", "TO"], ["s9", "s9", "APP", "APP"], ["s9", "s2", "AL_W", "AL_W"], ["s9", "s2", "AL_F", "TO"], ["s10", "s10", "HELLO", "NO_RENEGO"], ["s10", "s10", "KEX", "TO"], ["s10", "s1", "CIPH", "TO"], ["s10", "s10", "FIN", "TO"], ["s10", "s10", "APP", "APP"], ["s10", "s1", "AL_W", "AL_W"], ["s10", "s1", "AL_F", "TO"], ["s11", "s1", "HELLO", "INT_ERR"], ["s11", "s6", "KEX", "TO"], ["s11", "s11", "CIPH", "TO"], ["s11", "s1", "FIN", "INT_ERR"], ["s11", "s15", "APP", "TO"], ["s11", "s1", "AL_W", "AL_W"], ["s11", "s1", "AL_F", "TO"], ["s12", "s12", "HELLO", "TO"], ["s12", "s12", "KEX", "TO"], ["s12", "s1", "CIPH", "CIPH,FIN"], ["s12", "s12", "FIN", "TO"], ["s12", "s9", "APP", "APP"], ["s12", "s2", "AL_W", "AL_W"], ["s12", "s2", "AL_F", "TO"], ["s13", "s1", "HELLO", "INT_ERR"], ["s13", "s1", "KEX", "INT_ERR"], ["s13", "s6", "CIPH", "TO"], ["s13", "s10", "FIN", "CIPH,FIN,APP"], ["s13", "s13", "APP", "TO"], ["s13", "s1", "AL_W", "AL_W"], ["s13", "s1", "AL_F", "TO"], ["s14", "s14", "HELLO", "SER_HELLO_DONE"], ["s14", "s5", "KEX", "TO"], ["s14", "s11", "CIPH", "TO"], ["s14", "s2", "FIN", "INT_ERR"], ["s14", "s14", "APP", "TO"], ["s14", "s2", "AL_W", "AL_W"], ["s14", "s2", "AL_F", "TO"], ["s15", "s1", "HELLO", "INT_ERR"], ["s15", "s13", "KEX", "TO"], ["s15", "s11", "CIPH", "TO"], ["s15", "s1", "FIN", "INT_ERR"], ["s15", "s15", "APP", "TO"], ["s15", "s1", "AL_W", "AL_W"], ["s15", "s1", "AL_F", "TO"]];
|
||||||
|
|
||||||
|
// We zetten ze om in een meer functionele data structuur, zodat we voor elke
|
||||||
|
// state en input de transitie kunnen opvragen. De prefix gebruik ik zodat de
|
||||||
|
// states van elk model een andere naam heeft.
|
||||||
|
function toModel(alphabet, states, transitions, prefix) {
|
||||||
|
// Ik gebruik een object als Map data structuur. Geen idee of dit normaal is
|
||||||
|
// in javascript, maar het werkt. Ik geloof dat de keys altijd worden omgezet
|
||||||
|
// naar een string. Dat is prima hier.
|
||||||
|
const transitionMap = {}
|
||||||
|
transitions.forEach(([s, t, i, o]) => {
|
||||||
|
transitionMap[[prefix + s, i]] = [o, prefix + t];
|
||||||
|
});
|
||||||
|
|
||||||
|
function behaviour(state, input) {
|
||||||
|
return transitionMap[[state, input]];
|
||||||
|
}
|
||||||
|
|
||||||
|
// We voegen nog een aantal dingen toe aan de functie. Dat kan gewoon in
|
||||||
|
// javascript!
|
||||||
|
behaviour.alphabet = alphabet;
|
||||||
|
behaviour.states = states.map(s => prefix + s);
|
||||||
|
behaviour.initial_state = prefix + states[0];
|
||||||
|
behaviour.id = prefix;
|
||||||
|
|
||||||
|
return behaviour;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hier zijn dan uiteindelijk de modellen, hernoemd met m1 en m2.
|
||||||
|
const model1 = toModel(alphabet, states1, transitions1, "m1");
|
||||||
|
const model2 = toModel(alphabet, states2, transitions2, "m2");
|
||||||
|
|
||||||
|
// Met de hand uitgerekend. Momenteel krijgen deze nodes een sterke
|
||||||
|
// aantrekkingskracht, maar dat werkt eigenlijk niet zo lekker. Dus ik denk
|
||||||
|
// dat het beter is zulke nodes echt te mergen. (Of de "forceManyBodies" te
|
||||||
|
// verfijnen.)
|
||||||
|
const exact_bisimulation = [{source: "m1s1", target: "m2s1"}, {source: "m1s10", target: "m2s10"}];
|
||||||
|
|
||||||
|
// BFS vanuit de begintoestanden. De zoek stops als er een fout wordt gevonden.
|
||||||
|
const approx_bisim = (() => {
|
||||||
|
const queue = [[model1.initial_state, model2.initial_state]];
|
||||||
|
const matched = []
|
||||||
|
const visited = new Set();
|
||||||
|
|
||||||
|
while(queue.length > 0) {
|
||||||
|
const [s1, s2] = queue[0];
|
||||||
|
queue.shift(0);
|
||||||
|
|
||||||
|
if (visited.has(s1) || visited.has(s2)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
visited.add(s1);
|
||||||
|
visited.add(s2);
|
||||||
|
matched.push({source: s1, target: s2});
|
||||||
|
|
||||||
|
alphabet.forEach(i => {
|
||||||
|
const [o1, t1] = model1(s1, i);
|
||||||
|
const [o2, t2] = model2 (s2, i);
|
||||||
|
|
||||||
|
if (o1 == o2) {
|
||||||
|
queue.push([t1, t2]);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return matched;
|
||||||
|
})();
|
||||||
|
|
||||||
|
// We doen net alsof dit een bisimulation is
|
||||||
|
const bisimulation = exact_bisimulation.concat(approx_bisim);
|
||||||
|
|
||||||
|
// Punten die gematched zijn, behandelen we anders, dus we willen weten welke
|
||||||
|
// dat zijn.
|
||||||
|
const matched = new Set();
|
||||||
|
bisimulation.forEach(l => {
|
||||||
|
matched.add(l.source);
|
||||||
|
matched.add(l.target);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Hier gaan we de graaf maken, we zetten gewoon alles in 1 graaf en doen
|
||||||
|
// niks ingewikkelds.
|
||||||
|
const data = (() => {
|
||||||
|
const models = [model1, model2];
|
||||||
|
|
||||||
|
const nodes = [];
|
||||||
|
const links = [];
|
||||||
|
const linksAdded = new Set();
|
||||||
|
|
||||||
|
models.forEach(m => {
|
||||||
|
m.states.forEach(s => {
|
||||||
|
nodes.push({id: s, model_id: m.id});
|
||||||
|
m.alphabet.forEach(i => {
|
||||||
|
const [o, t] = m(s, i);
|
||||||
|
if (s != t && !linksAdded.has([s, t].toString()) && !linksAdded.has([t, s].toString())) {
|
||||||
|
links.push({source: s, target: t, model_id: m.id});
|
||||||
|
linksAdded.add([s, t].toString());
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
console.log(links);
|
||||||
|
|
||||||
|
return {nodes, links};
|
||||||
|
})();
|
||||||
|
|
||||||
|
const chart = (() => {
|
||||||
|
const width = 700;
|
||||||
|
const height = 700;
|
||||||
|
const heightMargin = 300;
|
||||||
|
|
||||||
|
const links = data.links.map(d => Object.create(d));
|
||||||
|
const links_bisim = bisimulation.map(d => Object.create(d));
|
||||||
|
const nodes = data.nodes.map(d => Object.create(d));
|
||||||
|
|
||||||
|
// begin en "eind"-toestand van model 1
|
||||||
|
nodes[0].fy = -heightMargin;
|
||||||
|
nodes[1].fy = heightMargin;
|
||||||
|
|
||||||
|
// begin en "eind"-toestand van model 1
|
||||||
|
nodes[13].fy = -heightMargin;
|
||||||
|
nodes[14].fy = heightMargin;
|
||||||
|
|
||||||
|
function extraForces () {
|
||||||
|
var nodes = null;
|
||||||
|
|
||||||
|
function force(alpha){
|
||||||
|
for (let i = 0, n = nodes.length; i < n; ++i) {
|
||||||
|
var node = nodes[i];
|
||||||
|
// we zorgen dat nodes niet boven en onder verdwijnen
|
||||||
|
if (node.y > heightMargin) {
|
||||||
|
node.vy -= alpha * (node.y - heightMargin)
|
||||||
|
}
|
||||||
|
if (node.y < -heightMargin) {
|
||||||
|
node.vy -= alpha * (node.y + heightMargin)
|
||||||
|
}
|
||||||
|
// En ik wil het ene model links en het ander model rechts. We slaan
|
||||||
|
// nodes over die gematched zijn.
|
||||||
|
if (!matched.has(node.id)){
|
||||||
|
if (node.model_id == "m1") {
|
||||||
|
node.vx += 5 * alpha;
|
||||||
|
} else {
|
||||||
|
node.vx -= 5 * alpha;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Voor state s2 een extra foce die m wat omhoog duwt. Dit is
|
||||||
|
// natuurlijk een hack.
|
||||||
|
if (node.id == "m1s2" || node.id == "m2s2") {
|
||||||
|
node.vy -= 40 * alpha;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
force.initialize = function(_) { nodes = _; };
|
||||||
|
|
||||||
|
return force;
|
||||||
|
}
|
||||||
|
|
||||||
|
const simulation = d3.forceSimulation(nodes)
|
||||||
|
// Er is een kracht die alle nodes uit elkaar duwt.
|
||||||
|
.force("charge", d3.forceManyBody().distanceMin(8))
|
||||||
|
// Er is een kracht die edges kort houdt (vaste afstand, niet zo handig)
|
||||||
|
.force("link", d3.forceLink(links).id(d => d.id).strength(0.2).distance(150))
|
||||||
|
// Vergelijkbare nodes hebben afstand 0
|
||||||
|
.force("link_bisim", d3.forceLink(links_bisim).id(d => d.id).strength(2).distance(0).iterations(3))
|
||||||
|
// En ik heb nog wat extra dingen toegevoegd
|
||||||
|
.force("extra", extraForces());
|
||||||
|
|
||||||
|
// SVG container
|
||||||
|
const svg = d3.create("svg")
|
||||||
|
.attr("width", width)
|
||||||
|
.attr("height", height)
|
||||||
|
.attr("viewBox", [-width / 2, -height / 2, width, height])
|
||||||
|
.attr("style", "max-width: 100%; height: auto;");
|
||||||
|
|
||||||
|
// een groep voor alle lijnen
|
||||||
|
const link = svg.append("g")
|
||||||
|
.selectAll("line")
|
||||||
|
.data(links)
|
||||||
|
.join("line")
|
||||||
|
.attr("stroke-width", 3);
|
||||||
|
|
||||||
|
// een groep voor alle punten
|
||||||
|
const node = svg.append("g")
|
||||||
|
.attr("style", "isolation: isolate;")
|
||||||
|
.attr("stroke", "#fff")
|
||||||
|
.selectAll("circle")
|
||||||
|
.data(nodes)
|
||||||
|
.join("circle")
|
||||||
|
.attr("style", "mix-blend-mode: multiply")
|
||||||
|
.attr("r", 10);
|
||||||
|
|
||||||
|
// Elke tick moeten we de posities updaten van punten en lijnen
|
||||||
|
simulation.on("tick", () => {
|
||||||
|
link.attr("x1", d => d.source.x)
|
||||||
|
.attr("y1", d => d.source.y)
|
||||||
|
.attr("x2", d => d.target.x)
|
||||||
|
.attr("y2", d => d.target.y)
|
||||||
|
.attr("stroke", d => d.model_id == "m1" ? "#0aa4" : "#aa04");
|
||||||
|
|
||||||
|
node.attr("cx", d => d.x)
|
||||||
|
.attr("cy", d => d.y)
|
||||||
|
.attr("fill", d => d.model_id == "m1" ? "#0ee" : "#ee0")
|
||||||
|
.attr("stroke", d => d.fy == null ? "#fff" : "#000");
|
||||||
|
});
|
||||||
|
|
||||||
|
// Interactie moet de punten
|
||||||
|
const drag = d3.drag()
|
||||||
|
.on("start", dragstarted)
|
||||||
|
.on("drag", dragged)
|
||||||
|
.on("end", dragended);
|
||||||
|
|
||||||
|
node.call(drag).on("click", clickn);
|
||||||
|
|
||||||
|
function dragstarted(event) {
|
||||||
|
if (!event.active) simulation.alphaTarget(0.3).restart();
|
||||||
|
event.subject.fx = event.subject.x;
|
||||||
|
event.subject.fy = event.subject.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
function dragged(event) {
|
||||||
|
event.subject.fx = event.x;
|
||||||
|
event.subject.fy = event.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
function dragended(event) {
|
||||||
|
if (!event.active) simulation.alphaTarget(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
function clickn(event, d) {
|
||||||
|
delete d.fx;
|
||||||
|
delete d.fy;
|
||||||
|
simulation.restart();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deze dingen hebben we buiten de block scope nog nodig.
|
||||||
|
return {
|
||||||
|
node: svg.node(),
|
||||||
|
simulation: simulation,
|
||||||
|
links: links,
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
|
// In de html zetten
|
||||||
|
container.append(chart.node);
|
||||||
|
|
||||||
|
// Slider laten werken.
|
||||||
|
var slider = document.getElementById("distance");
|
||||||
|
|
||||||
|
// on-input is zolang je aan het slepen bent
|
||||||
|
slider.oninput = function() {
|
||||||
|
chart.simulation.force("link", d3.forceLink(chart.links).strength(0.2).distance(this.value));
|
||||||
|
chart.simulation.alphaTarget(0.3).restart();
|
||||||
|
}
|
||||||
|
|
||||||
|
// on-change is daarna
|
||||||
|
slider.onchange = function() {
|
||||||
|
chart.simulation.alphaTarget(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
Loading…
Add table
Reference in a new issue