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

Add alert for unsupported queries #25

Merged
merged 7 commits into from
Feb 5, 2024
Merged

Add alert for unsupported queries #25

merged 7 commits into from
Feb 5, 2024

Conversation

stilscher
Copy link
Member

@stilscher stilscher commented Jun 20, 2023

This PR contains the handling of the exception that is introduced in goblint/cil#147 (comment). It is used to distinguish between "No results found" and "Query not supported" in the syntactic analysis. In the case the Query is not supported, GobView will, with the changes of this PR display two different alert texts instead of just "No results found" in both cases. This should help to make the results of the search more transparent/understandable.

An example for a syntactic query that is not supported is finding the declaration of a function by name:
{"kind":["fun"],"target":["name","pthread_once"],"find":["decl"],"expression":"","mode":["Must"]}
on
tests/regression/00-sanity/01-assert.c

@stilscher stilscher marked this pull request as ready for review July 21, 2023 08:57
src/state/search.ml Outdated Show resolved Hide resolved
@stilscher stilscher merged commit 7cfdafd into master Feb 5, 2024
@stilscher stilscher deleted the fix-search branch February 5, 2024 14:48
@sim642
Copy link
Member

sim642 commented Feb 7, 2024

This seems to cause a build error now:

File "gobview/src/state/search.ml", line 13, characters 49-59:
13 |     { kind; target; find; structure; limitation; expression; mode }
                                                      ^^^^^^^^^^
Error: This expression has type 'a option
       but an expression was expected of type string

I guess it also requires some change in Goblint or CIL itself?

@stilscher
Copy link
Member Author

stilscher commented Feb 7, 2024

I guess it also requires some change in Goblint or CIL itself?

Yes, this is the corresponding not yet merged PR for the changes on the Goblint side: goblint/analyzer#1092

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

Successfully merging this pull request may close these issues.

3 participants