Skip to content
Snippets Groups Projects
Commit b236b003 authored by Hans-Peter Deifel's avatar Hans-Peter Deifel
Browse files

search: Correctly label edges with interrupts

Attaches the interrupt number to the edge in our CFG corresponding to
the triggered interrupt.
parent 7fdb8a3e
No related branches found
No related tags found
No related merge requests found
{-# LANGUAGE LambdaCase, OverloadedStrings #-} {-# LANGUAGE LambdaCase, OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
module Search.Search (driver) where module Search.Search (driver) where
...@@ -160,8 +161,8 @@ graph2Dot is graph = ...@@ -160,8 +161,8 @@ graph2Dot is graph =
nodeStr from tos = mconcat $ map (arrow from) $ S.toList tos nodeStr from tos = mconcat $ map (arrow from) $ S.toList tos
arrow from to = " " <> nodeId is from <> " -> " arrow from to = " " <> nodeId is from <> " -> "
<> nodeId is to <> " [label=\"" <> edgeLabel (fst from) <> "\"];\n" <> nodeId is to <> " [label=\"" <> edgeLabel (fst from) <> "\"];\n"
edgeLabel txt = T.dropEnd 1 $ T.dropWhileEnd (/='_') $ edgeLabel (T.stripPrefix "OSEKOS_" -> Just txt) = T.dropWhileEnd (=='_') $ T.dropWhileEnd (/='_') txt
T.drop (T.length "OSEKOS_") txt edgeLabel txt = txt
dotNodes :: Bool -> Graph -> Text dotNodes :: Bool -> Graph -> Text
dotNodes is = foldMap formatNode . allNotes dotNodes is = foldMap formatNode . allNotes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment