diff --git a/src/Control/Abstract/Heap.hs b/src/Control/Abstract/Heap.hs index a356fd506..c93b5944a 100644 --- a/src/Control/Abstract/Heap.hs +++ b/src/Control/Abstract/Heap.hs @@ -375,7 +375,7 @@ assign :: ( Member (Deref value) sig -> Evaluator term address value m () assign addr value = do heap <- getHeap - cell <- send (AssignCell value (fromMaybe lowerBound (Heap.getSlot addr heap)) ret) + cell <- send (AssignCell value (fromMaybe lowerBound (Heap.getSlotValue addr heap)) ret) putHeap (Heap.setSlot addr cell heap) dealloc :: ( Carrier sig m diff --git a/src/Data/Abstract/Heap.hs b/src/Data/Abstract/Heap.hs index d118dc893..5fa267622 100644 --- a/src/Data/Abstract/Heap.hs +++ b/src/Data/Abstract/Heap.hs @@ -6,7 +6,7 @@ module Data.Abstract.Heap , scopeLookup , frameSlots , frameLinks - , getSlot + , getSlotValue , setSlot , deleteSlot , initFrame @@ -77,8 +77,8 @@ frameSlots address = fmap slots . frameLookup address frameLinks :: Ord address => address -> Heap scope address value -> Maybe (Map EdgeLabel (Map scope address)) frameLinks address = fmap links . frameLookup address -getSlot :: Ord address => Slot address -> Heap address address value -> Maybe (Set value) -getSlot Slot{..} = (IntMap.lookup (unPosition position) =<<) . frameSlots frameAddress +getSlotValue :: Ord address => Slot address -> Heap address address value -> Maybe (Set value) +getSlotValue Slot{..} = (IntMap.lookup (unPosition position) =<<) . frameSlots frameAddress setSlot :: Ord address => Slot address -> Set value -> Heap scope address value -> Heap scope address value setSlot Slot{..} value h@(Heap heap) = case frameLookup frameAddress h of