MCPcopy Create free account
hub / github.com/Whiley/WhileyCompiler / visitDeclaration

Method visitDeclaration

src/main/java/wyil/util/WyilUtils.java:295–311  ·  view source on GitHub ↗
(Decl d)

Source from the content-addressed store, hash-verified

293 }
294
295 @Override
296 public void visitDeclaration(Decl d) {
297 // NOTE: this is needed to prevent traversal into type invariants, etc.
298 if (d instanceof Decl.Lambda) {
299 // NOTE: must account for variable capture here
300 Decl.Lambda l = (Decl.Lambda) d;
301 HashSet<Decl.Variable> tmp = new HashSet<>();
302 // Traverse quantify body
303 super.visitLambda(l);
304 // Remove all captured variables
305 for (Decl.Variable v : l.getParameters()) {
306 tmp.remove(v);
307 }
308 // Done
309 uses.addAll(tmp);
310 }
311 }
312
313 @Override
314 public void visitUniversalQuantifier(Expr.UniversalQuantifier q) {

Callers

nothing calls this directly

Calls 4

removeMethod · 0.80
visitLambdaMethod · 0.45
getParametersMethod · 0.45
addAllMethod · 0.45

Tested by

no test coverage detected