Skip to content

Conversation

@JTrenerry
Copy link
Collaborator

@JTrenerry JTrenerry commented Jan 14, 2026

Adds a new ProcCheck to ensure type correctness of an IR program.

  • Change String.append to Printf.sprintf
  • Descriptive error messages
  • Write a test suite checking invalid types

JTrenerry and others added 7 commits January 13, 2026 09:52
- 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
@JTrenerry JTrenerry self-assigned this Jan 14, 2026
@JTrenerry JTrenerry added the enhancement New feature or request label Jan 14, 2026
Copy link
Owner

@agle agle left a 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)))
Copy link
Owner

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

@JTrenerry
Copy link
Collaborator Author

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?

Yeah, I think I did the reverse thinking it was like merge in the direction. I was on the branch and did git rebase main (I believe).

@JTrenerry
Copy link
Collaborator Author

Closed PR and opened #15 (weird diff so cherry-pick to a new branch)

@JTrenerry JTrenerry closed this Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants