Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smatch (still) yields scores above 100% #28

Closed
ramon-astudillo opened this issue Apr 1, 2020 · 2 comments
Closed

Smatch (still) yields scores above 100% #28

ramon-astudillo opened this issue Apr 1, 2020 · 2 comments

Comments

@ramon-astudillo
Copy link
Contributor

This seems like a bug similar to the solved

#15

which can cause Smatch scores to be artificially high by double counting edges and eventually reach values above 100%. The only way of knowing if a Smatch score below 100% is real or suffers from this bug is computing the Smatch of a file with itself (henceforce self-Smatch).

An example

# ::tok Uh ... Do you have legislative power or enforcement power ? <ROOT>
(h / have-03
      :ARG0 (y / you)
      :ARG1 (o / or
            :op1 (p / power
                  :instrument-of (l / legislate-01))
            :op2 (p2 / power
                  :instrument-of (e / enforce-01)))
      :mod (u / uh
            :mode expressive)
      :mode interrogative)

has the expected self-Smatch of 100%, while

# ::tok Uh ... Do you have legislative power or enforcement power ? <ROOT>
(h / have-03
      :ARG0 (y / you)
      :ARG1 (o / or
            :op1 (p / power
                  :instrument-of (l / legislate-01))
            :op2 (p2 / power
                  :instrument-of (e / enforce-01)))
      :mod (u / uh
            :mode expressive)
      :mode interrogative
      :mode interrogative)

has self-Smatch 110.5% due to the repeated :mode interrogative. The score can grow ad-infinitum just by repeating further.

@goodmami
Copy link
Contributor

goodmami commented Apr 2, 2020

This is a duplicate of #15, which is not actually "solved" (you may have seen the red "closed" graphic at the bottom of the issue, but note that that is for a linked issue in mtool and not for smatch).

But you're right that this is a real issue that needs to be addressed. I suggest closing this issue and continuing the conversation at #15.

@ramon-astudillo
Copy link
Contributor Author

thanks moving discussion to #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants