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

No crucible prefix #980

Merged
merged 11 commits into from
Dec 16, 2020
Merged

No crucible prefix #980

merged 11 commits into from
Dec 16, 2020

Conversation

brianhuffman
Copy link
Contributor

Add new saw-script function names without "crucible_" prefix.

LLVM-specific function names with the prefix "crucible_" have been switched to use the prefix "llvm_".

The original names remain in place, with documentation strings referring to the new names.

@brianhuffman
Copy link
Contributor Author

See #382.

…act`.

The name "java_extract" was already in use for a deprecated function,
and other crucible-based commands mostly use the "jvm_" prefix anyway.
@brianhuffman
Copy link
Contributor Author

Here's the full list of renamings:

crucible_java_extract -> jvm_extract
crucible_llvm_cfg -> llvm_cfg
crucible_llvm_extract -> llvm_extract
crucible_llvm_compositional_extract -> llvm_compositional_extract
crucible_fresh_var -> llvm_fresh_var
crucible_fresh_cryptol_var -> llvm_fresh_cryptol_var
crucible_alloc -> llvm_alloc
crucible_alloc_aligned -> llvm_alloc_aligned
crucible_alloc_readonly -> llvm_alloc_readonly
crucible_alloc_readonly_aligned -> llvm_alloc_readonly_aligned
crucible_alloc_with_size -> llvm_alloc_with_size
crucible_symbolic_alloc -> llvm_symbolic_alloc
crucible_alloc_global -> llvm_alloc_global
crucible_fresh_pointer -> llvm_fresh_pointer
crucible_fresh_expanded_val -> llvm_fresh_expanded_val
crucible_points_to -> llvm_points_to
crucible_conditional_points_to -> llvm_conditional_points_to
crucible_points_to_untyped -> llvm_points_to_untyped
crucible_conditional_points_to_untyped -> llvm_conditional_points_to_untyped
crucible_points_to_array_prefix -> llvm_points_to_array_prefix
crucible_equal -> llvm_equal
crucible_precond -> llvm_precond
crucible_postcond -> llvm_postcond
crucible_execute_func -> llvm_execute_func
crucible_return -> llvm_return
crucible_llvm_verify -> llvm_verify
crucible_llvm_unsafe_assume_spec -> llvm_unsafe_assume_spec
crucible_llvm_array_size_profile -> llvm_array_size_profile
crucible_llvm_verify_x86 -> llvm_verify_x86
crucible_array -> llvm_array_value
crucible_struct -> llvm_struct_value
crucible_packed_struct -> llvm_packed_struct_value
crucible_elem -> llvm_elem
crucible_field -> llvm_field
crucible_null -> llvm_null
crucible_global -> llvm_global
crucible_global_initializer -> llvm_global_initializer
crucible_term -> llvm_term
crucible_declare_ghost_state -> llvm_declare_ghost_state
crucible_ghost_value -> llvm_ghost_value
crucible_spec_solvers -> llvm_spec_solvers
crucible_spec_size -> llvm_spec_size

The pattern is quite regular, but for a few exceptions: The SetupValue constructors crucible_array and crucible_struct would have been renamed to llvm_array and llvm_struct, except those names were already taken as constructors for LLVMType. So to avoid a clash, they have been renamed to llvm_array_value and llvm_struct_value. For consistency, crucible_packed_struct has also been renamed to llvm_packed_struct_value. It would be nicer to have shorter names for these things, but at least they are not nearly so commonly-used as the other renamed functions that did get significantly shorter.

I have not updated CHANGES.md to mention the new function names; we should probably do that.

Also, it would be nice to similarly rename a couple of saw-script type names like CrucibleMethodSpec and CrucibleSetup to avoid the Crucible prefix; LLVMMethodSpec (or just LLVMSpec) and LLVMSetup would be better names.

@brianhuffman brianhuffman requested a review from atomb December 16, 2020 01:59
@atomb
Copy link
Contributor

atomb commented Dec 16, 2020

Would you be able to add some text to CHANGES.md as part of this PR?

I like the LLVMSpec and LLVMSetup names for the related types.

Brian Huffman added 2 commits December 16, 2020 00:01
CrucibleSetup -> LLVMSetup
CrucibleMethodSpec -> LLVMSpec
JVMMethodSpec -> JVMSpec

The old names still work, and are translated to the new ones upon parsing.
Copy link
Contributor

@atomb atomb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Thanks for going as far as updating the help text for the crucible_ commands to mention that they're legacy. We can perhaps deprecate them for the next release.

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.

2 participants