# find use of native modifier in each project
NativePerProject: output sum[string] of int;
visit(input, visitor {
# only look at the latest snapshot
before n: CodeRepository -> {
snapshot := getsnapshot(n);
foreach (i: int; def(snapshot[i]))
visit(snapshot[i]);
stop;
}
before m: Modifier ->
if (m.kind == ModifierKind.OTHER && m.other == "native")
NativePerProject[input.id] << 1;
});