Alperen Keleş
keles.bsky.social
Alperen Keleş
@keles.bsky.social
METU CENG 21'
PhD Student at UMD
Programming Languages/Formal Verification/Random Testing
Writing at http://alpkeles99.medium.com
Twitter: @keleesssss
Here it is
smt.st
SAT/SMT by Example
smt.st
May 8, 2025 at 11:24 PM
There’s a great book with lots of practical examples, let me find that
May 8, 2025 at 11:22 PM
Ah no, it would break early in the first type error. This is slow for cases it is well typed. The other is slow for cases it is ill-typed.
May 8, 2025 at 11:21 PM
Because constraint solvers are better at falsifying constraints then proving them. Falsification means you can stop halfway when you produce a falsifying model to the problem.
May 8, 2025 at 11:18 PM
You could do the reverse, and tell it “I bet you can find a set of assignments that satisfies it”, so it will return SAT indicating well-typedness and UNSAT + breaking constraints, but that tends to be slower than the reverse as far as I know.
May 8, 2025 at 11:16 PM
I think it gets untractable really really fast. This was my undergrad graduation project, so we didn’t have a lot large programs we could test it with, but even the call to Z3 is very slow compared to classic type checking
May 8, 2025 at 11:14 PM
So you either need to modularize the type checking and somehow make it incremental, or have some type of hybrid approach.
May 8, 2025 at 11:12 PM
The problem, of course, is type errors. Because if Z3 really cannot find a set of assignments that works, it just tells you yes, you are correct, but you don’t get a local type error for it.
May 8, 2025 at 11:10 PM
Yeap, you produce constraints for every variable based on their use sites, definitions etc. and then you tell Z3 “I bet you can’t find a set of assignments for these constraints”, at which point it gives a set of types assigned to variables as its result.
May 8, 2025 at 11:08 PM
My first type checker was entirely Z3 driven, we had Dafny style requires/ensures annotations proven via Z3, so that played nicely. The typed jq type system might also switch to Z3 at some point, not sure yet
May 8, 2025 at 10:18 PM
Paylaştım abi sitede alperenkeles.com/posts/tip-si...
Tip Sistemleri Hakkında
alperenkeles.com
December 1, 2024 at 7:02 PM
Abi ben bir şeyi sevip ona odaklanabileceğim inancını bıraktım bayağı bir süre önce. Canımın istediği şeyleri yapıp paralel ilerlemeye çalışıyorum, bir tane ana yol belirleyip kendimi de zorluyorum sadece en çok vakti buna harcayacaksın diye.
November 24, 2024 at 2:24 PM
THERE'S A LANGUAGE FILTER?? I may actually use this site
November 21, 2024 at 8:44 PM