-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a testgen.p4 file with custom extern definitions such as testgen_…
…assert and testgen_assume. (#4214)
- Loading branch information
Showing
7 changed files
with
23 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#ifndef _TOOLS_TESTGEN_P4_ | ||
#define _TOOLS_TESTGEN_P4_ | ||
|
||
/// Add @param check as a necessary path constraint for all subsequent executions in the program. | ||
/// Enabled by default, unless `--disable-assumption-mode` is toggled. | ||
extern void testgen_assume(in bool assumption); | ||
|
||
/// Add @param check as a necessary path constraint for all subsequent executions in the program. | ||
/// Enabled by default, unless `--disable-assumption-mode` is toggled. | ||
/// If `--assertion-mode` is toggled, P4Testgen will not apply the condition to the path | ||
/// constraints, but instead will try to only generate tests that violate this assumption. | ||
extern void testgen_assert(in bool assumption); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters