Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
7896295
fix
JTrenerry Mar 17, 2026
cd51acd
slow but progress
JTrenerry Jan 29, 2026
fafa502
draft load / store constrain gen
JTrenerry Jan 29, 2026
e10a088
Change constraint set to actually be a set and not a list
JTrenerry Jan 30, 2026
2e6718d
first draft of coalescing types
JTrenerry Jan 30, 2026
1817125
Adds functions to coalesce
JTrenerry Jan 30, 2026
e87f4fe
Adds records / fields
JTrenerry Jan 30, 2026
19aa1c1
constraint set seems stable, inf recursion in coalesce though :(
JTrenerry Feb 2, 2026
0ac0d4f
inf recursion gone
JTrenerry Feb 2, 2026
206557e
cleans up some code and comments
JTrenerry Feb 2, 2026
8d4244d
add bounds basic testing
JTrenerry Feb 4, 2026
fbde2c3
cleanup and helpers for tests
JTrenerry Feb 4, 2026
ece1d7d
remove program from gen_constraint_set
JTrenerry Feb 4, 2026
0887013
basic consistent constraint test
JTrenerry Feb 4, 2026
1348086
change int size to int and bv size
JTrenerry Feb 4, 2026
b98b15b
draft transfer function
JTrenerry Feb 4, 2026
2027f78
adjust polarity to be a bool based around positive
JTrenerry Feb 5, 2026
bd39be2
join function completed
JTrenerry Feb 5, 2026
91785c4
fixes transfer function and makes it maps instead
JTrenerry Feb 5, 2026
e8d8bda
most of automata done
JTrenerry Feb 6, 2026
7af1e96
recursion of constraints is fixed, coalesce is wrong
JTrenerry Feb 9, 2026
a53aaf2
coalesce fixed. and automata slightly nicer
JTrenerry Feb 9, 2026
f04cc9b
type automata draft
JTrenerry Feb 12, 2026
593ac82
modules everywhere
JTrenerry Feb 13, 2026
5b3197c
clean
JTrenerry Feb 13, 2026
c6554f8
fix module errors
JTrenerry Feb 13, 2026
fc2c0b5
merge nodes completed, I believe recursion will explode everything bu…
JTrenerry Feb 13, 2026
52e492d
forgot the one relevant file in last commit
JTrenerry Feb 13, 2026
ef7d41e
recusives
JTrenerry Feb 15, 2026
5763ccf
temp testing
JTrenerry Feb 16, 2026
5b19915
start of something new :3
JTrenerry Feb 18, 2026
a269756
adds sym bases
JTrenerry Feb 18, 2026
12e189e
:
JTrenerry Feb 18, 2026
5dd1478
pulling
JTrenerry Feb 18, 2026
0d07bc2
malloc call and other transfers done
JTrenerry Feb 19, 2026
3005b4d
sva almost done
JTrenerry Feb 23, 2026
9e3ee2d
fix merge
JTrenerry Feb 23, 2026
ed71f9a
sva seems to work
JTrenerry Feb 24, 2026
bd12524
adds fucntions to LatticeMap and adjust passes for cfg
JTrenerry Feb 24, 2026
4b0c3a1
adds flake stuff and makes function calls smarter
JTrenerry Feb 24, 2026
3a6158d
confused
JTrenerry Feb 27, 2026
9c55daf
found what i lost
JTrenerry Feb 27, 2026
8f9ce57
remove paren
JTrenerry Feb 27, 2026
81f340c
Updates the examples to be have no concat spam and be more up to date
JTrenerry Feb 27, 2026
08a8b64
bump
JTrenerry Feb 27, 2026
c8ccfe5
move automata stuff to inference file
JTrenerry Mar 1, 2026
53e5095
remove asd
JTrenerry Mar 2, 2026
0b2c7fe
bump
JTrenerry Mar 2, 2026
acfc259
change sva to use dfg
JTrenerry Mar 2, 2026
9430654
adds value_soundness testing to sva
JTrenerry Mar 2, 2026
ae5f58e
testing for type inference
JTrenerry Mar 2, 2026
48e218f
rename of tests
JTrenerry Mar 2, 2026
76e9a53
constrain variables by there given type
JTrenerry Mar 2, 2026
9abd285
bump
JTrenerry Mar 2, 2026
cc1f6f3
bump
JTrenerry Mar 3, 2026
5c937e2
pop stash
JTrenerry Mar 3, 2026
fab74c5
add stack pointer
JTrenerry Mar 3, 2026
075d7e1
bump
JTrenerry Mar 3, 2026
90ffae3
sva implemented within type inference
JTrenerry Mar 3, 2026
f2acb1b
stay
JTrenerry Mar 3, 2026
ffa4561
Remove weird rec check and just see if it is in bounds (the same but …
JTrenerry Mar 4, 2026
75fb99c
fix rec check
JTrenerry Mar 4, 2026
f8838e4
allow two ctypes to be constrained to each other
JTrenerry Mar 4, 2026
1a40f37
finish up more todos
JTrenerry Mar 4, 2026
fe023ef
bmp
JTrenerry Mar 4, 2026
80818fa
remove print
JTrenerry Mar 4, 2026
71ec166
flake stuff
JTrenerry Mar 4, 2026
3f9ed5c
fmt
JTrenerry Mar 4, 2026
9209d0b
Adds more comments and renames variables
JTrenerry Mar 4, 2026
edbb735
same changes but for tests
JTrenerry Mar 4, 2026
936eef8
update cat
JTrenerry Mar 9, 2026
f06acd6
map sva results to global
JTrenerry Mar 10, 2026
fa31e77
automata -> type
JTrenerry Mar 10, 2026
958f04f
the best way to remove stuff is to not add stuff
JTrenerry Mar 11, 2026
e65e195
pondering
JTrenerry Mar 11, 2026
97ac8bf
change recursives
JTrenerry Mar 12, 2026
5a40d42
adds records and ptrs to type_inferencing
JTrenerry Mar 13, 2026
a4abb3b
rename
JTrenerry Mar 13, 2026
cc06ae1
start transforming
JTrenerry Mar 16, 2026
1a39c72
bump
JTrenerry Mar 17, 2026
ab396ca
we are so back
JTrenerry Mar 17, 2026
0517700
Remove unreachable done
JTrenerry Mar 18, 2026
e113e0d
Apply the heuristic more often
JTrenerry Mar 18, 2026
7dd5243
constrain ptrs better
JTrenerry Mar 18, 2026
e0dfd79
adds recursives and params / returns
JTrenerry Mar 19, 2026
3f48116
ptrs and recs need a name
JTrenerry Mar 19, 2026
3c5b088
bmp
JTrenerry Mar 19, 2026
33143e5
bmp
JTrenerry Mar 19, 2026
1010a82
bmp
JTrenerry Mar 20, 2026
6eaffbb
fix
JTrenerry Apr 6, 2026
1a39a8f
UGHGHGHGH, maybe progress
JTrenerry Apr 8, 2026
96f5e3f
rec name
JTrenerry Apr 8, 2026
46b0328
wrong ver
JTrenerry Apr 8, 2026
804762b
constrain
JTrenerry Apr 9, 2026
e2fc78c
fix tests
JTrenerry Apr 9, 2026
2cf118f
smol name
JTrenerry Apr 10, 2026
22ae783
record size
JTrenerry Apr 10, 2026
98fb7ab
update test
JTrenerry Apr 10, 2026
b7862ba
fix from pull
JTrenerry Apr 13, 2026
aa15a06
fix tests
JTrenerry Apr 14, 2026
0a5bbe2
ptrrec newline
JTrenerry Apr 14, 2026
8666faf
loops type checking mostly
JTrenerry Apr 14, 2026
ba59ede
finally testing more code
JTrenerry Apr 14, 2026
97ffac7
fix merge
JTrenerry Apr 14, 2026
d41f9fc
some fixes from the sva branch did not make it here, fix that.
JTrenerry Apr 14, 2026
b40101d
tweaking
JTrenerry Apr 15, 2026
2c2cd78
flip the order
JTrenerry Apr 15, 2026
e8ef551
fmt, grammar bump, tests passing
JTrenerry Apr 15, 2026
9a5d323
fix test file
JTrenerry Apr 15, 2026
3ed0ca2
Remove pointer name, add comment to cram test case, remove duplicate …
JTrenerry Apr 16, 2026
786b839
remove bincaml types
JTrenerry Apr 16, 2026
8bc2d54
this test again
JTrenerry Apr 16, 2026
3ad8d92
the diff hide from auto-promote
JTrenerry Apr 16, 2026
003184d
make analyse more seperate for testing
JTrenerry Apr 16, 2026
631e967
fix tests
JTrenerry Apr 17, 2026
ccd4df0
fix merge
JTrenerry Apr 17, 2026
c85b864
merge
JTrenerry Apr 17, 2026
6cb8a8a
remove duplicate decl
JTrenerry Apr 17, 2026
8a78c62
huh?
JTrenerry Apr 17, 2026
ab100c5
sort before add
JTrenerry Apr 17, 2026
34d12fc
add some tests
JTrenerry Apr 17, 2026
3c99514
fix test
JTrenerry Apr 17, 2026
9a04c3d
adds another test and fixes a bug
JTrenerry Apr 21, 2026
d1db7af
Hmm, removes functions stuff and load/store but that is cause it isn'…
JTrenerry Apr 22, 2026
1d2594a
make BVSUB work the same as BVADD
JTrenerry Apr 22, 2026
3444a69
load / store is gone still but looks fine
JTrenerry Apr 22, 2026
ff5c466
bump
JTrenerry Apr 22, 2026
df76833
fixes and combines loads / store
JTrenerry Apr 23, 2026
8152c16
Temp commit to show how using diff polar types can cause type checker…
JTrenerry Apr 23, 2026
d9061cd
parse record type decls
JTrenerry Apr 27, 2026
63db392
fmt
JTrenerry Apr 27, 2026
bc6a76e
cat seems to work
JTrenerry Apr 28, 2026
472e46b
fix tests
JTrenerry Apr 28, 2026
a93736a
recursive declartions
JTrenerry Apr 28, 2026
a34fba1
fix test w new print
JTrenerry Apr 28, 2026
c3d25e0
more clean
JTrenerry Apr 28, 2026
fd18cc7
fix test
JTrenerry Apr 28, 2026
e4c8cdb
other clean up stuff
JTrenerry Apr 28, 2026
e9c48ac
adds some docs?
JTrenerry May 8, 2026
13757d1
fix flake
JTrenerry May 8, 2026
b540b6a
fix
JTrenerry May 8, 2026
ca43d1a
fmt
JTrenerry May 8, 2026
e1a40bc
fix links to be placeholders
JTrenerry May 8, 2026
ba5ad96
remove various warnings
JTrenerry May 8, 2026
d419d5f
FMTMTMTMT
JTrenerry May 8, 2026
8b2a03c
merge
JTrenerry May 27, 2026
0d51560
fmt
JTrenerry May 27, 2026
e5d7773
fix record joining finally :(((((((((((((((((((((((((((
JTrenerry May 29, 2026
d88675c
fixes bugs in nesting records
JTrenerry Jun 1, 2026
ff85438
disjoint was so wrong lmao
JTrenerry Jun 2, 2026
ab3f6b9
rm print
JTrenerry Jun 2, 2026
2ee5bdd
cleans some failwiths and todos
JTrenerry Jun 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion bin/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ let cmd =
let main () =
Trace_core.set_process_name "main";
Trace_core.set_thread_name "t1";
Logs.set_level (Some Logs.Info);
Logs.set_reporter (Logs.format_reporter ());
exit (Cmd.eval_result cmd)

Expand Down
2 changes: 1 addition & 1 deletion examples
2 changes: 1 addition & 1 deletion lib/analysis/defuse_bool.ml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module IsZeroValueAbstraction = struct
match op with
| `BVNEG -> Top
| `BoolNOT -> ( match a with Zero -> NonZero | NonZero -> Zero | o -> o)
| `BOOLTOBV1 -> a
| `RECTOBV | `PTRTOBV64 | `BOOLTOBV1 -> a
| `INTNEG -> Top
| `Extract _ -> ( match a with Zero -> Zero | _ -> Top)
| `SignExtend _ -> ( match a with Zero -> Zero | _ -> Top)
Expand Down
15 changes: 11 additions & 4 deletions lib/fe/AbsBasilIR.ml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 11 additions & 7 deletions lib/fe/BasilIR.cf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ rules LambdaSep ::= "->" | "::" ;

token Str '"' ((char - ["\"\\"]) | ('\\' ["\"\\tnrf"]))* '"' ;
position token IntegerHex ('0' 'x' (digit | ["abcdef"])+);
position token IntegerDec (digit+);
position token IntegerDec ('-'? digit+);

comment "//" ;
comment "/*" "*/" ;
Expand Down Expand Up @@ -66,8 +66,10 @@ Decl_Proc . Decl ::= "proc" ProcIdent OpenParen [Params] CloseParen "->" OpenPar
TypeAssign_Sum. TypeAssign ::= LocalIdent "=" [SumCase] ;

separator nonempty TypeAssign "and";
Decl_RecType . Decl ::= "type" [TypeAssign] ;
Decl_Type . Decl ::= "type" LocalIdent;

Decl_RecType . Decl ::= "type" [TypeAssign] ;
Decl_StructType . Decl ::= "type" StructType ;
Decl_Type . Decl ::= "type" LocalIdent;

ProcDef_Empty . ProcDef ::= ;
ProcDef_Some . ProcDef ::= BeginList [Block] EndList ;
Expand All @@ -77,7 +79,8 @@ Field1 . Field ::= Str ":" OpenParen Type "," IntVal CloseParen ;

IntType1 . IntType ::= INTTYPE ;
BoolType1. BoolType ::= BOOLTYPE ;
RecordType1 . RecordType ::= BeginRec [Field] EndRec ;
TopType1 . TopType ::= "⊤";
StructType1 . StructType ::= LocalIdent "of" BeginRec [Field] EndRec IntVal;
PointerType1 . PointerType ::= "ptr" OpenParen Type "," Type CloseParen ;
BVType1 . BVType ::= BVTYPE ;
-- map types are right associative. left of -> cannot be another MapType.
Expand All @@ -95,8 +98,9 @@ separator nonempty SumCase "|";
TypeIntType . Type1 ::= IntType ;
TypeBoolType . Type1 ::= BoolType ;
TypeBVType . Type1 ::= BVType ;
TypeTop . Type1 ::= TopType ;
TypePointerType . Type1 ::= PointerType ;
TypeRecordType . Type1 ::= RecordType ;
TypeStructType . Type1 ::= StructType ;
TypeVarType . Type1 ::= LocalIdent ;
TypeParen . Type1 ::= OpenParen Type CloseParen;
TypeMapType . Type ::= MapType;
Expand Down Expand Up @@ -265,7 +269,7 @@ rules BinOp ::= "implies" | "get" | BVBinOp | BVLogicalBinOp | IntLogicalBinOp |
Expr_Binary . Expr2 ::= BinOp OpenParen Expr "," Expr CloseParen ;
Expr_Assoc . Expr2 ::= IntrinOp OpenParen [Expr] CloseParen ;

rules UnOp ::= BVUnOp | "boolnot" | "intneg" | "booltobv1" | "gamma" | "classification";
rules UnOp ::= BVUnOp | "boolnot" | "intneg" | "booltobv1" | "ptrtobv64" | "rectobv" | "gamma" | "classification";
Expr_Unary . Expr2 ::= UnOp OpenParen Expr CloseParen ;

Expr_LoadBe . Expr2 ::= "load_be" OpenParen IntVal "," Expr "," Expr CloseParen ;
Expand All @@ -286,7 +290,7 @@ Expr_Cases . Expr2 ::= "cases" OpenParen [Case] CloseParen ;
Expr_Paren . Expr2 ::= OpenParen Expr CloseParen ;


Expr_Field . Expr ::= Expr2 BIdent;
Expr_Field . Expr ::= OpenParen Expr BIdent CloseParen;
Expr_FieldSet . Expr2 ::= Expr2 "with" LocalIdent "=" Expr ;

rules FieldAssign ::= LocalIdent "=" Expr ;
Expand Down
12 changes: 6 additions & 6 deletions lib/fe/LexBasilIR.mll

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading