Skip to content

dancju/sam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sam

license

This is a tool that converts strings to images of suffix automaton.

It is a pure front-end application, i.e. the server only hosts static assets while all logics are executed on the browser. The process of "from string to automaton" can be split into three steps:

  1. Transforming the string to the corresponding suffix automaton, where the time complexity is a linear function to the length of the string.
  2. Serialising the topological structure of the automaton into DOT format.
  3. Transforming the DFA from DOT to SVG format with the help of Viz.js.

The first two steps were implemented in C++ and compiled into WebAssembly with the help of Emscripten.

License

This repository is distributed under a WTFPL.