coli-saar / alto

Alto, the Algebraic Language Toolkit
Other
16 stars 2 forks source link

getRulesBottomUp in StringAlgebra.CkyAutomaton not restrictive enoug #5

Closed akoehn closed 9 years ago

akoehn commented 9 years ago

Original report by Christoph Teichmann (Bitbucket: cteichmann, GitHub: CTNLP).


When asked for rules bottom up, with a certain label (other than concat), getRulesBottomUp will always return all the rules that read that label. This is independent of the children that where given. This is not in line with the contract of the method, as I understand it. I currently cannot judge how much damage to the whole system would result from fixing this, I will test this later.

As a reminder to myself: hasRuleWithPrefix could also easily be made much more restrictive, without sacrificing efficiency.

akoehn commented 9 years ago

Original comment by Christoph Teichmann (Bitbucket: cteichmann, GitHub: CTNLP).


Made a small change that did not influence any of the test cases. The getRulesBottomUp method now checks if the child array of the request was actually empty, when asked for terminals.

akoehn commented 9 years ago

Original changes by Christoph Teichmann (Bitbucket: cteichmann, GitHub: CTNLP).


changed content from "When asked for rules bottom up, with a certain label (other than concat), getRulesBottomUp will always return all the rules that read that label. This is independent of the children that where given. This is not in line with the contract of the method, a" to "When asked for rules bottom up, with a certain label (other than concat), getRulesBottomUp will always return all the rules that read that label. This is independent of the children that where given. This is not in line with the contract of the method, a"

akoehn commented 9 years ago

Original changes by Christoph Teichmann (Bitbucket: cteichmann, GitHub: CTNLP).


changed state from "new" to "resolved"