MCPcopy Create free account
hub / github.com/Rust-API/Rust-API-Bypass-Checker / widen

Method widen

src/analysis/memory/symbolic_value.rs:1485–1513  ·  view source on GitHub ↗

Returns a domain whose corresponding set of concrete values include all of the values corresponding to self and other. The set of values may be less precise (more inclusive) than the set returned by join. The chief requirement is that a small number of widen calls deterministically lead to a set of values that include of the values that could be stored in memory at the given path.

(&self, path: &Rc<Path>)

Source from the content-addressed store, hash-verified

1483 /// deterministically lead to a set of values that include of the values that could be stored
1484 /// in memory at the given path.
1485 fn widen(&self, path: &Rc<Path>) -> Rc<SymbolicValue> {
1486 match &self.expression {
1487 Expression::CompileTimeConstant(..)
1488 | Expression::HeapBlock { .. }
1489 | Expression::Reference(..)
1490 | Expression::Top
1491 | Expression::Variable { .. }
1492 | Expression::Widen { .. } => self.clone(),
1493 _ => {
1494 if self.expression_size > 1000 {
1495 SymbolicValue::make_from(
1496 Expression::Variable {
1497 path: path.clone(),
1498 var_type: self.expression.infer_type(),
1499 },
1500 1,
1501 )
1502 } else {
1503 SymbolicValue::make_from(
1504 Expression::Widen {
1505 path: path.clone(),
1506 operand: self.clone(),
1507 },
1508 3,
1509 )
1510 }
1511 }
1512 }
1513 }
1514}

Callers 6

refine_pathsMethod · 0.80
refine_parametersMethod · 0.80
dereferenceMethod · 0.80
refine_withMethod · 0.80
visit_placeMethod · 0.80
transfer_and_refineMethod · 0.80

Calls 1

infer_typeMethod · 0.80

Tested by

no test coverage detected