-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat(fv): add semantic analysis for fv attributes #88
Conversation
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.
LGTM
Exciting progress!
@@ -1381,4 +1395,75 @@ impl<'context> Elaborator<'context> { | |||
_ => true, | |||
}) | |||
} | |||
|
|||
fn elaborate_fv_attributes( |
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.
fn elaborate_fv_attributes( | |
/// Performs semantic analysis on the formal verification attributes discovered by the parser. | |
/// | |
/// `fv_attributes` - the parsed attributes | |
/// `func_id` - this is the `FuncId` of the function to which the attributes are attached | |
/// `body_type` - this is the semantically inferred type of the expression that is the body of the function | |
/// `hir_func` - this identifies the same expression | |
/// `func_span` - represents the span in code | |
fn elaborate_fv_attributes( |
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.
Please, also figure out what's the correct way to cite parameters in a doccomment in Rust (rustdoc).
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.
Citing parameters is not a part of rustdoc anymore. Source: rust-lang/rust-by-example#1804 .
Still, I will add old style comments for the arguments.
Added name resolution and type checking for the expression bodies of the formal verification attributes. This means that functions in HIR now have resolved formal verification attributes attached to them. Added tests which showcase the newly added functionality.
0a03406
to
49382b4
Compare
Formal verification attributes are now ignored in all other (non fv) nargo cli commands and won't produce any errors related to semantic analysis. Also expanded the testing logic. Now there are two directories for testing formal verification functionality. Them being `formal_verify_failure` and `formal_verify_success`. Moved the tests from PR #88 in their matching directories.
Formal verification attributes are now ignored in all other (non fv) nargo cli commands and won't produce any errors related to semantic analysis. Also expanded the testing logic. Now there are two directories for testing formal verification functionality. Them being `formal_verify_failure` and `formal_verify_success`. Moved the tests from PR #88 in their matching directories.
Formal verification attributes are now ignored in all other (non fv) nargo cli commands and won't produce any errors related to semantic analysis. Also expanded the testing logic. Now there are two directories for testing formal verification functionality. Them being `formal_verify_failure` and `formal_verify_success`. Moved the tests from PR #88 in their matching directories.
Formal verification attributes are now ignored in all other (non fv) nargo cli commands and won't produce any errors related to semantic analysis. Also expanded the testing logic. Now there are two directories for testing formal verification functionality. Them being `formal_verify_failure` and `formal_verify_success`. Moved the tests from PR #88 in their matching directories.
Formal verification attributes are now ignored in all other (non fv) nargo cli commands and won't produce any errors related to semantic analysis. Also expanded the testing logic. Now there are two directories for testing formal verification functionality. Them being `formal_verify_failure` and `formal_verify_success`. Moved the tests from PR #88 in their matching directories.
Formal verification attributes are now ignored in all other (non fv) nargo cli commands and won't produce any errors related to semantic analysis. Also expanded the testing logic. Now there are two directories for testing formal verification functionality. Them being `formal_verify_failure` and `formal_verify_success`. Moved the tests from PR #88 in their matching directories.
Added name resolution and type checking for the expression bodies of the formal verification attributes. This means that functions in HIR now have resolved formal verification attributes attached to them.
Added tests which showcase the newly added functionality.