@nbtheduke I think the best place to expand on your question is here Let's restate, can https://github.com/replikativ/beichte be used for type inference? I think the short answer is no because it's clearly one directional and there's a limit how much you can do with that
good call with the channel, i forgot about it
clearly there's a ton of static analysis one can do on clojure code (clj-kondo, now this), but i frankly don't know enough about how type systems work (type inference especially) to know what's actually possible
Beichte is beautifully simple and is essentially a tools analyzer bottom up pass Full type inference will be a whole ass project
lol right. i don't mean to suggest that beichte expand to cover that, more that the approach it takes might be an avenue for such analysis
I'll give you some spoilers the approach taken by core typed is similar, where expressions have bottom and top types and they unify like you would expect, min the tops, max the bottoms
Fancy name is "lattice"
CC @whilo you could probably provide a more informed opinion 😁
The problem is this information flows in both directions so it is somewhat hard
And I also found a while back tools analyzer is slow 😊
sorry, for replying late, only saw this lately; beichte is one form of abstract interpretation, typedclojure already has a symbolic interpreter as well, i think it is reasonable to maybe share some infrastructure, but in general implement different interpreters for different types of analysis. i looked more into what can be done and beichte could provide capture sets for variables (more fine grained), in particular read/write sets, which allow separation logic like reasoning about concurrent code; scala3 does this for instance