Production Rules (Events)
Production rules, called events, are a feature of the test-template language used in an AI-based test-generation application. Events allow the generator to observe the test generation process and automatically insert additional transactions when specified conditions are met.[1]
Definition
An event consists of two parts:
- Condition — a predicate checked during test generation.
- Response template — a template generated when the condition is satisfied.[1]
After each generated transaction, the system checks the conditions of all defined events. If an event condition is satisfied, the event’s response template is generated.[1]
Execution Model
The event mechanism operates during test generation as follows:
- A transaction is generated.
- The conditions of all defined events are evaluated.
- For each satisfied event condition, the corresponding response template is generated.
- The response template typically inserts additional transactions into the test.
- These additional transactions may themselves trigger other events.[1]
This makes events reactive: they monitor the evolving generation process and can augment the test sequence dynamically.
Condition Scope
An event condition may refer to multiple kinds of state, including:
- Processor state, such as the current value of a register.
- Generation state, such as the number and types of transactions generated so far.[1]
This allows events to express both architectural conditions and meta-level conditions about the test being produced.
Role in the AI-Based Generation System
Production rules are one of several AI techniques used by the application. The system also uses:
- An ontology for architectural and expert knowledge.
- Hierarchical expert rules representing beliefs about rule importance.
- Constraint satisfaction problem (CSP) technology as the core solver.
- Production rules/events to observe generation and insert special transactions when conditions apply.[1]
Within this architecture, events provide a procedural-reactive layer over the generated sequence: instead of merely constraining a single transaction, they can affect the surrounding test scenario by injecting new transactions after relevant situations arise.
Event Cascading
Because response templates normally insert additional transactions, and because event conditions are checked after each transaction, an event response may trigger further events.[1] This creates a cascading mechanism in which one detected condition can cause additional generated behavior, which may in turn satisfy other event conditions.
Summary
Production rules, or events, are condition-response constructs in the test-template language. They are checked after every generated transaction and, when satisfied, generate response templates that usually add more transactions to the test. Event conditions can depend on both processor state and generation history, making them useful for dynamically adapting generated tests to the current execution and generation context.[1]
References
[1]: Evidence b35d5537-147a-4ddc-a2b9-24f3aa0debbb.