UniverseFly / Readings

Reading valuable research ideas while taking notes through GitHub Issues
0 stars 0 forks source link

CCS'20 | Squirrel: Testing Database Management Systems with Language Validity and Coverage Feedback #2

Closed UniverseFly closed 3 years ago

UniverseFly commented 3 years ago

https://changochen.github.io/publication/squirrel_ccs2020.pdf

UniverseFly commented 3 years ago

Motivation

Approach overview

image
UniverseFly commented 3 years ago

Ensure syntax correctness through IR

Usage:

SSA form:

image

Mutation(squirrel strips concrete data before mutation, and only mutates the skeleton, the reason for which would be explained later):

image
UniverseFly commented 3 years ago

Improving semantic correctness

As mentioned in §5, after mutation the IR program is a syntax-correct skeleton with data stripped. Our instantiator first analyzes the dependency be- tween different data, and fill the skeleton with concrete values that satisfy all dependencies. After the instantiation, the query has a high chance to be semantically correct.

By inferring data dependencies [isA/isAnElement] between semantic-binding data from a set of rules following two principles:

Data dependency example:

image

Relation rule: a tuple of (target relation, source relation, relationship, scope)

For example, the relation rule (UseFromTable, UseTableColumn, isAnElement, nearest) means the data of type UseTableColumn is an element of the nearest data within the same statement that has type UseFromTable

With such predefined rules, the data dependency graph can be inferred.

Instantiation: fill those syntax correct generated skeletons and try to get a semantic correct one. (given the constructed dependency graph as input)

image

The algorithm (Definition means CreateXXX and Use means UseXXX; a node having a parent means it in the graph has a directed link pointing to some node, i.e. dependent on that pointed node):

image
UniverseFly commented 3 years ago

The above approach (filling IR skeleton) is called IR instantiation

UniverseFly commented 3 years ago

Implementation

Evaluation

  • Can Sqirrel detect memory errors from real-world production- level DBMSs?
  • Can Sqirrel outperform state-of-the-art testing tools?
  • What are the contributions of language correctness and coverage-based feedback in DBMS testing?

Q1

Q2

Q3