createWithPointsTo static method

InMemoryDatalogEngine createWithPointsTo()

Creates an engine with full points-to-based taint tracking.

Includes heap-sensitive taint propagation through field accesses. Requires points-to facts (VarPointsTo) for field tracking.

Implementation

static InMemoryDatalogEngine createWithPointsTo() {
  final engine = InMemoryDatalogEngine();

  // Points-to analysis (stratum 0)
  engine.addRule(AllocRule());
  engine.addRule(CopyRule());
  engine.addRule(StoreFieldRule());
  engine.addRule(LoadFieldRule());

  // Taint tracking (stratum 0, runs in parallel with points-to)
  engine.addRule(TaintSourceRule());
  engine.addRule(TaintPropagationRule());
  engine.addRule(TaintStoreFieldRule());
  engine.addRule(TaintLoadFieldRule());
  engine.addRule(TaintViolationRule());

  return engine;
}