From 808afb253330ee71b7c119a559e06a9055bbb50e Mon Sep 17 00:00:00 2001 From: Francesco Bertolaccini Date: Fri, 22 Nov 2024 10:38:29 +0100 Subject: [PATCH] pr: Rename `detect-parsers` to `vast-detect-parsers`. --- docs/Tools/{detect-parsers.md => vast-detect-parsers.md} | 4 ++-- test/CMakeLists.txt | 2 +- test/lit.cfg.py | 2 +- test/parsers/rle-a.c | 2 +- tools/CMakeLists.txt | 2 +- tools/{detect-parsers => vast-detect-parsers}/CMakeLists.txt | 2 +- .../ParserSourceDetector.cpp | 0 tools/{detect-parsers => vast-detect-parsers}/SarifPasses.hpp | 0 tools/{detect-parsers => vast-detect-parsers}/main.cpp | 2 +- www/mkdocs.yml | 2 +- 10 files changed, 9 insertions(+), 9 deletions(-) rename docs/Tools/{detect-parsers.md => vast-detect-parsers.md} (73%) rename tools/{detect-parsers => vast-detect-parsers}/CMakeLists.txt (66%) rename tools/{detect-parsers => vast-detect-parsers}/ParserSourceDetector.cpp (100%) rename tools/{detect-parsers => vast-detect-parsers}/SarifPasses.hpp (100%) rename tools/{detect-parsers => vast-detect-parsers}/main.cpp (97%) diff --git a/docs/Tools/detect-parsers.md b/docs/Tools/vast-detect-parsers.md similarity index 73% rename from docs/Tools/detect-parsers.md rename to docs/Tools/vast-detect-parsers.md index 4f33edfa26..0285544f9b 100644 --- a/docs/Tools/detect-parsers.md +++ b/docs/Tools/vast-detect-parsers.md @@ -2,10 +2,10 @@ The VAST parser detection leverages a dialect-based approach, where program data manipulation is abstracted and reduced to a parser dialect. This results in an MLIR representation that combines control-flow constructs with parser-specific operations. -To generate this representation, we provide the `detect-parsers` tool—a customized version of `mlir-opt` that converts VAST dialects into the parser dialect. +To generate this representation, we provide the `vast-detect-parsers` tool—a customized version of `mlir-opt` that converts VAST dialects into the parser dialect. To use the tool, simply run: ```bash -detect-parsers -vast-hl-to-parser +vast-detect-parsers -vast-hl-to-parser ``` Parser conversion can be enhanced with the use of function models, which specify how functions in programs should be interpreted. A default set of models is provided in `Conversion/Parser/default-parsers-config.yaml`. Additional configurations can be supplied via a pass parameter. diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b860e01453..dc66064a96 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -11,7 +11,7 @@ set(VAST_TEST_DEPENDS vast-query vast-opt vast-front - detect-parsers + vast-detect-parsers ) add_lit_testsuite(check-vast "Running the VAST regression tests" diff --git a/test/lit.cfg.py b/test/lit.cfg.py index 15d578e7d4..df5e3af7ed 100644 --- a/test/lit.cfg.py +++ b/test/lit.cfg.py @@ -64,7 +64,7 @@ "-nostdsysteminc" ] ), - ToolSubst('%detect-parsers', command = 'detect-parsers'), + ToolSubst('%vast-detect-parsers', command = 'vast-detect-parsers'), ToolSubst('%file-check', command = 'FileCheck'), ToolSubst('%cc', command = config.host_cc) ] diff --git a/test/parsers/rle-a.c b/test/parsers/rle-a.c index 9eb7a9be37..c3ddcd1426 100644 --- a/test/parsers/rle-a.c +++ b/test/parsers/rle-a.c @@ -1,5 +1,5 @@ // RUN: %vast-front -vast-emit-mlir=hl %s -o - | %file-check %s -check-prefix=HL -// RUN: %vast-front -vast-show-locs -vast-loc-attrs -vast-emit-mlir=hl %s -o - | %detect-parsers -vast-hl-to-parser -parser-source-to-sarif=output=/dev/stdout -o /dev/null | %file-check %s -check-prefix=SARIF +// RUN: %vast-front -vast-show-locs -vast-loc-attrs -vast-emit-mlir=hl %s -o - | %vast-detect-parsers -vast-hl-to-parser -parser-source-to-sarif=output=/dev/stdout -o /dev/null | %file-check %s -check-prefix=SARIF // REQUIRES: sarif #include diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 757044f5a1..5e9356a6b6 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -add_subdirectory(detect-parsers) +add_subdirectory(vast-detect-parsers) add_subdirectory(vast-front) add_subdirectory(vast-opt) add_subdirectory(vast-query) diff --git a/tools/detect-parsers/CMakeLists.txt b/tools/vast-detect-parsers/CMakeLists.txt similarity index 66% rename from tools/detect-parsers/CMakeLists.txt rename to tools/vast-detect-parsers/CMakeLists.txt index 304054c6ec..871b4fd0dc 100644 --- a/tools/detect-parsers/CMakeLists.txt +++ b/tools/vast-detect-parsers/CMakeLists.txt @@ -1,4 +1,4 @@ -add_vast_executable(detect-parsers +add_vast_executable(vast-detect-parsers main.cpp ParserSourceDetector.cpp diff --git a/tools/detect-parsers/ParserSourceDetector.cpp b/tools/vast-detect-parsers/ParserSourceDetector.cpp similarity index 100% rename from tools/detect-parsers/ParserSourceDetector.cpp rename to tools/vast-detect-parsers/ParserSourceDetector.cpp diff --git a/tools/detect-parsers/SarifPasses.hpp b/tools/vast-detect-parsers/SarifPasses.hpp similarity index 100% rename from tools/detect-parsers/SarifPasses.hpp rename to tools/vast-detect-parsers/SarifPasses.hpp diff --git a/tools/detect-parsers/main.cpp b/tools/vast-detect-parsers/main.cpp similarity index 97% rename from tools/detect-parsers/main.cpp rename to tools/vast-detect-parsers/main.cpp index 89440dc85f..6fd1d16b8c 100644 --- a/tools/detect-parsers/main.cpp +++ b/tools/vast-detect-parsers/main.cpp @@ -47,7 +47,7 @@ namespace vast { { .tool{ .driver{ - .name{ "detect-parsers" }, + .name{ "vast-detect-parsers" }, }, }, .results{ results }, diff --git a/www/mkdocs.yml b/www/mkdocs.yml index c84e57aed9..ed3f62817f 100644 --- a/www/mkdocs.yml +++ b/www/mkdocs.yml @@ -24,7 +24,7 @@ nav: - Optimizer: Tools/vast-opt.md - Query: Tools/vast-query.md - REPL: Tools/vast-repl.md - - Detect Parsers: Tools/detect-parsers.md + - Detect Parsers: Tools/vast-detect-parsers.md - Related Projects: Projects/related.md - Benchmarks: - LLVM Single Source: Benchmarks/single-source-results.md