The EET oracle detects a bug by transforming a query's expressions into semantically equivalent ones and comparing the two result sets. The transformed query is built by randomly applying EET rules, each wrapping a subexpression in a larger but equivalent form. Every such application is one "transformation site". Until now, reduction only shrank the database setup statements. The transformed query itself was left at full size, which is a problem because EET's transformation can lead to very complex queries which bury the real cause of a bug. This PR adds a second reduction stage that shrinks the transformed query, while keeping it equivalent to the original so the oracle stays sound.
To achieve this, the transformed query is re-rendered with only a chosen subset of the transformation sites applied, and this choice is varied using a delta-debugging strategy. This feature required quite a lot of infrastructure in order to keep track of the applied transformations, reproduce them in a deterministic way, and log the reduction process clearly.
Later, this functionality will be extended to the EET DML oracle.
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The EET oracle detects a bug by transforming a query's expressions into semantically equivalent ones and comparing the two result sets. The transformed query is built by randomly applying EET rules, each wrapping a subexpression in a larger but equivalent form. Every such application is one "transformation site". Until now, reduction only shrank the database setup statements. The transformed query itself was left at full size, which is a problem because EET's transformation can lead to very complex queries which bury the real cause of a bug. This PR adds a second reduction stage that shrinks the transformed query, while keeping it equivalent to the original so the oracle stays sound.
To achieve this, the transformed query is re-rendered with only a chosen subset of the transformation sites applied, and this choice is varied using a delta-debugging strategy. This feature required quite a lot of infrastructure in order to keep track of the applied transformations, reproduce them in a deterministic way, and log the reduction process clearly.
Later, this functionality will be extended to the EET DML oracle.