Skip to content

Commit

Permalink
Merge pull request #3562 from mtzguido/cache
Browse files Browse the repository at this point in the history
Fix some missing branches for ShowOptions
  • Loading branch information
mtzguido authored Oct 14, 2024
2 parents ba3ae57 + 0dcc1e1 commit 20e0256
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
2 changes: 2 additions & 0 deletions ocaml/fstar-lib/generated/FStarC_Parser_AST_Util.ml

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

15 changes: 9 additions & 6 deletions ocaml/fstar-lib/generated/FStarC_SMTEncoding_Solver_Cache.ml

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

1 change: 1 addition & 0 deletions src/parser/FStarC.Parser.AST.Util.fst
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ let eq_lift (t1 t2: lift) =

let eq_pragma (t1 t2: pragma) =
match t1, t2 with
| ShowOptions, ShowOptions -> true
| SetOptions s1, SetOptions s2 -> s1 = s2
| ResetOptions s1, ResetOptions s2 -> eq_option (fun s1 s2 -> s1 = s2) s1 s2
| PushOptions s1, PushOptions s2 -> eq_option (fun s1 s2 -> s1 = s2) s1 s2
Expand Down
13 changes: 7 additions & 6 deletions src/smtencoding/FStarC.SMTEncoding.Solver.Cache.fst
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,13 @@ instance hashable_letbinding : hashable letbinding = {

instance hashable_pragma : hashable pragma = {
hash = (function
| SetOptions s -> hash 1 `mix` hash s
| ResetOptions s -> hash 2 `mix` hash s
| PushOptions s -> hash 3 `mix` hash s
| PopOptions -> hash 4
| RestartSolver -> hash 5
| PrintEffectsGraph -> hash 6);
| ShowOptions -> hash 1
| SetOptions s -> hash 2 `mix` hash s
| ResetOptions s -> hash 3 `mix` hash s
| PushOptions s -> hash 4 `mix` hash s
| PopOptions -> hash 5
| RestartSolver -> hash 6
| PrintEffectsGraph -> hash 7);
}

let rec hash_sigelt (se:sigelt) : hash_code =
Expand Down

0 comments on commit 20e0256

Please sign in to comment.