https://github.com/valinet/ssa
ssa (String Search Algorithms) is a homework I had for my Algorithms Analysis course during my 2nd year in uni.
https://github.com/valinet/ssa
Last synced: 28 days ago
JSON representation
ssa (String Search Algorithms) is a homework I had for my Algorithms Analysis course during my 2nd year in uni.
- Host: GitHub
- URL: https://github.com/valinet/ssa
- Owner: valinet
- License: mit
- Created: 2020-09-28T22:24:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-28T22:58:28.000Z (over 5 years ago)
- Last Synced: 2025-02-26T02:30:30.155Z (over 1 year ago)
- Language: C
- Size: 4.46 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ssa
ssa (String Search Algorithms) implements various substring search algorithms; I chose to do it in C and x86 (IA-32) assembly, in order to do comparisons between the two implementations, and also across the different algorithms.
The algorithms contained are:
* Knuth-Morris-Pratt (KMP)
* Rabin-Karp (RK)
* Aho-Corasick (AC)
At the moment, it compiles as is in a Linux environment. Available options are:
* Navigate to a folder containing an algorithm (for e.g., cd KMP)
* 'make all' will compile/assemble & link everything
* 'make runc' compiles and runs the C variant of the algorithm
* 'make runasm' assembles and runs the x86 Intel-flavored nasm assembly version of the algorithm
* 'make clean' cleans off binaries generated by the above commands
The makefile is set to compile the code as 32-bit, in order to do a fair comparison against the assembly version (install gcc-multilib for compiling x86 C, and nasm for assembling).
More documentation is available at "docs/Raport.pdf" (in Romanian).
Example of invoking the resulting executables: `echo Hello world | KMP/c/kmp ll` (will highlight *ll* in *Hello world*).
The work is compatible with the Aho-Corasick problem on Infoarena: https://www.infoarena.ro/problema/ahocorasick.
The implementation has been coded as homework for my Algorithms Analysis course during my 2nd year as bachelor, Faculty of Automatic Control and Computer Science, University POLITEHNICA of Bucharest.