Skip to content

Commit

Permalink
Merge pull request #191 from tlaplus/fix-inst-use
Browse files Browse the repository at this point in the history
Fix instantiation of a module containing USE.
  • Loading branch information
kape1395 authored Jan 4, 2025
2 parents e0ce98e + 05a8e2e commit 9df048d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/module/m_visit.ml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ class map =
method mutate cx change usable =
let mu = Mutate (
change, usable) in
let cx = update_cx cx mu in
(cx, mu)

method submod cx tla_module =
Expand Down
5 changes: 5 additions & 0 deletions test/bugs/instance_mutate.tla
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---- MODULE instance_mutate ----
Op(x) == TRUE
USE TRUE
OpAll == \A x : Op(x)
====
7 changes: 7 additions & 0 deletions test/bugs/instance_mutate_test.tla
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---- MODULE instance_mutate_test ----
(*
Instantiation was failing on use of an operator if there was
a Mutation (USE) involved in the instantiated module.
*)
INSTANCE instance_mutate
====

0 comments on commit 9df048d

Please sign in to comment.