Skip to content

Commit

Permalink
More fixes to frontend simulator with AST fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
KabirSamsi committed Oct 28, 2024
1 parent 742b4c8 commit 184654f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rio/simulator/state.mli
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exception UnboundKey of string

val empty : t
val rebind : string -> float -> t -> t
val rebind_all : (string * float) list -> t -> t
val rebind_all : (string * 'a) list -> t -> t
val is_defined : string -> t -> bool
val lookup : string -> t -> float
val lookup_opt : string -> t -> float option
7 changes: 4 additions & 3 deletions rio/simulator/topo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ let rec addr_to_string = function

let rec of_policy (p : Frontend.Policy.t) =
match p with
| Class _ -> Star
| Fifo plst | RoundRobin plst | Strict plst -> Node (List.map of_policy plst)
| WeightedFair wplst -> Node (List.map (fun (p, _) -> of_policy p) wplst)
| Fifo _ | EarliestDeadline _ | ShortestJobNext _ | ShortestRemaining _ ->
Node [ Star ]
| RoundRobin plst | Strict plst -> Node (List.map of_policy plst)
| WeightedFair (wplst, _) -> Node (List.map of_policy wplst)

let rec height = function
| Star -> 1
Expand Down

0 comments on commit 184654f

Please sign in to comment.