-
Notifications
You must be signed in to change notification settings - Fork 3
Simple Type Check #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Hides more implementation of `Var` and `ID`, `BasilExpr`, and `MapState` to try to clean up the inferred type signatures throughout - add dfg transform pass type that just runs an analysis and dumps the result - Add `pretty : t -> Containers_pp.t` requirement to lattice for better output. - Add qcheck valueabstraction soundness test
agle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diff view here looks really odd, maybe like its rebased main onto this branch rather than this branch onto main? would you mind messaging me what you ran to rebase it?
| (compare_maps BasilExpr.type_of args real_args stmt) | ||
| (compare_maps Var.typ lhs output stmt); | ||
| ] | ||
| (List.map (fun (_, v) -> v) (StringMap.to_list args))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could write this more cleanly like below; flat_map is combines the map and concat operations.Also be aware List.append / concat / flat_map are O(n^2) since List is singly linked, it should be fine here as the lists are small but can be a bit of a performance trap (which is why I've generally been defaulting to Iter.t which is a more efficient version of Seq).
let params_check = List.append
(compare_maps BasilExpr.type_of args real_args stmt)
(compare_maps Var.typ lhs output stmt) in
let args = StringMap.values args |> Iter.to_list |> List.flat_map type_check in
List.append params_check args
Yeah, I think I did the reverse thinking it was like merge in the direction. I was on the branch and did |
|
Closed PR and opened #15 (weird diff so cherry-pick to a new branch) |
Adds a new ProcCheck to ensure type correctness of an IR program.