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>)
| 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 | } |
no test coverage detected