-
Notifications
You must be signed in to change notification settings - Fork 1
Insert raw definition into .smt2 file with #![raw_definie()] attribute #21
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
base: main
Are you sure you want to change the base?
Conversation
|
Probably I have to add some more tests and documentation comments. |
| @@ -0,0 +1,20 @@ | |||
| //@error-in-other-file: UnexpectedToken | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can I test that the Thrust panics with a specific error message? I tried using //@error-in-other-file, but I might be misunderstanding its purpose.
| let ts = analyze::annot::extract_annot_tokens(attrs.clone()); | ||
| let parser = annot::AnnotParser::new( | ||
| // TODO: this resolver is not actually used. | ||
| analyze::annot::ParamResolver::default() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parseg_raw_definition() is implemented on annot::AnnotParser and it's new() requires any Resolver instance, which isn't actually used in parsing of raw definitions.
I might have to fix so that no Resolver is required for this analysis.
This attribute allows users to inject arbitrary string literals directly into the generated .smt2 files using crate-level inner attributes.
By adding an inner attribute to the crate root, such as:
The attached string literal will be inserted into the head of the generated SMT-LIB2 file:
This feature is intended for debugging and testing. It enables the manual injection of SMT-LIB logic, serving as a workaround until a dedicated parser is implemented.