Skip to content

Latest commit

 

History

History
12 lines (11 loc) · 528 Bytes

File metadata and controls

12 lines (11 loc) · 528 Bytes

Definition

Using a grammar for a text input to generate valid random inputs.

Taking some grammar:

Expr ::= Number | Expr Expr Op
Op   ::= '+' | '-' | '*' | '/'
Number ::= <32-bit signed integer>

Then randomly traversing the grammar from a start symbol:

  • Randomly pick the non-terminal symbol and jump to its production rule.
  • We need to consider the distribution of outputs (e.g. with integers, to bias towards edge values? To bias towards complexity rather than simple/shallow trees?) (See [[Swarm Testing]])