Fixes wrong order for conversion

This commit is contained in:
elvis
2024-12-02 00:45:24 +01:00
parent 52cd7e7e13
commit 15356aa5a9
5 changed files with 163 additions and 116 deletions

View File

@ -197,7 +197,11 @@ let rec helper (prg: CfgRISC.RISCCfg.t) (currentnode: Cfg.Node.t) (alreadyVisite
([], alreadyVisited)
else (
let nextnodes = (Cfg.NodeMap.find_opt currentnode prg.edges) in
let currentcode = (Cfg.NodeMap.find currentnode prg.content |> convert_cfgrisc_risci) in
let currentcode =
(match (Cfg.NodeMap.find_opt currentnode prg.content) with
| None -> []
| Some x -> convert_cfgrisc_risci x)
in
match nextnodes with
| Some (nextnode1, None) ->
let res, vis = (helper prg nextnode1) (currentnode :: alreadyVisited) in