Commit Graph

274 Commits

Author SHA1 Message Date
41ada43047 Move predecessor code into Graphs
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-09 23:13:49 -07:00
a081edb881 Add a proof about filter's distributivity
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-09 23:06:49 -07:00
3d2a507f2f Almost prove correctness
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-09 22:49:53 -07:00
82027ecd04 Move predecessor computation into Graphs
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-09 21:26:32 -07:00
734e82ff6d Wrap generated graphs to ensure entry and exit nodes have no extra edges
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-09 21:08:32 -07:00
69d1ecebae Prove that the bottom map's valyes are all bottoms
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-09 20:48:32 -07:00
b78cb91f2a Strengthen lemma about IterProd bottom to definition equality
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-09 20:20:11 -07:00
16fa4cd1d8 Use records rather than nested pairs to represent 'fixed height'
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-09 20:11:04 -07:00
95669b2c65 Prove that the iterated product is made from iterated bottom elements
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-09 19:45:15 -07:00
6857f60465 Rename the min/max elements top bottom and top in Prod
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-09 19:08:46 -07:00
f4392b32c0 Finish the last proof obligation for trace walking
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-09 19:01:36 -07:00
794c04eee9 Prove the foldr-implies lemma
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-09 18:37:50 -07:00
80069e76e6 Prove the recursive step of trace walking
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-09 17:56:47 -07:00
a22c0c9252 Prove a property of multi-key lookup
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-09 17:56:26 -07:00
20dc99ba1f Re-indent some code to take up less horizontal space
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-09 16:57:03 -07:00
b3a62da1fb Add a proof that edges lead to 'incoming' inclusion
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-09 16:56:45 -07:00
f0b0d51b48 Add unproven lemma about fold implication
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-08 23:38:23 -07:00
8ff88f9f9e Move helper code into separate function
I'll need to reuse it.

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-08 23:35:02 -07:00
c1581075d3 Add more test programs
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-08 23:30:23 -07:00
838aaf9c58 Start end-to-end proof of correctness
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-08 23:30:03 -07:00
4ac9dffa9b Prove that the var->lattice maps respect equality
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-08 22:53:21 -07:00
3f5551d70c Add a lemma about the effect of joinAll
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-08 22:34:02 -07:00
5837fdf19b Prove that 'updateAll' has preservation
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-08 22:29:36 -07:00
4350919871 Add proof about setVariablesForState
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-08 22:09:56 -07:00
7fe46b014c Slightly simplify evaluation code
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-08 22:05:50 -07:00
66d229c493 Prove that multi-statement evaluation "preserves" the validity of the analysis
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-08 21:51:53 -07:00
1b8bea8957 Use foldl in multi-statement evaluation
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-08 21:50:38 -07:00
dd8cdcd10c Add proofs about monotonicity of foldl
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-08 21:48:41 -07:00
ad4592d4d2 Switch to using implicit arguments where needed
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-08 21:34:17 -07:00
8d0d87d2d9 Start on proofs of correctness
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-08 20:50:21 -07:00
cfa3375de5 Expose more functions from FiniteMap
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-08 20:50:05 -07:00
6b116ed960 Forward some map function to Finite{,Value}Map
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-08 20:34:15 -07:00
3859826293 Define interpretation of the sign lattice
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-04-30 21:58:41 -07:00
be50c76cb1 Add more higher-order primitives
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-04-30 21:56:34 -07:00
112a5087ef Tentative start on proving correctness
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-04-30 19:20:02 -07:00
ccb7abc501 Remove unused code from Utils
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-04-30 19:15:38 -07:00
91b5d108f6 Simplify proofs about 'loop' using concatenation lemma
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-04-29 21:28:21 -07:00
c574ca9c56 Prove that graphs build by buildCfg are sufficient
That is, if we have a (semantic) trace, we can
find a corresponding path through the CFG.

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-04-29 20:57:43 -07:00
bbfba34e05 Prove another (simple) case
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-04-28 13:37:03 -07:00
aec15573fc Add properties of end-to-end traces on loops 2024-04-28 12:53:25 -07:00
b4d395767d Simplify operations used for constructing graphs
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-04-28 12:40:50 -07:00
07550bc214 Prove 'sufficiency' for if-else.
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-04-28 12:10:12 -07:00
9366ec4a97 Allow promoting end-to-end traces too 2024-04-28 12:00:06 -07:00
0fb884eb07 Use implicit arguments for more things
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-04-28 11:43:49 -07:00
6b44ac1feb Make graph arguments implicit where possible 2024-04-28 11:37:08 -07:00
69a4e8eb5c Add some helpers and rewrite code
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-04-27 17:43:16 -07:00
4fee16413a Define end-to-end path concatenation and prove one more case
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-04-27 17:34:50 -07:00
316e56f2bc Dip toes into creating end-to-end traces
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-04-27 15:27:46 -07:00
ab40a27e78 Formulate correctness of buildCfg using end-to-end traces
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-04-27 14:56:19 -07:00
f555947184 Promote traces through loop
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-04-27 14:38:07 -07:00