Skip to content

Commit

Permalink
pr: Rename detect-parsers to vast-detect-parsers.
Browse files Browse the repository at this point in the history
  • Loading branch information
frabert committed Nov 22, 2024
1 parent 3ce4f0e commit 1fa0c00
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 <input.mlir>
vast-detect-parsers -vast-hl-to-parser <input.mlir>
```

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.
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
]
Expand Down
2 changes: 1 addition & 1 deletion test/parsers/rle-a.c
Original file line number Diff line number Diff line change
@@ -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 out.mlir -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 out.mlir -o /dev/null | %file-check %s -check-prefix=SARIF

#include <stdio.h>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
add_vast_executable(detect-parsers
add_vast_executable(vast-detect-parsers
main.cpp
ParserSourceDetector.cpp

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace vast {
{
.tool{
.driver{
.name{ "detect-parsers" },
.name{ "vast-detect-parsers" },
},
},
.results{ results },
Expand Down
2 changes: 1 addition & 1 deletion www/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1fa0c00

Please sign in to comment.