mutilin / klever

Klever Git repository read-only mirror
https://forge.ispras.ru/projects/klever
Apache License 2.0
0 stars 1 forks source link

Extend note/warning considering #31

Closed PavelAndrianov closed 5 years ago

PavelAndrianov commented 5 years ago

Now a test of note/warning may be considered only completely in comparison. There are cases where it is useful to have an ability to consider only location of warning without any description and to consider only a part of description. So, there is a need to extend its comparison.

vmordan commented 5 years ago

Currently such extension leads to problems with performance. If we change comparison function to operate with regexps, than it requires much more time for any comparison. Alternatively regexps can be used as conversion function arguments, but in this case we need to recalculate cache for each new regexp (which is bad for big number of compared traces).

Would it be enough to add some default regexps, which will be applied to all notes/warnings? This extension will not be configurable, but will be much more efficient.

PavelAndrianov commented 5 years ago

Lack of performance is worse than creation of several marks. So, let's perform only those extension, which consume less time. The most use case for me is targeting warning to a special function. As I understand, location of warning is not considered now. Maybe, the extension may be performed totally without regexp, just with adding a warning location to a converted error trace. An improvement may be to use some part of warning description, but I do not know how it can be implemented without regexps. So, let's delay this feature until better times.

vmordan commented 5 years ago

Commits 296e209...633b90aa added option for considering only note/warning location instead of their full description. Since regular expressions are too inefficient, they will not be added. Most likely, creation of several similar marks (if they are really needed), which already have cached results of conversion functions, will require much less time, than creation of one mark with new conversion function arguments.