Softwaretechnik-II/boa/aufgabe_01_a.boa
Jan-Niclas Loosen a20667f720 edit boa task
2025-01-03 21:21:22 +01:00

26 lines
603 B
Plaintext

# Java-Job: 111005
# Python-Job: 111006
# Includes all revisions
p: Project = input;
# Prepare output variables
relative_list: output mean[string] of float;
statement_counter := visitor {
before node: Statement -> {
if(node.kind == StatementKind.TRY or node.kind == StatementKind.WITH)
relative_list[p.name] << 1;
else
relative_list[p.name] << 0;
}
};
visit(p, visitor {
before node: CodeRepository -> {
snapshot := getsnapshot(node);
foreach (i: int; def(snapshot[i]))
visit(snapshot[i], statement_counter);
}
});