Add report_workspace() to Reporter, and remove dead rules from the workspace.

I think the change to `workspace.breakRule()` is harmless. In theory, it
should make Copycat less hesitant to come up with rules that conflict with
the already-broken rule.
This commit is contained in:
Arthur O'Dwyer
2017-05-01 15:28:38 -07:00
parent 25d73785de
commit ecc2c2e407
3 changed files with 8 additions and 3 deletions

View File

@ -837,7 +837,7 @@ def rule_builder(ctx, codelet):
rule.updateStrength()
assert rule.totalStrength
# fight against other rules
if workspace.rule:
if workspace.rule is not None:
assert __structureVsStructure(rule, 1.0, workspace.rule, 1.0)
workspace.buildRule(rule)