Style more consistent, replace capitalization with camel case

This commit is contained in:
elvis
2025-01-27 16:28:23 +01:00
parent 4ab0b40cca
commit 2fbbf4e4d1
23 changed files with 390 additions and 373 deletions

View File

@ -102,7 +102,7 @@ module RISCSimpleStatements = struct
in
pp_t ppf v
let pplist (ppf: out_channel) (l: t list) : unit =
let pp_list (ppf: out_channel) (l: t list) : unit =
List.iter (fun x -> pp ppf x; Printf.printf "; ") l
end
@ -915,7 +915,7 @@ let convert_ss
in
(Cfg.NodeMap.add node instructions risccode, m)
let helper
let helper_convert
(c: CfgImp.SimpleStatements.t list Cfg.NodeMap.t)
(m: RegisterMap.m)
: RISCSimpleStatements.t list Cfg.NodeMap.t =
@ -932,16 +932,16 @@ let convert (prg: CfgImp.SSCfg.t) : RISCCfg.t =
let ({ empty: bool;
nodes: Cfg.NodeSet.t;
edges: (Cfg.Node.t * (Cfg.Node.t option)) Cfg.NodeMap.t;
reverseEdges: (Cfg.Node.t list) Cfg.NodeMap.t;
inputVal: int option;
inputOutputVar: (string * string) option;
reverse_edges: (Cfg.Node.t list) Cfg.NodeMap.t;
input_val: int option;
input_output_var: (string * string) option;
initial: Cfg.Node.t option;
terminal: Cfg.Node.t option;
content: CfgImp.SimpleStatements.t list Cfg.NodeMap.t
}: CfgImp.SSCfg.t) = prg
in
let initial_bindings =
match inputOutputVar with
match input_output_var with
| Some (i, o) -> (
if i = o then
RegisterMap.empty |>
@ -957,10 +957,10 @@ let convert (prg: CfgImp.SSCfg.t) : RISCCfg.t =
{ empty = empty;
nodes = nodes;
edges = edges;
reverseEdges = reverseEdges;
inputVal = inputVal;
inputOutputVar = (
match inputOutputVar with
reverse_edges = reverse_edges;
input_val = input_val;
input_output_var = (
match input_output_var with
| Some (i, o) -> (
if i = o then
Some ("in", "in")
@ -971,5 +971,5 @@ let convert (prg: CfgImp.SSCfg.t) : RISCCfg.t =
);
initial = initial;
terminal = terminal;
content = helper content initial_bindings;
content = helper_convert content initial_bindings;
}