Database(Iterable<Rule> rules) { for (final rule in rules) { this.rules.putIfAbsent(rule.head.name, () => []).add(rule); } }