Conversation
8489b31 to
6bab69a
Compare
|
Is testing analysis just by doing the value soundness enough? The lattices I am using should be tested already I believe as it is just wrapped and map lattice from Hayden and bpal. |
91b8bf9 to
611868c
Compare
|
I think it would be best if this is merged once fully complete as it would allow for more complete testing. If SVA is needed elsewhere I can cherry pick those commits, but I also would need some better testing for SVA as well. |
|
Globals are not done in SVA, will probably have to confirm with Nick but he did not want me to just say things are globals and then the offsets goes out of that global area and now I have to widen. I believe what he wanted (although I do not remember), after I get all the offsets I can then check to see if it lines up maybe, but even that seems iffy, I remember him saying, keep it is a constant unless I need it to be a global, but like when would I ever need it to be global? |
4e2f24d to
deb3282
Compare
3dd9fb4 to
7552bba
Compare
|
Current example output: Todo
Improvements
IssuesWeird assignments not working properly. This doesn't cascade the pointer type somehow. This also doesn't cascade the pointer type, but this is known and due to lack of constrain calls on load / stores, changing this should fix it. Edit: Implemented the above and it fixed those two issues, the first may still be lurking and only fixed in this case due to the pointers being better, but doubt it |
|
Idea for recursives: make inferred_to_real return something like this and then that first element can be turned into extra decls Edit: Done but not tested |
6fedca3 to
977c758
Compare
|
This looks like an error, will need to investigate |
|
records will be present within the IR and be converted when needed to sorts. |
|
store constraint seems wrong, stmt number is not good enough for store names. |
|
tests are currently wrong as names were added to recs / ptrs |
| let rec iter f (ty : t) = | ||
| f ty; | ||
| match ty with | ||
| | Top | Bottom | BinCamlType _ | TypeVar _ | Recursive _ -> () |
There was a problem hiding this comment.
recursive needs to go deeper
| | Variable a -> TypeVar (VarId.make_id a) | ||
| | Pointer { lower; upper } -> | ||
| Pointer (type_to_inferred lower, type_to_inferred upper) | ||
| | Record (name, fields) -> failwith "TODO" |
| let rec type_to_state_list p (ty : InferredType.t) ((ls, tbl) as acc) = | ||
| let open Sigma in | ||
| match ty with | ||
| | Top | BinCamlType _ | TypeVar _ | Bottom | Field _ -> |
There was a problem hiding this comment.
what if field isnt just a single type
| let st = constrain_arg proc st l t in | ||
| constrain_arg proc st r t | ||
|
|
||
| let rec constrain_expr proc (st : ConstraintState.t) |
There was a problem hiding this comment.
i should seperate this into each type of expr.
| let st = constrain st (Pointer (lb, ub)) addr in | ||
| let st = constrain st ub lb in | ||
| constrain st ty (TypeVar lhs) | ||
| | Stmt.Instr_Store { lhs; addr = Addr { addr; size } } -> |
There was a problem hiding this comment.
i want this and load to be more function
|
extract has errors where the coalescing is wrong, i forget if i fixed this |
miniUnsure if this does anything of valueattribNote: SVA does not net very good results in most cases