ostafen / smart

String Matching Algorithms Research Tool
https://smart-tool.github.io/smart/
GNU General Public License v3.0
4 stars 2 forks source link

Test algos and a lot of refactoring. #36

Closed nishihatapalmer closed 1 year ago

nishihatapalmer commented 1 year ago

This PR adds testing algos, and does a lot of refactoring to separate concerns and re-use functions.

Main changes:

  1. centralized defines in defines.h
  2. moved quite a few functions to utils.h so they can be shared
  3. ensured that all string handling for paths or algo names is buffer-overflow safe.
  4. split out cpu_pinning into its own header with conditional compilation for linux and default code for other platforms.
  5. moved all the command definitions from parser.h into commands.h.
  6. created an algorithms.h header containing functions to manipulate sets of algorithms, re-used in most commands.
  7. added test.h for fixed and random testing of algorithms.
  8. added a new config main command that prints the run-time config of smart out.
  9. Ensured consistent formatting by having warn and info functions for smart console output.
nishihatapalmer commented 1 year ago

And apologies - I did it against master again, instead of develop. Must remember to change that when submitting!!