Skip to content

Quantifier sweep: All, Any and Count over captured lists and nullable columns, and compound predicates, held by metamorphic relations #377

Closed

Description

@CaffeinatedCoder

Problem

CapturedCollectionProbeTests sends ranges and value sets as a captured collection through Contains, Any and Count, over required columns, one predicate deep. Nothing checks a quantifier over a nullable column, All, a list holding null, or a compound predicate (P && Q, P || Q and their negations), where EF Core's three-valued compensation acts on the predicate's NULLs.

Change

A sweep, QuantifierProbeTests (integration project, a database of its own), over a nullable range, RangeSet and value set column and captured lists of each (empty, one element, holding null, duplicates, every shape). Its oracles are memory over the loaded rows, and metamorphic relations inside the database that need no memory answer:

  • All(P) equals !Any(x => !P(x));
  • Count(P) == 0 equals !Any(P);
  • Where(P) selects exactly the ids for which Select(P) is true;
  • Where(!(P && Q)) equals Where(!P || !Q), and the same for ||.

Disagreements go through Candidates.Verdict.

Done when

Registered in test/oracles/oracles.json with a seed it is shown to catch; every disagreement is an issue and a candidates.json entry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/range-setRangeSet and multirange algebraarea/rangesRange unions, variants and the shape enginesarea/value-setsValue set families and wrapper aritiespackage/efcoreAffects CodoMetis.ValueRanges.EFCore.PostgreSQLtestsAdds or changes tests only (oracles, harnesses); no library code

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions