Skip to content

Commit

Permalink
Dramatically decrease the probabilities for other statement generatio…
Browse files Browse the repository at this point in the history
…ns in backends/p4tools/modules/smith/common/probabilities.h (this modification should be reverted)
  • Loading branch information
zzmic committed Jul 4, 2024
1 parent 31b3c44 commit a41ffdd
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions backends/p4tools/modules/smith/common/probabilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ static struct Probabilities {
uint16_t ASSIGNMENTORMETHODCALLSTATEMENT_METHOD_BUILT_IN = 1;

// probabilities for statements
uint16_t STATEMENT_SWITCH = 5;
uint16_t STATEMENT_ASSIGNMENTORMETHODCALL = 30;
uint16_t STATEMENT_IF = 3;
uint16_t STATEMENT_RETURN = 2;
uint16_t STATEMENT_SWITCH = 0;
uint16_t STATEMENT_ASSIGNMENTORMETHODCALL = 0;
uint16_t STATEMENT_IF = 0;
uint16_t STATEMENT_RETURN = 0;
uint16_t STATEMENT_EXIT = 0;
uint16_t STATEMENT_BLOCK = 2;
uint16_t STATEMENT_BLOCK = 0;
// Add probabilities for for-loop and for-in-loop statement(s).
// TODO(zzmic): Determine the probability for for-loop and for-in-loop statement(s).
// TODO(zzmic): Dramatically the probability for assignment or method call statement intentionally
// to test out whether for-loop and for-in-loop statement(s) could be generated.
uint16_t STATEMENT_FOR = 29;
uint16_t STATEMENT_FOR_IN = 29;
// Dramatically decrease the probabilities for other statement generations to intentionally
// test out whether for-loop and for-in-loop statement(s) could be generated.
uint16_t STATEMENT_FOR = 50;
uint16_t STATEMENT_FOR_IN = 50;

// probabilities to pick a slice when requesting an lval
uint16_t SCOPE_LVAL_PATH = 90;
Expand Down

0 comments on commit a41ffdd

Please sign in to comment.