Skip to content
This repository was archived by the owner on May 4, 2024. It is now read-only.

Commit 33e62b4

Browse files
committed
fix the typos
1 parent ea70797 commit 33e62b4

File tree

28 files changed

+61
-61
lines changed

28 files changed

+61
-61
lines changed

language/move-binary-format/src/check_bounds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ impl<'a> BoundsChecker<'a> {
202202
check_bounds_impl(self.view.identifiers(), function_handle.name)?;
203203
check_bounds_impl(self.view.signatures(), function_handle.parameters)?;
204204
check_bounds_impl(self.view.signatures(), function_handle.return_)?;
205-
// function signature type paramters must be in bounds to the function type parameters
205+
// function signature type parameters must be in bounds to the function type parameters
206206
let type_param_count = function_handle.type_parameters.len();
207207
if let Some(sig) = self
208208
.view

language/move-model/src/builder/module_builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ impl<'env, 'translator> ModuleBuilder<'env, 'translator> {
216216

217217
/// Creates a SpecBlockContext from the given SpecBlockTarget. The context is used during
218218
/// definition analysis when visiting a schema block member (condition, invariant, etc.).
219-
/// This returns None if the SpecBlockTarget cannnot be resolved; error reporting happens
219+
/// This returns None if the SpecBlockTarget cannot be resolved; error reporting happens
220220
/// at caller side.
221221
fn get_spec_block_context<'pa>(
222222
&self,
@@ -2925,7 +2925,7 @@ impl<'env, 'translator> ModuleBuilder<'env, 'translator> {
29252925
} else {
29262926
// This is calling a function from the module we are currently translating.
29272927
// Need to recursively ensure we have computed used_spec_vars because of
2928-
// arbitrary call graphs, including cyclic. If visted_opt is not set,
2928+
// arbitrary call graphs, including cyclic. If visited_opt is not set,
29292929
// we know we already computed this.
29302930
if let Some(visited) = &mut visited_opt {
29312931
self.compute_state_usage_and_callees_for_fun(visited, fid.as_usize());

language/move-model/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ pub fn run_model_builder<
7979
}
8080

8181
/// Build the move model with default compilation flags and custom options and a set of provided
82-
/// named addreses.
82+
/// named addresses.
8383
/// This collects transitive dependencies for move sources from the provided directory list.
8484
pub fn run_model_builder_with_options<
8585
Paths: Into<MoveSymbol> + Clone,

language/move-model/src/model.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ pub struct GlobalEnv {
514514
pub intrinsics: IntrinsicsAnnotation,
515515
/// A type-indexed container for storing extension data in the environment.
516516
extensions: RefCell<BTreeMap<TypeId, Box<dyn Any>>>,
517-
/// The address of the standard and extension libaries.
517+
/// The address of the standard and extension libraries.
518518
stdlib_address: Option<BigUint>,
519519
extlib_address: Option<BigUint>,
520520
}
@@ -2285,12 +2285,12 @@ impl<'env> ModuleEnv<'env> {
22852285
}
22862286

22872287
/// Converts a constant to the specified type. The type must correspond to the expected
2288-
/// cannonical representation as defined in `move_core_types::values`
2288+
/// canonical representation as defined in `move_core_types::values`
22892289
pub fn get_constant_value(&self, constant: &VMConstant) -> MoveValue {
22902290
VMConstant::deserialize_constant(constant).unwrap()
22912291
}
22922292

2293-
/// Return the `AccountAdress` of this module
2293+
/// Return the `AccountAddress` of this module
22942294
pub fn self_address(&self) -> &AccountAddress {
22952295
self.data.module.address()
22962296
}
@@ -3272,7 +3272,7 @@ impl<'env> FunctionEnv<'env> {
32723272
self.definition_view().visibility()
32733273
}
32743274

3275-
/// Return true if the function is an entry fucntion
3275+
/// Return true if the function is an entry function
32763276
pub fn is_entry(&self) -> bool {
32773277
self.definition_view().is_entry()
32783278
}
@@ -3308,7 +3308,7 @@ impl<'env> FunctionEnv<'env> {
33083308

33093309
/// Returns true if the function is a script function
33103310
pub fn is_script(&self) -> bool {
3311-
// The main function of a scipt is a script function
3311+
// The main function of a script is a script function
33123312
self.module_env.is_script_module() || self.definition_view().is_entry()
33133313
}
33143314

language/move-model/src/simplifier/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ mod pass_inline;
1919
pub use pass::SpecRewriter;
2020
use pass_inline::SpecPassInline;
2121

22-
/// Available simplifications passes to run after tbe model is built
22+
/// Available simplifications passes to run after the model is built
2323
#[derive(Clone, Debug, Serialize, Deserialize)]
2424
pub enum SimplificationPass {
2525
Inline,

language/move-prover/boogie-backend/src/boogie_wrapper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,7 @@ impl ModelValue {
15181518
let struct_name = &boogie_struct_name(struct_env, inst);
15191519
let values = self
15201520
.extract_list(struct_name)
1521-
// It appears sometimes keys are represented witout, sometimes with enclosing
1521+
// It appears sometimes keys are represented without, sometimes with enclosing
15221522
// bars?
15231523
.or_else(|| self.extract_list(&format!("|{}|", struct_name)))?;
15241524
struct_env

language/move-prover/boogie-backend/src/bytecode_translator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@ impl<'env> FunctionTranslator<'env> {
11931193
.iter()
11941194
.cloned()
11951195
.map(str_local)
1196-
// Add implict dest returns for &mut srcs:
1196+
// Add implicit dest returns for &mut srcs:
11971197
// f(x) --> x := f(x) if type(x) = &mut_
11981198
.chain(
11991199
srcs.iter()

language/move-prover/bytecode/src/access_path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ impl AbsStructType {
770770
self.get_type().into_struct_tag(env)
771771
}
772772

773-
/// Substitue the open types in self.types with caller `type_actuals`
773+
/// Substitute the open types in self.types with caller `type_actuals`
774774
pub fn substitute_footprint(&mut self, type_actuals: &[Type]) {
775775
for t in self.types.iter_mut() {
776776
*t = t.instantiate(type_actuals)

language/move-prover/bytecode/src/dataflow_domains.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ impl<K: Ord + Clone, V: AbstractDomain + Clone + PartialEq> MapDomain<K, V> {
268268
/// but this is not available in OrdMap for obvious reasons (because entries are shared),
269269
/// so we need to use this pattern here instead.
270270
pub fn update_values(&mut self, mut f: impl FnMut(&mut V)) {
271-
// Commpute the key-values which actually changed. If the change is small, we preserve
271+
// Compute the key-values which actually changed. If the change is small, we preserve
272272
// structure sharing.
273273
let new_values = self
274274
.iter()

language/move-prover/bytecode/src/number_operation_analysis.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl NumberOperationState {
132132
}
133133
}
134134

135-
fn vector_table_funs_name_propogate_to_dest(callee_name: &str) -> bool {
135+
fn vector_table_funs_name_propagate_to_dest(callee_name: &str) -> bool {
136136
callee_name.contains("borrow")
137137
|| callee_name.contains("borrow_mut")
138138
|| callee_name.contains("pop_back")
@@ -142,15 +142,15 @@ fn vector_table_funs_name_propogate_to_dest(callee_name: &str) -> bool {
142142
|| callee_name.contains("spec_get")
143143
}
144144

145-
fn vector_funs_name_propogate_to_srcs(callee_name: &str) -> bool {
145+
fn vector_funs_name_propagate_to_srcs(callee_name: &str) -> bool {
146146
callee_name == "contains"
147147
|| callee_name == "index_of"
148148
|| callee_name == "append"
149149
|| callee_name == "push_back"
150150
|| callee_name == "insert"
151151
}
152152

153-
fn table_funs_name_propogate_to_srcs(callee_name: &str) -> bool {
153+
fn table_funs_name_propagate_to_srcs(callee_name: &str) -> bool {
154154
callee_name == "add" || callee_name == "borrow_mut_with_default" || callee_name == "upsert"
155155
}
156156

@@ -301,7 +301,7 @@ impl<'a> NumberOperationAnalysis<'a> {
301301
let oper_first =
302302
global_state.get_node_num_oper(args[0].node_id());
303303
// First argument is the target vector and the return type has the same NumberOperation type
304-
if vector_table_funs_name_propogate_to_dest(&callee_name) {
304+
if vector_table_funs_name_propagate_to_dest(&callee_name) {
305305
global_state.update_node_oper(*id, oper_first, true);
306306
} else {
307307
global_state.update_node_oper(*id, Bottom, allow_merge);
@@ -1035,7 +1035,7 @@ impl<'a> TransferFunctions for NumberOperationAnalysis<'a> {
10351035
.get_temp_index_oper(cur_mid, cur_fid, srcs[0], baseline_flag)
10361036
.unwrap();
10371037
// Bitwise is specified explicitly in the fun or struct spec
1038-
if vector_table_funs_name_propogate_to_dest(&callee_name) {
1038+
if vector_table_funs_name_propagate_to_dest(&callee_name) {
10391039
if *first_oper == Bitwise {
10401040
// Do not consider the method remove_return_key where the first return value is k
10411041
for dest in dests.iter() {
@@ -1050,7 +1050,7 @@ impl<'a> TransferFunctions for NumberOperationAnalysis<'a> {
10501050
let mut second_oper = first_oper;
10511051
let mut src_idx = 0;
10521052
if module_env.is_std_vector()
1053-
&& vector_funs_name_propogate_to_srcs(&callee_name)
1053+
&& vector_funs_name_propagate_to_srcs(&callee_name)
10541054
{
10551055
assert!(srcs.len() > 1);
10561056
second_oper = global_state
@@ -1062,7 +1062,7 @@ impl<'a> TransferFunctions for NumberOperationAnalysis<'a> {
10621062
)
10631063
.unwrap();
10641064
src_idx = 1;
1065-
} else if table_funs_name_propogate_to_srcs(&callee_name) {
1065+
} else if table_funs_name_propagate_to_srcs(&callee_name) {
10661066
assert!(srcs.len() > 2);
10671067
second_oper = global_state
10681068
.get_temp_index_oper(

0 commit comments

Comments
 (0)