From 3e01426ccd87dd02b6519db783eff107028368f7 Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Mon, 11 Sep 2023 17:29:53 +0300 Subject: [PATCH] Cherry-pick AddressDomain.filter from 224615f63b07448ba45afb79f42c2d8284d4b968 Required to fix Promela extraction tests. --- src/cdomains/addressDomain.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cdomains/addressDomain.ml b/src/cdomains/addressDomain.ml index 9f6ee56cbf..5981caf9ea 100644 --- a/src/cdomains/addressDomain.ml +++ b/src/cdomains/addressDomain.ml @@ -440,4 +440,6 @@ struct let r = narrow x y in if M.tracing then M.traceu "ad" "-> %a\n" pretty r; r + + let filter f ad = fold (fun addr ad -> if f addr then add addr ad else ad) ad (empty ()) end