diff --git a/new/code/github_com/goose_lang/goose/testdata/examples/append_log.v b/new/code/github_com/goose_lang/goose/testdata/examples/append_log.v index a67a52892..65b278170 100644 --- a/new/code/github_com/goose_lang/goose/testdata/examples/append_log.v +++ b/new/code/github_com/goose_lang/goose/testdata/examples/append_log.v @@ -21,10 +21,10 @@ Definition Log__mkHdr : val := (func_call #marshal.pkg_name' #"NewEnc"%go) "$a0") in do: ("enc" <-[marshal.Enc] "$r0");;; do: (let: "$a0" := (![uint64T] (struct.field_ref Log "sz" (![ptrT] "log"))) in - (method_call #marshal.pkg_name' #"Enc" #"PutInt" "PutInt" #() (![marshal.Enc] "enc")) "$a0");;; + (method_call #marshal.pkg_name' #"Enc" #"PutInt" (![marshal.Enc] "enc")) "$a0");;; do: (let: "$a0" := (![uint64T] (struct.field_ref Log "diskSz" (![ptrT] "log"))) in - (method_call #marshal.pkg_name' #"Enc" #"PutInt" "PutInt" #() (![marshal.Enc] "enc")) "$a0");;; - return: ((method_call #marshal.pkg_name' #"Enc" #"Finish" "Finish" #() (![marshal.Enc] "enc")) #())). + (method_call #marshal.pkg_name' #"Enc" #"PutInt" (![marshal.Enc] "enc")) "$a0");;; + return: ((method_call #marshal.pkg_name' #"Enc" #"Finish" (![marshal.Enc] "enc")) #())). Definition pkg_name' : go_string := "github.com/goose-lang/goose/testdata/examples/append_log". @@ -33,7 +33,7 @@ Definition Log__writeHdr : val := rec: "Log__writeHdr" "log" <> := exception_do (let: "log" := (ref_ty ptrT "log") in do: (let: "$a0" := #(W64 0) in - let: "$a1" := ((method_call #pkg_name' #"Log'ptr" #"mkHdr" #() (![ptrT] "log")) #()) in + let: "$a1" := ((method_call #pkg_name' #"Log'ptr" #"mkHdr" (![ptrT] "log")) #()) in (func_call #disk.pkg_name' #"Write"%go) "$a0" "$a1")). (* go: append_log.go:33:6 *) @@ -61,7 +61,7 @@ Definition Init : val := "diskSz" ::= "$diskSz" }])) in do: ("log" <-[ptrT] "$r0");;; - do: ((method_call #pkg_name' #"Log'ptr" #"writeHdr" #() (![ptrT] "log")) #());;; + do: ((method_call #pkg_name' #"Log'ptr" #"writeHdr" (![ptrT] "log")) #());;; return: (![ptrT] "log", #true)). (* go: append_log.go:42:6 *) @@ -76,10 +76,10 @@ Definition Open : val := (func_call #marshal.pkg_name' #"NewDec"%go) "$a0") in do: ("dec" <-[marshal.Dec] "$r0");;; let: "sz" := (ref_ty uint64T (zero_val uint64T)) in - let: "$r0" := ((method_call #marshal.pkg_name' #"Dec" #"GetInt" "GetInt" #() (![marshal.Dec] "dec")) #()) in + let: "$r0" := ((method_call #marshal.pkg_name' #"Dec" #"GetInt" (![marshal.Dec] "dec")) #()) in do: ("sz" <-[uint64T] "$r0");;; let: "diskSz" := (ref_ty uint64T (zero_val uint64T)) in - let: "$r0" := ((method_call #marshal.pkg_name' #"Dec" #"GetInt" "GetInt" #() (![marshal.Dec] "dec")) #()) in + let: "$r0" := ((method_call #marshal.pkg_name' #"Dec" #"GetInt" (![marshal.Dec] "dec")) #()) in do: ("diskSz" <-[uint64T] "$r0");;; return: (ref_ty Log (let: "$m" := (ref_ty sync.Mutex (zero_val sync.Mutex)) in let: "$sz" := (![uint64T] "sz") in @@ -110,16 +110,16 @@ Definition Log__Get : val := rec: "Log__Get" "log" "i" := exception_do (let: "log" := (ref_ty ptrT "log") in let: "i" := (ref_ty uint64T "i") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref Log "m" (![ptrT] "log")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref Log "m" (![ptrT] "log")))) #());;; let: "b" := (ref_ty boolT (zero_val boolT)) in let: "v" := (ref_ty sliceT (zero_val sliceT)) in let: ("$ret0", "$ret1") := (let: "$a0" := (![uint64T] "i") in - (method_call #pkg_name' #"Log'ptr" #"get" #() (![ptrT] "log")) "$a0") in + (method_call #pkg_name' #"Log'ptr" #"get" (![ptrT] "log")) "$a0") in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("v" <-[sliceT] "$r0");;; do: ("b" <-[boolT] "$r1");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref Log "m" (![ptrT] "log")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref Log "m" (![ptrT] "log")))) #());;; return: (![sliceT] "v", ![boolT] "b")). (* go: append_log.go:65:6 *) @@ -152,7 +152,7 @@ Definition Log__append : val := (func_call #pkg_name' #"writeAll"%go) "$a0" "$a1");;; do: ((struct.field_ref Log "sz" (![ptrT] "log")) <-[uint64T] ((![uint64T] (struct.field_ref Log "sz" (![ptrT] "log"))) + (let: "$a0" := (![sliceT] "bks") in slice.len "$a0")));;; - do: ((method_call #pkg_name' #"Log'ptr" #"writeHdr" #() (![ptrT] "log")) #());;; + do: ((method_call #pkg_name' #"Log'ptr" #"writeHdr" (![ptrT] "log")) #());;; return: (#true)). (* go: append_log.go:82:17 *) @@ -160,12 +160,12 @@ Definition Log__Append : val := rec: "Log__Append" "log" "bks" := exception_do (let: "log" := (ref_ty ptrT "log") in let: "bks" := (ref_ty sliceT "bks") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref Log "m" (![ptrT] "log")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref Log "m" (![ptrT] "log")))) #());;; let: "b" := (ref_ty boolT (zero_val boolT)) in let: "$r0" := (let: "$a0" := (![sliceT] "bks") in - (method_call #pkg_name' #"Log'ptr" #"append" #() (![ptrT] "log")) "$a0") in + (method_call #pkg_name' #"Log'ptr" #"append" (![ptrT] "log")) "$a0") in do: ("b" <-[boolT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref Log "m" (![ptrT] "log")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref Log "m" (![ptrT] "log")))) #());;; return: (![boolT] "b")). (* go: append_log.go:89:17 *) @@ -174,15 +174,15 @@ Definition Log__reset : val := exception_do (let: "log" := (ref_ty ptrT "log") in let: "$r0" := #(W64 0) in do: ((struct.field_ref Log "sz" (![ptrT] "log")) <-[uint64T] "$r0");;; - do: ((method_call #pkg_name' #"Log'ptr" #"writeHdr" #() (![ptrT] "log")) #())). + do: ((method_call #pkg_name' #"Log'ptr" #"writeHdr" (![ptrT] "log")) #())). (* go: append_log.go:94:17 *) Definition Log__Reset : val := rec: "Log__Reset" "log" <> := exception_do (let: "log" := (ref_ty ptrT "log") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref Log "m" (![ptrT] "log")))) #());;; - do: ((method_call #pkg_name' #"Log'ptr" #"reset" #() (![ptrT] "log")) #());;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref Log "m" (![ptrT] "log")))) #())). + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref Log "m" (![ptrT] "log")))) #());;; + do: ((method_call #pkg_name' #"Log'ptr" #"reset" (![ptrT] "log")) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref Log "m" (![ptrT] "log")))) #())). Definition vars' : list (go_string * go_type) := []. diff --git a/new/code/github_com/goose_lang/goose/testdata/examples/semantics.v b/new/code/github_com/goose_lang/goose/testdata/examples/semantics.v index 88cef3475..6a639ebe4 100644 --- a/new/code/github_com/goose_lang/goose/testdata/examples/semantics.v +++ b/new/code/github_com/goose_lang/goose/testdata/examples/semantics.v @@ -493,11 +493,11 @@ Definition roundtripEncDec32 : val := }])) in do: ("d" <-[ptrT] "$r0");;; do: (let: "$a0" := (let: "$a0" := #(W64 4) in - (method_call #pkg_name' #"Enc'ptr" #"consume" #() (![ptrT] "e")) "$a0") in + (method_call #pkg_name' #"Enc'ptr" #"consume" (![ptrT] "e")) "$a0") in let: "$a1" := (![uint32T] "x") in (func_call #primitive.pkg_name' #"UInt32Put"%go) "$a0" "$a1");;; return: (let: "$a0" := (let: "$a0" := #(W64 4) in - (method_call #pkg_name' #"Dec'ptr" #"consume" #() (![ptrT] "d")) "$a0") in + (method_call #pkg_name' #"Dec'ptr" #"consume" (![ptrT] "d")) "$a0") in (func_call #primitive.pkg_name' #"UInt32Get"%go) "$a0")). (* go: encoding.go:34:6 *) @@ -520,11 +520,11 @@ Definition roundtripEncDec64 : val := }])) in do: ("d" <-[ptrT] "$r0");;; do: (let: "$a0" := (let: "$a0" := #(W64 8) in - (method_call #pkg_name' #"Enc'ptr" #"consume" #() (![ptrT] "e")) "$a0") in + (method_call #pkg_name' #"Enc'ptr" #"consume" (![ptrT] "e")) "$a0") in let: "$a1" := (![uint64T] "x") in (func_call #primitive.pkg_name' #"UInt64Put"%go) "$a0" "$a1");;; return: (let: "$a0" := (let: "$a0" := #(W64 8) in - (method_call #pkg_name' #"Dec'ptr" #"consume" #() (![ptrT] "d")) "$a0") in + (method_call #pkg_name' #"Dec'ptr" #"consume" (![ptrT] "d")) "$a0") in (func_call #primitive.pkg_name' #"UInt64Get"%go) "$a0")). (* tests @@ -711,21 +711,21 @@ Definition failing_testFunctionOrdering : val := }]) in do: ("e2" <-[Editor] "$r0");;; (if: ((let: "$a0" := #(W64 2) in - (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" #() "e1") "$a0") + (let: "$a0" := #(W64 102) in - (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" #() "e2") "$a0")) ≠ #(W64 102) + (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" "e1") "$a0") + (let: "$a0" := #(W64 102) in + (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" "e2") "$a0")) ≠ #(W64 102) then return: (#false) else do: #());;; (if: (![uint64T] (slice.elem_ref uint64T (![sliceT] "arr") #(W64 0))) ≠ #(W64 101) then return: (#false) else do: #());;; (if: (let: "$a0" := (let: "$a0" := #(W64 3) in - (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" #() "e1") "$a0") in + (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" "e1") "$a0") in let: "$a1" := (let: "$a0" := #(W64 103) in - (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" #() "e2") "$a0") in + (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" "e2") "$a0") in let: "$a2" := (let: "$a0" := #(W64 104) in - (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" #() "e2") "$a0") in + (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" "e2") "$a0") in let: "$a3" := (let: "$a0" := #(W64 4) in - (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" #() "e1") "$a0") in + (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" "e1") "$a0") in (func_call #pkg_name' #"addFour64"%go) "$a0" "$a1" "$a2" "$a3") ≠ #(W64 210) then return: (#false) else do: #());;; @@ -737,9 +737,9 @@ Definition failing_testFunctionOrdering : val := else do: #());;; let: "p" := (ref_ty Pair (zero_val Pair)) in let: "$r0" := (let: "$x" := (let: "$a0" := #(W64 5) in - (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" #() "e1") "$a0") in + (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" "e1") "$a0") in let: "$y" := (let: "$a0" := #(W64 105) in - (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" #() "e2") "$a0") in + (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" "e2") "$a0") in struct.make Pair [{ "x" ::= "$x"; "y" ::= "$y" @@ -750,9 +750,9 @@ Definition failing_testFunctionOrdering : val := else do: #());;; let: "q" := (ref_ty Pair (zero_val Pair)) in let: "$r0" := (let: "$y" := (let: "$a0" := #(W64 6) in - (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" #() "e1") "$a0") in + (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" "e1") "$a0") in let: "$x" := (let: "$a0" := #(W64 106) in - (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" #() "e2") "$a0") in + (method_call #pkg_name' #"Editor'ptr" #"AdvanceReturn" "e2") "$a0") in struct.make Pair [{ "x" ::= "$x"; "y" ::= "$y" @@ -1049,8 +1049,8 @@ Definition testsUseLocks : val := exception_do (let: "m" := (ref_ty ptrT (zero_val ptrT)) in let: "$r0" := (ref_ty sync.Mutex (zero_val sync.Mutex)) in do: ("m" <-[ptrT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] "m")) #());;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] "m")) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] "m")) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] "m")) #());;; return: (#true)). (* helpers @@ -1132,7 +1132,7 @@ Definition testForLoopWait : val := }]) in do: ("ls" <-[LoopStruct] "$r0");;; do: (let: "$a0" := #(W64 3) in - (method_call #pkg_name' #"LoopStruct" #"forLoopWait" "forLoopWait" #() (![LoopStruct] "ls")) "$a0");;; + (method_call #pkg_name' #"LoopStruct" #"forLoopWait" (![LoopStruct] "ls")) "$a0");;; return: ((![uint64T] (![ptrT] (struct.field_ref LoopStruct "loopNext" "ls"))) = #(W64 4))). (* go: loops.go:59:6 *) @@ -1828,9 +1828,9 @@ Definition testLinearize : val := exception_do (let: "m" := (ref_ty ptrT (zero_val ptrT)) in let: "$r0" := (ref_ty sync.Mutex (zero_val sync.Mutex)) in do: ("m" <-[ptrT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] "m")) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] "m")) #());;; do: ((func_call #primitive.pkg_name' #"Linearize"%go) #());;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] "m")) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] "m")) #());;; return: (#true)). Definition BoolTest : go_type := structT [ @@ -2082,25 +2082,25 @@ Definition testOverwriteArray : val := do: ("ae2" <-[ptrT] "$r0");;; do: (let: "$a0" := (![sliceT] "arr") in let: "$a1" := #(W64 103) in - (method_call #pkg_name' #"ArrayEditor'ptr" #"Advance" #() (![ptrT] "ae2")) "$a0" "$a1");;; + (method_call #pkg_name' #"ArrayEditor'ptr" #"Advance" (![ptrT] "ae2")) "$a0" "$a1");;; do: (let: "$a0" := (![sliceT] "arr") in let: "$a1" := #(W64 104) in - (method_call #pkg_name' #"ArrayEditor'ptr" #"Advance" #() (![ptrT] "ae2")) "$a0" "$a1");;; + (method_call #pkg_name' #"ArrayEditor'ptr" #"Advance" (![ptrT] "ae2")) "$a0" "$a1");;; do: (let: "$a0" := (![sliceT] "arr") in let: "$a1" := #(W64 105) in - (method_call #pkg_name' #"ArrayEditor'ptr" #"Advance" #() (![ptrT] "ae2")) "$a0" "$a1");;; + (method_call #pkg_name' #"ArrayEditor'ptr" #"Advance" (![ptrT] "ae2")) "$a0" "$a1");;; do: (let: "$a0" := (![sliceT] "arr") in let: "$a1" := #(W64 2) in - (method_call #pkg_name' #"ArrayEditor'ptr" #"Advance" #() (![ptrT] "ae1")) "$a0" "$a1");;; + (method_call #pkg_name' #"ArrayEditor'ptr" #"Advance" (![ptrT] "ae1")) "$a0" "$a1");;; do: (let: "$a0" := (![sliceT] "arr") in let: "$a1" := #(W64 3) in - (method_call #pkg_name' #"ArrayEditor'ptr" #"Advance" #() (![ptrT] "ae1")) "$a0" "$a1");;; + (method_call #pkg_name' #"ArrayEditor'ptr" #"Advance" (![ptrT] "ae1")) "$a0" "$a1");;; do: (let: "$a0" := (![sliceT] "arr") in let: "$a1" := #(W64 4) in - (method_call #pkg_name' #"ArrayEditor'ptr" #"Advance" #() (![ptrT] "ae1")) "$a0" "$a1");;; + (method_call #pkg_name' #"ArrayEditor'ptr" #"Advance" (![ptrT] "ae1")) "$a0" "$a1");;; do: (let: "$a0" := (![sliceT] "arr") in let: "$a1" := #(W64 5) in - (method_call #pkg_name' #"ArrayEditor'ptr" #"Advance" #() (![ptrT] "ae1")) "$a0" "$a1");;; + (method_call #pkg_name' #"ArrayEditor'ptr" #"Advance" (![ptrT] "ae1")) "$a0" "$a1");;; (if: ((((![uint64T] (slice.elem_ref uint64T (![sliceT] "arr") #(W64 0))) + (![uint64T] (slice.elem_ref uint64T (![sliceT] "arr") #(W64 1)))) + (![uint64T] (slice.elem_ref uint64T (![sliceT] "arr") #(W64 2)))) + (![uint64T] (slice.elem_ref uint64T (![sliceT] "arr") #(W64 3)))) ≥ #(W64 100) then return: (#false) else do: #());;; @@ -2151,7 +2151,7 @@ Definition Bar__mutate : val := Definition Foo__mutateBar : val := rec: "Foo__mutateBar" "foo" <> := exception_do (let: "foo" := (ref_ty ptrT "foo") in - do: ((method_call #pkg_name' #"Bar'ptr" #"mutate" #() (struct.field_ref Foo "bar" (![ptrT] "foo"))) #())). + do: ((method_call #pkg_name' #"Bar'ptr" #"mutate" (struct.field_ref Foo "bar" (![ptrT] "foo"))) #())). (* go: struct_pointers.go:23:6 *) Definition testFooBarMutation : val := @@ -2167,7 +2167,7 @@ Definition testFooBarMutation : val := "bar" ::= "$bar" }]) in do: ("x" <-[Foo] "$r0");;; - do: ((method_call #pkg_name' #"Foo'ptr" #"mutateBar" #() "x") #());;; + do: ((method_call #pkg_name' #"Foo'ptr" #"mutateBar" "x") #());;; return: ((![uint64T] (struct.field_ref Bar "a" (struct.field_ref Foo "bar" "x"))) = #(W64 2))). Definition TwoInts : go_type := structT [ @@ -2240,20 +2240,20 @@ Definition testStructUpdates : val := let: "ns" := (ref_ty ptrT (zero_val ptrT)) in let: "$r0" := ((func_call #pkg_name' #"NewS"%go) #()) in do: ("ns" <-[ptrT] "$r0");;; - let: "$r0" := ((![boolT] "ok") && (((method_call #pkg_name' #"S'ptr" #"readA" #() (![ptrT] "ns")) #()) = #(W64 2))) in + let: "$r0" := ((![boolT] "ok") && (((method_call #pkg_name' #"S'ptr" #"readA" (![ptrT] "ns")) #()) = #(W64 2))) in do: ("ok" <-[boolT] "$r0");;; let: "b1" := (ref_ty TwoInts (zero_val TwoInts)) in - let: "$r0" := ((method_call #pkg_name' #"S'ptr" #"readB" #() (![ptrT] "ns")) #()) in + let: "$r0" := ((method_call #pkg_name' #"S'ptr" #"readB" (![ptrT] "ns")) #()) in do: ("b1" <-[TwoInts] "$r0");;; let: "$r0" := ((![boolT] "ok") && ((![uint64T] (struct.field_ref TwoInts "x" "b1")) = #(W64 1))) in do: ("ok" <-[boolT] "$r0");;; - do: ((method_call #pkg_name' #"S'ptr" #"negateC" #() (![ptrT] "ns")) #());;; + do: ((method_call #pkg_name' #"S'ptr" #"negateC" (![ptrT] "ns")) #());;; let: "$r0" := ((![boolT] "ok") && ((![boolT] (struct.field_ref S "c" (![ptrT] "ns"))) = #false)) in do: ("ok" <-[boolT] "$r0");;; let: "$r0" := #(W64 3) in do: ((struct.field_ref TwoInts "x" "b1") <-[uint64T] "$r0");;; let: "b2" := (ref_ty TwoInts (zero_val TwoInts)) in - let: "$r0" := ((method_call #pkg_name' #"S'ptr" #"readB" #() (![ptrT] "ns")) #()) in + let: "$r0" := ((method_call #pkg_name' #"S'ptr" #"readB" (![ptrT] "ns")) #()) in do: ("b2" <-[TwoInts] "$r0");;; let: "$r0" := ((![boolT] "ok") && ((![uint64T] (struct.field_ref TwoInts "x" "b2")) = #(W64 1))) in do: ("ok" <-[boolT] "$r0");;; @@ -2263,8 +2263,8 @@ Definition testStructUpdates : val := let: "$r0" := ((![boolT] "ok") && ((![uint64T] (struct.field_ref TwoInts "x" (![ptrT] "b3"))) = #(W64 1))) in do: ("ok" <-[boolT] "$r0");;; do: (let: "$a0" := #(W64 4) in - (method_call #pkg_name' #"S'ptr" #"updateBValX" #() (![ptrT] "ns")) "$a0");;; - let: "$r0" := ((![boolT] "ok") && ((struct.field_get TwoInts "x" ((method_call #pkg_name' #"S" #"readBVal" "readBVal" #() (![S] (![ptrT] "ns"))) #())) = #(W64 4))) in + (method_call #pkg_name' #"S'ptr" #"updateBValX" (![ptrT] "ns")) "$a0");;; + let: "$r0" := ((![boolT] "ok") && ((struct.field_get TwoInts "x" ((method_call #pkg_name' #"S" #"readBVal" (![S] (![ptrT] "ns"))) #())) = #(W64 4))) in do: ("ok" <-[boolT] "$r0");;; return: (![boolT] "ok")). @@ -2634,13 +2634,13 @@ Definition New : val := Definition Log__lock : val := rec: "Log__lock" "l" <> := exception_do (let: "l" := (ref_ty Log "l") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref Log "l" "l"))) #())). + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref Log "l" "l"))) #())). (* go: wal.go:56:14 *) Definition Log__unlock : val := rec: "Log__unlock" "l" <> := exception_do (let: "l" := (ref_ty Log "l") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref Log "l" "l"))) #())). + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref Log "l" "l"))) #())). (* BeginTxn allocates space for a new transaction in the log. @@ -2650,16 +2650,16 @@ Definition Log__unlock : val := Definition Log__BeginTxn : val := rec: "Log__BeginTxn" "l" <> := exception_do (let: "l" := (ref_ty Log "l") in - do: ((method_call #pkg_name' #"Log" #"lock" "lock" #() (![Log] "l")) #());;; + do: ((method_call #pkg_name' #"Log" #"lock" (![Log] "l")) #());;; let: "length" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := (![uint64T] (![ptrT] (struct.field_ref Log "length" "l"))) in do: ("length" <-[uint64T] "$r0");;; (if: (![uint64T] "length") = #(W64 0) then - do: ((method_call #pkg_name' #"Log" #"unlock" "unlock" #() (![Log] "l")) #());;; + do: ((method_call #pkg_name' #"Log" #"unlock" (![Log] "l")) #());;; return: (#true) else do: #());;; - do: ((method_call #pkg_name' #"Log" #"unlock" "unlock" #() (![Log] "l")) #());;; + do: ((method_call #pkg_name' #"Log" #"unlock" (![Log] "l")) #());;; return: (#false)). (* Read from the logical disk. @@ -2671,7 +2671,7 @@ Definition Log__Read : val := rec: "Log__Read" "l" "a" := exception_do (let: "l" := (ref_ty Log "l") in let: "a" := (ref_ty uint64T "a") in - do: ((method_call #pkg_name' #"Log" #"lock" "lock" #() (![Log] "l")) #());;; + do: ((method_call #pkg_name' #"Log" #"lock" (![Log] "l")) #());;; let: "ok" := (ref_ty boolT (zero_val boolT)) in let: "v" := (ref_ty sliceT (zero_val sliceT)) in let: ("$ret0", "$ret1") := (map.get (![mapT uint64T sliceT] (struct.field_ref Log "cache" "l")) (![uint64T] "a")) in @@ -2681,10 +2681,10 @@ Definition Log__Read : val := do: ("ok" <-[boolT] "$r1");;; (if: ![boolT] "ok" then - do: ((method_call #pkg_name' #"Log" #"unlock" "unlock" #() (![Log] "l")) #());;; + do: ((method_call #pkg_name' #"Log" #"unlock" (![Log] "l")) #());;; return: (![sliceT] "v") else do: #());;; - do: ((method_call #pkg_name' #"Log" #"unlock" "unlock" #() (![Log] "l")) #());;; + do: ((method_call #pkg_name' #"Log" #"unlock" (![Log] "l")) #());;; let: "dv" := (ref_ty sliceT (zero_val sliceT)) in let: "$r0" := (let: "$a0" := (logLength + (![uint64T] "a")) in (interface.get "Read" (![disk.Disk] (struct.field_ref Log "d" "l"))) "$a0") in @@ -2708,7 +2708,7 @@ Definition Log__Write : val := exception_do (let: "l" := (ref_ty Log "l") in let: "v" := (ref_ty sliceT "v") in let: "a" := (ref_ty uint64T "a") in - do: ((method_call #pkg_name' #"Log" #"lock" "lock" #() (![Log] "l")) #());;; + do: ((method_call #pkg_name' #"Log" #"lock" (![Log] "l")) #());;; let: "length" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := (![uint64T] (![ptrT] (struct.field_ref Log "length" "l"))) in do: ("length" <-[uint64T] "$r0");;; @@ -2734,7 +2734,7 @@ Definition Log__Write : val := do: (map.insert (![mapT uint64T sliceT] (struct.field_ref Log "cache" "l")) (![uint64T] "a") "$r0");;; let: "$r0" := ((![uint64T] "length") + #(W64 1)) in do: ((![ptrT] (struct.field_ref Log "length" "l")) <-[uint64T] "$r0");;; - do: ((method_call #pkg_name' #"Log" #"unlock" "unlock" #() (![Log] "l")) #())). + do: ((method_call #pkg_name' #"Log" #"unlock" (![Log] "l")) #())). (* Commit the current transaction. @@ -2742,11 +2742,11 @@ Definition Log__Write : val := Definition Log__Commit : val := rec: "Log__Commit" "l" <> := exception_do (let: "l" := (ref_ty Log "l") in - do: ((method_call #pkg_name' #"Log" #"lock" "lock" #() (![Log] "l")) #());;; + do: ((method_call #pkg_name' #"Log" #"lock" (![Log] "l")) #());;; let: "length" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := (![uint64T] (![ptrT] (struct.field_ref Log "length" "l"))) in do: ("length" <-[uint64T] "$r0");;; - do: ((method_call #pkg_name' #"Log" #"unlock" "unlock" #() (![Log] "l")) #());;; + do: ((method_call #pkg_name' #"Log" #"unlock" (![Log] "l")) #());;; let: "header" := (ref_ty sliceT (zero_val sliceT)) in let: "$r0" := (let: "$a0" := (![uint64T] "length") in (func_call #pkg_name' #"intToBlock"%go) "$a0") in @@ -2828,7 +2828,7 @@ Definition clearLog : val := Definition Log__Apply : val := rec: "Log__Apply" "l" <> := exception_do (let: "l" := (ref_ty Log "l") in - do: ((method_call #pkg_name' #"Log" #"lock" "lock" #() (![Log] "l")) #());;; + do: ((method_call #pkg_name' #"Log" #"lock" (![Log] "l")) #());;; let: "length" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := (![uint64T] (![ptrT] (struct.field_ref Log "length" "l"))) in do: ("length" <-[uint64T] "$r0");;; @@ -2839,7 +2839,7 @@ Definition Log__Apply : val := (func_call #pkg_name' #"clearLog"%go) "$a0");;; let: "$r0" := #(W64 0) in do: ((![ptrT] (struct.field_ref Log "length" "l")) <-[uint64T] "$r0");;; - do: ((method_call #pkg_name' #"Log" #"unlock" "unlock" #() (![Log] "l")) #())). + do: ((method_call #pkg_name' #"Log" #"unlock" (![Log] "l")) #())). (* Open recovers the log following a crash or shutdown @@ -2895,27 +2895,27 @@ Definition disabled_testWal : val := let: "lg" := (ref_ty Log (zero_val Log)) in let: "$r0" := ((func_call #pkg_name' #"New"%go) #()) in do: ("lg" <-[Log] "$r0");;; - (if: (method_call #pkg_name' #"Log" #"BeginTxn" "BeginTxn" #() (![Log] "lg")) #() + (if: (method_call #pkg_name' #"Log" #"BeginTxn" (![Log] "lg")) #() then do: (let: "$a0" := #(W64 2) in let: "$a1" := (let: "$a0" := #(W64 11) in (func_call #pkg_name' #"intToBlock"%go) "$a0") in - (method_call #pkg_name' #"Log" #"Write" "Write" #() (![Log] "lg")) "$a0" "$a1") + (method_call #pkg_name' #"Log" #"Write" (![Log] "lg")) "$a0" "$a1") else do: #());;; let: "$r0" := ((![boolT] "ok") && ((let: "$a0" := (let: "$a0" := #(W64 2) in - (method_call #pkg_name' #"Log" #"Read" "Read" #() (![Log] "lg")) "$a0") in + (method_call #pkg_name' #"Log" #"Read" (![Log] "lg")) "$a0") in (func_call #pkg_name' #"blockToInt"%go) "$a0") = #(W64 11))) in do: ("ok" <-[boolT] "$r0");;; let: "$r0" := ((![boolT] "ok") && ((let: "$a0" := (let: "$a0" := #(W64 0) in (interface.get "Read" (![disk.Disk] (struct.field_ref Log "d" "lg"))) "$a0") in (func_call #pkg_name' #"blockToInt"%go) "$a0") = #(W64 0))) in do: ("ok" <-[boolT] "$r0");;; - do: ((method_call #pkg_name' #"Log" #"Commit" "Commit" #() (![Log] "lg")) #());;; + do: ((method_call #pkg_name' #"Log" #"Commit" (![Log] "lg")) #());;; let: "$r0" := ((![boolT] "ok") && ((let: "$a0" := (let: "$a0" := #(W64 0) in (interface.get "Read" (![disk.Disk] (struct.field_ref Log "d" "lg"))) "$a0") in (func_call #pkg_name' #"blockToInt"%go) "$a0") = #(W64 1))) in do: ("ok" <-[boolT] "$r0");;; - do: ((method_call #pkg_name' #"Log" #"Apply" "Apply" #() (![Log] "lg")) #());;; + do: ((method_call #pkg_name' #"Log" #"Apply" (![Log] "lg")) #());;; let: "$r0" := ((![boolT] "ok") && ((![uint64T] (![ptrT] (struct.field_ref Log "length" "lg"))) = #(W64 0))) in do: ("ok" <-[boolT] "$r0");;; return: (![boolT] "ok")). @@ -2925,30 +2925,30 @@ Definition vars' : list (go_string * go_type) := []. Definition functions' : list (go_string * val) := [("findKey"%go, findKey); ("allocate"%go, allocate); ("freeRange"%go, freeRange); ("testAllocateDistinct"%go, testAllocateDistinct); ("testAllocateFull"%go, testAllocateFull); ("testExplicitBlockStmt"%go, testExplicitBlockStmt); ("testMinUint64"%go, testMinUint64); ("testMaxUint64"%go, testMaxUint64); ("adder"%go, adder); ("testClosureBasic"%go, testClosureBasic); ("testCompareAll"%go, testCompareAll); ("testCompareGT"%go, testCompareGT); ("testCompareGE"%go, testCompareGE); ("testCompareLT"%go, testCompareLT); ("testCompareLE"%go, testCompareLE); ("literalCast"%go, literalCast); ("stringToByteSlice"%go, stringToByteSlice); ("byteSliceToString"%go, byteSliceToString); ("testByteSliceToString"%go, testByteSliceToString); ("testCopySimple"%go, testCopySimple); ("testCopyShorterDst"%go, testCopyShorterDst); ("testCopyShorterSrc"%go, testCopyShorterSrc); ("deferSimple"%go, deferSimple); ("testDefer"%go, testDefer); ("testDeferFuncLit"%go, testDeferFuncLit); ("roundtripEncDec32"%go, roundtripEncDec32); ("roundtripEncDec64"%go, roundtripEncDec64); ("testEncDec32Simple"%go, testEncDec32Simple); ("failing_testEncDec32"%go, failing_testEncDec32); ("testEncDec64Simple"%go, testEncDec64Simple); ("testEncDec64"%go, testEncDec64); ("FirstClassFunction"%go, FirstClassFunction); ("ApplyF"%go, ApplyF); ("testFirstClassFunction"%go, testFirstClassFunction); ("addFour64"%go, addFour64); ("failing_testFunctionOrdering"%go, failing_testFunctionOrdering); ("storeAndReturn"%go, storeAndReturn); ("failing_testArgumentOrder"%go, failing_testArgumentOrder); ("identity"%go, identity); ("identity2"%go, identity2); ("testGenericStructs"%go, testGenericStructs); ("testU64ToU32"%go, testU64ToU32); ("testU32Len"%go, testU32Len); ("failing_testU32NewtypeLen"%go, failing_testU32NewtypeLen); ("measureArea"%go, measureArea); ("measureVolumePlusNM"%go, measureVolumePlusNM); ("measureVolume"%go, measureVolume); ("testBasicInterface"%go, testBasicInterface); ("testAssignInterface"%go, testAssignInterface); ("testMultipleInterface"%go, testMultipleInterface); ("testBinaryExprInterface"%go, testBinaryExprInterface); ("testIfStmtInterface"%go, testIfStmtInterface); ("testsUseLocks"%go, testsUseLocks); ("standardForLoop"%go, standardForLoop); ("testStandardForLoop"%go, testStandardForLoop); ("testForLoopWait"%go, testForLoopWait); ("testBreakFromLoopWithContinue"%go, testBreakFromLoopWithContinue); ("testBreakFromLoopNoContinue"%go, testBreakFromLoopNoContinue); ("testBreakFromLoopNoContinueDouble"%go, testBreakFromLoopNoContinueDouble); ("testBreakFromLoopForOnly"%go, testBreakFromLoopForOnly); ("testBreakFromLoopAssignAndContinue"%go, testBreakFromLoopAssignAndContinue); ("testNestedLoops"%go, testNestedLoops); ("testNestedGoStyleLoops"%go, testNestedGoStyleLoops); ("testNestedGoStyleLoopsNoComparison"%go, testNestedGoStyleLoopsNoComparison); ("IterateMapKeys"%go, IterateMapKeys); ("IterateMapValues"%go, IterateMapValues); ("testIterateMap"%go, testIterateMap); ("testMapSize"%go, testMapSize); ("multReturnTwo"%go, multReturnTwo); ("testAssignTwo"%go, testAssignTwo); ("multReturnThree"%go, multReturnThree); ("testAssignThree"%go, testAssignThree); ("testMultipleAssignToMap"%go, testMultipleAssignToMap); ("returnTwo"%go, returnTwo); ("testReturnTwo"%go, testReturnTwo); ("testAnonymousBinding"%go, testAnonymousBinding); ("returnThree"%go, returnThree); ("testReturnThree"%go, testReturnThree); ("returnFour"%go, returnFour); ("testReturnFour"%go, testReturnFour); ("failing_testCompareSliceToNil"%go, failing_testCompareSliceToNil); ("testComparePointerToNil"%go, testComparePointerToNil); ("testCompareNilToNil"%go, testCompareNilToNil); ("testComparePointerWrappedToNil"%go, testComparePointerWrappedToNil); ("testComparePointerWrappedDefaultToNil"%go, testComparePointerWrappedDefaultToNil); ("reverseAssignOps64"%go, reverseAssignOps64); ("reverseAssignOps32"%go, reverseAssignOps32); ("add64Equals"%go, add64Equals); ("sub64Equals"%go, sub64Equals); ("testReverseAssignOps64"%go, testReverseAssignOps64); ("failing_testReverseAssignOps32"%go, failing_testReverseAssignOps32); ("testAdd64Equals"%go, testAdd64Equals); ("testSub64Equals"%go, testSub64Equals); ("testDivisionPrecedence"%go, testDivisionPrecedence); ("testModPrecedence"%go, testModPrecedence); ("testBitwiseOpsPrecedence"%go, testBitwiseOpsPrecedence); ("testArithmeticShifts"%go, testArithmeticShifts); ("testBitAddAnd"%go, testBitAddAnd); ("testManyParentheses"%go, testManyParentheses); ("testPlusTimes"%go, testPlusTimes); ("testOrCompareSimple"%go, testOrCompareSimple); ("testOrCompare"%go, testOrCompare); ("testAndCompare"%go, testAndCompare); ("testShiftMod"%go, testShiftMod); ("testLinearize"%go, testLinearize); ("CheckTrue"%go, CheckTrue); ("CheckFalse"%go, CheckFalse); ("testShortcircuitAndTF"%go, testShortcircuitAndTF); ("testShortcircuitAndFT"%go, testShortcircuitAndFT); ("testShortcircuitOrTF"%go, testShortcircuitOrTF); ("testShortcircuitOrFT"%go, testShortcircuitOrFT); ("testSliceOps"%go, testSliceOps); ("testSliceCapacityOps"%go, testSliceCapacityOps); ("testOverwriteArray"%go, testOverwriteArray); ("testSliceLiteral"%go, testSliceLiteral); ("testFooBarMutation"%go, testFooBarMutation); ("NewS"%go, NewS); ("testStructUpdates"%go, testStructUpdates); ("testNestedStructUpdates"%go, testNestedStructUpdates); ("testStructConstructions"%go, testStructConstructions); ("testIncompleteStruct"%go, testIncompleteStruct); ("testStoreInStructVar"%go, testStoreInStructVar); ("testStoreInStructPointerVar"%go, testStoreInStructPointerVar); ("testStoreComposite"%go, testStoreComposite); ("testStoreSlice"%go, testStoreSlice); ("testStructFieldFunc"%go, testStructFieldFunc); ("testSwitchVal"%go, testSwitchVal); ("testSwitchMultiple"%go, testSwitchMultiple); ("testSwitchDefaultTrue"%go, testSwitchDefaultTrue); ("testSwitchConversion"%go, testSwitchConversion); ("testPointerAssignment"%go, testPointerAssignment); ("testAddressOfLocal"%go, testAddressOfLocal); ("testAnonymousAssign"%go, testAnonymousAssign); ("intToBlock"%go, intToBlock); ("blockToInt"%go, blockToInt); ("New"%go, New); ("getLogEntry"%go, getLogEntry); ("applyLog"%go, applyLog); ("clearLog"%go, clearLog); ("Open"%go, Open); ("disabled_testWal"%go, disabled_testWal)]. Definition msets' : list (go_string * (list (go_string * val))) := [("unit"%go, []); ("unit'ptr"%go, []); ("Enc"%go, []); ("Enc'ptr"%go, [("consume"%go, Enc__consume)]); ("Dec"%go, []); ("Dec'ptr"%go, [("consume"%go, Dec__consume)]); ("Editor"%go, []); ("Editor'ptr"%go, [("AdvanceReturn"%go, Editor__AdvanceReturn)]); ("Pair"%go, []); ("Pair'ptr"%go, []); ("genericStruct"%go, []); ("genericStruct'ptr"%go, []); ("genericStruct2"%go, []); ("genericStruct2'ptr"%go, []); ("nonGenericStruct"%go, []); ("nonGenericStruct'ptr"%go, []); ("IntMap"%go, []); ("IntMap'ptr"%go, []); ("Uint32"%go, []); ("Uint32'ptr"%go, []); ("SquareStruct"%go, [("Square"%go, SquareStruct__Square); ("Volume"%go, SquareStruct__Volume)]); ("SquareStruct'ptr"%go, [("Square"%go, (λ: "$recvAddr", - method_call #pkg_name' #"SquareStruct" #"Square" "Square" #() (![SquareStruct] "$recvAddr") - )); ("Volume"%go, (λ: "$recvAddr", - method_call #pkg_name' #"SquareStruct" #"Volume" "Volume" #() (![SquareStruct] "$recvAddr") - ))]); ("LoopStruct"%go, [("forLoopWait"%go, LoopStruct__forLoopWait)]); ("LoopStruct'ptr"%go, [("forLoopWait"%go, (λ: "$recvAddr", - method_call #pkg_name' #"LoopStruct" #"forLoopWait" "forLoopWait" #() (![LoopStruct] "$recvAddr") - ))]); ("BoolTest"%go, []); ("BoolTest'ptr"%go, []); ("ArrayEditor"%go, []); ("ArrayEditor'ptr"%go, [("Advance"%go, ArrayEditor__Advance)]); ("Bar"%go, []); ("Bar'ptr"%go, [("mutate"%go, Bar__mutate)]); ("Foo"%go, []); ("Foo'ptr"%go, [("mutateBar"%go, Foo__mutateBar)]); ("TwoInts"%go, []); ("TwoInts'ptr"%go, []); ("S"%go, [("readBVal"%go, S__readBVal)]); ("S'ptr"%go, [("negateC"%go, S__negateC); ("readA"%go, S__readA); ("readB"%go, S__readB); ("readBVal"%go, (λ: "$recvAddr", - method_call #pkg_name' #"S" #"readBVal" "readBVal" #() (![S] "$recvAddr") - )); ("updateBValX"%go, S__updateBValX)]); ("StructWrap"%go, []); ("StructWrap'ptr"%go, []); ("StructWithFunc"%go, []); ("StructWithFunc'ptr"%go, []); ("switchConcrete"%go, []); ("switchConcrete'ptr"%go, [("marker"%go, switchConcrete__marker)]); ("Log"%go, [("Apply"%go, Log__Apply); ("BeginTxn"%go, Log__BeginTxn); ("Commit"%go, Log__Commit); ("Read"%go, Log__Read); ("Size"%go, Log__Size); ("Write"%go, Log__Write); ("lock"%go, Log__lock); ("unlock"%go, Log__unlock)]); ("Log'ptr"%go, [("Apply"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Log" #"Apply" "Apply" #() (![Log] "$recvAddr") - )); ("BeginTxn"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Log" #"BeginTxn" "BeginTxn" #() (![Log] "$recvAddr") - )); ("Commit"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Log" #"Commit" "Commit" #() (![Log] "$recvAddr") - )); ("Read"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Log" #"Read" "Read" #() (![Log] "$recvAddr") - )); ("Size"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Log" #"Size" "Size" #() (![Log] "$recvAddr") - )); ("Write"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Log" #"Write" "Write" #() (![Log] "$recvAddr") - )); ("lock"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Log" #"lock" "lock" #() (![Log] "$recvAddr") - )); ("unlock"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Log" #"unlock" "unlock" #() (![Log] "$recvAddr") - ))])]. + method_call #pkg_name' #"SquareStruct" #"Square" (![SquareStruct] "$recvAddr") + )%V); ("Volume"%go, (λ: "$recvAddr", + method_call #pkg_name' #"SquareStruct" #"Volume" (![SquareStruct] "$recvAddr") + )%V)]); ("LoopStruct"%go, [("forLoopWait"%go, LoopStruct__forLoopWait)]); ("LoopStruct'ptr"%go, [("forLoopWait"%go, (λ: "$recvAddr", + method_call #pkg_name' #"LoopStruct" #"forLoopWait" (![LoopStruct] "$recvAddr") + )%V)]); ("BoolTest"%go, []); ("BoolTest'ptr"%go, []); ("ArrayEditor"%go, []); ("ArrayEditor'ptr"%go, [("Advance"%go, ArrayEditor__Advance)]); ("Bar"%go, []); ("Bar'ptr"%go, [("mutate"%go, Bar__mutate)]); ("Foo"%go, []); ("Foo'ptr"%go, [("mutateBar"%go, Foo__mutateBar)]); ("TwoInts"%go, []); ("TwoInts'ptr"%go, []); ("S"%go, [("readBVal"%go, S__readBVal)]); ("S'ptr"%go, [("negateC"%go, S__negateC); ("readA"%go, S__readA); ("readB"%go, S__readB); ("readBVal"%go, (λ: "$recvAddr", + method_call #pkg_name' #"S" #"readBVal" (![S] "$recvAddr") + )%V); ("updateBValX"%go, S__updateBValX)]); ("StructWrap"%go, []); ("StructWrap'ptr"%go, []); ("StructWithFunc"%go, []); ("StructWithFunc'ptr"%go, []); ("switchConcrete"%go, []); ("switchConcrete'ptr"%go, [("marker"%go, switchConcrete__marker)]); ("Log"%go, [("Apply"%go, Log__Apply); ("BeginTxn"%go, Log__BeginTxn); ("Commit"%go, Log__Commit); ("Read"%go, Log__Read); ("Size"%go, Log__Size); ("Write"%go, Log__Write); ("lock"%go, Log__lock); ("unlock"%go, Log__unlock)]); ("Log'ptr"%go, [("Apply"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Log" #"Apply" (![Log] "$recvAddr") + )%V); ("BeginTxn"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Log" #"BeginTxn" (![Log] "$recvAddr") + )%V); ("Commit"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Log" #"Commit" (![Log] "$recvAddr") + )%V); ("Read"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Log" #"Read" (![Log] "$recvAddr") + )%V); ("Size"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Log" #"Size" (![Log] "$recvAddr") + )%V); ("Write"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Log" #"Write" (![Log] "$recvAddr") + )%V); ("lock"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Log" #"lock" (![Log] "$recvAddr") + )%V); ("unlock"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Log" #"unlock" (![Log] "$recvAddr") + )%V)])]. Definition initialize' : val := rec: "initialize'" <> := diff --git a/new/code/github_com/goose_lang/goose/testdata/examples/unittest.v b/new/code/github_com/goose_lang/goose/testdata/examples/unittest.v index 2292c26ed..a3b7646c0 100644 --- a/new/code/github_com/goose_lang/goose/testdata/examples/unittest.v +++ b/new/code/github_com/goose_lang/goose/testdata/examples/unittest.v @@ -242,7 +242,7 @@ Definition condvarWrapping : val := do: ("cond1" <-[ptrT] "$r0");;; let: "$r0" := (ref_ty sync.Mutex (zero_val sync.Mutex)) in do: ("mu" <-[ptrT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" #() (![ptrT] "cond1")) #())). + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" (![ptrT] "cond1")) #())). Definition GlobalConstant : expr := #"foo"%go. @@ -712,14 +712,14 @@ Definition useEmbeddedValField : val := Definition useEmbeddedMethod : val := rec: "useEmbeddedMethod" "d" := exception_do (let: "d" := (ref_ty embedD "d") in - return: (((method_call #pkg_name' #"embedB" #"Foo" "Foo" #() (![embedB] (![ptrT] (struct.field_ref embedC "embedB" (struct.field_ref embedD "embedC" "d"))))) #()) = ((method_call #pkg_name' #"embedA" #"Foo" "Foo" #() (![embedA] (struct.field_ref embedB "embedA" (![ptrT] (struct.field_ref embedC "embedB" (struct.field_ref embedD "embedC" "d")))))) #()))). + return: (((method_call #pkg_name' #"embedB" #"Foo" (![embedB] (![ptrT] (struct.field_ref embedC "embedB" (struct.field_ref embedD "embedC" "d"))))) #()) = ((method_call #pkg_name' #"embedA" #"Foo" (![embedA] (struct.field_ref embedB "embedA" (![ptrT] (struct.field_ref embedC "embedB" (struct.field_ref embedD "embedC" "d")))))) #()))). (* go: embedded.go:64:6 *) Definition useEmbeddedMethod2 : val := rec: "useEmbeddedMethod2" "d" := exception_do (let: "d" := (ref_ty embedD "d") in - do: ((method_call #pkg_name' #"embedB'ptr" #"Car" #() (![ptrT] (struct.field_ref embedC "embedB" (struct.field_ref embedD "embedC" "d")))) #());;; - return: (((method_call #pkg_name' #"embedA'ptr" #"Bar" #() (struct.field_ref embedB "embedA" (![ptrT] (struct.field_ref embedC "embedB" (struct.field_ref embedD "embedC" "d"))))) #()) = ((method_call #pkg_name' #"embedA'ptr" #"Bar" #() (struct.field_ref embedB "embedA" (![ptrT] (struct.field_ref embedC "embedB" (struct.field_ref embedD "embedC" "d"))))) #()))). + do: ((method_call #pkg_name' #"embedB'ptr" #"Car" (![ptrT] (struct.field_ref embedC "embedB" (struct.field_ref embedD "embedC" "d")))) #());;; + return: (((method_call #pkg_name' #"embedA'ptr" #"Bar" (struct.field_ref embedB "embedA" (![ptrT] (struct.field_ref embedC "embedB" (struct.field_ref embedD "embedC" "d"))))) #()) = ((method_call #pkg_name' #"embedA'ptr" #"Bar" (struct.field_ref embedB "embedA" (![ptrT] (struct.field_ref embedC "embedB" (struct.field_ref embedD "embedC" "d"))))) #()))). (* go: empty_functions.go:3:6 *) Definition empty : val := @@ -755,7 +755,7 @@ Definition Enc__UInt64 : val := exception_do (let: "e" := (ref_ty ptrT "e") in let: "x" := (ref_ty uint64T "x") in do: (let: "$a0" := (let: "$a0" := #(W64 8) in - (method_call #pkg_name' #"Enc'ptr" #"consume" #() (![ptrT] "e")) "$a0") in + (method_call #pkg_name' #"Enc'ptr" #"consume" (![ptrT] "e")) "$a0") in let: "$a1" := (![uint64T] "x") in (func_call #primitive.pkg_name' #"UInt64Put"%go) "$a0" "$a1")). @@ -765,7 +765,7 @@ Definition Enc__UInt32 : val := exception_do (let: "e" := (ref_ty ptrT "e") in let: "x" := (ref_ty uint32T "x") in do: (let: "$a0" := (let: "$a0" := #(W64 4) in - (method_call #pkg_name' #"Enc'ptr" #"consume" #() (![ptrT] "e")) "$a0") in + (method_call #pkg_name' #"Enc'ptr" #"consume" (![ptrT] "e")) "$a0") in let: "$a1" := (![uint32T] "x") in (func_call #primitive.pkg_name' #"UInt32Put"%go) "$a0" "$a1")). @@ -792,7 +792,7 @@ Definition Dec__UInt64 : val := rec: "Dec__UInt64" "d" <> := exception_do (let: "d" := (ref_ty ptrT "d") in return: (let: "$a0" := (let: "$a0" := #(W64 8) in - (method_call #pkg_name' #"Dec'ptr" #"consume" #() (![ptrT] "d")) "$a0") in + (method_call #pkg_name' #"Dec'ptr" #"consume" (![ptrT] "d")) "$a0") in (func_call #primitive.pkg_name' #"UInt64Get"%go) "$a0")). (* go: encoding.go:37:15 *) @@ -800,7 +800,7 @@ Definition Dec__UInt32 : val := rec: "Dec__UInt32" "d" <> := exception_do (let: "d" := (ref_ty ptrT "d") in return: (let: "$a0" := (let: "$a0" := #(W64 4) in - (method_call #pkg_name' #"Dec'ptr" #"consume" #() (![ptrT] "d")) "$a0") in + (method_call #pkg_name' #"Dec'ptr" #"consume" (![ptrT] "d")) "$a0") in (func_call #primitive.pkg_name' #"UInt32Get"%go) "$a0")). (* go: globals.go:3:6 *) @@ -812,13 +812,13 @@ Definition foo : val := Definition other : val := rec: "other" <> := exception_do (let: "$r0" := #"ok"%go in - do: ((globals.get #pkg_name' #"globalY"%go #()) <-[stringT] "$r0")). + do: ((globals.get #pkg_name' #"globalY"%go) <-[stringT] "$r0")). (* go: globals.go:18:6 *) Definition bar : val := rec: "bar" <> := exception_do (do: ((func_call #pkg_name' #"other"%go) #());;; - (if: ((![uint64T] (globals.get #pkg_name' #"GlobalX"%go #())) ≠ #(W64 10)) || ((![stringT] (globals.get #pkg_name' #"globalY"%go #())) ≠ #"ok"%go) + (if: ((![uint64T] (globals.get #pkg_name' #"GlobalX"%go)) ≠ #(W64 10)) || ((![stringT] (globals.get #pkg_name' #"globalY"%go)) ≠ #"ok"%go) then do: (let: "$a0" := (interface.make #""%go #"string"%go #"bad"%go) in Panic "$a0") @@ -879,7 +879,7 @@ Definition testPassConcreteToInterfaceArg : val := do: ("f" <-[Fooer] "$r0");;; do: (let: "$a0" := (![Fooer] "f") in (func_call #pkg_name' #"fooConsumer"%go) "$a0");;; - do: ((method_call #pkg_name' #"concreteFooer'ptr" #"Foo" #() (![ptrT] "c")) #());;; + do: ((method_call #pkg_name' #"concreteFooer'ptr" #"Foo" (![ptrT] "c")) #());;; do: ((interface.get "Foo" (![Fooer] "f")) #())). (* go: interfaces.go:37:6 *) @@ -1131,8 +1131,8 @@ Definition useLocks : val := exception_do (let: "m" := (ref_ty ptrT (zero_val ptrT)) in let: "$r0" := (ref_ty sync.Mutex (zero_val sync.Mutex)) in do: ("m" <-[ptrT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] "m")) #());;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] "m")) #())). + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] "m")) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] "m")) #())). (* go: locks.go:11:6 *) Definition useCondVar : val := @@ -1144,10 +1144,10 @@ Definition useCondVar : val := let: "$r0" := (let: "$a0" := (interface.make #sync.pkg_name' #"Mutex'ptr" (![ptrT] "m")) in (func_call #sync.pkg_name' #"NewCond"%go) "$a0") in do: ("c" <-[ptrT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] "m")) #());;; - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" #() (![ptrT] "c")) #());;; - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" #() (![ptrT] "c")) #());;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] "m")) #())). + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] "m")) #());;; + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" (![ptrT] "c")) #());;; + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" (![ptrT] "c")) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] "m")) #())). Definition hasCondVar : go_type := structT [ "cond" :: ptrT @@ -1561,8 +1561,8 @@ Definition wrapExternalStruct : go_type := structT [ Definition wrapExternalStruct__moveUint64 : val := rec: "wrapExternalStruct__moveUint64" "w" <> := exception_do (let: "w" := (ref_ty wrapExternalStruct "w") in - do: (let: "$a0" := ((method_call #marshal.pkg_name' #"Dec" #"GetInt" "GetInt" #() (![marshal.Dec] (struct.field_ref wrapExternalStruct "d" "w"))) #()) in - (method_call #marshal.pkg_name' #"Enc" #"PutInt" "PutInt" #() (![marshal.Enc] (struct.field_ref wrapExternalStruct "e" "w"))) "$a0")). + do: (let: "$a0" := ((method_call #marshal.pkg_name' #"Dec" #"GetInt" (![marshal.Dec] (struct.field_ref wrapExternalStruct "d" "w"))) #()) in + (method_call #marshal.pkg_name' #"Enc" #"PutInt" (![marshal.Enc] (struct.field_ref wrapExternalStruct "e" "w"))) "$a0")). (* go: panic.go:3:6 *) Definition PanicAtTheDisco : val := @@ -1627,7 +1627,7 @@ Definition R : go_type := structT [ Definition R__recurMethod : val := rec: "R__recurMethod" "r" <> := exception_do (let: "r" := (ref_ty ptrT "r") in - do: ((method_call #pkg_name' #"R'ptr" #"recurMethod" #() (![ptrT] "r")) #())). + do: ((method_call #pkg_name' #"R'ptr" #"recurMethod" (![ptrT] "r")) #())). Definition Other : go_type := structT [ "RecursiveEmbedded" :: ptrT @@ -1641,7 +1641,7 @@ Definition RecursiveEmbedded : go_type := structT [ Definition RecursiveEmbedded__recurEmbeddedMethod : val := rec: "RecursiveEmbedded__recurEmbeddedMethod" "r" <> := exception_do (let: "r" := (ref_ty ptrT "r") in - do: ((method_call #pkg_name' #"RecursiveEmbedded'ptr" #"recurEmbeddedMethod" #() (![ptrT] (struct.field_ref Other "RecursiveEmbedded" (struct.field_ref RecursiveEmbedded "Other" (![ptrT] "r"))))) #())). + do: ((method_call #pkg_name' #"RecursiveEmbedded'ptr" #"recurEmbeddedMethod" (![ptrT] (struct.field_ref Other "RecursiveEmbedded" (struct.field_ref RecursiveEmbedded "Other" (![ptrT] "r"))))) #())). Definition Block : go_type := structT [ "Value" :: uint64T @@ -1844,20 +1844,20 @@ Definition simpleSpawn : val := let: "$r0" := (ref_ty uint64T (zero_val uint64T)) in do: ("v" <-[ptrT] "$r0");;; let: "$go" := (λ: <>, - exception_do (do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] "l")) #());;; + exception_do (do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] "l")) #());;; let: "x" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := (![uint64T] (![ptrT] "v")) in do: ("x" <-[uint64T] "$r0");;; (if: (![uint64T] "x") > #(W64 0) then do: ((func_call #pkg_name' #"Skip"%go) #()) else do: #());;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] "l")) #())) + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] "l")) #())) ) in do: (Fork ("$go" #()));;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] "l")) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] "l")) #());;; let: "$r0" := #(W64 1) in do: ((![ptrT] "v") <-[uint64T] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] "l")) #())). + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] "l")) #())). (* go: spawn.go:26:6 *) Definition threadCode : val := @@ -1944,7 +1944,7 @@ Definition UseAdd : val := do: ("c" <-[Point] "$r0");;; let: "r" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := (let: "$a0" := #(W64 4) in - (method_call #pkg_name' #"Point" #"Add" "Add" #() (![Point] "c")) "$a0") in + (method_call #pkg_name' #"Point" #"Add" (![Point] "c")) "$a0") in do: ("r" <-[uint64T] "$r0");;; return: (![uint64T] "r")). @@ -2051,8 +2051,8 @@ Definition setField : val := Definition DoSomeLocking : val := rec: "DoSomeLocking" "l" := exception_do (let: "l" := (ref_ty ptrT "l") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] "l")) #());;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] "l")) #())). + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] "l")) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] "l")) #())). (* go: synchronization.go:15:6 *) Definition makeLock : val := @@ -2152,52 +2152,52 @@ Definition vars' : list (go_string * go_type) := [("GlobalX"%go, uint64T); ("glo Definition functions' : list (go_string * val) := [("takesArray"%go, takesArray); ("takesPtr"%go, takesPtr); ("usesArrayElemRef"%go, usesArrayElemRef); ("sum"%go, sum); ("arrayToSlice"%go, arrayToSlice); ("arrayLiteralKeyed"%go, arrayLiteralKeyed); ("chanBasic"%go, chanBasic); ("f"%go, f); ("chanSelect"%go, chanSelect); ("chanDirectional"%go, chanDirectional); ("doSubtleThings"%go, doSubtleThings); ("hasStartComment"%go, hasStartComment); ("hasEndComment"%go, hasEndComment); ("condvarWrapping"%go, condvarWrapping); ("useUntypedInt"%go, useUntypedInt); ("useUntypedString"%go, useUntypedString); ("conditionalReturn"%go, conditionalReturn); ("alwaysReturn"%go, alwaysReturn); ("alwaysReturnInNestedBranches"%go, alwaysReturnInNestedBranches); ("earlyReturn"%go, earlyReturn); ("conditionalAssign"%go, conditionalAssign); ("elseIf"%go, elseIf); ("ifStmtInitialization"%go, ifStmtInitialization); ("typedLiteral"%go, typedLiteral); ("literalCast"%go, literalCast); ("castInt"%go, castInt); ("stringToByteSlice"%go, stringToByteSlice); ("byteSliceToString"%go, byteSliceToString); ("stringToStringWrapper"%go, stringToStringWrapper); ("stringWrapperToString"%go, stringWrapperToString); ("testCopySimple"%go, testCopySimple); ("testCopyDifferentLengths"%go, testCopyDifferentLengths); ("atomicCreateStub"%go, atomicCreateStub); ("useSlice"%go, useSlice); ("useSliceIndexing"%go, useSliceIndexing); ("useMap"%go, useMap); ("usePtr"%go, usePtr); ("iterMapKeysAndValues"%go, iterMapKeysAndValues); ("iterMapKeys"%go, iterMapKeys); ("getRandom"%go, getRandom); ("diskArgument"%go, diskArgument); ("returnEmbedVal"%go, returnEmbedVal); ("returnEmbedValWithPointer"%go, returnEmbedValWithPointer); ("useEmbeddedField"%go, useEmbeddedField); ("useEmbeddedValField"%go, useEmbeddedValField); ("useEmbeddedMethod"%go, useEmbeddedMethod); ("useEmbeddedMethod2"%go, useEmbeddedMethod2); ("empty"%go, empty); ("emptyReturn"%go, emptyReturn); ("foo"%go, foo); ("other"%go, other); ("bar"%go, bar); ("TakesFunctionType"%go, TakesFunctionType); ("fooConsumer"%go, fooConsumer); ("testAssignConcreteToInterface"%go, testAssignConcreteToInterface); ("testPassConcreteToInterfaceArg"%go, testPassConcreteToInterfaceArg); ("testPassConcreteToInterfaceArgSpecial"%go, testPassConcreteToInterfaceArgSpecial); ("takesVarArgsInterface"%go, takesVarArgsInterface); ("test"%go, test); ("returnConcrete"%go, returnConcrete); ("testMultiReturn"%go, testMultiReturn); ("testReturnStatment"%go, testReturnStatment); ("testConversionInEq"%go, testConversionInEq); ("takeMultiple"%go, takeMultiple); ("giveMultiple"%go, giveMultiple); ("testConversionInMultipleReturnPassThrough"%go, testConversionInMultipleReturnPassThrough); ("testConversionInMultiplePassThrough"%go, testConversionInMultiplePassThrough); ("testPtrMset"%go, testPtrMset); ("useInts"%go, useInts); ("normalLiterals"%go, normalLiterals); ("outOfOrderLiteral"%go, outOfOrderLiteral); ("specialLiterals"%go, specialLiterals); ("oddLiterals"%go, oddLiterals); ("unKeyedLiteral"%go, unKeyedLiteral); ("useLocks"%go, useLocks); ("useCondVar"%go, useCondVar); ("ToBeDebugged"%go, ToBeDebugged); ("DoNothing"%go, DoNothing); ("DoSomething"%go, DoSomething); ("standardForLoop"%go, standardForLoop); ("conditionalInLoop"%go, conditionalInLoop); ("conditionalInLoopElse"%go, conditionalInLoopElse); ("nestedConditionalInLoopImplicitContinue"%go, nestedConditionalInLoopImplicitContinue); ("ImplicitLoopContinue"%go, ImplicitLoopContinue); ("ImplicitLoopContinue2"%go, ImplicitLoopContinue2); ("ImplicitLoopContinueAfterIfBreak"%go, ImplicitLoopContinueAfterIfBreak); ("nestedLoops"%go, nestedLoops); ("nestedGoStyleLoops"%go, nestedGoStyleLoops); ("sumSlice"%go, sumSlice); ("breakFromLoop"%go, breakFromLoop); ("clearMap"%go, clearMap); ("IterateMapKeys"%go, IterateMapKeys); ("MapSize"%go, MapSize); ("MapTypeAliases"%go, MapTypeAliases); ("StringMap"%go, StringMap); ("mapUpdateField"%go, mapUpdateField); ("returnTwo"%go, returnTwo); ("returnTwoWrapper"%go, returnTwoWrapper); ("multipleVar"%go, multipleVar); ("multiplePassThrough"%go, multiplePassThrough); ("multipleReturnPassThrough"%go, multipleReturnPassThrough); ("AssignNilSlice"%go, AssignNilSlice); ("AssignNilPointer"%go, AssignNilPointer); ("CompareSliceToNil"%go, CompareSliceToNil); ("ComparePointerToNil"%go, ComparePointerToNil); ("LogicalOperators"%go, LogicalOperators); ("LogicalAndEqualityOperators"%go, LogicalAndEqualityOperators); ("ArithmeticShifts"%go, ArithmeticShifts); ("BitwiseOps"%go, BitwiseOps); ("Comparison"%go, Comparison); ("AssignOps"%go, AssignOps); ("PanicAtTheDisco"%go, PanicAtTheDisco); ("Oracle"%go, Oracle); ("ReassignVars"%go, ReassignVars); ("recur"%go, recur); ("TwoDiskWrite"%go, TwoDiskWrite); ("TwoDiskRead"%go, TwoDiskRead); ("TwoDiskLock"%go, TwoDiskLock); ("TwoDiskUnlock"%go, TwoDiskUnlock); ("ReplicatedDiskRead"%go, ReplicatedDiskRead); ("ReplicatedDiskWrite"%go, ReplicatedDiskWrite); ("ReplicatedDiskRecover"%go, ReplicatedDiskRecover); ("sliceOps"%go, sliceOps); ("makeSingletonSlice"%go, makeSingletonSlice); ("makeAlias"%go, makeAlias); ("Skip"%go, Skip); ("simpleSpawn"%go, simpleSpawn); ("threadCode"%go, threadCode); ("loopSpawn"%go, loopSpawn); ("stringAppend"%go, stringAppend); ("stringLength"%go, stringLength); ("x"%go, x); ("UseAdd"%go, UseAdd); ("UseAddWithLiteral"%go, UseAddWithLiteral); ("NewS"%go, NewS); ("localSRef"%go, localSRef); ("setField"%go, setField); ("DoSomeLocking"%go, DoSomeLocking); ("makeLock"%go, makeLock); ("sleep"%go, sleep); ("mkInt"%go, mkInt); ("mkNothing"%go, mkNothing); ("convertToAlias"%go, convertToAlias); ("variadicFunc"%go, variadicFunc); ("testVariadicCall"%go, testVariadicCall); ("returnMultiple"%go, returnMultiple); ("testVariadicPassThrough"%go, testVariadicPassThrough)]. Definition msets' : list (go_string * (list (go_string * val))) := [("Foo"%go, []); ("Foo'ptr"%go, []); ("importantStruct"%go, []); ("importantStruct'ptr"%go, []); ("stringWrapper"%go, []); ("stringWrapper'ptr"%go, []); ("diskWrapper"%go, []); ("diskWrapper'ptr"%go, []); ("embedA"%go, [("Foo"%go, embedA__Foo)]); ("embedA'ptr"%go, [("Bar"%go, embedA__Bar); ("Foo"%go, (λ: "$recvAddr", - method_call #pkg_name' #"embedA" #"Foo" "Foo" #() (![embedA] "$recvAddr") - ))]); ("embedB"%go, [("Foo"%go, embedB__Foo)]); ("embedB'ptr"%go, [("Bar"%go, (λ: "$recvAddr", - method_call #pkg_name' #"embedA'ptr" #"Bar" #() (struct.field_ref embedB "embedA" "$recvAddr") - )); ("Car"%go, embedB__Car); ("Foo"%go, (λ: "$recvAddr", - method_call #pkg_name' #"embedB" #"Foo" "Foo" #() (![embedB] "$recvAddr") - ))]); ("embedC"%go, [("Bar"%go, (λ: "$recv", - method_call #pkg_name' #"embedA'ptr" #"Bar" #() (struct.field_ref embedB "embedA" (struct.field_get embedC "embedB" "$recv")) - )); ("Car"%go, (λ: "$recv", - method_call #pkg_name' #"embedB'ptr" #"Car" #() (struct.field_get embedC "embedB" "$recv") - )); ("Foo"%go, (λ: "$recv", - method_call #pkg_name' #"embedB" #"Foo" "Foo" #() (![embedB] (struct.field_get embedC "embedB" "$recv")) - ))]); ("embedC'ptr"%go, [("Bar"%go, (λ: "$recvAddr", - method_call #pkg_name' #"embedA'ptr" #"Bar" #() (struct.field_ref embedB "embedA" (![ptrT] (struct.field_ref embedC "embedB" "$recvAddr"))) - )); ("Car"%go, (λ: "$recvAddr", - method_call #pkg_name' #"embedB'ptr" #"Car" #() (![ptrT] (struct.field_ref embedC "embedB" "$recvAddr")) - )); ("Foo"%go, (λ: "$recvAddr", - method_call #pkg_name' #"embedB" #"Foo" "Foo" #() (![embedB] (![ptrT] (struct.field_ref embedC "embedB" "$recvAddr"))) - ))]); ("embedD"%go, [("Bar"%go, (λ: "$recv", - method_call #pkg_name' #"embedA'ptr" #"Bar" #() (struct.field_ref embedB "embedA" (struct.field_get embedC "embedB" (struct.field_get embedD "embedC" "$recv"))) - )); ("Car"%go, (λ: "$recv", - method_call #pkg_name' #"embedB'ptr" #"Car" #() (struct.field_get embedC "embedB" (struct.field_get embedD "embedC" "$recv")) - )); ("Foo"%go, (λ: "$recv", - method_call #pkg_name' #"embedB" #"Foo" "Foo" #() (![embedB] (struct.field_get embedC "embedB" (struct.field_get embedD "embedC" "$recv"))) - ))]); ("embedD'ptr"%go, [("Bar"%go, (λ: "$recvAddr", - method_call #pkg_name' #"embedA'ptr" #"Bar" #() (struct.field_ref embedB "embedA" (![ptrT] (struct.field_ref embedC "embedB" (struct.field_ref embedD "embedC" "$recvAddr")))) - )); ("Car"%go, (λ: "$recvAddr", - method_call #pkg_name' #"embedB'ptr" #"Car" #() (![ptrT] (struct.field_ref embedC "embedB" (struct.field_ref embedD "embedC" "$recvAddr"))) - )); ("Foo"%go, (λ: "$recvAddr", - method_call #pkg_name' #"embedB" #"Foo" "Foo" #() (![embedB] (![ptrT] (struct.field_ref embedC "embedB" (struct.field_ref embedD "embedC" "$recvAddr")))) - ))]); ("Enc"%go, []); ("Enc'ptr"%go, [("UInt32"%go, Enc__UInt32); ("UInt64"%go, Enc__UInt64); ("consume"%go, Enc__consume)]); ("Dec"%go, []); ("Dec'ptr"%go, [("UInt32"%go, Dec__UInt32); ("UInt64"%go, Dec__UInt64); ("consume"%go, Dec__consume)]); ("concreteFooer"%go, []); ("concreteFooer'ptr"%go, [("Foo"%go, concreteFooer__Foo)]); ("FooerUser"%go, []); ("FooerUser'ptr"%go, []); ("concrete1"%go, [("Foo"%go, concrete1__Foo)]); ("concrete1'ptr"%go, [("B"%go, concrete1__B); ("Foo"%go, (λ: "$recvAddr", - method_call #pkg_name' #"concrete1" #"Foo" "Foo" #() (![concrete1] "$recvAddr") - ))]); ("my_u32"%go, []); ("my_u32'ptr"%go, []); ("also_u32"%go, []); ("also_u32'ptr"%go, []); ("allTheLiterals"%go, []); ("allTheLiterals'ptr"%go, []); ("hasCondVar"%go, []); ("hasCondVar'ptr"%go, []); ("IntWrapper"%go, []); ("IntWrapper'ptr"%go, []); ("MapWrapper"%go, []); ("MapWrapper'ptr"%go, []); ("mapElem"%go, []); ("mapElem'ptr"%go, []); ("wrapExternalStruct"%go, [("moveUint64"%go, wrapExternalStruct__moveUint64)]); ("wrapExternalStruct'ptr"%go, [("moveUint64"%go, (λ: "$recvAddr", - method_call #pkg_name' #"wrapExternalStruct" #"moveUint64" "moveUint64" #() (![wrapExternalStruct] "$recvAddr") - ))]); ("typing"%go, []); ("typing'ptr"%go, []); ("composite"%go, []); ("composite'ptr"%go, []); ("R"%go, []); ("R'ptr"%go, [("recurMethod"%go, R__recurMethod)]); ("Other"%go, [("recurEmbeddedMethod"%go, (λ: "$recv", - method_call #pkg_name' #"RecursiveEmbedded'ptr" #"recurEmbeddedMethod" #() (struct.field_get Other "RecursiveEmbedded" "$recv") - ))]); ("Other'ptr"%go, [("recurEmbeddedMethod"%go, (λ: "$recvAddr", - method_call #pkg_name' #"RecursiveEmbedded'ptr" #"recurEmbeddedMethod" #() (![ptrT] (struct.field_ref Other "RecursiveEmbedded" "$recvAddr")) - ))]); ("RecursiveEmbedded"%go, []); ("RecursiveEmbedded'ptr"%go, [("recurEmbeddedMethod"%go, RecursiveEmbedded__recurEmbeddedMethod)]); ("Block"%go, []); ("Block'ptr"%go, []); ("SliceAlias"%go, []); ("SliceAlias'ptr"%go, []); ("thing"%go, []); ("thing'ptr"%go, []); ("sliceOfThings"%go, [("getThingRef"%go, sliceOfThings__getThingRef)]); ("sliceOfThings'ptr"%go, [("getThingRef"%go, (λ: "$recvAddr", - method_call #pkg_name' #"sliceOfThings" #"getThingRef" "getThingRef" #() (![sliceOfThings] "$recvAddr") - ))]); ("Point"%go, [("Add"%go, Point__Add); ("GetField"%go, Point__GetField)]); ("Point'ptr"%go, [("Add"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Point" #"Add" "Add" #() (![Point] "$recvAddr") - )); ("GetField"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Point" #"GetField" "GetField" #() (![Point] "$recvAddr") - ))]); ("TwoInts"%go, []); ("TwoInts'ptr"%go, []); ("S"%go, [("readBVal"%go, S__readBVal)]); ("S'ptr"%go, [("negateC"%go, S__negateC); ("readA"%go, S__readA); ("readB"%go, S__readB); ("readBVal"%go, (λ: "$recvAddr", - method_call #pkg_name' #"S" #"readBVal" "readBVal" #() (![S] "$recvAddr") - )); ("refC"%go, S__refC); ("writeB"%go, S__writeB)]); ("B"%go, []); ("B'ptr"%go, []); ("A"%go, []); ("A'ptr"%go, []); ("Timestamp"%go, []); ("Timestamp'ptr"%go, []); ("UseTypeAbbrev"%go, []); ("UseTypeAbbrev'ptr"%go, []); ("UseNamedType"%go, []); ("UseNamedType'ptr"%go, [])]. + method_call #pkg_name' #"embedA" #"Foo" (![embedA] "$recvAddr") + )%V)]); ("embedB"%go, [("Foo"%go, embedB__Foo)]); ("embedB'ptr"%go, [("Bar"%go, (λ: "$recvAddr", + method_call #pkg_name' #"embedA'ptr" #"Bar" (struct.field_ref embedB "embedA" "$recvAddr") + )%V); ("Car"%go, embedB__Car); ("Foo"%go, (λ: "$recvAddr", + method_call #pkg_name' #"embedB" #"Foo" (![embedB] "$recvAddr") + )%V)]); ("embedC"%go, [("Bar"%go, (λ: "$recv", + method_call #pkg_name' #"embedA'ptr" #"Bar" (struct.field_ref embedB "embedA" (struct.field_get embedC "embedB" "$recv")) + )%V); ("Car"%go, (λ: "$recv", + method_call #pkg_name' #"embedB'ptr" #"Car" (struct.field_get embedC "embedB" "$recv") + )%V); ("Foo"%go, (λ: "$recv", + method_call #pkg_name' #"embedB" #"Foo" (![embedB] (struct.field_get embedC "embedB" "$recv")) + )%V)]); ("embedC'ptr"%go, [("Bar"%go, (λ: "$recvAddr", + method_call #pkg_name' #"embedA'ptr" #"Bar" (struct.field_ref embedB "embedA" (![ptrT] (struct.field_ref embedC "embedB" "$recvAddr"))) + )%V); ("Car"%go, (λ: "$recvAddr", + method_call #pkg_name' #"embedB'ptr" #"Car" (![ptrT] (struct.field_ref embedC "embedB" "$recvAddr")) + )%V); ("Foo"%go, (λ: "$recvAddr", + method_call #pkg_name' #"embedB" #"Foo" (![embedB] (![ptrT] (struct.field_ref embedC "embedB" "$recvAddr"))) + )%V)]); ("embedD"%go, [("Bar"%go, (λ: "$recv", + method_call #pkg_name' #"embedA'ptr" #"Bar" (struct.field_ref embedB "embedA" (struct.field_get embedC "embedB" (struct.field_get embedD "embedC" "$recv"))) + )%V); ("Car"%go, (λ: "$recv", + method_call #pkg_name' #"embedB'ptr" #"Car" (struct.field_get embedC "embedB" (struct.field_get embedD "embedC" "$recv")) + )%V); ("Foo"%go, (λ: "$recv", + method_call #pkg_name' #"embedB" #"Foo" (![embedB] (struct.field_get embedC "embedB" (struct.field_get embedD "embedC" "$recv"))) + )%V)]); ("embedD'ptr"%go, [("Bar"%go, (λ: "$recvAddr", + method_call #pkg_name' #"embedA'ptr" #"Bar" (struct.field_ref embedB "embedA" (![ptrT] (struct.field_ref embedC "embedB" (struct.field_ref embedD "embedC" "$recvAddr")))) + )%V); ("Car"%go, (λ: "$recvAddr", + method_call #pkg_name' #"embedB'ptr" #"Car" (![ptrT] (struct.field_ref embedC "embedB" (struct.field_ref embedD "embedC" "$recvAddr"))) + )%V); ("Foo"%go, (λ: "$recvAddr", + method_call #pkg_name' #"embedB" #"Foo" (![embedB] (![ptrT] (struct.field_ref embedC "embedB" (struct.field_ref embedD "embedC" "$recvAddr")))) + )%V)]); ("Enc"%go, []); ("Enc'ptr"%go, [("UInt32"%go, Enc__UInt32); ("UInt64"%go, Enc__UInt64); ("consume"%go, Enc__consume)]); ("Dec"%go, []); ("Dec'ptr"%go, [("UInt32"%go, Dec__UInt32); ("UInt64"%go, Dec__UInt64); ("consume"%go, Dec__consume)]); ("concreteFooer"%go, []); ("concreteFooer'ptr"%go, [("Foo"%go, concreteFooer__Foo)]); ("FooerUser"%go, []); ("FooerUser'ptr"%go, []); ("concrete1"%go, [("Foo"%go, concrete1__Foo)]); ("concrete1'ptr"%go, [("B"%go, concrete1__B); ("Foo"%go, (λ: "$recvAddr", + method_call #pkg_name' #"concrete1" #"Foo" (![concrete1] "$recvAddr") + )%V)]); ("my_u32"%go, []); ("my_u32'ptr"%go, []); ("also_u32"%go, []); ("also_u32'ptr"%go, []); ("allTheLiterals"%go, []); ("allTheLiterals'ptr"%go, []); ("hasCondVar"%go, []); ("hasCondVar'ptr"%go, []); ("IntWrapper"%go, []); ("IntWrapper'ptr"%go, []); ("MapWrapper"%go, []); ("MapWrapper'ptr"%go, []); ("mapElem"%go, []); ("mapElem'ptr"%go, []); ("wrapExternalStruct"%go, [("moveUint64"%go, wrapExternalStruct__moveUint64)]); ("wrapExternalStruct'ptr"%go, [("moveUint64"%go, (λ: "$recvAddr", + method_call #pkg_name' #"wrapExternalStruct" #"moveUint64" (![wrapExternalStruct] "$recvAddr") + )%V)]); ("typing"%go, []); ("typing'ptr"%go, []); ("composite"%go, []); ("composite'ptr"%go, []); ("R"%go, []); ("R'ptr"%go, [("recurMethod"%go, R__recurMethod)]); ("Other"%go, [("recurEmbeddedMethod"%go, (λ: "$recv", + method_call #pkg_name' #"RecursiveEmbedded'ptr" #"recurEmbeddedMethod" (struct.field_get Other "RecursiveEmbedded" "$recv") + )%V)]); ("Other'ptr"%go, [("recurEmbeddedMethod"%go, (λ: "$recvAddr", + method_call #pkg_name' #"RecursiveEmbedded'ptr" #"recurEmbeddedMethod" (![ptrT] (struct.field_ref Other "RecursiveEmbedded" "$recvAddr")) + )%V)]); ("RecursiveEmbedded"%go, []); ("RecursiveEmbedded'ptr"%go, [("recurEmbeddedMethod"%go, RecursiveEmbedded__recurEmbeddedMethod)]); ("Block"%go, []); ("Block'ptr"%go, []); ("SliceAlias"%go, []); ("SliceAlias'ptr"%go, []); ("thing"%go, []); ("thing'ptr"%go, []); ("sliceOfThings"%go, [("getThingRef"%go, sliceOfThings__getThingRef)]); ("sliceOfThings'ptr"%go, [("getThingRef"%go, (λ: "$recvAddr", + method_call #pkg_name' #"sliceOfThings" #"getThingRef" (![sliceOfThings] "$recvAddr") + )%V)]); ("Point"%go, [("Add"%go, Point__Add); ("GetField"%go, Point__GetField)]); ("Point'ptr"%go, [("Add"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Point" #"Add" (![Point] "$recvAddr") + )%V); ("GetField"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Point" #"GetField" (![Point] "$recvAddr") + )%V)]); ("TwoInts"%go, []); ("TwoInts'ptr"%go, []); ("S"%go, [("readBVal"%go, S__readBVal)]); ("S'ptr"%go, [("negateC"%go, S__negateC); ("readA"%go, S__readA); ("readB"%go, S__readB); ("readBVal"%go, (λ: "$recvAddr", + method_call #pkg_name' #"S" #"readBVal" (![S] "$recvAddr") + )%V); ("refC"%go, S__refC); ("writeB"%go, S__writeB)]); ("B"%go, []); ("B'ptr"%go, []); ("A"%go, []); ("A'ptr"%go, []); ("Timestamp"%go, []); ("Timestamp'ptr"%go, []); ("UseTypeAbbrev"%go, []); ("UseTypeAbbrev'ptr"%go, []); ("UseNamedType"%go, []); ("UseNamedType'ptr"%go, [])]. Definition initialize' : val := rec: "initialize'" <> := @@ -2209,18 +2209,18 @@ Definition initialize' : val := do: sync.initialize';;; do: fmt.initialize';;; let: "$r0" := ((func_call #pkg_name' #"foo"%go) #()) in - do: ((globals.get #pkg_name' #"GlobalX"%go #()) <-[uint64T] "$r0");;; + do: ((globals.get #pkg_name' #"GlobalX"%go) <-[uint64T] "$r0");;; let: "$r0" := #"a"%go in - do: ((globals.get #pkg_name' #"globalA"%go #()) <-[stringT] "$r0");;; + do: ((globals.get #pkg_name' #"globalA"%go) <-[stringT] "$r0");;; let: "$r0" := #"b"%go in - do: ((globals.get #pkg_name' #"globalB"%go #()) <-[stringT] "$r0");;; + do: ((globals.get #pkg_name' #"globalB"%go) <-[stringT] "$r0");;; let: "$r0" := ((func_call #pkg_name' #"foo"%go) #()) in do: ((λ: <>, - exception_do (let: "$r0" := (![uint64T] (globals.get #pkg_name' #"GlobalX"%go #())) in - do: ((globals.get #pkg_name' #"GlobalX"%go #()) <-[uint64T] "$r0")) + exception_do (let: "$r0" := (![uint64T] (globals.get #pkg_name' #"GlobalX"%go)) in + do: ((globals.get #pkg_name' #"GlobalX"%go) <-[uint64T] "$r0")) ) #());;; do: ((λ: <>, exception_do (let: "$r0" := #""%go in - do: ((globals.get #pkg_name' #"globalY"%go #()) <-[stringT] "$r0")) + do: ((globals.get #pkg_name' #"globalY"%go) <-[stringT] "$r0")) ) #())) ). diff --git a/new/code/github_com/goose_lang/std.v b/new/code/github_com/goose_lang/std.v index 0fdcfe316..b619d393a 100644 --- a/new/code/github_com/goose_lang/std.v +++ b/new/code/github_com/goose_lang/std.v @@ -125,11 +125,11 @@ Definition newJoinHandle : val := Definition JoinHandle__finish : val := rec: "JoinHandle__finish" "h" <> := exception_do (let: "h" := (ref_ty ptrT "h") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref JoinHandle "mu" (![ptrT] "h")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref JoinHandle "mu" (![ptrT] "h")))) #());;; let: "$r0" := #true in do: ((struct.field_ref JoinHandle "done" (![ptrT] "h")) <-[boolT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" #() (![ptrT] (struct.field_ref JoinHandle "cond" (![ptrT] "h")))) #());;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref JoinHandle "mu" (![ptrT] "h")))) #())). + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" (![ptrT] (struct.field_ref JoinHandle "cond" (![ptrT] "h")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref JoinHandle "mu" (![ptrT] "h")))) #())). (* Spawn runs `f` in a parallel goroutine and returns a handle to wait for it to finish. @@ -148,7 +148,7 @@ Definition Spawn : val := do: ("h" <-[ptrT] "$r0");;; let: "$go" := (λ: <>, exception_do (do: ((![funcT] "f") #());;; - do: ((method_call #pkg_name' #"JoinHandle'ptr" #"finish" #() (![ptrT] "h")) #())) + do: ((method_call #pkg_name' #"JoinHandle'ptr" #"finish" (![ptrT] "h")) #())) ) in do: (Fork ("$go" #()));;; return: (![ptrT] "h")). @@ -157,7 +157,7 @@ Definition Spawn : val := Definition JoinHandle__Join : val := rec: "JoinHandle__Join" "h" <> := exception_do (let: "h" := (ref_ty ptrT "h") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref JoinHandle "mu" (![ptrT] "h")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref JoinHandle "mu" (![ptrT] "h")))) #());;; (for: (λ: <>, #true); (λ: <>, Skip) := λ: <>, (if: ![boolT] (struct.field_ref JoinHandle "done" (![ptrT] "h")) then @@ -165,8 +165,8 @@ Definition JoinHandle__Join : val := do: ((struct.field_ref JoinHandle "done" (![ptrT] "h")) <-[boolT] "$r0");;; break: #() else do: #());;; - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" #() (![ptrT] (struct.field_ref JoinHandle "cond" (![ptrT] "h")))) #()));;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref JoinHandle "mu" (![ptrT] "h")))) #())). + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" (![ptrT] (struct.field_ref JoinHandle "cond" (![ptrT] "h")))) #()));;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref JoinHandle "mu" (![ptrT] "h")))) #())). (* Multipar runs op(0) ... op(num-1) in parallel and waits for them all to finish. @@ -199,16 +199,16 @@ Definition Multipar : val := let: "$go" := (λ: <>, exception_do (do: (let: "$a0" := (![uint64T] "i") in (![funcT] "op") "$a0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] "num_left_mu")) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] "num_left_mu")) #());;; do: ("num_left" <-[uint64T] ((![uint64T] "num_left") - #(W64 1)));;; - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" #() (![ptrT] "num_left_cond")) #());;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] "num_left_mu")) #())) + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" (![ptrT] "num_left_cond")) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] "num_left_mu")) #())) ) in do: (Fork ("$go" #()))));;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] "num_left_mu")) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] "num_left_mu")) #());;; (for: (λ: <>, (![uint64T] "num_left") > #(W64 0)); (λ: <>, Skip) := λ: <>, - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" #() (![ptrT] "num_left_cond")) #()));;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] "num_left_mu")) #())). + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" (![ptrT] "num_left_cond")) #()));;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] "num_left_mu")) #())). (* Skip is a no-op that can be useful in proofs. diff --git a/new/code/github_com/mit_pdos/gokv/asyncfile.v b/new/code/github_com/mit_pdos/gokv/asyncfile.v index 635526db4..bcff5064c 100644 --- a/new/code/github_com/mit_pdos/gokv/asyncfile.v +++ b/new/code/github_com/mit_pdos/gokv/asyncfile.v @@ -26,8 +26,8 @@ Definition AsyncFile__Write : val := rec: "AsyncFile__Write" "s" "data" := with_defer: (let: "s" := (ref_ty ptrT "s") in let: "data" := (ref_ty sliceT "data") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) #());;; - do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) in + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) #());;; + do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) in "$defer" <-[funcT] (let: "$oldf" := (![funcT] "$defer") in (λ: <>, "$f" #();; @@ -42,10 +42,10 @@ Definition AsyncFile__Write : val := let: "index" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := (![uint64T] (struct.field_ref AsyncFile "index" (![ptrT] "s"))) in do: ("index" <-[uint64T] "$r0");;; - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" #() (![ptrT] (struct.field_ref AsyncFile "indexCond" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" (![ptrT] (struct.field_ref AsyncFile "indexCond" (![ptrT] "s")))) #());;; return: ((λ: <>, exception_do (do: (let: "$a0" := (![uint64T] "index") in - (method_call #pkg_name' #"AsyncFile'ptr" #"wait" #() (![ptrT] "s")) "$a0")) + (method_call #pkg_name' #"AsyncFile'ptr" #"wait" (![ptrT] "s")) "$a0")) ))). (* go: storage.go:36:21 *) @@ -53,21 +53,21 @@ Definition AsyncFile__wait : val := rec: "AsyncFile__wait" "s" "index" := with_defer: (let: "s" := (ref_ty ptrT "s") in let: "index" := (ref_ty uint64T "index") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) #());;; - do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) in + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) #());;; + do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) in "$defer" <-[funcT] (let: "$oldf" := (![funcT] "$defer") in (λ: <>, "$f" #();; "$oldf" #() )));;; (for: (λ: <>, (![uint64T] (struct.field_ref AsyncFile "durableIndex" (![ptrT] "s"))) < (![uint64T] "index")); (λ: <>, Skip) := λ: <>, - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" #() (![ptrT] (struct.field_ref AsyncFile "durableIndexCond" (![ptrT] "s")))) #()))). + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" (![ptrT] (struct.field_ref AsyncFile "durableIndexCond" (![ptrT] "s")))) #()))). (* go: storage.go:45:21 *) Definition AsyncFile__flushThread : val := rec: "AsyncFile__flushThread" "s" <> := exception_do (let: "s" := (ref_ty ptrT "s") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) #());;; (for: (λ: <>, #true); (λ: <>, Skip) := λ: <>, (if: ![boolT] (struct.field_ref AsyncFile "closeRequested" (![ptrT] "s")) then @@ -76,16 +76,16 @@ Definition AsyncFile__flushThread : val := (func_call #grove_ffi.pkg_name' #"FileWrite"%go) "$a0" "$a1");;; let: "$r0" := (![uint64T] (struct.field_ref AsyncFile "index" (![ptrT] "s"))) in do: ((struct.field_ref AsyncFile "durableIndex" (![ptrT] "s")) <-[uint64T] "$r0");;; - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Broadcast" #() (![ptrT] (struct.field_ref AsyncFile "durableIndexCond" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Broadcast" (![ptrT] (struct.field_ref AsyncFile "durableIndexCond" (![ptrT] "s")))) #());;; let: "$r0" := #true in do: ((struct.field_ref AsyncFile "closed" (![ptrT] "s")) <-[boolT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) #());;; - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" #() (![ptrT] (struct.field_ref AsyncFile "closedCond" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" (![ptrT] (struct.field_ref AsyncFile "closedCond" (![ptrT] "s")))) #());;; return: (#()) else do: #());;; (if: (![uint64T] (struct.field_ref AsyncFile "durableIndex" (![ptrT] "s"))) ≥ (![uint64T] (struct.field_ref AsyncFile "index" (![ptrT] "s"))) then - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" #() (![ptrT] (struct.field_ref AsyncFile "indexCond" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" (![ptrT] (struct.field_ref AsyncFile "indexCond" (![ptrT] "s")))) #());;; continue: #() else do: #());;; let: "index" := (ref_ty uint64T (zero_val uint64T)) in @@ -94,21 +94,21 @@ Definition AsyncFile__flushThread : val := let: "data" := (ref_ty sliceT (zero_val sliceT)) in let: "$r0" := (![sliceT] (struct.field_ref AsyncFile "data" (![ptrT] "s"))) in do: ("data" <-[sliceT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) #());;; do: (let: "$a0" := (![stringT] (struct.field_ref AsyncFile "filename" (![ptrT] "s"))) in let: "$a1" := (![sliceT] "data") in (func_call #grove_ffi.pkg_name' #"FileWrite"%go) "$a0" "$a1");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) #());;; let: "$r0" := (![uint64T] "index") in do: ((struct.field_ref AsyncFile "durableIndex" (![ptrT] "s")) <-[uint64T] "$r0");;; - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Broadcast" #() (![ptrT] (struct.field_ref AsyncFile "durableIndexCond" (![ptrT] "s")))) #()))). + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Broadcast" (![ptrT] (struct.field_ref AsyncFile "durableIndexCond" (![ptrT] "s")))) #()))). (* go: storage.go:73:21 *) Definition AsyncFile__Close : val := rec: "AsyncFile__Close" "s" <> := with_defer: (let: "s" := (ref_ty ptrT "s") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) #());;; - do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) in + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) #());;; + do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref AsyncFile "mu" (![ptrT] "s")))) in "$defer" <-[funcT] (let: "$oldf" := (![funcT] "$defer") in (λ: <>, "$f" #();; @@ -116,9 +116,9 @@ Definition AsyncFile__Close : val := )));;; let: "$r0" := #true in do: ((struct.field_ref AsyncFile "closeRequested" (![ptrT] "s")) <-[boolT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" #() (![ptrT] (struct.field_ref AsyncFile "indexCond" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" (![ptrT] (struct.field_ref AsyncFile "indexCond" (![ptrT] "s")))) #());;; (for: (λ: <>, (~ (![boolT] (struct.field_ref AsyncFile "closed" (![ptrT] "s"))))); (λ: <>, Skip) := λ: <>, - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" #() (![ptrT] (struct.field_ref AsyncFile "closedCond" (![ptrT] "s")))) #()))). + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" (![ptrT] (struct.field_ref AsyncFile "closedCond" (![ptrT] "s")))) #()))). (* returns the state, then the File object @@ -158,7 +158,7 @@ Definition MakeAsyncFile : val := let: "data" := (ref_ty sliceT (zero_val sliceT)) in let: "$r0" := (![sliceT] (struct.field_ref AsyncFile "data" (![ptrT] "s"))) in do: ("data" <-[sliceT] "$r0");;; - let: "$go" := (method_call #pkg_name' #"AsyncFile'ptr" #"flushThread" #() (![ptrT] "s")) in + let: "$go" := (method_call #pkg_name' #"AsyncFile'ptr" #"flushThread" (![ptrT] "s")) in do: (Fork ("$go" #()));;; return: (![sliceT] "data", ![ptrT] "s")). diff --git a/new/code/github_com/mit_pdos/gokv/bank.v b/new/code/github_com/mit_pdos/gokv/bank.v index 0e7005a14..448eeac6d 100644 --- a/new/code/github_com/mit_pdos/gokv/bank.v +++ b/new/code/github_com/mit_pdos/gokv/bank.v @@ -25,14 +25,14 @@ Definition acquire_two_good : val := (if: (![stringT] "l1") < (![stringT] "l2") then do: (let: "$a0" := (![stringT] "l1") in - (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Lock" #() (![ptrT] "lck")) "$a0");;; + (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Lock" (![ptrT] "lck")) "$a0");;; do: (let: "$a0" := (![stringT] "l2") in - (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Lock" #() (![ptrT] "lck")) "$a0") + (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Lock" (![ptrT] "lck")) "$a0") else do: (let: "$a0" := (![stringT] "l2") in - (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Lock" #() (![ptrT] "lck")) "$a0");;; + (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Lock" (![ptrT] "lck")) "$a0");;; do: (let: "$a0" := (![stringT] "l1") in - (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Lock" #() (![ptrT] "lck")) "$a0"));;; + (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Lock" (![ptrT] "lck")) "$a0"));;; return: (#())). (* go: bank.go:30:6 *) @@ -42,9 +42,9 @@ Definition acquire_two : val := let: "l1" := (ref_ty stringT "l1") in let: "lck" := (ref_ty ptrT "lck") in do: (let: "$a0" := (![stringT] "l1") in - (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Lock" #() (![ptrT] "lck")) "$a0");;; + (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Lock" (![ptrT] "lck")) "$a0");;; do: (let: "$a0" := (![stringT] "l2") in - (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Lock" #() (![ptrT] "lck")) "$a0");;; + (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Lock" (![ptrT] "lck")) "$a0");;; return: (#())). (* go: bank.go:37:6 *) @@ -54,9 +54,9 @@ Definition release_two : val := let: "l1" := (ref_ty stringT "l1") in let: "lck" := (ref_ty ptrT "lck") in do: (let: "$a0" := (![stringT] "l1") in - (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Unlock" #() (![ptrT] "lck")) "$a0");;; + (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Unlock" (![ptrT] "lck")) "$a0");;; do: (let: "$a0" := (![stringT] "l2") in - (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Unlock" #() (![ptrT] "lck")) "$a0");;; + (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Unlock" (![ptrT] "lck")) "$a0");;; return: (#())). (* go: bank.go:43:6 *) @@ -140,7 +140,7 @@ Definition BankClerk__SimpleTransfer : val := do: (let: "$a0" := (![stringT] (slice.elem_ref stringT (![sliceT] (struct.field_ref BankClerk "accts" (![ptrT] "bck"))) (![uint64T] "src"))) in let: "$a1" := (![stringT] (slice.elem_ref stringT (![sliceT] (struct.field_ref BankClerk "accts" (![ptrT] "bck"))) (![uint64T] "dst"))) in let: "$a2" := (![uint64T] "amount") in - (method_call #pkg_name' #"BankClerk'ptr" #"transfer_internal" #() (![ptrT] "bck")) "$a0" "$a1" "$a2") + (method_call #pkg_name' #"BankClerk'ptr" #"transfer_internal" (![ptrT] "bck")) "$a0" "$a1" "$a2") else do: #()))). (* go: bank.go:76:23 *) @@ -152,7 +152,7 @@ Definition BankClerk__get_total : val := slice.for_range stringT "$range" (λ: <> "acct", let: "acct" := ref_ty stringT "acct" in do: (let: "$a0" := (![stringT] "acct") in - (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Lock" #() (![ptrT] (struct.field_ref BankClerk "lck" (![ptrT] "bck")))) "$a0");;; + (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Lock" (![ptrT] (struct.field_ref BankClerk "lck" (![ptrT] "bck")))) "$a0");;; let: "$r0" := ((![uint64T] "sum") + (let: "$a0" := (let: "$a0" := (![stringT] "acct") in (interface.get "Get" (![kv.Kv] (struct.field_ref BankClerk "kvck" (![ptrT] "bck")))) "$a0") in (func_call #pkg_name' #"decodeInt"%go) "$a0")) in @@ -161,7 +161,7 @@ Definition BankClerk__get_total : val := slice.for_range stringT "$range" (λ: <> "acct", let: "acct" := ref_ty stringT "acct" in do: (let: "$a0" := (![stringT] "acct") in - (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Unlock" #() (![ptrT] (struct.field_ref BankClerk "lck" (![ptrT] "bck")))) "$a0")));;; + (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Unlock" (![ptrT] (struct.field_ref BankClerk "lck" (![ptrT] "bck")))) "$a0")));;; return: (![uint64T] "sum")). (* go: bank.go:92:23 *) @@ -169,7 +169,7 @@ Definition BankClerk__SimpleAudit : val := rec: "BankClerk__SimpleAudit" "bck" <> := exception_do (let: "bck" := (ref_ty ptrT "bck") in (for: (λ: <>, #true); (λ: <>, Skip) := λ: <>, - (if: ((method_call #pkg_name' #"BankClerk'ptr" #"get_total" #() (![ptrT] "bck")) #()) ≠ BAL_TOTAL + (if: ((method_call #pkg_name' #"BankClerk'ptr" #"get_total" (![ptrT] "bck")) #()) ≠ BAL_TOTAL then do: (let: "$a0" := (interface.make #""%go #"string"%go #"Balance total invariant violated"%go) in Panic "$a0") @@ -192,7 +192,7 @@ Definition MakeBankClerkSlice : val := let: "$r0" := (![sliceT] "accts") in do: ((struct.field_ref BankClerk "accts" (![ptrT] "bck")) <-[sliceT] "$r0");;; do: (let: "$a0" := (![stringT] "init_flag") in - (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Lock" #() (![ptrT] (struct.field_ref BankClerk "lck" (![ptrT] "bck")))) "$a0");;; + (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Lock" (![ptrT] (struct.field_ref BankClerk "lck" (![ptrT] "bck")))) "$a0");;; (if: (let: "$a0" := (![stringT] "init_flag") in (interface.get "Get" (![kv.Kv] (struct.field_ref BankClerk "kvck" (![ptrT] "bck")))) "$a0") = #""%go then @@ -213,7 +213,7 @@ Definition MakeBankClerkSlice : val := (interface.get "Put" (![kv.Kv] (struct.field_ref BankClerk "kvck" (![ptrT] "bck")))) "$a0" "$a1") else do: #());;; do: (let: "$a0" := (![stringT] "init_flag") in - (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Unlock" #() (![ptrT] (struct.field_ref BankClerk "lck" (![ptrT] "bck")))) "$a0");;; + (method_call #lockservice.pkg_name' #"LockClerk'ptr" #"Unlock" (![ptrT] (struct.field_ref BankClerk "lck" (![ptrT] "bck")))) "$a0");;; return: (![ptrT] "bck")). (* go: bank.go:120:6 *) diff --git a/new/code/github_com/mit_pdos/gokv/cachekv.v b/new/code/github_com/mit_pdos/gokv/cachekv.v index 2f68316fb..067fdb242 100644 --- a/new/code/github_com/mit_pdos/gokv/cachekv.v +++ b/new/code/github_com/mit_pdos/gokv/cachekv.v @@ -87,7 +87,7 @@ Definition CacheKv__Get : val := rec: "CacheKv__Get" "k" "key" := exception_do (let: "k" := (ref_ty ptrT "k") in let: "key" := (ref_ty stringT "key") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref CacheKv "mu" (![ptrT] "k")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref CacheKv "mu" (![ptrT] "k")))) #());;; let: "ok" := (ref_ty boolT (zero_val boolT)) in let: "cv" := (ref_ty cacheValue (zero_val cacheValue)) in let: ("$ret0", "$ret1") := (map.get (![mapT stringT cacheValue] (struct.field_ref CacheKv "cache" (![ptrT] "k"))) (![stringT] "key")) in @@ -103,13 +103,13 @@ Definition CacheKv__Get : val := do: ("high" <-[uint64T] "$r1");;; (if: (![boolT] "ok") && ((![uint64T] "high") < (![uint64T] (struct.field_ref cacheValue "l" "cv"))) then - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref CacheKv "mu" (![ptrT] "k")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref CacheKv "mu" (![ptrT] "k")))) #());;; return: (![stringT] (struct.field_ref cacheValue "v" "cv")) else do: #());;; do: (let: "$a0" := (![mapT stringT cacheValue] (struct.field_ref CacheKv "cache" (![ptrT] "k"))) in let: "$a1" := (![stringT] "key") in map.delete "$a0" "$a1");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref CacheKv "mu" (![ptrT] "k")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref CacheKv "mu" (![ptrT] "k")))) #());;; return: (struct.field_get cacheValue "v" (let: "$a0" := (let: "$a0" := (![stringT] "key") in (interface.get "Get" (![kv.KvCput] (struct.field_ref CacheKv "kv" (![ptrT] "k")))) "$a0") in (func_call #pkg_name' #"DecodeValue"%go) "$a0"))). @@ -154,7 +154,7 @@ Definition CacheKv__GetAndCache : val := do: ("resp" <-[stringT] "$r0");;; (if: (![stringT] "resp") = #"ok"%go then - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref CacheKv "mu" (![ptrT] "k")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref CacheKv "mu" (![ptrT] "k")))) #());;; let: "$r0" := (let: "$v" := (![stringT] (struct.field_ref cacheValue "v" "old")) in let: "$l" := (![uint64T] "newLeaseExpiration") in struct.make cacheValue [{ @@ -167,7 +167,7 @@ Definition CacheKv__GetAndCache : val := let: "ret" := (ref_ty stringT (zero_val stringT)) in let: "$r0" := (struct.field_get cacheValue "v" (Fst (map.get (![mapT stringT cacheValue] (struct.field_ref CacheKv "cache" (![ptrT] "k"))) (![stringT] "key")))) in do: ("ret" <-[stringT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref CacheKv "mu" (![ptrT] "k")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref CacheKv "mu" (![ptrT] "k")))) #());;; return: (![stringT] "ret")). (* go: clerk.go:90:19 *) diff --git a/new/code/github_com/mit_pdos/gokv/globals_test.v b/new/code/github_com/mit_pdos/gokv/globals_test.v index 5f36159ee..13986a1bf 100644 --- a/new/code/github_com/mit_pdos/gokv/globals_test.v +++ b/new/code/github_com/mit_pdos/gokv/globals_test.v @@ -15,13 +15,13 @@ Definition pkg_name' : go_string := "github.com/mit-pdos/gokv/globals_test". Definition other : val := rec: "other" <> := exception_do (let: "$r0" := #"ok"%go in - do: ((globals.get #pkg_name' #"globalY"%go #()) <-[stringT] "$r0")). + do: ((globals.get #pkg_name' #"globalY"%go) <-[stringT] "$r0")). (* go: globals.go:16:6 *) Definition bar : val := rec: "bar" <> := exception_do (do: ((func_call #pkg_name' #"other"%go) #());;; - (if: ((![uint64T] (globals.get #pkg_name' #"GlobalX"%go #())) ≠ #(W64 10)) || ((![stringT] (globals.get #pkg_name' #"globalY"%go #())) ≠ #"ok"%go) + (if: ((![uint64T] (globals.get #pkg_name' #"GlobalX"%go)) ≠ #(W64 10)) || ((![stringT] (globals.get #pkg_name' #"globalY"%go)) ≠ #"ok"%go) then do: (let: "$a0" := (interface.make #""%go #"string"%go #"bad"%go) in Panic "$a0") @@ -42,18 +42,18 @@ Definition initialize' : val := rec: "initialize'" <> := globals.package_init pkg_name' vars' functions' msets' (λ: <>, exception_do (let: "$r0" := ((func_call #pkg_name' #"foo"%go) #()) in - do: ((globals.get #pkg_name' #"GlobalX"%go #()) <-[uint64T] "$r0");;; + do: ((globals.get #pkg_name' #"GlobalX"%go) <-[uint64T] "$r0");;; let: "$r0" := #"a"%go in - do: ((globals.get #pkg_name' #"globalA"%go #()) <-[stringT] "$r0");;; + do: ((globals.get #pkg_name' #"globalA"%go) <-[stringT] "$r0");;; let: "$r0" := #"b"%go in - do: ((globals.get #pkg_name' #"globalB"%go #()) <-[stringT] "$r0");;; + do: ((globals.get #pkg_name' #"globalB"%go) <-[stringT] "$r0");;; do: ((λ: <>, - exception_do (let: "$r0" := ((![uint64T] (globals.get #pkg_name' #"GlobalX"%go #())) + #(W64 0)) in - do: ((globals.get #pkg_name' #"GlobalX"%go #()) <-[uint64T] "$r0")) + exception_do (let: "$r0" := ((![uint64T] (globals.get #pkg_name' #"GlobalX"%go)) + #(W64 0)) in + do: ((globals.get #pkg_name' #"GlobalX"%go) <-[uint64T] "$r0")) ) #());;; do: ((λ: <>, exception_do (let: "$r0" := #""%go in - do: ((globals.get #pkg_name' #"globalY"%go #()) <-[stringT] "$r0")) + do: ((globals.get #pkg_name' #"globalY"%go) <-[stringT] "$r0")) ) #())) ). diff --git a/new/code/github_com/mit_pdos/gokv/reconnectclient.v b/new/code/github_com/mit_pdos/gokv/reconnectclient.v index 6479108ce..402b9e865 100644 --- a/new/code/github_com/mit_pdos/gokv/reconnectclient.v +++ b/new/code/github_com/mit_pdos/gokv/reconnectclient.v @@ -33,16 +33,16 @@ Definition MakeReconnectingClient : val := Definition ReconnectingClient__getClient : val := rec: "ReconnectingClient__getClient" "cl" <> := exception_do (let: "cl" := (ref_ty ptrT "cl") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref ReconnectingClient "mu" (![ptrT] "cl")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref ReconnectingClient "mu" (![ptrT] "cl")))) #());;; (if: ![boolT] (struct.field_ref ReconnectingClient "valid" (![ptrT] "cl")) then let: "ret" := (ref_ty ptrT (zero_val ptrT)) in let: "$r0" := (![ptrT] (struct.field_ref ReconnectingClient "urpcCl" (![ptrT] "cl"))) in do: ("ret" <-[ptrT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref ReconnectingClient "mu" (![ptrT] "cl")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref ReconnectingClient "mu" (![ptrT] "cl")))) #());;; return: (#(W64 0), ![ptrT] "ret") else do: #());;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref ReconnectingClient "mu" (![ptrT] "cl")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref ReconnectingClient "mu" (![ptrT] "cl")))) #());;; let: "newRpcCl" := (ref_ty ptrT (zero_val ptrT)) in let: "err" := (ref_ty uint64T (zero_val uint64T)) in let: ("$ret0", "$ret1") := (let: "$a0" := (![uint64T] (struct.field_ref ReconnectingClient "addr" (![ptrT] "cl"))) in @@ -56,7 +56,7 @@ Definition ReconnectingClient__getClient : val := do: (let: "$a0" := #(W64 10000000) in (func_call #primitive.pkg_name' #"Sleep"%go) "$a0") else do: #());;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref ReconnectingClient "mu" (![ptrT] "cl")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref ReconnectingClient "mu" (![ptrT] "cl")))) #());;; (if: (![uint64T] "err") = #(W64 0) then let: "$r0" := (![ptrT] "newRpcCl") in @@ -64,7 +64,7 @@ Definition ReconnectingClient__getClient : val := let: "$r0" := #true in do: ((struct.field_ref ReconnectingClient "valid" (![ptrT] "cl")) <-[boolT] "$r0") else do: #());;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref ReconnectingClient "mu" (![ptrT] "cl")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref ReconnectingClient "mu" (![ptrT] "cl")))) #());;; return: (![uint64T] "err", ![ptrT] "newRpcCl")). Definition pkg_name' : go_string := "github.com/mit-pdos/gokv/reconnectclient". @@ -79,7 +79,7 @@ Definition ReconnectingClient__Call : val := let: "rpcid" := (ref_ty uint64T "rpcid") in let: "urpcCl" := (ref_ty ptrT (zero_val ptrT)) in let: "err1" := (ref_ty uint64T (zero_val uint64T)) in - let: ("$ret0", "$ret1") := ((method_call #pkg_name' #"ReconnectingClient'ptr" #"getClient" #() (![ptrT] "cl")) #()) in + let: ("$ret0", "$ret1") := ((method_call #pkg_name' #"ReconnectingClient'ptr" #"getClient" (![ptrT] "cl")) #()) in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("err1" <-[uint64T] "$r0");;; @@ -92,14 +92,14 @@ Definition ReconnectingClient__Call : val := let: "$a1" := (![sliceT] "args") in let: "$a2" := (![ptrT] "reply") in let: "$a3" := (![uint64T] "timeout_ms") in - (method_call #urpc.pkg_name' #"Client'ptr" #"Call" #() (![ptrT] "urpcCl")) "$a0" "$a1" "$a2" "$a3") in + (method_call #urpc.pkg_name' #"Client'ptr" #"Call" (![ptrT] "urpcCl")) "$a0" "$a1" "$a2" "$a3") in do: ("err" <-[uint64T] "$r0");;; (if: (![uint64T] "err") = urpc.ErrDisconnect then - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref ReconnectingClient "mu" (![ptrT] "cl")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref ReconnectingClient "mu" (![ptrT] "cl")))) #());;; let: "$r0" := #false in do: ((struct.field_ref ReconnectingClient "valid" (![ptrT] "cl")) <-[boolT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref ReconnectingClient "mu" (![ptrT] "cl")))) #()) + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref ReconnectingClient "mu" (![ptrT] "cl")))) #()) else do: #());;; return: (![uint64T] "err")). diff --git a/new/code/github_com/mit_pdos/gokv/urpc.v b/new/code/github_com/mit_pdos/gokv/urpc.v index b663ce8b0..599cf0c22 100644 --- a/new/code/github_com/mit_pdos/gokv/urpc.v +++ b/new/code/github_com/mit_pdos/gokv/urpc.v @@ -97,7 +97,7 @@ Definition Server__readThread : val := let: "$a1" := (![uint64T] "rpcid") in let: "$a2" := (![uint64T] "seqno") in let: "$a3" := (![sliceT] "req") in - (method_call #pkg_name' #"Server'ptr" #"rpcHandle" #() (![ptrT] "srv")) "$a0" "$a1" "$a2" "$a3")) + (method_call #pkg_name' #"Server'ptr" #"rpcHandle" (![ptrT] "srv")) "$a0" "$a1" "$a2" "$a3")) ) in do: (Fork ("$go" #()));;; continue: #())). @@ -119,7 +119,7 @@ Definition Server__Serve : val := do: ("conn" <-[grove_ffi.Connection] "$r0");;; let: "$go" := (λ: <>, exception_do (do: (let: "$a0" := (![grove_ffi.Connection] "conn") in - (method_call #pkg_name' #"Server'ptr" #"readThread" #() (![ptrT] "srv")) "$a0")) + (method_call #pkg_name' #"Server'ptr" #"readThread" (![ptrT] "srv")) "$a0")) ) in do: (Fork ("$go" #())))) ) in @@ -155,12 +155,12 @@ Definition Client__replyThread : val := do: ("r" <-[grove_ffi.ReceiveRet] "$r0");;; (if: ![boolT] (struct.field_ref grove_ffi.ReceiveRet "Err" "r") then - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; do: (map.for_range (![mapT uint64T ptrT] (struct.field_ref Client "pending" (![ptrT] "cl"))) (λ: <> "cb", let: "$r0" := callbackStateAborted in do: ((![ptrT] (struct.field_ref Callback "state" (![ptrT] "cb"))) <-[uint64T] "$r0");;; - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" #() (![ptrT] (struct.field_ref Callback "cond" (![ptrT] "cb")))) #())));;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" (![ptrT] (struct.field_ref Callback "cond" (![ptrT] "cb")))) #())));;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; break: #() else do: #());;; let: "data" := (ref_ty sliceT (zero_val sliceT)) in @@ -176,7 +176,7 @@ Definition Client__replyThread : val := let: "reply" := (ref_ty sliceT (zero_val sliceT)) in let: "$r0" := (![sliceT] "data") in do: ("reply" <-[sliceT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; let: "ok" := (ref_ty boolT (zero_val boolT)) in let: "cb" := (ref_ty ptrT (zero_val ptrT)) in let: ("$ret0", "$ret1") := (map.get (![mapT uint64T ptrT] (struct.field_ref Client "pending" (![ptrT] "cl"))) (![uint64T] "seqno")) in @@ -193,9 +193,9 @@ Definition Client__replyThread : val := do: ((![ptrT] (struct.field_ref Callback "reply" (![ptrT] "cb"))) <-[sliceT] "$r0");;; let: "$r0" := callbackStateDone in do: ((![ptrT] (struct.field_ref Callback "state" (![ptrT] "cb"))) <-[uint64T] "$r0");;; - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" #() (![ptrT] (struct.field_ref Callback "cond" (![ptrT] "cb")))) #()) + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" (![ptrT] (struct.field_ref Callback "cond" (![ptrT] "cb")))) #()) else do: #());;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; continue: #())). (* go: urpc.go:120:6 *) @@ -226,7 +226,7 @@ Definition TryMakeClient : val := }])) in do: ("cl" <-[ptrT] "$r0");;; let: "$go" := (λ: <>, - exception_do (do: ((method_call #pkg_name' #"Client'ptr" #"replyThread" #() (![ptrT] "cl")) #())) + exception_do (do: ((method_call #pkg_name' #"Client'ptr" #"replyThread" (![ptrT] "cl")) #())) ) in do: (Fork ("$go" #()));;; return: (#(W64 0), ![ptrT] "cl")). @@ -285,7 +285,7 @@ Definition Client__CallStart : val := do: ("cb" <-[ptrT] "$r0");;; let: "$r0" := callbackStateWaiting in do: ((![ptrT] (struct.field_ref Callback "state" (![ptrT] "cb"))) <-[uint64T] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; let: "seqno" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := (![uint64T] (struct.field_ref Client "seq" (![ptrT] "cl"))) in do: ("seqno" <-[uint64T] "$r0");;; @@ -295,7 +295,7 @@ Definition Client__CallStart : val := do: ((struct.field_ref Client "seq" (![ptrT] "cl")) <-[uint64T] "$r0");;; let: "$r0" := (![ptrT] "cb") in do: (map.insert (![mapT uint64T ptrT] (struct.field_ref Client "pending" (![ptrT] "cl"))) (![uint64T] "seqno") "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; let: "data1" := (ref_ty sliceT (zero_val sliceT)) in let: "$r0" := (slice.make3 byteT #(W64 0) (#(W64 (8 + 8)) + (let: "$a0" := (![sliceT] "args") in slice.len "$a0"))) in @@ -334,7 +334,7 @@ Definition Client__CallComplete : val := let: "timeout_ms" := (ref_ty uint64T "timeout_ms") in let: "reply" := (ref_ty ptrT "reply") in let: "cb" := (ref_ty ptrT "cb") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; (if: (![uint64T] (![ptrT] (struct.field_ref Callback "state" (![ptrT] "cb")))) = callbackStateWaiting then do: (let: "$a0" := (![ptrT] (struct.field_ref Callback "cond" (![ptrT] "cb"))) in @@ -348,10 +348,10 @@ Definition Client__CallComplete : val := then let: "$r0" := (![sliceT] (![ptrT] (struct.field_ref Callback "reply" (![ptrT] "cb")))) in do: ((![ptrT] "reply") <-[sliceT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; return: (#(W64 0)) else - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref Client "mu" (![ptrT] "cl")))) #());;; (if: (![uint64T] "state") = callbackStateAborted then return: (ErrDisconnect) else return: (ErrTimeout)))). @@ -368,7 +368,7 @@ Definition Client__Call : val := let: "cb" := (ref_ty ptrT (zero_val ptrT)) in let: ("$ret0", "$ret1") := (let: "$a0" := (![uint64T] "rpcid") in let: "$a1" := (![sliceT] "args") in - (method_call #pkg_name' #"Client'ptr" #"CallStart" #() (![ptrT] "cl")) "$a0" "$a1") in + (method_call #pkg_name' #"Client'ptr" #"CallStart" (![ptrT] "cl")) "$a0" "$a1") in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("cb" <-[ptrT] "$r0");;; @@ -379,7 +379,7 @@ Definition Client__Call : val := return: (let: "$a0" := (![ptrT] "cb") in let: "$a1" := (![ptrT] "reply") in let: "$a2" := (![uint64T] "timeout_ms") in - (method_call #pkg_name' #"Client'ptr" #"CallComplete" #() (![ptrT] "cl")) "$a0" "$a1" "$a2")). + (method_call #pkg_name' #"Client'ptr" #"CallComplete" (![ptrT] "cl")) "$a0" "$a1" "$a2")). Definition vars' : list (go_string * go_type) := []. diff --git a/new/code/github_com/mit_pdos/gokv/vrsm/paxos.v b/new/code/github_com/mit_pdos/gokv/vrsm/paxos.v index 733928da4..8cc533eeb 100644 --- a/new/code/github_com/mit_pdos/gokv/vrsm/paxos.v +++ b/new/code/github_com/mit_pdos/gokv/vrsm/paxos.v @@ -64,7 +64,7 @@ Definition singleClerk__enterNewEpoch : val := let: "$a1" := (![sliceT] "raw_args") in let: "$a2" := (![ptrT] "raw_reply") in let: "$a3" := #(W64 500) in - (method_call #reconnectclient.pkg_name' #"ReconnectingClient'ptr" #"Call" #() (![ptrT] (struct.field_ref singleClerk "cl" (![ptrT] "s")))) "$a0" "$a1" "$a2" "$a3") in + (method_call #reconnectclient.pkg_name' #"ReconnectingClient'ptr" #"Call" (![ptrT] (struct.field_ref singleClerk "cl" (![ptrT] "s")))) "$a0" "$a1" "$a2" "$a3") in do: ("err" <-[uint64T] "$r0");;; (if: (![uint64T] "err") = #(W64 0) then @@ -100,7 +100,7 @@ Definition singleClerk__applyAsFollower : val := let: "$a1" := (![sliceT] "raw_args") in let: "$a2" := (![ptrT] "raw_reply") in let: "$a3" := #(W64 500) in - (method_call #reconnectclient.pkg_name' #"ReconnectingClient'ptr" #"Call" #() (![ptrT] (struct.field_ref singleClerk "cl" (![ptrT] "s")))) "$a0" "$a1" "$a2" "$a3") in + (method_call #reconnectclient.pkg_name' #"ReconnectingClient'ptr" #"Call" (![ptrT] (struct.field_ref singleClerk "cl" (![ptrT] "s")))) "$a0" "$a1" "$a2" "$a3") in do: ("err" <-[uint64T] "$r0");;; (if: (![uint64T] "err") = #(W64 0) then @@ -123,7 +123,7 @@ Definition singleClerk__TryBecomeLeader : val := let: "$a1" := (slice.make2 byteT #(W64 0)) in let: "$a2" := (![ptrT] "reply") in let: "$a3" := #(W64 500) in - (method_call #reconnectclient.pkg_name' #"ReconnectingClient'ptr" #"Call" #() (![ptrT] (struct.field_ref singleClerk "cl" (![ptrT] "s")))) "$a0" "$a1" "$a2" "$a3")). + (method_call #reconnectclient.pkg_name' #"ReconnectingClient'ptr" #"Call" (![ptrT] (struct.field_ref singleClerk "cl" (![ptrT] "s")))) "$a0" "$a1" "$a2" "$a3")). Definition ENone : expr := #(W64 0). @@ -455,15 +455,15 @@ Definition Server__withLock : val := rec: "Server__withLock" "s" "f" := exception_do (let: "s" := (ref_ty ptrT "s") in let: "f" := (ref_ty funcT "f") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; do: (let: "$a0" := (![ptrT] (struct.field_ref Server "ps" (![ptrT] "s"))) in (![funcT] "f") "$a0");;; let: "waitFn" := (ref_ty funcT (zero_val funcT)) in let: "$r0" := (let: "$a0" := (let: "$a0" := (![ptrT] (struct.field_ref Server "ps" (![ptrT] "s"))) in (func_call #pkg_name' #"encodePaxosState"%go) "$a0") in - (method_call #asyncfile.pkg_name' #"AsyncFile'ptr" #"Write" #() (![ptrT] (struct.field_ref Server "storage" (![ptrT] "s")))) "$a0") in + (method_call #asyncfile.pkg_name' #"AsyncFile'ptr" #"Write" (![ptrT] (struct.field_ref Server "storage" (![ptrT] "s")))) "$a0") in do: ("waitFn" <-[funcT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; do: ((![funcT] "waitFn") #())). (* go: server.go:36:18 *) @@ -506,7 +506,7 @@ Definition Server__applyAsFollower : val := let: "$r0" := EEpochStale in do: ((struct.field_ref applyAsFollowerReply "err" (![ptrT] "reply")) <-[Error] "$r0"))) ) in - (method_call #pkg_name' #"Server'ptr" #"withLock" #() (![ptrT] "s")) "$a0")). + (method_call #pkg_name' #"Server'ptr" #"withLock" (![ptrT] "s")) "$a0")). (* NOTE: This will vote yes only the first time it's called in an epoch. @@ -541,7 +541,7 @@ Definition Server__enterNewEpoch : val := let: "$r0" := (![sliceT] (struct.field_ref paxosState "state" (![ptrT] "ps"))) in do: ((struct.field_ref enterNewEpochReply "state" (![ptrT] "reply")) <-[sliceT] "$r0")) ) in - (method_call #pkg_name' #"Server'ptr" #"withLock" #() (![ptrT] "s")) "$a0")). + (method_call #pkg_name' #"Server'ptr" #"withLock" (![ptrT] "s")) "$a0")). (* go: server.go:83:18 *) Definition Server__TryBecomeLeader : val := @@ -550,13 +550,13 @@ Definition Server__TryBecomeLeader : val := do: (let: "$a0" := ((let: "$sl0" := (interface.make #""%go #"string"%go #"started trybecomeleader"%go) in slice.literal interfaceT ["$sl0"])) in (func_call #log.pkg_name' #"Println"%go) "$a0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; (if: ![boolT] (struct.field_ref paxosState "isLeader" (![ptrT] (struct.field_ref Server "ps" (![ptrT] "s")))) then do: (let: "$a0" := ((let: "$sl0" := (interface.make #""%go #"string"%go #"already leader"%go) in slice.literal interfaceT ["$sl0"])) in (func_call #log.pkg_name' #"Println"%go) "$a0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; return: (#()) else do: #());;; let: "clerks" := (ref_ty sliceT (zero_val sliceT)) in @@ -568,7 +568,7 @@ Definition Server__TryBecomeLeader : val := "epoch" ::= "$epoch" }])) in do: ("args" <-[ptrT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; let: "numReplies" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := #(W64 0) in do: ("numReplies" <-[uint64T] "$r0");;; @@ -594,21 +594,21 @@ Definition Server__TryBecomeLeader : val := let: "$go" := (λ: <>, exception_do (let: "reply" := (ref_ty ptrT (zero_val ptrT)) in let: "$r0" := (let: "$a0" := (![ptrT] "args") in - (method_call #pkg_name' #"singleClerk'ptr" #"enterNewEpoch" #() (![ptrT] "ck")) "$a0") in + (method_call #pkg_name' #"singleClerk'ptr" #"enterNewEpoch" (![ptrT] "ck")) "$a0") in do: ("reply" <-[ptrT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] "mu")) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] "mu")) #());;; do: ("numReplies" <-[uint64T] ((![uint64T] "numReplies") + #(W64 1)));;; let: "$r0" := (![ptrT] "reply") in do: ((slice.elem_ref ptrT (![sliceT] "replies") (![intT] "i")) <-[ptrT] "$r0");;; (if: (#(W64 2) * (![uint64T] "numReplies")) > (![uint64T] "n") - then do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" #() (![ptrT] "numReplies_cond")) #()) + then do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" (![ptrT] "numReplies_cond")) #()) else do: #());;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] "mu")) #())) + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] "mu")) #())) ) in do: (Fork ("$go" #()))));;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] "mu")) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] "mu")) #());;; (for: (λ: <>, (#(W64 2) * (![uint64T] "numReplies")) ≤ (![uint64T] "n")); (λ: <>, Skip) := λ: <>, - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" #() (![ptrT] "numReplies_cond")) #()));;; + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" (![ptrT] "numReplies_cond")) #()));;; let: "latestReply" := (ref_ty ptrT (zero_val ptrT)) in let: "numSuccesses" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := #(W64 0) in @@ -661,10 +661,10 @@ Definition Server__TryBecomeLeader : val := do: ((struct.field_ref paxosState "state" (![ptrT] "ps")) <-[sliceT] "$r0") else do: #())) ) in - (method_call #pkg_name' #"Server'ptr" #"withLock" #() (![ptrT] "s")) "$a0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] "mu")) #()) + (method_call #pkg_name' #"Server'ptr" #"withLock" (![ptrT] "s")) "$a0");;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] "mu")) #()) else - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] "mu")) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] "mu")) #());;; do: (let: "$a0" := ((let: "$sl0" := (interface.make #""%go #"string"%go #"failed becomeleader"%go) in slice.literal interfaceT ["$sl0"])) in (func_call #log.pkg_name' #"Println"%go) "$a0"))). @@ -674,10 +674,10 @@ Definition Server__TryAcquire : val := rec: "Server__TryAcquire" "s" <> := exception_do (let: "s" := (ref_ty ptrT "s") in let: "retErr" := (ref_ty Error (zero_val Error)) in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; (if: (~ (![boolT] (struct.field_ref paxosState "isLeader" (![ptrT] (struct.field_ref Server "ps" (![ptrT] "s")))))) then - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; let: "n" := (ref_ty ptrT (zero_val ptrT)) in return: (ENotLeader, ![ptrT] "n", #func.nil) else do: #());;; @@ -700,9 +700,9 @@ Definition Server__TryAcquire : val := let: "waitFn" := (ref_ty funcT (zero_val funcT)) in let: "$r0" := (let: "$a0" := (let: "$a0" := (![ptrT] (struct.field_ref Server "ps" (![ptrT] "s"))) in (func_call #pkg_name' #"encodePaxosState"%go) "$a0") in - (method_call #asyncfile.pkg_name' #"AsyncFile'ptr" #"Write" #() (![ptrT] (struct.field_ref Server "storage" (![ptrT] "s")))) "$a0") in + (method_call #asyncfile.pkg_name' #"AsyncFile'ptr" #"Write" (![ptrT] (struct.field_ref Server "storage" (![ptrT] "s")))) "$a0") in do: ("waitFn" <-[funcT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; do: ((![funcT] "waitFn") #());;; let: "clerks" := (ref_ty sliceT (zero_val sliceT)) in let: "$r0" := (![sliceT] (struct.field_ref Server "clerks" (![ptrT] "s"))) in @@ -738,21 +738,21 @@ Definition Server__TryAcquire : val := let: "$go" := (λ: <>, exception_do (let: "reply" := (ref_ty ptrT (zero_val ptrT)) in let: "$r0" := (let: "$a0" := (![ptrT] "args") in - (method_call #pkg_name' #"singleClerk'ptr" #"applyAsFollower" #() (![ptrT] "ck")) "$a0") in + (method_call #pkg_name' #"singleClerk'ptr" #"applyAsFollower" (![ptrT] "ck")) "$a0") in do: ("reply" <-[ptrT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] "mu")) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] "mu")) #());;; do: ("numReplies" <-[uint64T] ((![uint64T] "numReplies") + #(W64 1)));;; let: "$r0" := (![ptrT] "reply") in do: ((slice.elem_ref ptrT (![sliceT] "replies") (![intT] "i")) <-[ptrT] "$r0");;; (if: (#(W64 2) * (![uint64T] "numReplies")) > (![uint64T] "n") - then do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" #() (![ptrT] "numReplies_cond")) #()) + then do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Signal" (![ptrT] "numReplies_cond")) #()) else do: #());;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] "mu")) #())) + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] "mu")) #())) ) in do: (Fork ("$go" #()))));;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] "mu")) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] "mu")) #());;; (for: (λ: <>, (#(W64 2) * (![uint64T] "numReplies")) ≤ (![uint64T] "n")); (λ: <>, Skip) := λ: <>, - do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" #() (![ptrT] "numReplies_cond")) #()));;; + do: ((method_call #sync.pkg_name' #"Cond'ptr" #"Wait" (![ptrT] "numReplies_cond")) #()));;; let: "numSuccesses" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := #(W64 0) in do: ("numSuccesses" <-[uint64T] "$r0");;; @@ -781,11 +781,11 @@ Definition Server__TryAcquire : val := Definition Server__WeakRead : val := rec: "Server__WeakRead" "s" <> := exception_do (let: "s" := (ref_ty ptrT "s") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; let: "ret" := (ref_ty sliceT (zero_val sliceT)) in let: "$r0" := (![sliceT] (struct.field_ref paxosState "state" (![ptrT] (struct.field_ref Server "ps" (![ptrT] "s"))))) in do: ("ret" <-[sliceT] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (![ptrT] (struct.field_ref Server "mu" (![ptrT] "s")))) #());;; return: (![sliceT] "ret")). (* go: server.go:242:6 *) @@ -858,7 +858,7 @@ Definition StartServer : val := do: ("args" <-[ptrT] "$r0");;; do: (let: "$a0" := (![ptrT] "args") in let: "$a1" := (![ptrT] "reply") in - (method_call #pkg_name' #"Server'ptr" #"applyAsFollower" #() (![ptrT] "s")) "$a0" "$a1");;; + (method_call #pkg_name' #"Server'ptr" #"applyAsFollower" (![ptrT] "s")) "$a0" "$a1");;; let: "$r0" := (let: "$a0" := (![ptrT] "reply") in (func_call #pkg_name' #"encodeApplyAsFollowerReply"%go) "$a0") in do: ((![ptrT] "raw_reply") <-[sliceT] "$r0")) @@ -876,7 +876,7 @@ Definition StartServer : val := do: ("args" <-[ptrT] "$r0");;; do: (let: "$a0" := (![ptrT] "args") in let: "$a1" := (![ptrT] "reply") in - (method_call #pkg_name' #"Server'ptr" #"enterNewEpoch" #() (![ptrT] "s")) "$a0" "$a1");;; + (method_call #pkg_name' #"Server'ptr" #"enterNewEpoch" (![ptrT] "s")) "$a0" "$a1");;; let: "$r0" := (let: "$a0" := (![ptrT] "reply") in (func_call #pkg_name' #"encodeEnterNewEpochReply"%go) "$a0") in do: ((![ptrT] "raw_reply") <-[sliceT] "$r0")) @@ -885,7 +885,7 @@ Definition StartServer : val := let: "$r0" := (λ: "raw_args" "raw_reply", exception_do (let: "raw_reply" := (ref_ty ptrT "raw_reply") in let: "raw_args" := (ref_ty sliceT "raw_args") in - do: ((method_call #pkg_name' #"Server'ptr" #"TryBecomeLeader" #() (![ptrT] "s")) #())) + do: ((method_call #pkg_name' #"Server'ptr" #"TryBecomeLeader" (![ptrT] "s")) #())) ) in do: (map.insert (![mapT uint64T funcT] "handlers") RPC_BECOME_LEADER "$r0");;; let: "r" := (ref_ty ptrT (zero_val ptrT)) in @@ -893,7 +893,7 @@ Definition StartServer : val := (func_call #urpc.pkg_name' #"MakeServer"%go) "$a0") in do: ("r" <-[ptrT] "$r0");;; do: (let: "$a0" := (![uint64T] "me") in - (method_call #urpc.pkg_name' #"Server'ptr" #"Serve" #() (![ptrT] "r")) "$a0");;; + (method_call #urpc.pkg_name' #"Server'ptr" #"Serve" (![ptrT] "r")) "$a0");;; return: (![ptrT] "s")). Definition vars' : list (go_string * go_type) := []. diff --git a/new/code/github_com/tchajed/marshal.v b/new/code/github_com/tchajed/marshal.v index 54b9df61b..283951d32 100644 --- a/new/code/github_com/tchajed/marshal.v +++ b/new/code/github_com/tchajed/marshal.v @@ -71,7 +71,7 @@ Definition Enc__PutInts : val := slice.for_range uint64T "$range" (λ: <> "x", let: "x" := ref_ty uint64T "x" in do: (let: "$a0" := (![uint64T] "x") in - (method_call #pkg_name' #"Enc" #"PutInt" "PutInt" #() (![Enc] "enc")) "$a0")))). + (method_call #pkg_name' #"Enc" #"PutInt" (![Enc] "enc")) "$a0")))). (* go: marshal.go:43:16 *) Definition Enc__PutBytes : val := @@ -167,7 +167,7 @@ Definition Dec__GetInts : val := do: ("i" <-[uint64T] "$r0");;; (for: (λ: <>, (![uint64T] "i") < (![uint64T] "num")); (λ: <>, do: ("i" <-[uint64T] ((![uint64T] "i") + #(W64 1)))) := λ: <>, let: "$r0" := (let: "$a0" := (![sliceT] "xs") in - let: "$a1" := ((let: "$sl0" := ((method_call #pkg_name' #"Dec" #"GetInt" "GetInt" #() (![Dec] "dec")) #()) in + let: "$a1" := ((let: "$sl0" := ((method_call #pkg_name' #"Dec" #"GetInt" (![Dec] "dec")) #()) in slice.literal uint64T ["$sl0"])) in (slice.append sliceT) "$a0" "$a1") in do: ("xs" <-[sliceT] "$r0")));;; @@ -524,28 +524,28 @@ Definition vars' : list (go_string * go_type) := []. Definition functions' : list (go_string * val) := [("NewEncFromSlice"%go, NewEncFromSlice); ("NewEnc"%go, NewEnc); ("bool2byte"%go, bool2byte); ("NewDec"%go, NewDec); ("compute_new_cap"%go, compute_new_cap); ("reserve"%go, reserve); ("ReadInt"%go, ReadInt); ("ReadInt32"%go, ReadInt32); ("ReadBytes"%go, ReadBytes); ("ReadBytesCopy"%go, ReadBytesCopy); ("ReadBool"%go, ReadBool); ("ReadLenPrefixedBytes"%go, ReadLenPrefixedBytes); ("WriteInt"%go, WriteInt); ("WriteInt32"%go, WriteInt32); ("WriteBytes"%go, WriteBytes); ("WriteBool"%go, WriteBool); ("WriteLenPrefixedBytes"%go, WriteLenPrefixedBytes); ("ReadSlice"%go, ReadSlice); ("ReadSliceLenPrefix"%go, ReadSliceLenPrefix); ("WriteSlice"%go, WriteSlice); ("WriteSliceLenPrefix"%go, WriteSliceLenPrefix)]. Definition msets' : list (go_string * (list (go_string * val))) := [("Enc"%go, [("Finish"%go, Enc__Finish); ("PutBool"%go, Enc__PutBool); ("PutBytes"%go, Enc__PutBytes); ("PutInt"%go, Enc__PutInt); ("PutInt32"%go, Enc__PutInt32); ("PutInts"%go, Enc__PutInts)]); ("Enc'ptr"%go, [("Finish"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Enc" #"Finish" "Finish" #() (![Enc] "$recvAddr") - )); ("PutBool"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Enc" #"PutBool" "PutBool" #() (![Enc] "$recvAddr") - )); ("PutBytes"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Enc" #"PutBytes" "PutBytes" #() (![Enc] "$recvAddr") - )); ("PutInt"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Enc" #"PutInt" "PutInt" #() (![Enc] "$recvAddr") - )); ("PutInt32"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Enc" #"PutInt32" "PutInt32" #() (![Enc] "$recvAddr") - )); ("PutInts"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Enc" #"PutInts" "PutInts" #() (![Enc] "$recvAddr") - ))]); ("Dec"%go, [("GetBool"%go, Dec__GetBool); ("GetBytes"%go, Dec__GetBytes); ("GetInt"%go, Dec__GetInt); ("GetInt32"%go, Dec__GetInt32); ("GetInts"%go, Dec__GetInts)]); ("Dec'ptr"%go, [("GetBool"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Dec" #"GetBool" "GetBool" #() (![Dec] "$recvAddr") - )); ("GetBytes"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Dec" #"GetBytes" "GetBytes" #() (![Dec] "$recvAddr") - )); ("GetInt"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Dec" #"GetInt" "GetInt" #() (![Dec] "$recvAddr") - )); ("GetInt32"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Dec" #"GetInt32" "GetInt32" #() (![Dec] "$recvAddr") - )); ("GetInts"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Dec" #"GetInts" "GetInts" #() (![Dec] "$recvAddr") - ))])]. + method_call #pkg_name' #"Enc" #"Finish" (![Enc] "$recvAddr") + )%V); ("PutBool"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Enc" #"PutBool" (![Enc] "$recvAddr") + )%V); ("PutBytes"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Enc" #"PutBytes" (![Enc] "$recvAddr") + )%V); ("PutInt"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Enc" #"PutInt" (![Enc] "$recvAddr") + )%V); ("PutInt32"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Enc" #"PutInt32" (![Enc] "$recvAddr") + )%V); ("PutInts"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Enc" #"PutInts" (![Enc] "$recvAddr") + )%V)]); ("Dec"%go, [("GetBool"%go, Dec__GetBool); ("GetBytes"%go, Dec__GetBytes); ("GetInt"%go, Dec__GetInt); ("GetInt32"%go, Dec__GetInt32); ("GetInts"%go, Dec__GetInts)]); ("Dec'ptr"%go, [("GetBool"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Dec" #"GetBool" (![Dec] "$recvAddr") + )%V); ("GetBytes"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Dec" #"GetBytes" (![Dec] "$recvAddr") + )%V); ("GetInt"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Dec" #"GetInt" (![Dec] "$recvAddr") + )%V); ("GetInt32"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Dec" #"GetInt32" (![Dec] "$recvAddr") + )%V); ("GetInts"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Dec" #"GetInts" (![Dec] "$recvAddr") + )%V)])]. Definition initialize' : val := rec: "initialize'" <> := diff --git a/new/code/go_etcd_io/raft/v3.v b/new/code/go_etcd_io/raft/v3.v index 5ce503465..8c7b44b3b 100644 --- a/new/code/go_etcd_io/raft/v3.v +++ b/new/code/go_etcd_io/raft/v3.v @@ -149,11 +149,11 @@ Definition RawNode__Bootstrap : val := return: (let: "$a0" := #"can't bootstrap a nonempty Storage"%go in (func_call #errors.pkg_name' #"New"%go) "$a0") else do: #());;; - let: "$r0" := (![raftpb.HardState] (globals.get #pkg_name' #"emptyState"%go #())) in + let: "$r0" := (![raftpb.HardState] (globals.get #pkg_name' #"emptyState"%go)) in do: ((struct.field_ref RawNode "prevHardSt" (![ptrT] "rn")) <-[raftpb.HardState] "$r0");;; do: (let: "$a0" := #(W64 1) in let: "$a1" := None in - (method_call #pkg_name' #"raft'ptr" #"becomeFollower" #() (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0" "$a1");;; + (method_call #pkg_name' #"raft'ptr" #"becomeFollower" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0" "$a1");;; let: "ents" := (ref_ty sliceT (zero_val sliceT)) in let: "$r0" := (slice.make2 raftpb.Entry (let: "$a0" := (![sliceT] "peers") in slice.len "$a0")) in @@ -175,7 +175,7 @@ Definition RawNode__Bootstrap : val := do: ("cc" <-[raftpb.ConfChange] "$r0");;; let: "err" := (ref_ty error (zero_val error)) in let: "data" := (ref_ty sliceT (zero_val sliceT)) in - let: ("$ret0", "$ret1") := ((method_call #raftpb.pkg_name' #"ConfChange'ptr" #"Marshal" #() "cc") #()) in + let: ("$ret0", "$ret1") := ((method_call #raftpb.pkg_name' #"ConfChange'ptr" #"Marshal" "cc") #()) in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("data" <-[sliceT] "$r0");;; @@ -195,7 +195,7 @@ Definition RawNode__Bootstrap : val := }]) in do: ((slice.elem_ref raftpb.Entry (![sliceT] "ents") (![intT] "i")) <-[raftpb.Entry] "$r0")));;; do: (let: "$a0" := (![sliceT] "ents") in - (method_call #pkg_name' #"raftLog'ptr" #"append" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))))) "$a0");;; + (method_call #pkg_name' #"raftLog'ptr" #"append" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))))) "$a0");;; let: "$r0" := (let: "$a0" := (![sliceT] "ents") in slice.len "$a0") in do: ((struct.field_ref raftLog "committed" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))))) <-[uint64T] "$r0");;; @@ -210,7 +210,7 @@ Definition RawNode__Bootstrap : val := "Context" ::= zero_val sliceT; "ID" ::= zero_val uint64T }])) #()) in - (method_call #pkg_name' #"raft'ptr" #"applyConfChange" #() (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0")));;; + (method_call #pkg_name' #"raft'ptr" #"applyConfChange" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0")));;; return: (#interface.nil)). Definition noLimit : Z := math.MaxUint64. @@ -327,7 +327,7 @@ Definition raftLog__maybeAppend : val := let: "a" := (ref_ty logSlice "a") in let: "lastnewi" := (ref_ty uint64T (zero_val uint64T)) in (if: (~ (let: "$a0" := (![entryID] (struct.field_ref logSlice "prev" "a")) in - (method_call #pkg_name' #"raftLog'ptr" #"matchTerm" #() (![ptrT] "l")) "$a0")) + (method_call #pkg_name' #"raftLog'ptr" #"matchTerm" (![ptrT] "l")) "$a0")) then return: (#(W64 0), #false) else do: #());;; let: "$r0" := ((![uint64T] (struct.field_ref entryID "index" (struct.field_ref logSlice "prev" "a"))) + (let: "$a0" := (![sliceT] (struct.field_ref logSlice "entries" "a")) in @@ -335,7 +335,7 @@ Definition raftLog__maybeAppend : val := do: ("lastnewi" <-[uint64T] "$r0");;; let: "ci" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := (let: "$a0" := (![sliceT] (struct.field_ref logSlice "entries" "a")) in - (method_call #pkg_name' #"raftLog'ptr" #"findConflict" #() (![ptrT] "l")) "$a0") in + (method_call #pkg_name' #"raftLog'ptr" #"findConflict" (![ptrT] "l")) "$a0") in do: ("ci" <-[uint64T] "$r0");;; let: "$sw" := #true in (if: "$sw" = ((![uint64T] "ci") = #(W64 0)) @@ -364,11 +364,11 @@ Definition raftLog__maybeAppend : val := else do: #());;; do: (let: "$a0" := (let: "$s" := (![sliceT] (struct.field_ref logSlice "entries" "a")) in slice.slice raftpb.Entry "$s" ((![uint64T] "ci") - (![uint64T] "offset")) (slice.len "$s")) in - (method_call #pkg_name' #"raftLog'ptr" #"append" #() (![ptrT] "l")) "$a0")));;; + (method_call #pkg_name' #"raftLog'ptr" #"append" (![ptrT] "l")) "$a0")));;; do: (let: "$a0" := (let: "$a0" := (![uint64T] "committed") in let: "$a1" := (![uint64T] "lastnewi") in (minUint64 2) "$a0" "$a1") in - (method_call #pkg_name' #"raftLog'ptr" #"commitTo" #() (![ptrT] "l")) "$a0");;; + (method_call #pkg_name' #"raftLog'ptr" #"commitTo" (![ptrT] "l")) "$a0");;; return: (![uint64T] "lastnewi", #true)). (* go: log.go:132:19 *) @@ -378,7 +378,7 @@ Definition raftLog__append : val := let: "ents" := (ref_ty sliceT "ents") in (if: (let: "$a0" := (![sliceT] "ents") in slice.len "$a0") = #(W64 0) - then return: ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] "l")) #()) + then return: ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] "l")) #()) else do: #());;; (let: "after" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := ((![uint64T] (struct.field_ref raftpb.Entry "Index" (slice.elem_ref raftpb.Entry (![sliceT] "ents") #(W64 0)))) - #(W64 1)) in @@ -392,8 +392,8 @@ Definition raftLog__append : val := (interface.get "Panicf" (![Logger] (struct.field_ref raftLog "logger" (![ptrT] "l")))) "$a0" "$a1") else do: #()));;; do: (let: "$a0" := (![sliceT] "ents") in - (method_call #pkg_name' #"unstable'ptr" #"truncateAndAppend" #() (struct.field_ref raftLog "unstable" (![ptrT] "l"))) "$a0");;; - return: ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] "l")) #())). + (method_call #pkg_name' #"unstable'ptr" #"truncateAndAppend" (struct.field_ref raftLog "unstable" (![ptrT] "l"))) "$a0");;; + return: ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] "l")) #())). (* findConflict finds the index of the conflict. It returns the first pair of conflicting entries between the existing @@ -419,17 +419,17 @@ Definition raftLog__findConflict : val := (func_call #pkg_name' #"pbEntryID"%go) "$a0") in do: ("id" <-[entryID] "$r0");;; (if: (~ (let: "$a0" := (![entryID] "id") in - (method_call #pkg_name' #"raftLog'ptr" #"matchTerm" #() (![ptrT] "l")) "$a0")) + (method_call #pkg_name' #"raftLog'ptr" #"matchTerm" (![ptrT] "l")) "$a0")) then - (if: (![uint64T] (struct.field_ref entryID "index" "id")) ≤ ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] "l")) #()) + (if: (![uint64T] (struct.field_ref entryID "index" "id")) ≤ ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] "l")) #()) then do: (let: "$a0" := #"found conflict at index %d [existing term: %d, conflicting term: %d]"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref entryID "index" "id"))) in let: "$sl1" := (interface.make #""%go #"uint64"%go (let: ("$ret0", "$ret1") := ((let: "$a0" := (![uint64T] (struct.field_ref entryID "index" "id")) in - (method_call #pkg_name' #"raftLog'ptr" #"term" #() (![ptrT] "l")) "$a0")) in + (method_call #pkg_name' #"raftLog'ptr" #"term" (![ptrT] "l")) "$a0")) in let: "$a0" := "$ret0" in let: "$a1" := "$ret1" in - (method_call #pkg_name' #"raftLog'ptr" #"zeroTermOnOutOfBounds" #() (![ptrT] "l")) "$a0" "$a1")) in + (method_call #pkg_name' #"raftLog'ptr" #"zeroTermOnOutOfBounds" (![ptrT] "l")) "$a0" "$a1")) in let: "$sl2" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref entryID "term" "id"))) in slice.literal interfaceT ["$sl0"; "$sl1"; "$sl2"])) in (interface.get "Infof" (![Logger] (struct.field_ref raftLog "logger" (![ptrT] "l")))) "$a0" "$a1") @@ -462,7 +462,7 @@ Definition raftLog__findConflictByTerm : val := (let: "err" := (ref_ty error (zero_val error)) in let: "ourTerm" := (ref_ty uint64T (zero_val uint64T)) in let: ("$ret0", "$ret1") := (let: "$a0" := (![uint64T] "index") in - (method_call #pkg_name' #"raftLog'ptr" #"term" #() (![ptrT] "l")) "$a0") in + (method_call #pkg_name' #"raftLog'ptr" #"term" (![ptrT] "l")) "$a0") in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("ourTerm" <-[uint64T] "$r0");;; @@ -482,7 +482,7 @@ Definition raftLog__findConflictByTerm : val := Definition raftLog__nextUnstableEnts : val := rec: "raftLog__nextUnstableEnts" "l" <> := exception_do (let: "l" := (ref_ty ptrT "l") in - return: ((method_call #pkg_name' #"unstable'ptr" #"nextEntries" #() (struct.field_ref raftLog "unstable" (![ptrT] "l"))) #())). + return: ((method_call #pkg_name' #"unstable'ptr" #"nextEntries" (struct.field_ref raftLog "unstable" (![ptrT] "l"))) #())). (* hasNextUnstableEnts returns if there are any entries that are available to be written to the local stable log and are not already in-progress. @@ -491,7 +491,7 @@ Definition raftLog__nextUnstableEnts : val := Definition raftLog__hasNextUnstableEnts : val := rec: "raftLog__hasNextUnstableEnts" "l" <> := exception_do (let: "l" := (ref_ty ptrT "l") in - return: (int_gt (let: "$a0" := ((method_call #pkg_name' #"raftLog'ptr" #"nextUnstableEnts" #() (![ptrT] "l")) #()) in + return: (int_gt (let: "$a0" := ((method_call #pkg_name' #"raftLog'ptr" #"nextUnstableEnts" (![ptrT] "l")) #()) in slice.len "$a0") #(W64 0))). (* hasNextOrInProgressUnstableEnts returns if there are any entries that are @@ -520,14 +520,14 @@ Definition raftLog__nextCommittedEnts : val := (if: ![boolT] (struct.field_ref raftLog "applyingEntsPaused" (![ptrT] "l")) then return: (#slice.nil) else do: #());;; - (if: (method_call #pkg_name' #"raftLog'ptr" #"hasNextOrInProgressSnapshot" #() (![ptrT] "l")) #() + (if: (method_call #pkg_name' #"raftLog'ptr" #"hasNextOrInProgressSnapshot" (![ptrT] "l")) #() then return: (#slice.nil) else do: #());;; let: "hi" := (ref_ty uint64T (zero_val uint64T)) in let: "lo" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := ((![uint64T] (struct.field_ref raftLog "applying" (![ptrT] "l"))) + #(W64 1)) in let: "$r1" := ((let: "$a0" := (![boolT] "allowUnstable") in - (method_call #pkg_name' #"raftLog'ptr" #"maxAppliableIndex" #() (![ptrT] "l")) "$a0") + #(W64 1)) in + (method_call #pkg_name' #"raftLog'ptr" #"maxAppliableIndex" (![ptrT] "l")) "$a0") + #(W64 1)) in do: ("lo" <-[uint64T] "$r0");;; do: ("hi" <-[uint64T] "$r1");;; (if: (![uint64T] "lo") ≥ (![uint64T] "hi") @@ -549,7 +549,7 @@ Definition raftLog__nextCommittedEnts : val := let: ("$ret0", "$ret1") := (let: "$a0" := (![uint64T] "lo") in let: "$a1" := (![uint64T] "hi") in let: "$a2" := (![entryEncodingSize] "maxSize") in - (method_call #pkg_name' #"raftLog'ptr" #"slice" #() (![ptrT] "l")) "$a0" "$a1" "$a2") in + (method_call #pkg_name' #"raftLog'ptr" #"slice" (![ptrT] "l")) "$a0" "$a1" "$a2") in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("ents" <-[sliceT] "$r0");;; @@ -574,14 +574,14 @@ Definition raftLog__hasNextCommittedEnts : val := (if: ![boolT] (struct.field_ref raftLog "applyingEntsPaused" (![ptrT] "l")) then return: (#false) else do: #());;; - (if: (method_call #pkg_name' #"raftLog'ptr" #"hasNextOrInProgressSnapshot" #() (![ptrT] "l")) #() + (if: (method_call #pkg_name' #"raftLog'ptr" #"hasNextOrInProgressSnapshot" (![ptrT] "l")) #() then return: (#false) else do: #());;; let: "hi" := (ref_ty uint64T (zero_val uint64T)) in let: "lo" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := ((![uint64T] (struct.field_ref raftLog "applying" (![ptrT] "l"))) + #(W64 1)) in let: "$r1" := ((let: "$a0" := (![boolT] "allowUnstable") in - (method_call #pkg_name' #"raftLog'ptr" #"maxAppliableIndex" #() (![ptrT] "l")) "$a0") + #(W64 1)) in + (method_call #pkg_name' #"raftLog'ptr" #"maxAppliableIndex" (![ptrT] "l")) "$a0") + #(W64 1)) in do: ("lo" <-[uint64T] "$r0");;; do: ("hi" <-[uint64T] "$r1");;; return: ((![uint64T] "lo") < (![uint64T] "hi"))). @@ -615,7 +615,7 @@ Definition raftLog__maxAppliableIndex : val := Definition raftLog__nextUnstableSnapshot : val := rec: "raftLog__nextUnstableSnapshot" "l" <> := exception_do (let: "l" := (ref_ty ptrT "l") in - return: ((method_call #pkg_name' #"unstable'ptr" #"nextSnapshot" #() (struct.field_ref raftLog "unstable" (![ptrT] "l"))) #())). + return: ((method_call #pkg_name' #"unstable'ptr" #"nextSnapshot" (struct.field_ref raftLog "unstable" (![ptrT] "l"))) #())). (* hasNextUnstableSnapshot returns if there is a snapshot that is available to be applied to the local storage and is not already in-progress. @@ -624,7 +624,7 @@ Definition raftLog__nextUnstableSnapshot : val := Definition raftLog__hasNextUnstableSnapshot : val := rec: "raftLog__hasNextUnstableSnapshot" "l" <> := exception_do (let: "l" := (ref_ty ptrT "l") in - return: (((method_call #pkg_name' #"unstable'ptr" #"nextSnapshot" #() (struct.field_ref raftLog "unstable" (![ptrT] "l"))) #()) ≠ #null)). + return: (((method_call #pkg_name' #"unstable'ptr" #"nextSnapshot" (struct.field_ref raftLog "unstable" (![ptrT] "l"))) #()) ≠ #null)). (* hasNextOrInProgressSnapshot returns if there is pending snapshot waiting for applying or in the process of being applied. @@ -651,7 +651,7 @@ Definition raftLog__firstIndex : val := exception_do (let: "l" := (ref_ty ptrT "l") in (let: "ok" := (ref_ty boolT (zero_val boolT)) in let: "i" := (ref_ty uint64T (zero_val uint64T)) in - let: ("$ret0", "$ret1") := ((method_call #pkg_name' #"unstable'ptr" #"maybeFirstIndex" #() (struct.field_ref raftLog "unstable" (![ptrT] "l"))) #()) in + let: ("$ret0", "$ret1") := ((method_call #pkg_name' #"unstable'ptr" #"maybeFirstIndex" (struct.field_ref raftLog "unstable" (![ptrT] "l"))) #()) in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("i" <-[uint64T] "$r0");;; @@ -679,7 +679,7 @@ Definition raftLog__lastIndex : val := exception_do (let: "l" := (ref_ty ptrT "l") in (let: "ok" := (ref_ty boolT (zero_val boolT)) in let: "i" := (ref_ty uint64T (zero_val uint64T)) in - let: ("$ret0", "$ret1") := ((method_call #pkg_name' #"unstable'ptr" #"maybeLastIndex" #() (struct.field_ref raftLog "unstable" (![ptrT] "l"))) #()) in + let: ("$ret0", "$ret1") := ((method_call #pkg_name' #"unstable'ptr" #"maybeLastIndex" (struct.field_ref raftLog "unstable" (![ptrT] "l"))) #()) in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("i" <-[uint64T] "$r0");;; @@ -708,11 +708,11 @@ Definition raftLog__commitTo : val := let: "tocommit" := (ref_ty uint64T "tocommit") in (if: (![uint64T] (struct.field_ref raftLog "committed" (![ptrT] "l"))) < (![uint64T] "tocommit") then - (if: ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] "l")) #()) < (![uint64T] "tocommit") + (if: ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] "l")) #()) < (![uint64T] "tocommit") then do: (let: "$a0" := #"tocommit(%d) is out of range [lastIndex(%d)]. Was the raft log corrupted, truncated, or lost?"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] "tocommit")) in - let: "$sl1" := (interface.make #""%go #"uint64"%go ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] "l")) #())) in + let: "$sl1" := (interface.make #""%go #"uint64"%go ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] "l")) #())) in slice.literal interfaceT ["$sl0"; "$sl1"])) in (interface.get "Panicf" (![Logger] (struct.field_ref raftLog "logger" (![ptrT] "l")))) "$a0" "$a1") else do: #());;; @@ -769,7 +769,7 @@ Definition raftLog__acceptApplying : val := do: ((struct.field_ref raftLog "applying" (![ptrT] "l")) <-[uint64T] "$r0");;; do: ((struct.field_ref raftLog "applyingEntsSize" (![ptrT] "l")) <-[entryEncodingSize] ((![entryEncodingSize] (struct.field_ref raftLog "applyingEntsSize" (![ptrT] "l"))) + (![entryEncodingSize] "size")));;; let: "$r0" := (((![entryEncodingSize] (struct.field_ref raftLog "applyingEntsSize" (![ptrT] "l"))) ≥ (![entryEncodingSize] (struct.field_ref raftLog "maxApplyingEntsSize" (![ptrT] "l")))) || ((![uint64T] "i") < (let: "$a0" := (![boolT] "allowUnstable") in - (method_call #pkg_name' #"raftLog'ptr" #"maxAppliableIndex" #() (![ptrT] "l")) "$a0"))) in + (method_call #pkg_name' #"raftLog'ptr" #"maxAppliableIndex" (![ptrT] "l")) "$a0"))) in do: ((struct.field_ref raftLog "applyingEntsPaused" (![ptrT] "l")) <-[boolT] "$r0")). (* go: log.go:367:19 *) @@ -778,7 +778,7 @@ Definition raftLog__stableTo : val := exception_do (let: "l" := (ref_ty ptrT "l") in let: "id" := (ref_ty entryID "id") in do: (let: "$a0" := (![entryID] "id") in - (method_call #pkg_name' #"unstable'ptr" #"stableTo" #() (struct.field_ref raftLog "unstable" (![ptrT] "l"))) "$a0")). + (method_call #pkg_name' #"unstable'ptr" #"stableTo" (struct.field_ref raftLog "unstable" (![ptrT] "l"))) "$a0")). (* go: log.go:369:19 *) Definition raftLog__stableSnapTo : val := @@ -786,7 +786,7 @@ Definition raftLog__stableSnapTo : val := exception_do (let: "l" := (ref_ty ptrT "l") in let: "i" := (ref_ty uint64T "i") in do: (let: "$a0" := (![uint64T] "i") in - (method_call #pkg_name' #"unstable'ptr" #"stableSnapTo" #() (struct.field_ref raftLog "unstable" (![ptrT] "l"))) "$a0")). + (method_call #pkg_name' #"unstable'ptr" #"stableSnapTo" (struct.field_ref raftLog "unstable" (![ptrT] "l"))) "$a0")). (* acceptUnstable indicates that the application has started persisting the unstable entries in storage, and that the current unstable entries are thus @@ -797,7 +797,7 @@ Definition raftLog__stableSnapTo : val := Definition raftLog__acceptUnstable : val := rec: "raftLog__acceptUnstable" "l" <> := exception_do (let: "l" := (ref_ty ptrT "l") in - do: ((method_call #pkg_name' #"unstable'ptr" #"acceptInProgress" #() (struct.field_ref raftLog "unstable" (![ptrT] "l"))) #())). + do: ((method_call #pkg_name' #"unstable'ptr" #"acceptInProgress" (struct.field_ref raftLog "unstable" (![ptrT] "l"))) #())). (* lastEntryID returns the ID of the last entry in the log. @@ -806,12 +806,12 @@ Definition raftLog__lastEntryID : val := rec: "raftLog__lastEntryID" "l" <> := exception_do (let: "l" := (ref_ty ptrT "l") in let: "index" := (ref_ty uint64T (zero_val uint64T)) in - let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] "l")) #()) in + let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] "l")) #()) in do: ("index" <-[uint64T] "$r0");;; let: "err" := (ref_ty error (zero_val error)) in let: "t" := (ref_ty uint64T (zero_val uint64T)) in let: ("$ret0", "$ret1") := (let: "$a0" := (![uint64T] "index") in - (method_call #pkg_name' #"raftLog'ptr" #"term" #() (![ptrT] "l")) "$a0") in + (method_call #pkg_name' #"raftLog'ptr" #"term" (![ptrT] "l")) "$a0") in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("t" <-[uint64T] "$r0");;; @@ -839,7 +839,7 @@ Definition raftLog__term : val := (let: "ok" := (ref_ty boolT (zero_val boolT)) in let: "t" := (ref_ty uint64T (zero_val uint64T)) in let: ("$ret0", "$ret1") := (let: "$a0" := (![uint64T] "i") in - (method_call #pkg_name' #"unstable'ptr" #"maybeTerm" #() (struct.field_ref raftLog "unstable" (![ptrT] "l"))) "$a0") in + (method_call #pkg_name' #"unstable'ptr" #"maybeTerm" (struct.field_ref raftLog "unstable" (![ptrT] "l"))) "$a0") in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("t" <-[uint64T] "$r0");;; @@ -847,11 +847,11 @@ Definition raftLog__term : val := (if: ![boolT] "ok" then return: (![uint64T] "t", #interface.nil) else do: #()));;; - (if: ((![uint64T] "i") + #(W64 1)) < ((method_call #pkg_name' #"raftLog'ptr" #"firstIndex" #() (![ptrT] "l")) #()) - then return: (#(W64 0), ![error] (globals.get #pkg_name' #"ErrCompacted"%go #())) + (if: ((![uint64T] "i") + #(W64 1)) < ((method_call #pkg_name' #"raftLog'ptr" #"firstIndex" (![ptrT] "l")) #()) + then return: (#(W64 0), ![error] (globals.get #pkg_name' #"ErrCompacted"%go)) else do: #());;; - (if: (![uint64T] "i") > ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] "l")) #()) - then return: (#(W64 0), ![error] (globals.get #pkg_name' #"ErrUnavailable"%go #())) + (if: (![uint64T] "i") > ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] "l")) #()) + then return: (#(W64 0), ![error] (globals.get #pkg_name' #"ErrUnavailable"%go)) else do: #());;; let: "err" := (ref_ty error (zero_val error)) in let: "t" := (ref_ty uint64T (zero_val uint64T)) in @@ -864,7 +864,7 @@ Definition raftLog__term : val := (if: (![error] "err") = #interface.nil then return: (![uint64T] "t", #interface.nil) else do: #());;; - (if: ((![error] "err") = (![error] (globals.get #pkg_name' #"ErrCompacted"%go #()))) || ((![error] "err") = (![error] (globals.get #pkg_name' #"ErrUnavailable"%go #()))) + (if: ((![error] "err") = (![error] (globals.get #pkg_name' #"ErrCompacted"%go))) || ((![error] "err") = (![error] (globals.get #pkg_name' #"ErrUnavailable"%go))) then return: (#(W64 0), ![error] "err") else do: #());;; do: (let: "$a0" := (![error] "err") in @@ -876,13 +876,13 @@ Definition raftLog__entries : val := exception_do (let: "l" := (ref_ty ptrT "l") in let: "maxSize" := (ref_ty entryEncodingSize "maxSize") in let: "i" := (ref_ty uint64T "i") in - (if: (![uint64T] "i") > ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] "l")) #()) + (if: (![uint64T] "i") > ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] "l")) #()) then return: (#slice.nil, #interface.nil) else do: #());;; let: ("$ret0", "$ret1") := ((let: "$a0" := (![uint64T] "i") in - let: "$a1" := (((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] "l")) #()) + #(W64 1)) in + let: "$a1" := (((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] "l")) #()) + #(W64 1)) in let: "$a2" := (![entryEncodingSize] "maxSize") in - (method_call #pkg_name' #"raftLog'ptr" #"slice" #() (![ptrT] "l")) "$a0" "$a1" "$a2")) in + (method_call #pkg_name' #"raftLog'ptr" #"slice" (![ptrT] "l")) "$a0" "$a1" "$a2")) in return: ("$ret0", "$ret1")). (* allEntries returns all entries in the log. @@ -893,9 +893,9 @@ Definition raftLog__allEntries : val := exception_do (let: "l" := (ref_ty ptrT "l") in let: "err" := (ref_ty error (zero_val error)) in let: "ents" := (ref_ty sliceT (zero_val sliceT)) in - let: ("$ret0", "$ret1") := (let: "$a0" := ((method_call #pkg_name' #"raftLog'ptr" #"firstIndex" #() (![ptrT] "l")) #()) in + let: ("$ret0", "$ret1") := (let: "$a0" := ((method_call #pkg_name' #"raftLog'ptr" #"firstIndex" (![ptrT] "l")) #()) in let: "$a1" := #(W64 noLimit) in - (method_call #pkg_name' #"raftLog'ptr" #"entries" #() (![ptrT] "l")) "$a0" "$a1") in + (method_call #pkg_name' #"raftLog'ptr" #"entries" (![ptrT] "l")) "$a0" "$a1") in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("ents" <-[sliceT] "$r0");;; @@ -903,8 +903,8 @@ Definition raftLog__allEntries : val := (if: (![error] "err") = #interface.nil then return: (![sliceT] "ents") else do: #());;; - (if: (![error] "err") = (![error] (globals.get #pkg_name' #"ErrCompacted"%go #())) - then return: ((method_call #pkg_name' #"raftLog'ptr" #"allEntries" #() (![ptrT] "l")) #()) + (if: (![error] "err") = (![error] (globals.get #pkg_name' #"ErrCompacted"%go)) + then return: ((method_call #pkg_name' #"raftLog'ptr" #"allEntries" (![ptrT] "l")) #()) else do: #());;; do: (let: "$a0" := (![error] "err") in Panic "$a0")). @@ -923,7 +923,7 @@ Definition raftLog__isUpToDate : val := exception_do (let: "l" := (ref_ty ptrT "l") in let: "their" := (ref_ty entryID "their") in let: "our" := (ref_ty entryID (zero_val entryID)) in - let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" #() (![ptrT] "l")) #()) in + let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" (![ptrT] "l")) #()) in do: ("our" <-[entryID] "$r0");;; return: (((![uint64T] (struct.field_ref entryID "term" "their")) > (![uint64T] (struct.field_ref entryID "term" "our"))) || (((![uint64T] (struct.field_ref entryID "term" "their")) = (![uint64T] (struct.field_ref entryID "term" "our"))) && ((![uint64T] (struct.field_ref entryID "index" "their")) ≥ (![uint64T] (struct.field_ref entryID "index" "our")))))). @@ -935,7 +935,7 @@ Definition raftLog__matchTerm : val := let: "err" := (ref_ty error (zero_val error)) in let: "t" := (ref_ty uint64T (zero_val uint64T)) in let: ("$ret0", "$ret1") := (let: "$a0" := (![uint64T] (struct.field_ref entryID "index" "id")) in - (method_call #pkg_name' #"raftLog'ptr" #"term" #() (![ptrT] "l")) "$a0") in + (method_call #pkg_name' #"raftLog'ptr" #"term" (![ptrT] "l")) "$a0") in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("t" <-[uint64T] "$r0");;; @@ -951,10 +951,10 @@ Definition raftLog__maybeCommit : val := exception_do (let: "l" := (ref_ty ptrT "l") in let: "at" := (ref_ty entryID "at") in (if: (((![uint64T] (struct.field_ref entryID "term" "at")) ≠ #(W64 0)) && ((![uint64T] (struct.field_ref entryID "index" "at")) > (![uint64T] (struct.field_ref raftLog "committed" (![ptrT] "l"))))) && (let: "$a0" := (![entryID] "at") in - (method_call #pkg_name' #"raftLog'ptr" #"matchTerm" #() (![ptrT] "l")) "$a0") + (method_call #pkg_name' #"raftLog'ptr" #"matchTerm" (![ptrT] "l")) "$a0") then do: (let: "$a0" := (![uint64T] (struct.field_ref entryID "index" "at")) in - (method_call #pkg_name' #"raftLog'ptr" #"commitTo" #() (![ptrT] "l")) "$a0");;; + (method_call #pkg_name' #"raftLog'ptr" #"commitTo" (![ptrT] "l")) "$a0");;; return: (#true) else do: #());;; return: (#false)). @@ -967,7 +967,7 @@ Definition raftLog__restore : val := let: "$r0" := (![uint64T] (struct.field_ref raftpb.SnapshotMetadata "Index" (struct.field_ref raftpb.Snapshot "Metadata" "s"))) in do: ((struct.field_ref raftLog "committed" (![ptrT] "l")) <-[uint64T] "$r0");;; do: (let: "$a0" := (![raftpb.Snapshot] "s") in - (method_call #pkg_name' #"unstable'ptr" #"restore" #() (struct.field_ref raftLog "unstable" (![ptrT] "l"))) "$a0")). + (method_call #pkg_name' #"unstable'ptr" #"restore" (struct.field_ref raftLog "unstable" (![ptrT] "l"))) "$a0")). (* scan visits all log entries in the [lo, hi) range, returning them via the given callback. The callback can be invoked multiple times, with consecutive @@ -994,7 +994,7 @@ Definition raftLog__scan : val := let: ("$ret0", "$ret1") := (let: "$a0" := (![uint64T] "lo") in let: "$a1" := (![uint64T] "hi") in let: "$a2" := (![entryEncodingSize] "pageSize") in - (method_call #pkg_name' #"raftLog'ptr" #"slice" #() (![ptrT] "l")) "$a0" "$a1" "$a2") in + (method_call #pkg_name' #"raftLog'ptr" #"slice" (![ptrT] "l")) "$a0" "$a1" "$a2") in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("ents" <-[sliceT] "$r0");;; @@ -1034,7 +1034,7 @@ Definition raftLog__slice : val := (let: "err" := (ref_ty error (zero_val error)) in let: "$r0" := (let: "$a0" := (![uint64T] "lo") in let: "$a1" := (![uint64T] "hi") in - (method_call #pkg_name' #"raftLog'ptr" #"mustCheckOutOfBounds" #() (![ptrT] "l")) "$a0" "$a1") in + (method_call #pkg_name' #"raftLog'ptr" #"mustCheckOutOfBounds" (![ptrT] "l")) "$a0" "$a1") in do: ("err" <-[error] "$r0");;; (if: (![error] "err") ≠ #interface.nil then return: (#slice.nil, ![error] "err") @@ -1047,7 +1047,7 @@ Definition raftLog__slice : val := let: "ents" := (ref_ty sliceT (zero_val sliceT)) in let: "$r0" := (let: "$a0" := (let: "$a0" := (![uint64T] "lo") in let: "$a1" := (![uint64T] "hi") in - (method_call #pkg_name' #"unstable'ptr" #"slice" #() (struct.field_ref raftLog "unstable" (![ptrT] "l"))) "$a0" "$a1") in + (method_call #pkg_name' #"unstable'ptr" #"slice" (struct.field_ref raftLog "unstable" (![ptrT] "l"))) "$a0" "$a1") in let: "$a1" := (![entryEncodingSize] "maxSize") in (func_call #pkg_name' #"limitSize"%go) "$a0" "$a1") in do: ("ents" <-[sliceT] "$r0");;; @@ -1071,10 +1071,10 @@ Definition raftLog__slice : val := let: "$r1" := "$ret1" in do: ("ents" <-[sliceT] "$r0");;; do: ("err" <-[error] "$r1");;; - (if: (![error] "err") = (![error] (globals.get #pkg_name' #"ErrCompacted"%go #())) + (if: (![error] "err") = (![error] (globals.get #pkg_name' #"ErrCompacted"%go)) then return: (#slice.nil, ![error] "err") else - (if: (![error] "err") = (![error] (globals.get #pkg_name' #"ErrUnavailable"%go #())) + (if: (![error] "err") = (![error] (globals.get #pkg_name' #"ErrUnavailable"%go)) then do: (let: "$a0" := #"entries[%d:%d) is unavailable from storage"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] "lo")) in @@ -1104,7 +1104,7 @@ Definition raftLog__slice : val := let: "unstable" := (ref_ty sliceT (zero_val sliceT)) in let: "$r0" := (let: "$a0" := (let: "$a0" := (![uint64T] (struct.field_ref unstable "offset" (struct.field_ref raftLog "unstable" (![ptrT] "l")))) in let: "$a1" := (![uint64T] "hi") in - (method_call #pkg_name' #"unstable'ptr" #"slice" #() (struct.field_ref raftLog "unstable" (![ptrT] "l"))) "$a0" "$a1") in + (method_call #pkg_name' #"unstable'ptr" #"slice" (struct.field_ref raftLog "unstable" (![ptrT] "l"))) "$a0" "$a1") in let: "$a1" := ((![entryEncodingSize] "maxSize") - (![entryEncodingSize] "size")) in (func_call #pkg_name' #"limitSize"%go) "$a0" "$a1") in do: ("unstable" <-[sliceT] "$r0");;; @@ -1134,13 +1134,13 @@ Definition raftLog__mustCheckOutOfBounds : val := (interface.get "Panicf" (![Logger] (struct.field_ref raftLog "logger" (![ptrT] "l")))) "$a0" "$a1") else do: #());;; let: "fi" := (ref_ty uint64T (zero_val uint64T)) in - let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"firstIndex" #() (![ptrT] "l")) #()) in + let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"firstIndex" (![ptrT] "l")) #()) in do: ("fi" <-[uint64T] "$r0");;; (if: (![uint64T] "lo") < (![uint64T] "fi") - then return: (![error] (globals.get #pkg_name' #"ErrCompacted"%go #())) + then return: (![error] (globals.get #pkg_name' #"ErrCompacted"%go)) else do: #());;; let: "length" := (ref_ty uint64T (zero_val uint64T)) in - let: "$r0" := ((((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] "l")) #()) + #(W64 1)) - (![uint64T] "fi")) in + let: "$r0" := ((((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] "l")) #()) + #(W64 1)) - (![uint64T] "fi")) in do: ("length" <-[uint64T] "$r0");;; (if: (![uint64T] "hi") > ((![uint64T] "fi") + (![uint64T] "length")) then @@ -1148,7 +1148,7 @@ Definition raftLog__mustCheckOutOfBounds : val := let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] "lo")) in let: "$sl1" := (interface.make #""%go #"uint64"%go (![uint64T] "hi")) in let: "$sl2" := (interface.make #""%go #"uint64"%go (![uint64T] "fi")) in - let: "$sl3" := (interface.make #""%go #"uint64"%go ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] "l")) #())) in + let: "$sl3" := (interface.make #""%go #"uint64"%go ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] "l")) #())) in slice.literal interfaceT ["$sl0"; "$sl1"; "$sl2"; "$sl3"])) in (interface.get "Panicf" (![Logger] (struct.field_ref raftLog "logger" (![ptrT] "l")))) "$a0" "$a1") else do: #());;; @@ -1163,7 +1163,7 @@ Definition raftLog__zeroTermOnOutOfBounds : val := (if: (![error] "err") = #interface.nil then return: (![uint64T] "t") else do: #());;; - (if: ((![error] "err") = (![error] (globals.get #pkg_name' #"ErrCompacted"%go #()))) || ((![error] "err") = (![error] (globals.get #pkg_name' #"ErrUnavailable"%go #()))) + (if: ((![error] "err") = (![error] (globals.get #pkg_name' #"ErrCompacted"%go))) || ((![error] "err") = (![error] (globals.get #pkg_name' #"ErrUnavailable"%go))) then return: (#(W64 0)) else do: #());;; do: (let: "$a0" := #"unexpected error (%v)"%go in @@ -1220,7 +1220,7 @@ Definition unstable__maybeTerm : val := else do: #());;; let: "ok" := (ref_ty boolT (zero_val boolT)) in let: "last" := (ref_ty uint64T (zero_val uint64T)) in - let: ("$ret0", "$ret1") := ((method_call #pkg_name' #"unstable'ptr" #"maybeLastIndex" #() (![ptrT] "u")) #()) in + let: ("$ret0", "$ret1") := ((method_call #pkg_name' #"unstable'ptr" #"maybeLastIndex" (![ptrT] "u")) #()) in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("last" <-[uint64T] "$r0");;; @@ -1300,7 +1300,7 @@ Definition unstable__stableTo : val := let: "ok" := (ref_ty boolT (zero_val boolT)) in let: "gt" := (ref_ty uint64T (zero_val uint64T)) in let: ("$ret0", "$ret1") := (let: "$a0" := (![uint64T] (struct.field_ref entryID "index" "id")) in - (method_call #pkg_name' #"unstable'ptr" #"maybeTerm" #() (![ptrT] "u")) "$a0") in + (method_call #pkg_name' #"unstable'ptr" #"maybeTerm" (![ptrT] "u")) "$a0") in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("gt" <-[uint64T] "$r0");;; @@ -1344,7 +1344,7 @@ Definition unstable__stableTo : val := let: "$a1" := (![uint64T] (struct.field_ref unstable "offset" (![ptrT] "u"))) in (maxUint64 2) "$a0" "$a1") in do: ((struct.field_ref unstable "offsetInProgress" (![ptrT] "u")) <-[uint64T] "$r0");;; - do: ((method_call #pkg_name' #"unstable'ptr" #"shrinkEntriesArray" #() (![ptrT] "u")) #())). + do: ((method_call #pkg_name' #"unstable'ptr" #"shrinkEntriesArray" (![ptrT] "u")) #())). Definition lenMultiple : Z := 2. @@ -1439,7 +1439,7 @@ Definition unstable__truncateAndAppend : val := let: "keep" := (ref_ty sliceT (zero_val sliceT)) in let: "$r0" := (let: "$a0" := (![uint64T] (struct.field_ref unstable "offset" (![ptrT] "u"))) in let: "$a1" := (![uint64T] "fromIndex") in - (method_call #pkg_name' #"unstable'ptr" #"slice" #() (![ptrT] "u")) "$a0" "$a1") in + (method_call #pkg_name' #"unstable'ptr" #"slice" (![ptrT] "u")) "$a0" "$a1") in do: ("keep" <-[sliceT] "$r0");;; let: "$r0" := (let: "$a0" := (![sliceT] "keep") in let: "$a1" := (![sliceT] "ents") in @@ -1467,7 +1467,7 @@ Definition unstable__slice : val := let: "lo" := (ref_ty uint64T "lo") in do: (let: "$a0" := (![uint64T] "lo") in let: "$a1" := (![uint64T] "hi") in - (method_call #pkg_name' #"unstable'ptr" #"mustCheckOutOfBounds" #() (![ptrT] "u")) "$a0" "$a1");;; + (method_call #pkg_name' #"unstable'ptr" #"mustCheckOutOfBounds" (![ptrT] "u")) "$a0" "$a1");;; return: (let: "$s" := (![sliceT] (struct.field_ref unstable "entries" (![ptrT] "u"))) in slice.full_slice raftpb.Entry "$s" ((![uint64T] "lo") - (![uint64T] (struct.field_ref unstable "offset" (![ptrT] "u")))) ((![uint64T] "hi") - (![uint64T] (struct.field_ref unstable "offset" (![ptrT] "u")))) ((![uint64T] "hi") - (![uint64T] (struct.field_ref unstable "offset" (![ptrT] "u")))))). @@ -1506,10 +1506,10 @@ Definition unstable__mustCheckOutOfBounds : val := Definition SetLogger : val := rec: "SetLogger" "l" := exception_do (let: "l" := (ref_ty Logger "l") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (globals.get #pkg_name' #"raftLoggerMu"%go #())) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (globals.get #pkg_name' #"raftLoggerMu"%go)) #());;; let: "$r0" := (![Logger] "l") in - do: ((globals.get #pkg_name' #"raftLogger"%go #()) <-[Logger] "$r0");;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (globals.get #pkg_name' #"raftLoggerMu"%go #())) #())). + do: ((globals.get #pkg_name' #"raftLogger"%go) <-[Logger] "$r0");;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (globals.get #pkg_name' #"raftLoggerMu"%go)) #())). Definition DefaultLogger : go_type := structT [ "Logger" :: ptrT; @@ -1519,20 +1519,20 @@ Definition DefaultLogger : go_type := structT [ (* go: logger.go:51:6 *) Definition ResetDefaultLogger : val := rec: "ResetDefaultLogger" <> := - exception_do (do: (let: "$a0" := (interface.make #pkg_name' #"DefaultLogger'ptr" (![ptrT] (globals.get #pkg_name' #"defaultLogger"%go #()))) in + exception_do (do: (let: "$a0" := (interface.make #pkg_name' #"DefaultLogger'ptr" (![ptrT] (globals.get #pkg_name' #"defaultLogger"%go))) in (func_call #pkg_name' #"SetLogger"%go) "$a0")). (* go: logger.go:55:6 *) Definition getLogger : val := rec: "getLogger" <> := - with_defer: (do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (globals.get #pkg_name' #"raftLoggerMu"%go #())) #());;; - do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (globals.get #pkg_name' #"raftLoggerMu"%go #())) in + with_defer: (do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (globals.get #pkg_name' #"raftLoggerMu"%go)) #());;; + do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (globals.get #pkg_name' #"raftLoggerMu"%go)) in "$defer" <-[funcT] (let: "$oldf" := (![funcT] "$defer") in (λ: <>, "$f" #();; "$oldf" #() )));;; - return: (![Logger] (globals.get #pkg_name' #"raftLogger"%go #()))). + return: (![Logger] (globals.get #pkg_name' #"raftLogger"%go))). Definition calldepth : Z := 2. @@ -1540,8 +1540,8 @@ Definition calldepth : Z := 2. Definition DefaultLogger__EnableTimestamps : val := rec: "DefaultLogger__EnableTimestamps" "l" <> := exception_do (let: "l" := (ref_ty ptrT "l") in - do: (let: "$a0" := ((((method_call #log.pkg_name' #"Logger'ptr" #"Flags" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) #()) `or` #(W64 log.Ldate)) `or` #(W64 log.Ltime)) in - (method_call #log.pkg_name' #"Logger'ptr" #"SetFlags" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0")). + do: (let: "$a0" := ((((method_call #log.pkg_name' #"Logger'ptr" #"Flags" (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) #()) `or` #(W64 log.Ldate)) `or` #(W64 log.Ltime)) in + (method_call #log.pkg_name' #"Logger'ptr" #"SetFlags" (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0")). (* go: logger.go:82:25 *) Definition DefaultLogger__EnableDebug : val := @@ -1562,7 +1562,7 @@ Definition DefaultLogger__Debug : val := let: "$a1" := (let: "$a0" := (![sliceT] "v") in (func_call #fmt.pkg_name' #"Sprint"%go) "$a0") in (func_call #pkg_name' #"header"%go) "$a0" "$a1") in - (method_call #log.pkg_name' #"Logger'ptr" #"Output" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1") + (method_call #log.pkg_name' #"Logger'ptr" #"Output" (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1") else do: #())). (* go: logger.go:92:25 *) @@ -1579,7 +1579,7 @@ Definition DefaultLogger__Debugf : val := let: "$a1" := (![sliceT] "v") in (func_call #fmt.pkg_name' #"Sprintf"%go) "$a0" "$a1") in (func_call #pkg_name' #"header"%go) "$a0" "$a1") in - (method_call #log.pkg_name' #"Logger'ptr" #"Output" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1") + (method_call #log.pkg_name' #"Logger'ptr" #"Output" (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1") else do: #())). (* go: logger.go:98:25 *) @@ -1592,7 +1592,7 @@ Definition DefaultLogger__Info : val := let: "$a1" := (let: "$a0" := (![sliceT] "v") in (func_call #fmt.pkg_name' #"Sprint"%go) "$a0") in (func_call #pkg_name' #"header"%go) "$a0" "$a1") in - (method_call #log.pkg_name' #"Logger'ptr" #"Output" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1")). + (method_call #log.pkg_name' #"Logger'ptr" #"Output" (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1")). (* go: logger.go:102:25 *) Definition DefaultLogger__Infof : val := @@ -1606,7 +1606,7 @@ Definition DefaultLogger__Infof : val := let: "$a1" := (![sliceT] "v") in (func_call #fmt.pkg_name' #"Sprintf"%go) "$a0" "$a1") in (func_call #pkg_name' #"header"%go) "$a0" "$a1") in - (method_call #log.pkg_name' #"Logger'ptr" #"Output" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1")). + (method_call #log.pkg_name' #"Logger'ptr" #"Output" (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1")). (* go: logger.go:106:25 *) Definition DefaultLogger__Error : val := @@ -1618,7 +1618,7 @@ Definition DefaultLogger__Error : val := let: "$a1" := (let: "$a0" := (![sliceT] "v") in (func_call #fmt.pkg_name' #"Sprint"%go) "$a0") in (func_call #pkg_name' #"header"%go) "$a0" "$a1") in - (method_call #log.pkg_name' #"Logger'ptr" #"Output" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1")). + (method_call #log.pkg_name' #"Logger'ptr" #"Output" (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1")). (* go: logger.go:110:25 *) Definition DefaultLogger__Errorf : val := @@ -1632,7 +1632,7 @@ Definition DefaultLogger__Errorf : val := let: "$a1" := (![sliceT] "v") in (func_call #fmt.pkg_name' #"Sprintf"%go) "$a0" "$a1") in (func_call #pkg_name' #"header"%go) "$a0" "$a1") in - (method_call #log.pkg_name' #"Logger'ptr" #"Output" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1")). + (method_call #log.pkg_name' #"Logger'ptr" #"Output" (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1")). (* go: logger.go:114:25 *) Definition DefaultLogger__Warning : val := @@ -1644,7 +1644,7 @@ Definition DefaultLogger__Warning : val := let: "$a1" := (let: "$a0" := (![sliceT] "v") in (func_call #fmt.pkg_name' #"Sprint"%go) "$a0") in (func_call #pkg_name' #"header"%go) "$a0" "$a1") in - (method_call #log.pkg_name' #"Logger'ptr" #"Output" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1")). + (method_call #log.pkg_name' #"Logger'ptr" #"Output" (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1")). (* go: logger.go:118:25 *) Definition DefaultLogger__Warningf : val := @@ -1658,7 +1658,7 @@ Definition DefaultLogger__Warningf : val := let: "$a1" := (![sliceT] "v") in (func_call #fmt.pkg_name' #"Sprintf"%go) "$a0" "$a1") in (func_call #pkg_name' #"header"%go) "$a0" "$a1") in - (method_call #log.pkg_name' #"Logger'ptr" #"Output" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1")). + (method_call #log.pkg_name' #"Logger'ptr" #"Output" (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1")). (* go: logger.go:122:25 *) Definition DefaultLogger__Fatal : val := @@ -1670,7 +1670,7 @@ Definition DefaultLogger__Fatal : val := let: "$a1" := (let: "$a0" := (![sliceT] "v") in (func_call #fmt.pkg_name' #"Sprint"%go) "$a0") in (func_call #pkg_name' #"header"%go) "$a0" "$a1") in - (method_call #log.pkg_name' #"Logger'ptr" #"Output" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1");;; + (method_call #log.pkg_name' #"Logger'ptr" #"Output" (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1");;; do: (let: "$a0" := #(W64 1) in (func_call #os.pkg_name' #"Exit"%go) "$a0")). @@ -1686,7 +1686,7 @@ Definition DefaultLogger__Fatalf : val := let: "$a1" := (![sliceT] "v") in (func_call #fmt.pkg_name' #"Sprintf"%go) "$a0" "$a1") in (func_call #pkg_name' #"header"%go) "$a0" "$a1") in - (method_call #log.pkg_name' #"Logger'ptr" #"Output" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1");;; + (method_call #log.pkg_name' #"Logger'ptr" #"Output" (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1");;; do: (let: "$a0" := #(W64 1) in (func_call #os.pkg_name' #"Exit"%go) "$a0")). @@ -1696,7 +1696,7 @@ Definition DefaultLogger__Panic : val := exception_do (let: "l" := (ref_ty ptrT "l") in let: "v" := (ref_ty sliceT "v") in do: (let: "$a0" := (![sliceT] "v") in - (method_call #log.pkg_name' #"Logger'ptr" #"Panic" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0")). + (method_call #log.pkg_name' #"Logger'ptr" #"Panic" (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0")). (* go: logger.go:136:25 *) Definition DefaultLogger__Panicf : val := @@ -1706,7 +1706,7 @@ Definition DefaultLogger__Panicf : val := let: "format" := (ref_ty stringT "format") in do: (let: "$a0" := (![stringT] "format") in let: "$a1" := (![sliceT] "v") in - (method_call #log.pkg_name' #"Logger'ptr" #"Panicf" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1")). + (method_call #log.pkg_name' #"Logger'ptr" #"Panicf" (![ptrT] (struct.field_ref DefaultLogger "Logger" (![ptrT] "l")))) "$a0" "$a1")). (* go: logger.go:140:6 *) Definition header : val := @@ -1762,7 +1762,7 @@ Definition IsEmptyHardState : val := rec: "IsEmptyHardState" "st" := exception_do (let: "st" := (ref_ty raftpb.HardState "st") in return: (let: "$a0" := (![raftpb.HardState] "st") in - let: "$a1" := (![raftpb.HardState] (globals.get #pkg_name' #"emptyState"%go #())) in + let: "$a1" := (![raftpb.HardState] (globals.get #pkg_name' #"emptyState"%go)) in (func_call #pkg_name' #"isHardStateEqual"%go) "$a0" "$a1")). (* IsEmptySnap returns true if the given Snapshot is empty. @@ -1861,7 +1861,7 @@ Definition setupNode : val := Panic "$a0") else do: #());;; let: "$r0" := (let: "$a0" := (![sliceT] "peers") in - (method_call #pkg_name' #"RawNode'ptr" #"Bootstrap" #() (![ptrT] "rn")) "$a0") in + (method_call #pkg_name' #"RawNode'ptr" #"Bootstrap" (![ptrT] "rn")) "$a0") in do: ("err" <-[error] "$r0");;; (if: (![error] "err") ≠ #interface.nil then @@ -1891,7 +1891,7 @@ Definition StartNode : val := let: "$a1" := (![sliceT] "peers") in (func_call #pkg_name' #"setupNode"%go) "$a0" "$a1") in do: ("n" <-[ptrT] "$r0");;; - let: "$go" := (method_call #pkg_name' #"node'ptr" #"run" #() (![ptrT] "n")) in + let: "$go" := (method_call #pkg_name' #"node'ptr" #"run" (![ptrT] "n")) in do: (Fork ("$go" #()));;; return: (interface.make #pkg_name' #"node'ptr" (![ptrT] "n"))). @@ -1921,7 +1921,7 @@ Definition RestartNode : val := let: "$r0" := (let: "$a0" := (![ptrT] "rn") in (func_call #pkg_name' #"newNode"%go) "$a0") in do: ("n" <-[node] "$r0");;; - let: "$go" := (method_call #pkg_name' #"node'ptr" #"run" #() "n") in + let: "$go" := (method_call #pkg_name' #"node'ptr" #"run" "n") in do: (Fork ("$go" #()));;; return: (interface.make #pkg_name' #"node'ptr" "n")). @@ -1988,16 +1988,16 @@ Definition node__run : val := do: ("lead" <-[uint64T] "$r0");;; (for: (λ: <>, #true); (λ: <>, Skip) := λ: <>, (if: ((![chanT (structT [ - ])] "advancec") = #null) && ((method_call #pkg_name' #"RawNode'ptr" #"HasReady" #() (![ptrT] (struct.field_ref node "rn" (![ptrT] "n")))) #()) + ])] "advancec") = #null) && ((method_call #pkg_name' #"RawNode'ptr" #"HasReady" (![ptrT] (struct.field_ref node "rn" (![ptrT] "n")))) #()) then - let: "$r0" := ((method_call #pkg_name' #"RawNode'ptr" #"readyWithoutAccept" #() (![ptrT] (struct.field_ref node "rn" (![ptrT] "n")))) #()) in + let: "$r0" := ((method_call #pkg_name' #"RawNode'ptr" #"readyWithoutAccept" (![ptrT] (struct.field_ref node "rn" (![ptrT] "n")))) #()) in do: ("rd" <-[Ready] "$r0");;; let: "$r0" := (![chanT Ready] (struct.field_ref node "readyc" (![ptrT] "n"))) in do: ("readyc" <-[chanT Ready] "$r0") else do: #());;; (if: (![uint64T] "lead") ≠ (![uint64T] (struct.field_ref raft "lead" (![ptrT] "r"))) then - (if: (method_call #pkg_name' #"raft'ptr" #"hasLeader" #() (![ptrT] "r")) #() + (if: (method_call #pkg_name' #"raft'ptr" #"hasLeader" (![ptrT] "r")) #() then (if: (![uint64T] "lead") = None then @@ -2031,7 +2031,7 @@ Definition node__run : val := else do: #());;; do: (chan.select [("$sendVal0", "$sendChan0", (λ: <>, do: (let: "$a0" := (![Ready] "rd") in - (method_call #pkg_name' #"RawNode'ptr" #"acceptReady" #() (![ptrT] (struct.field_ref node "rn" (![ptrT] "n")))) "$a0");;; + (method_call #pkg_name' #"RawNode'ptr" #"acceptReady" (![ptrT] (struct.field_ref node "rn" (![ptrT] "n")))) "$a0");;; (if: (~ (![boolT] (struct.field_ref RawNode "asyncStorageWrites" (![ptrT] (struct.field_ref node "rn" (![ptrT] "n")))))) then let: "$r0" := (![chanT (structT [ @@ -2063,7 +2063,7 @@ Definition node__run : val := do: ((struct.field_ref raftpb.Message "From" "m") <-[uint64T] "$r0");;; let: "err" := (ref_ty error (zero_val error)) in let: "$r0" := (let: "$a0" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"raft'ptr" #"Step" #() (![ptrT] "r")) "$a0") in + (method_call #pkg_name' #"raft'ptr" #"Step" (![ptrT] "r")) "$a0") in do: ("err" <-[error] "$r0");;; (if: (![chanT error] (struct.field_ref msgWithResult "result" "pm")) ≠ #null then @@ -2083,7 +2083,7 @@ Definition node__run : val := then break: #() else do: #());;; do: (let: "$a0" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"raft'ptr" #"Step" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"Step" (![ptrT] "r")) "$a0") )); ("$recvChan2", (λ: "$recvVal", let: "cc" := (ref_ty raftpb.ConfChangeV2 (zero_val raftpb.ConfChangeV2)) in let: "$r0" := (Fst "$recvVal") in @@ -2096,7 +2096,7 @@ Definition node__run : val := do: ("okBefore" <-[boolT] "$r1");;; let: "cs" := (ref_ty raftpb.ConfState (zero_val raftpb.ConfState)) in let: "$r0" := (let: "$a0" := (![raftpb.ConfChangeV2] "cc") in - (method_call #pkg_name' #"raft'ptr" #"applyConfChange" #() (![ptrT] "r")) "$a0") in + (method_call #pkg_name' #"raft'ptr" #"applyConfChange" (![ptrT] "r")) "$a0") in do: ("cs" <-[raftpb.ConfState] "$r0");;; (let: "okAfter" := (ref_ty boolT (zero_val boolT)) in let: ("$ret0", "$ret1") := (map.get (![tracker.ProgressMap] (struct.field_ref tracker.ProgressTracker "Progress" (struct.field_ref raft "trk" (![ptrT] "r")))) (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -2136,10 +2136,10 @@ Definition node__run : val := do: #() ))] (InjLV #())) )); ("$recvChan3", (λ: "$recvVal", - do: ((method_call #pkg_name' #"RawNode'ptr" #"Tick" #() (![ptrT] (struct.field_ref node "rn" (![ptrT] "n")))) #()) + do: ((method_call #pkg_name' #"RawNode'ptr" #"Tick" (![ptrT] (struct.field_ref node "rn" (![ptrT] "n")))) #()) )); ("$recvChan4", (λ: "$recvVal", do: (let: "$a0" := (![Ready] "rd") in - (method_call #pkg_name' #"RawNode'ptr" #"Advance" #() (![ptrT] (struct.field_ref node "rn" (![ptrT] "n")))) "$a0");;; + (method_call #pkg_name' #"RawNode'ptr" #"Advance" (![ptrT] (struct.field_ref node "rn" (![ptrT] "n")))) "$a0");;; let: "$r0" := (struct.make Ready [{ "SoftState" ::= zero_val ptrT; "HardState" ::= zero_val raftpb.HardState; @@ -2210,7 +2210,7 @@ Definition node__Campaign : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"node'ptr" #"step" #() (![ptrT] "n")) "$a0" "$a1")). + (method_call #pkg_name' #"node'ptr" #"step" (![ptrT] "n")) "$a0" "$a1")). (* go: node.go:471:16 *) Definition node__Propose : val := @@ -2244,7 +2244,7 @@ Definition node__Propose : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"node'ptr" #"stepWait" #() (![ptrT] "n")) "$a0" "$a1")). + (method_call #pkg_name' #"node'ptr" #"stepWait" (![ptrT] "n")) "$a0" "$a1")). (* go: node.go:475:16 *) Definition node__Step : val := @@ -2259,7 +2259,7 @@ Definition node__Step : val := else do: #());;; return: (let: "$a0" := (![context.Context] "ctx") in let: "$a1" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"node'ptr" #"step" #() (![ptrT] "n")) "$a0" "$a1")). + (method_call #pkg_name' #"node'ptr" #"step" (![ptrT] "n")) "$a0" "$a1")). (* go: node.go:484:6 *) Definition confChangeToMsg : val := @@ -2341,7 +2341,7 @@ Definition node__ProposeConfChange : val := else do: #());;; return: (let: "$a0" := (![context.Context] "ctx") in let: "$a1" := (![raftpb.Message] "msg") in - (method_call #pkg_name' #"node'ptr" #"Step" #() (![ptrT] "n")) "$a0" "$a1")). + (method_call #pkg_name' #"node'ptr" #"Step" (![ptrT] "n")) "$a0" "$a1")). (* go: node.go:500:16 *) Definition node__step : val := @@ -2352,7 +2352,7 @@ Definition node__step : val := return: (let: "$a0" := (![context.Context] "ctx") in let: "$a1" := (![raftpb.Message] "m") in let: "$a2" := #false in - (method_call #pkg_name' #"node'ptr" #"stepWithWaitOption" #() (![ptrT] "n")) "$a0" "$a1" "$a2")). + (method_call #pkg_name' #"node'ptr" #"stepWithWaitOption" (![ptrT] "n")) "$a0" "$a1" "$a2")). (* go: node.go:504:16 *) Definition node__stepWait : val := @@ -2363,7 +2363,7 @@ Definition node__stepWait : val := return: (let: "$a0" := (![context.Context] "ctx") in let: "$a1" := (![raftpb.Message] "m") in let: "$a2" := #true in - (method_call #pkg_name' #"node'ptr" #"stepWithWaitOption" #() (![ptrT] "n")) "$a0" "$a1" "$a2")). + (method_call #pkg_name' #"node'ptr" #"stepWithWaitOption" (![ptrT] "n")) "$a0" "$a1" "$a2")). (* Step advances the state machine using msgs. The ctx.Err() will be returned, if any. @@ -2382,7 +2382,7 @@ Definition node__stepWithWaitOption : val := ))] [("$recvChan0", (λ: "$recvVal", return: ((interface.get "Err" (![context.Context] "ctx")) #()) )); ("$recvChan1", (λ: "$recvVal", - return: (![error] (globals.get #pkg_name' #"ErrStopped"%go #())) + return: (![error] (globals.get #pkg_name' #"ErrStopped"%go)) ))] (InjLV #())) else do: #());;; let: "ch" := (ref_ty (chanT msgWithResult) (zero_val (chanT msgWithResult))) in @@ -2407,7 +2407,7 @@ Definition node__stepWithWaitOption : val := ))] [("$recvChan0", (λ: "$recvVal", return: ((interface.get "Err" (![context.Context] "ctx")) #()) )); ("$recvChan1", (λ: "$recvVal", - return: (![error] (globals.get #pkg_name' #"ErrStopped"%go #())) + return: (![error] (globals.get #pkg_name' #"ErrStopped"%go)) ))] (InjLV #()));;; do: (chan.select [] [("$recvChan0", (λ: "$recvVal", let: "err" := (ref_ty error (zero_val error)) in @@ -2419,7 +2419,7 @@ Definition node__stepWithWaitOption : val := )); ("$recvChan1", (λ: "$recvVal", return: ((interface.get "Err" (![context.Context] "ctx")) #()) )); ("$recvChan2", (λ: "$recvVal", - return: (![error] (globals.get #pkg_name' #"ErrStopped"%go #())) + return: (![error] (globals.get #pkg_name' #"ErrStopped"%go)) ))] (InjLV #()));;; return: (#interface.nil)). @@ -2540,7 +2540,7 @@ Definition node__ForgetLeader : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"node'ptr" #"step" #() (![ptrT] "n")) "$a0" "$a1")). + (method_call #pkg_name' #"node'ptr" #"step" (![ptrT] "n")) "$a0" "$a1")). (* go: node.go:610:16 *) Definition node__ReadIndex : val := @@ -2574,7 +2574,7 @@ Definition node__ReadIndex : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"node'ptr" #"step" #() (![ptrT] "n")) "$a0" "$a1")). + (method_call #pkg_name' #"node'ptr" #"step" (![ptrT] "n")) "$a0" "$a1")). Definition LocalAppendThread : expr := #(W64 math.MaxUint64). @@ -2609,9 +2609,9 @@ Definition lockedRand__Intn : val := rec: "lockedRand__Intn" "r" "n" := exception_do (let: "r" := (ref_ty ptrT "r") in let: "n" := (ref_ty intT "n") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (struct.field_ref lockedRand "mu" (![ptrT] "r"))) #());;; + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (struct.field_ref lockedRand "mu" (![ptrT] "r"))) #());;; let: "v" := (ref_ty ptrT (zero_val ptrT)) in - let: ("$ret0", "$ret1") := (let: "$a0" := (![io.Reader] (globals.get #rand.pkg_name' #"Reader"%go #())) in + let: ("$ret0", "$ret1") := (let: "$a0" := (![io.Reader] (globals.get #rand.pkg_name' #"Reader"%go)) in let: "$a1" := (let: "$a0" := (![intT] "n") in (func_call #big.pkg_name' #"NewInt"%go) "$a0") in (func_call #rand.pkg_name' #"Int"%go) "$a0" "$a1") in @@ -2619,8 +2619,8 @@ Definition lockedRand__Intn : val := let: "$r1" := "$ret1" in do: ("v" <-[ptrT] "$r0");;; do: "$r1";;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (struct.field_ref lockedRand "mu" (![ptrT] "r"))) #());;; - return: ((method_call #big.pkg_name' #"Int'ptr" #"Int64" #() (![ptrT] "v")) #())). + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (struct.field_ref lockedRand "mu" (![ptrT] "r"))) #());;; + return: ((method_call #big.pkg_name' #"Int'ptr" #"Int64" (![ptrT] "v")) #())). Definition CampaignType : go_type := stringT. @@ -2628,7 +2628,7 @@ Definition CampaignType : go_type := stringT. Definition StateType__String : val := rec: "StateType__String" "st" <> := exception_do (let: "st" := (ref_ty StateType "st") in - return: (![stringT] (array.elem_ref stringT (![arrayT 4 stringT] (globals.get #pkg_name' #"stmap"%go #())) (![StateType] "st")))). + return: (![stringT] (array.elem_ref stringT (![arrayT 4 stringT] (globals.get #pkg_name' #"stmap"%go)) (![StateType] "st")))). (* go: raft.go:291:18 *) Definition Config__validate : val := @@ -2706,7 +2706,7 @@ Definition newRaft : val := rec: "newRaft" "c" := exception_do (let: "c" := (ref_ty ptrT "c") in (let: "err" := (ref_ty error (zero_val error)) in - let: "$r0" := ((method_call #pkg_name' #"Config'ptr" #"validate" #() (![ptrT] "c")) #()) in + let: "$r0" := ((method_call #pkg_name' #"Config'ptr" #"validate" (![ptrT] "c")) #()) in do: ("err" <-[error] "$r0");;; (if: (![error] "err") ≠ #interface.nil then @@ -2791,12 +2791,12 @@ Definition newRaft : val := "traceLogger" ::= "$traceLogger" }])) in do: ("r" <-[ptrT] "$r0");;; - let: "$r0" := (method_call #pkg_name' #"raft'ptr" #"Step" #() (![ptrT] "r")) in + let: "$r0" := (method_call #pkg_name' #"raft'ptr" #"Step" (![ptrT] "r")) in do: ((struct.field_ref raft "StepHigherOrder" (![ptrT] "r")) <-[funcT] "$r0");;; do: (let: "$a0" := (![ptrT] "r") in (func_call #pkg_name' #"traceInitState"%go) "$a0");;; let: "lastID" := (ref_ty entryID (zero_val entryID)) in - let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in + let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in do: ("lastID" <-[entryID] "$r0");;; let: "trk" := (ref_ty tracker.ProgressMap (zero_val tracker.ProgressMap)) in let: "cfg" := (ref_ty tracker.Config (zero_val tracker.Config)) in @@ -2823,25 +2823,25 @@ Definition newRaft : val := let: "$a1" := (![raftpb.ConfState] "cs") in let: "$a2" := (let: "$a0" := (![tracker.Config] "cfg") in let: "$a1" := (![tracker.ProgressMap] "trk") in - (method_call #pkg_name' #"raft'ptr" #"switchToConfig" #() (![ptrT] "r")) "$a0" "$a1") in + (method_call #pkg_name' #"raft'ptr" #"switchToConfig" (![ptrT] "r")) "$a0" "$a1") in (func_call #pkg_name' #"assertConfStatesEquivalent"%go) "$a0" "$a1" "$a2");;; (if: (~ (let: "$a0" := (![raftpb.HardState] "hs") in (func_call #pkg_name' #"IsEmptyHardState"%go) "$a0")) then do: (let: "$a0" := (![raftpb.HardState] "hs") in - (method_call #pkg_name' #"raft'ptr" #"loadState" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"loadState" (![ptrT] "r")) "$a0") else do: #());;; (if: (![uint64T] (struct.field_ref Config "Applied" (![ptrT] "c"))) > #(W64 0) then do: (let: "$a0" := (![uint64T] (struct.field_ref Config "Applied" (![ptrT] "c"))) in let: "$a1" := #(W64 0) in - (method_call #pkg_name' #"raftLog'ptr" #"appliedTo" #() (![ptrT] "raftlog")) "$a0" "$a1") + (method_call #pkg_name' #"raftLog'ptr" #"appliedTo" (![ptrT] "raftlog")) "$a0" "$a1") else do: #());;; do: (let: "$a0" := (![uint64T] (struct.field_ref raft "Term" (![ptrT] "r"))) in let: "$a1" := None in - (method_call #pkg_name' #"raft'ptr" #"becomeFollower" #() (![ptrT] "r")) "$a0" "$a1");;; + (method_call #pkg_name' #"raft'ptr" #"becomeFollower" (![ptrT] "r")) "$a0" "$a1");;; let: "nodesStrs" := (ref_ty sliceT (zero_val sliceT)) in - do: (let: "$range" := ((method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"VoterNodes" #() (struct.field_ref raft "trk" (![ptrT] "r"))) #()) in + do: (let: "$range" := ((method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"VoterNodes" (struct.field_ref raft "trk" (![ptrT] "r"))) #()) in slice.for_range uint64T "$range" (λ: <> "n", let: "n" := ref_ty uint64T "n" in let: "$r0" := (let: "$a0" := (![sliceT] "nodesStrs") in @@ -2969,7 +2969,7 @@ Definition raft__sendAppend : val := let: "to" := (ref_ty uint64T "to") in do: (let: "$a0" := (![uint64T] "to") in let: "$a1" := #true in - (method_call #pkg_name' #"raft'ptr" #"maybeSendAppend" #() (![ptrT] "r")) "$a0" "$a1")). + (method_call #pkg_name' #"raft'ptr" #"maybeSendAppend" (![ptrT] "r")) "$a0" "$a1")). (* maybeSendAppend sends an append RPC with new entries to the given peer, if necessary. Returns true if a message was sent. The sendIfEmpty @@ -2990,7 +2990,7 @@ Definition raft__maybeSendAppend : val := let: "pr" := (ref_ty ptrT (zero_val ptrT)) in let: "$r0" := (Fst (map.get (![tracker.ProgressMap] (struct.field_ref tracker.ProgressTracker "Progress" (struct.field_ref raft "trk" (![ptrT] "r")))) (![uint64T] "to"))) in do: ("pr" <-[ptrT] "$r0");;; - (if: (method_call #tracker.pkg_name' #"Progress'ptr" #"IsPaused" #() (![ptrT] "pr")) #() + (if: (method_call #tracker.pkg_name' #"Progress'ptr" #"IsPaused" (![ptrT] "pr")) #() then return: (#false) else do: #());;; let: "prevIndex" := (ref_ty uint64T (zero_val uint64T)) in @@ -2999,7 +2999,7 @@ Definition raft__maybeSendAppend : val := let: "err" := (ref_ty error (zero_val error)) in let: "prevTerm" := (ref_ty uint64T (zero_val uint64T)) in let: ("$ret0", "$ret1") := (let: "$a0" := (![uint64T] "prevIndex") in - (method_call #pkg_name' #"raftLog'ptr" #"term" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0") in + (method_call #pkg_name' #"raftLog'ptr" #"term" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0") in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("prevTerm" <-[uint64T] "$r0");;; @@ -3008,14 +3008,14 @@ Definition raft__maybeSendAppend : val := then return: (let: "$a0" := (![uint64T] "to") in let: "$a1" := (![ptrT] "pr") in - (method_call #pkg_name' #"raft'ptr" #"maybeSendSnapshot" #() (![ptrT] "r")) "$a0" "$a1") + (method_call #pkg_name' #"raft'ptr" #"maybeSendSnapshot" (![ptrT] "r")) "$a0" "$a1") else do: #());;; let: "ents" := (ref_ty sliceT (zero_val sliceT)) in - (if: ((![tracker.StateType] (struct.field_ref tracker.Progress "State" (![ptrT] "pr"))) ≠ tracker.StateReplicate) || (~ ((method_call #tracker.pkg_name' #"Inflights'ptr" #"Full" #() (![ptrT] (struct.field_ref tracker.Progress "Inflights" (![ptrT] "pr")))) #())) + (if: ((![tracker.StateType] (struct.field_ref tracker.Progress "State" (![ptrT] "pr"))) ≠ tracker.StateReplicate) || (~ ((method_call #tracker.pkg_name' #"Inflights'ptr" #"Full" (![ptrT] (struct.field_ref tracker.Progress "Inflights" (![ptrT] "pr")))) #())) then let: ("$ret0", "$ret1") := (let: "$a0" := (![uint64T] (struct.field_ref tracker.Progress "Next" (![ptrT] "pr"))) in let: "$a1" := (![entryEncodingSize] (struct.field_ref raft "maxMsgSize" (![ptrT] "r"))) in - (method_call #pkg_name' #"raftLog'ptr" #"entries" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" "$a1") in + (method_call #pkg_name' #"raftLog'ptr" #"entries" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" "$a1") in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("ents" <-[sliceT] "$r0");;; @@ -3029,7 +3029,7 @@ Definition raft__maybeSendAppend : val := then return: (let: "$a0" := (![uint64T] "to") in let: "$a1" := (![ptrT] "pr") in - (method_call #pkg_name' #"raft'ptr" #"maybeSendSnapshot" #() (![ptrT] "r")) "$a0" "$a1") + (method_call #pkg_name' #"raft'ptr" #"maybeSendSnapshot" (![ptrT] "r")) "$a0" "$a1") else do: #());;; do: (let: "$a0" := (let: "$To" := (![uint64T] "to") in let: "$Type" := raftpb.MsgApp in @@ -3053,14 +3053,14 @@ Definition raft__maybeSendAppend : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0");;; + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0");;; do: (let: "$a0" := (let: "$a0" := (![sliceT] "ents") in slice.len "$a0") in let: "$a1" := (let: "$a0" := (![sliceT] "ents") in (func_call #pkg_name' #"payloadsSize"%go) "$a0") in - (method_call #tracker.pkg_name' #"Progress'ptr" #"SentEntries" #() (![ptrT] "pr")) "$a0" "$a1");;; + (method_call #tracker.pkg_name' #"Progress'ptr" #"SentEntries" (![ptrT] "pr")) "$a0" "$a1");;; do: (let: "$a0" := (![uint64T] (struct.field_ref raftLog "committed" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r"))))) in - (method_call #tracker.pkg_name' #"Progress'ptr" #"SentCommit" #() (![ptrT] "pr")) "$a0");;; + (method_call #tracker.pkg_name' #"Progress'ptr" #"SentCommit" (![ptrT] "pr")) "$a0");;; return: (#true)). (* maybeSendSnapshot fetches a snapshot from Storage, and sends it to the given @@ -3082,14 +3082,14 @@ Definition raft__maybeSendSnapshot : val := else do: #());;; let: "err" := (ref_ty error (zero_val error)) in let: "snapshot" := (ref_ty raftpb.Snapshot (zero_val raftpb.Snapshot)) in - let: ("$ret0", "$ret1") := ((method_call #pkg_name' #"raftLog'ptr" #"snapshot" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in + let: ("$ret0", "$ret1") := ((method_call #pkg_name' #"raftLog'ptr" #"snapshot" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("snapshot" <-[raftpb.Snapshot] "$r0");;; do: ("err" <-[error] "$r1");;; (if: (![error] "err") ≠ #interface.nil then - (if: (![error] "err") = (![error] (globals.get #pkg_name' #"ErrSnapshotTemporarilyUnavailable"%go #())) + (if: (![error] "err") = (![error] (globals.get #pkg_name' #"ErrSnapshotTemporarilyUnavailable"%go)) then do: (let: "$a0" := #"%x failed to send snapshot to %x because snapshot is temporarily unavailable"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -3115,7 +3115,7 @@ Definition raft__maybeSendSnapshot : val := do: ("sterm" <-[uint64T] "$r1");;; do: (let: "$a0" := #"%x [firstindex: %d, commit: %d] sent snapshot[index: %d, term: %d] to %x [%s]"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in - let: "$sl1" := (interface.make #""%go #"uint64"%go ((method_call #pkg_name' #"raftLog'ptr" #"firstIndex" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #())) in + let: "$sl1" := (interface.make #""%go #"uint64"%go ((method_call #pkg_name' #"raftLog'ptr" #"firstIndex" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #())) in let: "$sl2" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raftLog "committed" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))))) in let: "$sl3" := (interface.make #""%go #"uint64"%go (![uint64T] "sindex")) in let: "$sl4" := (interface.make #""%go #"uint64"%go (![uint64T] "sterm")) in @@ -3124,7 +3124,7 @@ Definition raft__maybeSendSnapshot : val := slice.literal interfaceT ["$sl0"; "$sl1"; "$sl2"; "$sl3"; "$sl4"; "$sl5"; "$sl6"])) in (interface.get "Debugf" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; do: (let: "$a0" := (![uint64T] "sindex") in - (method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeSnapshot" #() (![ptrT] "pr")) "$a0");;; + (method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeSnapshot" (![ptrT] "pr")) "$a0");;; do: (let: "$a0" := #"%x paused sending replication messages to %x [%s]"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in let: "$sl1" := (interface.make #""%go #"uint64"%go (![uint64T] "to")) in @@ -3150,7 +3150,7 @@ Definition raft__maybeSendSnapshot : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0");;; + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0");;; return: (#true)). (* sendHeartbeat sends a heartbeat RPC to the given peer. @@ -3189,9 +3189,9 @@ Definition raft__sendHeartbeat : val := "Context" ::= "$Context"; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0");;; + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0");;; do: (let: "$a0" := (![uint64T] "commit") in - (method_call #tracker.pkg_name' #"Progress'ptr" #"SentCommit" #() (![ptrT] "pr")) "$a0")). + (method_call #tracker.pkg_name' #"Progress'ptr" #"SentCommit" (![ptrT] "pr")) "$a0")). (* bcastAppend sends RPC, with entries to all peers that are not up-to-date according to the progress recorded in r.trk. @@ -3207,9 +3207,9 @@ Definition raft__bcastAppend : val := then return: (#()) else do: #());;; do: (let: "$a0" := (![uint64T] "id") in - (method_call #pkg_name' #"raft'ptr" #"sendAppend" #() (![ptrT] "r")) "$a0")) + (method_call #pkg_name' #"raft'ptr" #"sendAppend" (![ptrT] "r")) "$a0")) ) in - (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"Visit" #() (struct.field_ref raft "trk" (![ptrT] "r"))) "$a0")). + (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"Visit" (struct.field_ref raft "trk" (![ptrT] "r"))) "$a0")). Definition readOnly : go_type := structT [ "option" :: ReadOnlyOption; @@ -3224,16 +3224,16 @@ Definition raft__bcastHeartbeat : val := rec: "raft__bcastHeartbeat" "r" <> := exception_do (let: "r" := (ref_ty ptrT "r") in let: "lastCtx" := (ref_ty stringT (zero_val stringT)) in - let: "$r0" := ((method_call #pkg_name' #"readOnly'ptr" #"lastPendingRequestCtx" #() (![ptrT] (struct.field_ref raft "readOnly" (![ptrT] "r")))) #()) in + let: "$r0" := ((method_call #pkg_name' #"readOnly'ptr" #"lastPendingRequestCtx" (![ptrT] (struct.field_ref raft "readOnly" (![ptrT] "r")))) #()) in do: ("lastCtx" <-[stringT] "$r0");;; (if: (let: "$a0" := (![stringT] "lastCtx") in StringLength "$a0") = #(W64 0) then do: (let: "$a0" := #slice.nil in - (method_call #pkg_name' #"raft'ptr" #"bcastHeartbeatWithCtx" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"bcastHeartbeatWithCtx" (![ptrT] "r")) "$a0") else do: (let: "$a0" := (string.to_bytes (![stringT] "lastCtx")) in - (method_call #pkg_name' #"raft'ptr" #"bcastHeartbeatWithCtx" #() (![ptrT] "r")) "$a0"))). + (method_call #pkg_name' #"raft'ptr" #"bcastHeartbeatWithCtx" (![ptrT] "r")) "$a0"))). (* go: raft.go:739:16 *) Definition raft__bcastHeartbeatWithCtx : val := @@ -3248,9 +3248,9 @@ Definition raft__bcastHeartbeatWithCtx : val := else do: #());;; do: (let: "$a0" := (![uint64T] "id") in let: "$a1" := (![sliceT] "ctx") in - (method_call #pkg_name' #"raft'ptr" #"sendHeartbeat" #() (![ptrT] "r")) "$a0" "$a1")) + (method_call #pkg_name' #"raft'ptr" #"sendHeartbeat" (![ptrT] "r")) "$a0" "$a1")) ) in - (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"Visit" #() (struct.field_ref raft "trk" (![ptrT] "r"))) "$a0")). + (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"Visit" (struct.field_ref raft "trk" (![ptrT] "r"))) "$a0")). (* go: raft.go:748:16 *) Definition raft__appliedTo : val := @@ -3268,7 +3268,7 @@ Definition raft__appliedTo : val := do: ("newApplied" <-[uint64T] "$r0");;; do: (let: "$a0" := (![uint64T] "newApplied") in let: "$a1" := (![entryEncodingSize] "size") in - (method_call #pkg_name' #"raftLog'ptr" #"appliedTo" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" "$a1");;; + (method_call #pkg_name' #"raftLog'ptr" #"appliedTo" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" "$a1");;; (if: ((![boolT] (struct.field_ref tracker.Config "AutoLeave" (struct.field_ref tracker.ProgressTracker "Config" (struct.field_ref raft "trk" (![ptrT] "r"))))) && ((![uint64T] "newApplied") ≥ (![uint64T] (struct.field_ref raft "pendingConfIndex" (![ptrT] "r"))))) && ((![StateType] (struct.field_ref raft "state" (![ptrT] "r"))) = StateLeader) then let: "err" := (ref_ty error (zero_val error)) in @@ -3311,10 +3311,10 @@ Definition raft__appliedSnap : val := let: "$r0" := (![uint64T] (struct.field_ref raftpb.SnapshotMetadata "Index" (struct.field_ref raftpb.Snapshot "Metadata" (![ptrT] "snap")))) in do: ("index" <-[uint64T] "$r0");;; do: (let: "$a0" := (![uint64T] "index") in - (method_call #pkg_name' #"raftLog'ptr" #"stableSnapTo" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0");;; + (method_call #pkg_name' #"raftLog'ptr" #"stableSnapTo" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0");;; do: (let: "$a0" := (![uint64T] "index") in let: "$a1" := #(W64 0) in - (method_call #pkg_name' #"raft'ptr" #"appliedTo" #() (![ptrT] "r")) "$a0" "$a1")). + (method_call #pkg_name' #"raft'ptr" #"appliedTo" (![ptrT] "r")) "$a0" "$a1")). (* maybeCommit attempts to advance the commit index. Returns true if the commit index changed (in which case the caller should call r.bcastAppend). This can @@ -3332,12 +3332,12 @@ Definition raft__maybeCommit : val := "$oldf" #() )));;; return: (let: "$a0" := (let: "$term" := (![uint64T] (struct.field_ref raft "Term" (![ptrT] "r"))) in - let: "$index" := ((method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"Committed" #() (struct.field_ref raft "trk" (![ptrT] "r"))) #()) in + let: "$index" := ((method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"Committed" (struct.field_ref raft "trk" (![ptrT] "r"))) #()) in struct.make entryID [{ "term" ::= "$term"; "index" ::= "$index" }]) in - (method_call #pkg_name' #"raftLog'ptr" #"maybeCommit" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0")). + (method_call #pkg_name' #"raftLog'ptr" #"maybeCommit" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0")). (* go: raft.go:792:16 *) Definition raft__reset : val := @@ -3357,14 +3357,14 @@ Definition raft__reset : val := do: ((struct.field_ref raft "electionElapsed" (![ptrT] "r")) <-[intT] "$r0");;; let: "$r0" := #(W64 0) in do: ((struct.field_ref raft "heartbeatElapsed" (![ptrT] "r")) <-[intT] "$r0");;; - do: ((method_call #pkg_name' #"raft'ptr" #"resetRandomizedElectionTimeout" #() (![ptrT] "r")) #());;; - do: ((method_call #pkg_name' #"raft'ptr" #"abortLeaderTransfer" #() (![ptrT] "r")) #());;; - do: ((method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"ResetVotes" #() (struct.field_ref raft "trk" (![ptrT] "r"))) #());;; + do: ((method_call #pkg_name' #"raft'ptr" #"resetRandomizedElectionTimeout" (![ptrT] "r")) #());;; + do: ((method_call #pkg_name' #"raft'ptr" #"abortLeaderTransfer" (![ptrT] "r")) #());;; + do: ((method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"ResetVotes" (struct.field_ref raft "trk" (![ptrT] "r"))) #());;; do: (let: "$a0" := (λ: "id" "pr", exception_do (let: "pr" := (ref_ty ptrT "pr") in let: "id" := (ref_ty uint64T "id") in let: "$r0" := (let: "$Match" := #(W64 0) in - let: "$Next" := (((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) + #(W64 1)) in + let: "$Next" := (((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) + #(W64 1)) in let: "$Inflights" := (let: "$a0" := (![intT] (struct.field_ref tracker.ProgressTracker "MaxInflight" (struct.field_ref raft "trk" (![ptrT] "r")))) in let: "$a1" := (![uint64T] (struct.field_ref tracker.ProgressTracker "MaxInflightBytes" (struct.field_ref raft "trk" (![ptrT] "r")))) in (func_call #tracker.pkg_name' #"NewInflights"%go) "$a0" "$a1") in @@ -3383,11 +3383,11 @@ Definition raft__reset : val := do: ((![ptrT] "pr") <-[tracker.Progress] "$r0");;; (if: (![uint64T] "id") = (![uint64T] (struct.field_ref raft "id" (![ptrT] "r"))) then - let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in + let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in do: ((struct.field_ref tracker.Progress "Match" (![ptrT] "pr")) <-[uint64T] "$r0") else do: #())) ) in - (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"Visit" #() (struct.field_ref raft "trk" (![ptrT] "r"))) "$a0");;; + (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"Visit" (struct.field_ref raft "trk" (![ptrT] "r"))) "$a0");;; let: "$r0" := #(W64 0) in do: ((struct.field_ref raft "pendingConfIndex" (![ptrT] "r")) <-[uint64T] "$r0");;; let: "$r0" := #(W64 0) in @@ -3404,7 +3404,7 @@ Definition raft__appendEntry : val := exception_do (let: "r" := (ref_ty ptrT "r") in let: "es" := (ref_ty sliceT "es") in let: "li" := (ref_ty uint64T (zero_val uint64T)) in - let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in + let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in do: ("li" <-[uint64T] "$r0");;; do: (let: "$range" := (![sliceT] "es") in slice.for_range raftpb.Entry "$range" (λ: "i" <>, @@ -3414,7 +3414,7 @@ Definition raft__appendEntry : val := let: "$r0" := (((![uint64T] "li") + #(W64 1)) + (![intT] "i")) in do: ((struct.field_ref raftpb.Entry "Index" (slice.elem_ref raftpb.Entry (![sliceT] "es") (![intT] "i"))) <-[uint64T] "$r0")));;; (if: (~ (let: "$a0" := (![sliceT] "es") in - (method_call #pkg_name' #"raft'ptr" #"increaseUncommittedSize" #() (![ptrT] "r")) "$a0")) + (method_call #pkg_name' #"raft'ptr" #"increaseUncommittedSize" (![ptrT] "r")) "$a0")) then do: (let: "$a0" := #"%x appending new entries to log would exceed uncommitted entry size limit; dropping proposal"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -3426,7 +3426,7 @@ Definition raft__appendEntry : val := let: "$a1" := (![sliceT] "es") in (func_call #pkg_name' #"traceReplicate"%go) "$a0" "$a1");;; let: "$r0" := (let: "$a0" := (![sliceT] "es") in - (method_call #pkg_name' #"raftLog'ptr" #"append" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0") in + (method_call #pkg_name' #"raftLog'ptr" #"append" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0") in do: ("li" <-[uint64T] "$r0");;; do: (let: "$a0" := (let: "$To" := (![uint64T] (struct.field_ref raft "id" (![ptrT] "r"))) in let: "$Type" := raftpb.MsgAppResp in @@ -3447,7 +3447,7 @@ Definition raft__appendEntry : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0");;; + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0");;; return: (#true)). (* go: raft.go:858:16 *) @@ -3456,10 +3456,10 @@ Definition raft__tick : val := exception_do (let: "r" := (ref_ty ptrT "r") in let: "$sw" := (![intT] (struct.field_ref raft "tickId" (![ptrT] "r"))) in (if: "$sw" = tickElectionId - then do: ((method_call #pkg_name' #"raft'ptr" #"tickElection" #() (![ptrT] "r")) #()) + then do: ((method_call #pkg_name' #"raft'ptr" #"tickElection" (![ptrT] "r")) #()) else (if: "$sw" = tickHeartbeatId - then do: ((method_call #pkg_name' #"raft'ptr" #"tickHeartbeat" #() (![ptrT] "r")) #()) + then do: ((method_call #pkg_name' #"raft'ptr" #"tickHeartbeat" (![ptrT] "r")) #()) else #()))). (* tickElection is run by followers and candidates after r.electionTimeout. @@ -3469,7 +3469,7 @@ Definition raft__tickElection : val := rec: "raft__tickElection" "r" <> := exception_do (let: "r" := (ref_ty ptrT "r") in do: ((struct.field_ref raft "electionElapsed" (![ptrT] "r")) <-[intT] ((![intT] (struct.field_ref raft "electionElapsed" (![ptrT] "r"))) + #(W64 1)));;; - (if: ((method_call #pkg_name' #"raft'ptr" #"promotable" #() (![ptrT] "r")) #()) && ((method_call #pkg_name' #"raft'ptr" #"pastElectionTimeout" #() (![ptrT] "r")) #()) + (if: ((method_call #pkg_name' #"raft'ptr" #"promotable" (![ptrT] "r")) #()) && ((method_call #pkg_name' #"raft'ptr" #"pastElectionTimeout" (![ptrT] "r")) #()) then let: "$r0" := #(W64 0) in do: ((struct.field_ref raft "electionElapsed" (![ptrT] "r")) <-[intT] "$r0");;; @@ -3492,7 +3492,7 @@ Definition raft__tickElection : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"Step" #() (![ptrT] "r")) "$a0") in + (method_call #pkg_name' #"raft'ptr" #"Step" (![ptrT] "r")) "$a0") in do: ("err" <-[error] "$r0");;; (if: (![error] "err") ≠ #interface.nil then @@ -3536,7 +3536,7 @@ Definition raft__tickHeartbeat : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"Step" #() (![ptrT] "r")) "$a0") in + (method_call #pkg_name' #"raft'ptr" #"Step" (![ptrT] "r")) "$a0") in do: ("err" <-[error] "$r0");;; (if: (![error] "err") ≠ #interface.nil then @@ -3547,7 +3547,7 @@ Definition raft__tickHeartbeat : val := else do: #())) else do: #());;; (if: ((![StateType] (struct.field_ref raft "state" (![ptrT] "r"))) = StateLeader) && ((![uint64T] (struct.field_ref raft "leadTransferee" (![ptrT] "r"))) ≠ None) - then do: ((method_call #pkg_name' #"raft'ptr" #"abortLeaderTransfer" #() (![ptrT] "r")) #()) + then do: ((method_call #pkg_name' #"raft'ptr" #"abortLeaderTransfer" (![ptrT] "r")) #()) else do: #()) else do: #());;; (if: (![StateType] (struct.field_ref raft "state" (![ptrT] "r"))) ≠ StateLeader @@ -3576,7 +3576,7 @@ Definition raft__tickHeartbeat : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"Step" #() (![ptrT] "r")) "$a0") in + (method_call #pkg_name' #"raft'ptr" #"Step" (![ptrT] "r")) "$a0") in do: ("err" <-[error] "$r0");;; (if: (![error] "err") ≠ #interface.nil then @@ -3593,10 +3593,10 @@ Definition raft__becomeFollower : val := exception_do (let: "r" := (ref_ty ptrT "r") in let: "lead" := (ref_ty uint64T "lead") in let: "term" := (ref_ty uint64T "term") in - let: "$r0" := (![funcT] (globals.get #pkg_name' #"stepFollowerGlobal"%go #())) in + let: "$r0" := (![funcT] (globals.get #pkg_name' #"stepFollowerGlobal"%go)) in do: ((struct.field_ref raft "step" (![ptrT] "r")) <-[funcT] "$r0");;; do: (let: "$a0" := (![uint64T] "term") in - (method_call #pkg_name' #"raft'ptr" #"reset" #() (![ptrT] "r")) "$a0");;; + (method_call #pkg_name' #"raft'ptr" #"reset" (![ptrT] "r")) "$a0");;; let: "$r0" := tickElectionId in do: ((struct.field_ref raft "tickId" (![ptrT] "r")) <-[intT] "$r0");;; let: "$r0" := (![uint64T] "lead") in @@ -3620,10 +3620,10 @@ Definition raft__becomeCandidate : val := do: (let: "$a0" := (interface.make #""%go #"string"%go #"invalid transition [leader -> candidate]"%go) in Panic "$a0") else do: #());;; - let: "$r0" := (![funcT] (globals.get #pkg_name' #"stepCandidateGlobal"%go #())) in + let: "$r0" := (![funcT] (globals.get #pkg_name' #"stepCandidateGlobal"%go)) in do: ((struct.field_ref raft "step" (![ptrT] "r")) <-[funcT] "$r0");;; do: (let: "$a0" := ((![uint64T] (struct.field_ref raft "Term" (![ptrT] "r"))) + #(W64 1)) in - (method_call #pkg_name' #"raft'ptr" #"reset" #() (![ptrT] "r")) "$a0");;; + (method_call #pkg_name' #"raft'ptr" #"reset" (![ptrT] "r")) "$a0");;; let: "$r0" := tickElectionId in do: ((struct.field_ref raft "tickId" (![ptrT] "r")) <-[intT] "$r0");;; let: "$r0" := (![uint64T] (struct.field_ref raft "id" (![ptrT] "r"))) in @@ -3647,9 +3647,9 @@ Definition raft__becomePreCandidate : val := do: (let: "$a0" := (interface.make #""%go #"string"%go #"invalid transition [leader -> pre-candidate]"%go) in Panic "$a0") else do: #());;; - let: "$r0" := (![funcT] (globals.get #pkg_name' #"stepCandidateGlobal"%go #())) in + let: "$r0" := (![funcT] (globals.get #pkg_name' #"stepCandidateGlobal"%go)) in do: ((struct.field_ref raft "step" (![ptrT] "r")) <-[funcT] "$r0");;; - do: ((method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"ResetVotes" #() (struct.field_ref raft "trk" (![ptrT] "r"))) #());;; + do: ((method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"ResetVotes" (struct.field_ref raft "trk" (![ptrT] "r"))) #());;; let: "$r0" := tickElectionId in do: ((struct.field_ref raft "tickId" (![ptrT] "r")) <-[intT] "$r0");;; let: "$r0" := None in @@ -3671,10 +3671,10 @@ Definition raft__becomeLeader : val := do: (let: "$a0" := (interface.make #""%go #"string"%go #"invalid transition [follower -> leader]"%go) in Panic "$a0") else do: #());;; - let: "$r0" := (![funcT] (globals.get #pkg_name' #"stepLeaderGlobal"%go #())) in + let: "$r0" := (![funcT] (globals.get #pkg_name' #"stepLeaderGlobal"%go)) in do: ((struct.field_ref raft "step" (![ptrT] "r")) <-[funcT] "$r0");;; do: (let: "$a0" := (![uint64T] (struct.field_ref raft "Term" (![ptrT] "r"))) in - (method_call #pkg_name' #"raft'ptr" #"reset" #() (![ptrT] "r")) "$a0");;; + (method_call #pkg_name' #"raft'ptr" #"reset" (![ptrT] "r")) "$a0");;; let: "$r0" := tickHeartbeatId in do: ((struct.field_ref raft "tickId" (![ptrT] "r")) <-[intT] "$r0");;; let: "$r0" := (![uint64T] (struct.field_ref raft "id" (![ptrT] "r"))) in @@ -3684,10 +3684,10 @@ Definition raft__becomeLeader : val := let: "pr" := (ref_ty ptrT (zero_val ptrT)) in let: "$r0" := (Fst (map.get (![tracker.ProgressMap] (struct.field_ref tracker.ProgressTracker "Progress" (struct.field_ref raft "trk" (![ptrT] "r")))) (![uint64T] (struct.field_ref raft "id" (![ptrT] "r"))))) in do: ("pr" <-[ptrT] "$r0");;; - do: ((method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeReplicate" #() (![ptrT] "pr")) #());;; + do: ((method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeReplicate" (![ptrT] "pr")) #());;; let: "$r0" := #true in do: ((struct.field_ref tracker.Progress "RecentActive" (![ptrT] "pr")) <-[boolT] "$r0");;; - let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in + let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in do: ((struct.field_ref raft "pendingConfIndex" (![ptrT] "r")) <-[uint64T] "$r0");;; do: (let: "$a0" := (![ptrT] "r") in (func_call #pkg_name' #"traceBecomeLeader"%go) "$a0");;; @@ -3702,7 +3702,7 @@ Definition raft__becomeLeader : val := do: ("emptyEnt" <-[raftpb.Entry] "$r0");;; (if: (~ (let: "$a0" := ((let: "$sl0" := (![raftpb.Entry] "emptyEnt") in slice.literal raftpb.Entry ["$sl0"])) in - (method_call #pkg_name' #"raft'ptr" #"appendEntry" #() (![ptrT] "r")) "$a0")) + (method_call #pkg_name' #"raft'ptr" #"appendEntry" (![ptrT] "r")) "$a0")) then do: (let: "$a0" := ((let: "$sl0" := (interface.make #""%go #"string"%go #"empty entry was dropped"%go) in slice.literal interfaceT ["$sl0"])) in @@ -3727,7 +3727,7 @@ Definition raft__hup : val := (interface.get "Debugf" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; return: (#()) else do: #());;; - (if: (~ ((method_call #pkg_name' #"raft'ptr" #"promotable" #() (![ptrT] "r")) #())) + (if: (~ ((method_call #pkg_name' #"raft'ptr" #"promotable" (![ptrT] "r")) #())) then do: (let: "$a0" := #"%x is unpromotable and can not campaign"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -3735,7 +3735,7 @@ Definition raft__hup : val := (interface.get "Warningf" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; return: (#()) else do: #());;; - (if: (method_call #pkg_name' #"raft'ptr" #"hasUnappliedConfChanges" #() (![ptrT] "r")) #() + (if: (method_call #pkg_name' #"raft'ptr" #"hasUnappliedConfChanges" (![ptrT] "r")) #() then do: (let: "$a0" := #"%x cannot campaign at term %d since there are still pending configuration changes to apply"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -3750,7 +3750,7 @@ Definition raft__hup : val := slice.literal interfaceT ["$sl0"; "$sl1"])) in (interface.get "Infof" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; do: (let: "$a0" := (![CampaignType] "t") in - (method_call #pkg_name' #"raft'ptr" #"campaign" #() (![ptrT] "r")) "$a0")). + (method_call #pkg_name' #"raft'ptr" #"campaign" (![ptrT] "r")) "$a0")). (* go: raft.go:1013:16 *) Definition raft__hasUnappliedConfChanges : val := @@ -3784,13 +3784,13 @@ Definition raft__hasUnappliedConfChanges : val := then let: "$r0" := #true in do: ("found" <-[boolT] "$r0");;; - return: (![error] (globals.get #pkg_name' #"errBreak"%go #())) + return: (![error] (globals.get #pkg_name' #"errBreak"%go)) else do: #())));;; return: (#interface.nil)) ) in - (method_call #pkg_name' #"raftLog'ptr" #"scan" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" "$a1" "$a2" "$a3") in + (method_call #pkg_name' #"raftLog'ptr" #"scan" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" "$a1" "$a2" "$a3") in do: ("err" <-[error] "$r0");;; - (if: ((![error] "err") ≠ #interface.nil) && ((![error] "err") ≠ (![error] (globals.get #pkg_name' #"errBreak"%go #()))) + (if: ((![error] "err") ≠ #interface.nil) && ((![error] "err") ≠ (![error] (globals.get #pkg_name' #"errBreak"%go))) then do: (let: "$a0" := #"error scanning unapplied entries [%d, %d): %v"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] "lo")) in @@ -3809,7 +3809,7 @@ Definition raft__campaign : val := rec: "raft__campaign" "r" "t" := exception_do (let: "r" := (ref_ty ptrT "r") in let: "t" := (ref_ty CampaignType "t") in - (if: (~ ((method_call #pkg_name' #"raft'ptr" #"promotable" #() (![ptrT] "r")) #())) + (if: (~ ((method_call #pkg_name' #"raft'ptr" #"promotable" (![ptrT] "r")) #())) then do: (let: "$a0" := #"%x is unpromotable; campaign() should have been called"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -3820,13 +3820,13 @@ Definition raft__campaign : val := let: "voteMsg" := (ref_ty raftpb.MessageType (zero_val raftpb.MessageType)) in (if: (![CampaignType] "t") = campaignPreElection then - do: ((method_call #pkg_name' #"raft'ptr" #"becomePreCandidate" #() (![ptrT] "r")) #());;; + do: ((method_call #pkg_name' #"raft'ptr" #"becomePreCandidate" (![ptrT] "r")) #());;; let: "$r0" := raftpb.MsgPreVote in do: ("voteMsg" <-[raftpb.MessageType] "$r0");;; let: "$r0" := ((![uint64T] (struct.field_ref raft "Term" (![ptrT] "r"))) + #(W64 1)) in do: ("term" <-[uint64T] "$r0") else - do: ((method_call #pkg_name' #"raft'ptr" #"becomeCandidate" #() (![ptrT] "r")) #());;; + do: ((method_call #pkg_name' #"raft'ptr" #"becomeCandidate" (![ptrT] "r")) #());;; let: "$r0" := raftpb.MsgVote in do: ("voteMsg" <-[raftpb.MessageType] "$r0");;; let: "$r0" := (![uint64T] (struct.field_ref raft "Term" (![ptrT] "r"))) in @@ -3835,7 +3835,7 @@ Definition raft__campaign : val := let: "idMap" := (ref_ty (mapT uint64T (structT [ ])) (zero_val (mapT uint64T (structT [ ])))) in - let: "$r0" := ((method_call #quorum.pkg_name' #"JointConfig" #"IDs" "IDs" #() (![quorum.JointConfig] (struct.field_ref tracker.Config "Voters" (struct.field_ref tracker.ProgressTracker "Config" (struct.field_ref raft "trk" (![ptrT] "r")))))) #()) in + let: "$r0" := ((method_call #quorum.pkg_name' #"JointConfig" #"IDs" (![quorum.JointConfig] (struct.field_ref tracker.Config "Voters" (struct.field_ref tracker.ProgressTracker "Config" (struct.field_ref raft "trk" (![ptrT] "r")))))) #()) in do: ("idMap" <-[mapT uint64T (structT [ ])] "$r0");;; let: "$r0" := (slice.make3 uint64T #(W64 0) (let: "$a0" := (![mapT uint64T (structT [ @@ -3849,7 +3849,7 @@ Definition raft__campaign : val := slice.literal uint64T ["$sl0"])) in (slice.append sliceT) "$a0" "$a1") in do: ("ids" <-[sliceT] "$r0")));;; - do: (let: "$a0" := (interface.make slice' (![sliceT] "ids")) in + do: (let: "$a0" := (interface.make #"slice'"%go (![sliceT] "ids")) in let: "$a1" := (λ: "i" "j", exception_do (let: "j" := (ref_ty intT "j") in let: "i" := (ref_ty intT "i") in @@ -3881,11 +3881,11 @@ Definition raft__campaign : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0");;; + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0");;; continue: #() else do: #());;; let: "last" := (ref_ty entryID (zero_val entryID)) in - let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in + let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in do: ("last" <-[entryID] "$r0");;; do: (let: "$a0" := #"%x [logterm: %d, index: %d] sent %s request to %x at term %d"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -3924,7 +3924,7 @@ Definition raft__campaign : val := "Context" ::= "$Context"; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0")))). + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0")))). (* returns (granted, rejected, result) @@ -3954,8 +3954,8 @@ Definition raft__poll : val := (interface.get "Infof" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1"));;; do: (let: "$a0" := (![uint64T] "id") in let: "$a1" := (![boolT] "v") in - (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"RecordVote" #() (struct.field_ref raft "trk" (![ptrT] "r"))) "$a0" "$a1");;; - let: (("$ret0", "$ret1"), "$ret2") := (((method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"TallyVotes" #() (struct.field_ref raft "trk" (![ptrT] "r"))) #())) in + (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"RecordVote" (struct.field_ref raft "trk" (![ptrT] "r"))) "$a0" "$a1");;; + let: (("$ret0", "$ret1"), "$ret2") := (((method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"TallyVotes" (struct.field_ref raft "trk" (![ptrT] "r"))) #())) in return: ("$ret0", "$ret1", "$ret2")). (* go: raft.go:1104:16 *) @@ -3985,7 +3985,7 @@ Definition raft__Step : val := (if: (~ (![boolT] "force")) && (![boolT] "inLease") then let: "last" := (ref_ty entryID (zero_val entryID)) in - let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in + let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in do: ("last" <-[entryID] "$r0");;; do: (let: "$a0" := #"%x [logterm: %d, index: %d, vote: %x] ignored %s from %x [logterm: %d, index: %d] at term %d: lease is not expired (remaining ticks: %d)"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -4022,11 +4022,11 @@ Definition raft__Step : val := then do: (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "Term" "m")) in let: "$a1" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in - (method_call #pkg_name' #"raft'ptr" #"becomeFollower" #() (![ptrT] "r")) "$a0" "$a1") + (method_call #pkg_name' #"raft'ptr" #"becomeFollower" (![ptrT] "r")) "$a0" "$a1") else do: (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "Term" "m")) in let: "$a1" := None in - (method_call #pkg_name' #"raft'ptr" #"becomeFollower" #() (![ptrT] "r")) "$a0" "$a1")))) + (method_call #pkg_name' #"raft'ptr" #"becomeFollower" (![ptrT] "r")) "$a0" "$a1")))) else (if: "$sw" = ((![uint64T] (struct.field_ref raftpb.Message "Term" "m")) < (![uint64T] (struct.field_ref raft "Term" (![ptrT] "r")))) then @@ -4050,12 +4050,12 @@ Definition raft__Step : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0") else (if: (![raftpb.MessageType] (struct.field_ref raftpb.Message "Type" "m")) = raftpb.MsgPreVote then let: "last" := (ref_ty entryID (zero_val entryID)) in - let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in + let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in do: ("last" <-[entryID] "$r0");;; do: (let: "$a0" := #"%x [logterm: %d, index: %d, vote: %x] rejected %s from %x [logterm: %d, index: %d] at term %d"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -4089,7 +4089,7 @@ Definition raft__Step : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0") else (if: (![raftpb.MessageType] (struct.field_ref raftpb.Message "Type" "m")) = raftpb.MsgStorageAppendResp then @@ -4106,7 +4106,7 @@ Definition raft__Step : val := (if: (![ptrT] (struct.field_ref raftpb.Message "Snapshot" "m")) ≠ #null then do: (let: "$a0" := (![ptrT] (struct.field_ref raftpb.Message "Snapshot" "m")) in - (method_call #pkg_name' #"raft'ptr" #"appliedSnap" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"appliedSnap" (![ptrT] "r")) "$a0") else do: #()) else do: (let: "$a0" := #"%x [term: %d] ignored a %s message with lower term from %x [term: %d]"%go in @@ -4125,10 +4125,10 @@ Definition raft__Step : val := (if: ![boolT] (struct.field_ref raft "preVote" (![ptrT] "r")) then do: (let: "$a0" := campaignPreElection in - (method_call #pkg_name' #"raft'ptr" #"hup" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"hup" (![ptrT] "r")) "$a0") else do: (let: "$a0" := campaignElection in - (method_call #pkg_name' #"raft'ptr" #"hup" #() (![ptrT] "r")) "$a0")) + (method_call #pkg_name' #"raft'ptr" #"hup" (![ptrT] "r")) "$a0")) else (if: "$sw" = raftpb.MsgStorageAppendResp then @@ -4140,12 +4140,12 @@ Definition raft__Step : val := "term" ::= "$term"; "index" ::= "$index" }]) in - (method_call #pkg_name' #"raftLog'ptr" #"stableTo" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0") + (method_call #pkg_name' #"raftLog'ptr" #"stableTo" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0") else do: #());;; (if: (![ptrT] (struct.field_ref raftpb.Message "Snapshot" "m")) ≠ #null then do: (let: "$a0" := (![ptrT] (struct.field_ref raftpb.Message "Snapshot" "m")) in - (method_call #pkg_name' #"raft'ptr" #"appliedSnap" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"appliedSnap" (![ptrT] "r")) "$a0") else do: #()) else (if: "$sw" = raftpb.MsgStorageApplyResp @@ -4160,10 +4160,10 @@ Definition raft__Step : val := do: (let: "$a0" := (![uint64T] "index") in let: "$a1" := (let: "$a0" := (![sliceT] (struct.field_ref raftpb.Message "Entries" "m")) in (func_call #pkg_name' #"entsSize"%go) "$a0") in - (method_call #pkg_name' #"raft'ptr" #"appliedTo" #() (![ptrT] "r")) "$a0" "$a1");;; + (method_call #pkg_name' #"raft'ptr" #"appliedTo" (![ptrT] "r")) "$a0" "$a1");;; do: (let: "$a0" := (let: "$a0" := (![sliceT] (struct.field_ref raftpb.Message "Entries" "m")) in (func_call #pkg_name' #"payloadsSize"%go) "$a0") in - (method_call #pkg_name' #"raft'ptr" #"reduceUncommittedSize" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"reduceUncommittedSize" (![ptrT] "r")) "$a0") else do: #()) else (if: ("$sw" = raftpb.MsgPreVote) || ("$sw" = raftpb.MsgVote) @@ -4172,7 +4172,7 @@ Definition raft__Step : val := let: "$r0" := ((((![uint64T] (struct.field_ref raft "Vote" (![ptrT] "r"))) = (![uint64T] (struct.field_ref raftpb.Message "From" "m"))) || (((![uint64T] (struct.field_ref raft "Vote" (![ptrT] "r"))) = None) && ((![uint64T] (struct.field_ref raft "lead" (![ptrT] "r"))) = None))) || (((![raftpb.MessageType] (struct.field_ref raftpb.Message "Type" "m")) = raftpb.MsgPreVote) && ((![uint64T] (struct.field_ref raftpb.Message "Term" "m")) > (![uint64T] (struct.field_ref raft "Term" (![ptrT] "r")))))) in do: ("canVote" <-[boolT] "$r0");;; let: "lastID" := (ref_ty entryID (zero_val entryID)) in - let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in + let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in do: ("lastID" <-[entryID] "$r0");;; let: "candLastID" := (ref_ty entryID (zero_val entryID)) in let: "$r0" := (let: "$term" := (![uint64T] (struct.field_ref raftpb.Message "LogTerm" "m")) in @@ -4183,7 +4183,7 @@ Definition raft__Step : val := }]) in do: ("candLastID" <-[entryID] "$r0");;; (if: (![boolT] "canVote") && (let: "$a0" := (![entryID] "candLastID") in - (method_call #pkg_name' #"raftLog'ptr" #"isUpToDate" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0") + (method_call #pkg_name' #"raftLog'ptr" #"isUpToDate" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0") then do: (let: "$a0" := #"%x [logterm: %d, index: %d, vote: %x] cast %s for %x [logterm: %d, index: %d] at term %d"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -4217,7 +4217,7 @@ Definition raft__Step : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0");;; + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0");;; (if: (![raftpb.MessageType] (struct.field_ref raftpb.Message "Type" "m")) = raftpb.MsgVote then let: "$r0" := #(W64 0) in @@ -4259,7 +4259,7 @@ Definition raft__Step : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0")) + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0")) else let: "err" := (ref_ty error (zero_val error)) in let: "$r0" := (let: "$a0" := (![ptrT] "r") in @@ -4287,12 +4287,12 @@ Definition stepLeader : val := let: "$sw" := (![raftpb.MessageType] (struct.field_ref raftpb.Message "Type" "m")) in (if: "$sw" = raftpb.MsgBeat then - do: ((method_call #pkg_name' #"raft'ptr" #"bcastHeartbeat" #() (![ptrT] "r")) #());;; + do: ((method_call #pkg_name' #"raft'ptr" #"bcastHeartbeat" (![ptrT] "r")) #());;; return: (#interface.nil) else (if: "$sw" = raftpb.MsgCheckQuorum then - (if: (~ ((method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"QuorumActive" #() (struct.field_ref raft "trk" (![ptrT] "r"))) #())) + (if: (~ ((method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"QuorumActive" (struct.field_ref raft "trk" (![ptrT] "r"))) #())) then do: (let: "$a0" := #"%x stepped down to follower since quorum is not active"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -4300,7 +4300,7 @@ Definition stepLeader : val := (interface.get "Warningf" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; do: (let: "$a0" := (![uint64T] (struct.field_ref raft "Term" (![ptrT] "r"))) in let: "$a1" := None in - (method_call #pkg_name' #"raft'ptr" #"becomeFollower" #() (![ptrT] "r")) "$a0" "$a1") + (method_call #pkg_name' #"raft'ptr" #"becomeFollower" (![ptrT] "r")) "$a0" "$a1") else do: #());;; do: (let: "$a0" := (λ: "id" "pr", exception_do (let: "pr" := (ref_ty ptrT "pr") in @@ -4311,7 +4311,7 @@ Definition stepLeader : val := do: ((struct.field_ref tracker.Progress "RecentActive" (![ptrT] "pr")) <-[boolT] "$r0") else do: #())) ) in - (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"Visit" #() (struct.field_ref raft "trk" (![ptrT] "r"))) "$a0");;; + (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"Visit" (struct.field_ref raft "trk" (![ptrT] "r"))) "$a0");;; return: (#interface.nil) else (if: "$sw" = raftpb.MsgProp @@ -4325,7 +4325,7 @@ Definition stepLeader : val := (interface.get "Panicf" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1") else do: #());;; (if: (Fst (map.get (![tracker.ProgressMap] (struct.field_ref tracker.ProgressTracker "Progress" (struct.field_ref raft "trk" (![ptrT] "r")))) (![uint64T] (struct.field_ref raft "id" (![ptrT] "r"))))) = #null - then return: (![error] (globals.get #pkg_name' #"ErrProposalDropped"%go #())) + then return: (![error] (globals.get #pkg_name' #"ErrProposalDropped"%go)) else do: #());;; (if: (![uint64T] (struct.field_ref raft "leadTransferee" (![ptrT] "r"))) ≠ None then @@ -4335,7 +4335,7 @@ Definition stepLeader : val := let: "$sl2" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "leadTransferee" (![ptrT] "r")))) in slice.literal interfaceT ["$sl0"; "$sl1"; "$sl2"])) in (interface.get "Debugf" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; - return: (![error] (globals.get #pkg_name' #"ErrProposalDropped"%go #())) + return: (![error] (globals.get #pkg_name' #"ErrProposalDropped"%go)) else do: #());;; do: (let: "$range" := (![sliceT] (struct.field_ref raftpb.Message "Entries" "m")) in slice.for_range raftpb.Entry "$range" (λ: "i" <>, @@ -4349,7 +4349,7 @@ Definition stepLeader : val := let: "ccc" := (ref_ty raftpb.ConfChange (zero_val raftpb.ConfChange)) in (let: "err" := (ref_ty error (zero_val error)) in let: "$r0" := (let: "$a0" := (![sliceT] (struct.field_ref raftpb.Entry "Data" (![ptrT] "e"))) in - (method_call #raftpb.pkg_name' #"ConfChange'ptr" #"Unmarshal" #() "ccc") "$a0") in + (method_call #raftpb.pkg_name' #"ConfChange'ptr" #"Unmarshal" "ccc") "$a0") in do: ("err" <-[error] "$r0");;; (if: (![error] "err") ≠ #interface.nil then @@ -4364,7 +4364,7 @@ Definition stepLeader : val := let: "ccc" := (ref_ty raftpb.ConfChangeV2 (zero_val raftpb.ConfChangeV2)) in (let: "err" := (ref_ty error (zero_val error)) in let: "$r0" := (let: "$a0" := (![sliceT] (struct.field_ref raftpb.Entry "Data" (![ptrT] "e"))) in - (method_call #raftpb.pkg_name' #"ConfChangeV2'ptr" #"Unmarshal" #() "ccc") "$a0") in + (method_call #raftpb.pkg_name' #"ConfChangeV2'ptr" #"Unmarshal" "ccc") "$a0") in do: ("err" <-[error] "$r0");;; (if: (![error] "err") ≠ #interface.nil then @@ -4425,36 +4425,36 @@ Definition stepLeader : val := }]) in do: ((slice.elem_ref raftpb.Entry (![sliceT] (struct.field_ref raftpb.Message "Entries" "m")) (![intT] "i")) <-[raftpb.Entry] "$r0") else - let: "$r0" := ((((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) + (![intT] "i")) + #(W64 1)) in + let: "$r0" := ((((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) + (![intT] "i")) + #(W64 1)) in do: ((struct.field_ref raft "pendingConfIndex" (![ptrT] "r")) <-[uint64T] "$r0");;; do: (let: "$a0" := (![raftpb.ConfChangeI] "cc") in let: "$a1" := (![ptrT] "r") in (func_call #pkg_name' #"traceChangeConfEvent"%go) "$a0" "$a1")) else do: #())));;; (if: (~ (let: "$a0" := (![sliceT] (struct.field_ref raftpb.Message "Entries" "m")) in - (method_call #pkg_name' #"raft'ptr" #"appendEntry" #() (![ptrT] "r")) "$a0")) - then return: (![error] (globals.get #pkg_name' #"ErrProposalDropped"%go #())) + (method_call #pkg_name' #"raft'ptr" #"appendEntry" (![ptrT] "r")) "$a0")) + then return: (![error] (globals.get #pkg_name' #"ErrProposalDropped"%go)) else do: #());;; - do: ((method_call #pkg_name' #"raft'ptr" #"bcastAppend" #() (![ptrT] "r")) #());;; + do: ((method_call #pkg_name' #"raft'ptr" #"bcastAppend" (![ptrT] "r")) #());;; return: (#interface.nil) else (if: "$sw" = raftpb.MsgReadIndex then - (if: (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"IsSingleton" #() (struct.field_ref raft "trk" (![ptrT] "r"))) #() + (if: (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"IsSingleton" (struct.field_ref raft "trk" (![ptrT] "r"))) #() then (let: "resp" := (ref_ty raftpb.Message (zero_val raftpb.Message)) in let: "$r0" := (let: "$a0" := (![raftpb.Message] "m") in let: "$a1" := (![uint64T] (struct.field_ref raftLog "committed" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r"))))) in - (method_call #pkg_name' #"raft'ptr" #"responseToReadIndexReq" #() (![ptrT] "r")) "$a0" "$a1") in + (method_call #pkg_name' #"raft'ptr" #"responseToReadIndexReq" (![ptrT] "r")) "$a0" "$a1") in do: ("resp" <-[raftpb.Message] "$r0");;; (if: (![uint64T] (struct.field_ref raftpb.Message "To" "resp")) ≠ None then do: (let: "$a0" := (![raftpb.Message] "resp") in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0") else do: #()));;; return: (#interface.nil) else do: #());;; - (if: (~ ((method_call #pkg_name' #"raft'ptr" #"committedEntryInCurrentTerm" #() (![ptrT] "r")) #())) + (if: (~ ((method_call #pkg_name' #"raft'ptr" #"committedEntryInCurrentTerm" (![ptrT] "r")) #())) then let: "$r0" := (let: "$a0" := (![sliceT] (struct.field_ref raft "pendingReadIndexMessages" (![ptrT] "r"))) in let: "$a1" := ((let: "$sl0" := (![raftpb.Message] "m") in @@ -4505,7 +4505,7 @@ Definition stepLeader : val := then let: ("$ret0", "$ret1") := (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "RejectHint" "m")) in let: "$a1" := (![uint64T] (struct.field_ref raftpb.Message "LogTerm" "m")) in - (method_call #pkg_name' #"raftLog'ptr" #"findConflictByTerm" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" "$a1") in + (method_call #pkg_name' #"raftLog'ptr" #"findConflictByTerm" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" "$a1") in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("nextProbeIdx" <-[uint64T] "$r0");;; @@ -4513,7 +4513,7 @@ Definition stepLeader : val := else do: #());;; (if: let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "Index" "m")) in let: "$a1" := (![uint64T] "nextProbeIdx") in - (method_call #tracker.pkg_name' #"Progress'ptr" #"MaybeDecrTo" #() (![ptrT] "pr")) "$a0" "$a1" + (method_call #tracker.pkg_name' #"Progress'ptr" #"MaybeDecrTo" (![ptrT] "pr")) "$a0" "$a1" then do: (let: "$a0" := #"%x decreased progress of %x to [%s]"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -4522,20 +4522,20 @@ Definition stepLeader : val := slice.literal interfaceT ["$sl0"; "$sl1"; "$sl2"])) in (interface.get "Debugf" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; (if: (![tracker.StateType] (struct.field_ref tracker.Progress "State" (![ptrT] "pr"))) = tracker.StateReplicate - then do: ((method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeProbe" #() (![ptrT] "pr")) #()) + then do: ((method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeProbe" (![ptrT] "pr")) #()) else do: #());;; do: (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in - (method_call #pkg_name' #"raft'ptr" #"sendAppend" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"sendAppend" (![ptrT] "r")) "$a0") else do: #()) else (if: (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "Index" "m")) in - (method_call #tracker.pkg_name' #"Progress'ptr" #"MaybeUpdate" #() (![ptrT] "pr")) "$a0") || (((![uint64T] (struct.field_ref tracker.Progress "Match" (![ptrT] "pr"))) = (![uint64T] (struct.field_ref raftpb.Message "Index" "m"))) && ((![tracker.StateType] (struct.field_ref tracker.Progress "State" (![ptrT] "pr"))) = tracker.StateProbe)) + (method_call #tracker.pkg_name' #"Progress'ptr" #"MaybeUpdate" (![ptrT] "pr")) "$a0") || (((![uint64T] (struct.field_ref tracker.Progress "Match" (![ptrT] "pr"))) = (![uint64T] (struct.field_ref raftpb.Message "Index" "m"))) && ((![tracker.StateType] (struct.field_ref tracker.Progress "State" (![ptrT] "pr"))) = tracker.StateProbe)) then let: "$sw" := #true in (if: "$sw" = ((![tracker.StateType] (struct.field_ref tracker.Progress "State" (![ptrT] "pr"))) = tracker.StateProbe) - then do: ((method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeReplicate" #() (![ptrT] "pr")) #()) + then do: ((method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeReplicate" (![ptrT] "pr")) #()) else - (if: "$sw" = (((![tracker.StateType] (struct.field_ref tracker.Progress "State" (![ptrT] "pr"))) = tracker.StateSnapshot) && (((![uint64T] (struct.field_ref tracker.Progress "Match" (![ptrT] "pr"))) + #(W64 1)) ≥ ((method_call #pkg_name' #"raftLog'ptr" #"firstIndex" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()))) + (if: "$sw" = (((![tracker.StateType] (struct.field_ref tracker.Progress "State" (![ptrT] "pr"))) = tracker.StateSnapshot) && (((![uint64T] (struct.field_ref tracker.Progress "Match" (![ptrT] "pr"))) + #(W64 1)) ≥ ((method_call #pkg_name' #"raftLog'ptr" #"firstIndex" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()))) then do: (let: "$a0" := #"%x recovered from needing snapshot, resumed sending replication messages to %x [%s]"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -4543,34 +4543,34 @@ Definition stepLeader : val := let: "$sl2" := (interface.make #tracker.pkg_name' #"Progress'ptr" (![ptrT] "pr")) in slice.literal interfaceT ["$sl0"; "$sl1"; "$sl2"])) in (interface.get "Debugf" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; - do: ((method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeProbe" #() (![ptrT] "pr")) #());;; - do: ((method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeReplicate" #() (![ptrT] "pr")) #()) + do: ((method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeProbe" (![ptrT] "pr")) #());;; + do: ((method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeReplicate" (![ptrT] "pr")) #()) else (if: "$sw" = ((![tracker.StateType] (struct.field_ref tracker.Progress "State" (![ptrT] "pr"))) = tracker.StateReplicate) then do: (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "Index" "m")) in - (method_call #tracker.pkg_name' #"Inflights'ptr" #"FreeLE" #() (![ptrT] (struct.field_ref tracker.Progress "Inflights" (![ptrT] "pr")))) "$a0") + (method_call #tracker.pkg_name' #"Inflights'ptr" #"FreeLE" (![ptrT] (struct.field_ref tracker.Progress "Inflights" (![ptrT] "pr")))) "$a0") else #())));;; - (if: (method_call #pkg_name' #"raft'ptr" #"maybeCommit" #() (![ptrT] "r")) #() + (if: (method_call #pkg_name' #"raft'ptr" #"maybeCommit" (![ptrT] "r")) #() then do: (let: "$a0" := (![ptrT] "r") in (func_call #pkg_name' #"releasePendingReadIndexMessages"%go) "$a0");;; - do: ((method_call #pkg_name' #"raft'ptr" #"bcastAppend" #() (![ptrT] "r")) #()) + do: ((method_call #pkg_name' #"raft'ptr" #"bcastAppend" (![ptrT] "r")) #()) else (if: ((![uint64T] (struct.field_ref raft "id" (![ptrT] "r"))) ≠ (![uint64T] (struct.field_ref raftpb.Message "From" "m"))) && (let: "$a0" := (![uint64T] (struct.field_ref raftLog "committed" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r"))))) in - (method_call #tracker.pkg_name' #"Progress'ptr" #"CanBumpCommit" #() (![ptrT] "pr")) "$a0") + (method_call #tracker.pkg_name' #"Progress'ptr" #"CanBumpCommit" (![ptrT] "pr")) "$a0") then do: (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in - (method_call #pkg_name' #"raft'ptr" #"sendAppend" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"sendAppend" (![ptrT] "r")) "$a0") else do: #()));;; (if: (![uint64T] (struct.field_ref raft "id" (![ptrT] "r"))) ≠ (![uint64T] (struct.field_ref raftpb.Message "From" "m")) then (for: (λ: <>, let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in let: "$a1" := #false in - (method_call #pkg_name' #"raft'ptr" #"maybeSendAppend" #() (![ptrT] "r")) "$a0" "$a1"); (λ: <>, Skip) := λ: <>, + (method_call #pkg_name' #"raft'ptr" #"maybeSendAppend" (![ptrT] "r")) "$a0" "$a1"); (λ: <>, Skip) := λ: <>, do: #()) else do: #());;; - (if: ((![uint64T] (struct.field_ref raftpb.Message "From" "m")) = (![uint64T] (struct.field_ref raft "leadTransferee" (![ptrT] "r")))) && ((![uint64T] (struct.field_ref tracker.Progress "Match" (![ptrT] "pr"))) = ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #())) + (if: ((![uint64T] (struct.field_ref raftpb.Message "From" "m")) = (![uint64T] (struct.field_ref raft "leadTransferee" (![ptrT] "r")))) && ((![uint64T] (struct.field_ref tracker.Progress "Match" (![ptrT] "pr"))) = ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #())) then do: (let: "$a0" := #"%x sent MsgTimeoutNow to %x after received MsgAppResp"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -4578,7 +4578,7 @@ Definition stepLeader : val := slice.literal interfaceT ["$sl0"; "$sl1"])) in (interface.get "Infof" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; do: (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in - (method_call #pkg_name' #"raft'ptr" #"sendTimeoutNow" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"sendTimeoutNow" (![ptrT] "r")) "$a0") else do: #()) else do: #())) else @@ -4588,10 +4588,10 @@ Definition stepLeader : val := do: ((struct.field_ref tracker.Progress "RecentActive" (![ptrT] "pr")) <-[boolT] "$r0");;; let: "$r0" := #false in do: ((struct.field_ref tracker.Progress "MsgAppFlowPaused" (![ptrT] "pr")) <-[boolT] "$r0");;; - (if: ((![uint64T] (struct.field_ref tracker.Progress "Match" (![ptrT] "pr"))) < ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #())) || ((![tracker.StateType] (struct.field_ref tracker.Progress "State" (![ptrT] "pr"))) = tracker.StateProbe) + (if: ((![uint64T] (struct.field_ref tracker.Progress "Match" (![ptrT] "pr"))) < ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #())) || ((![tracker.StateType] (struct.field_ref tracker.Progress "State" (![ptrT] "pr"))) = tracker.StateProbe) then do: (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in - (method_call #pkg_name' #"raft'ptr" #"sendAppend" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"sendAppend" (![ptrT] "r")) "$a0") else do: #());;; (if: ((![ReadOnlyOption] (struct.field_ref readOnly "option" (![ptrT] (struct.field_ref raft "readOnly" (![ptrT] "r"))))) ≠ ReadOnlySafe) || ((let: "$a0" := (![sliceT] (struct.field_ref raftpb.Message "Context" "m")) in slice.len "$a0") = #(W64 0)) @@ -4599,13 +4599,13 @@ Definition stepLeader : val := else do: #());;; (if: (let: "$a0" := (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in let: "$a1" := (![sliceT] (struct.field_ref raftpb.Message "Context" "m")) in - (method_call #pkg_name' #"readOnly'ptr" #"recvAck" #() (![ptrT] (struct.field_ref raft "readOnly" (![ptrT] "r")))) "$a0" "$a1") in - (method_call #quorum.pkg_name' #"JointConfig" #"VoteResult" "VoteResult" #() (![quorum.JointConfig] (struct.field_ref tracker.Config "Voters" (struct.field_ref tracker.ProgressTracker "Config" (struct.field_ref raft "trk" (![ptrT] "r")))))) "$a0") ≠ quorum.VoteWon + (method_call #pkg_name' #"readOnly'ptr" #"recvAck" (![ptrT] (struct.field_ref raft "readOnly" (![ptrT] "r")))) "$a0" "$a1") in + (method_call #quorum.pkg_name' #"JointConfig" #"VoteResult" (![quorum.JointConfig] (struct.field_ref tracker.Config "Voters" (struct.field_ref tracker.ProgressTracker "Config" (struct.field_ref raft "trk" (![ptrT] "r")))))) "$a0") ≠ quorum.VoteWon then return: (#interface.nil) else do: #());;; let: "rss" := (ref_ty sliceT (zero_val sliceT)) in let: "$r0" := (let: "$a0" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"readOnly'ptr" #"advance" #() (![ptrT] (struct.field_ref raft "readOnly" (![ptrT] "r")))) "$a0") in + (method_call #pkg_name' #"readOnly'ptr" #"advance" (![ptrT] (struct.field_ref raft "readOnly" (![ptrT] "r")))) "$a0") in do: ("rss" <-[sliceT] "$r0");;; do: (let: "$range" := (![sliceT] "rss") in slice.for_range ptrT "$range" (λ: <> "rs", @@ -4613,12 +4613,12 @@ Definition stepLeader : val := (let: "resp" := (ref_ty raftpb.Message (zero_val raftpb.Message)) in let: "$r0" := (let: "$a0" := (![raftpb.Message] (struct.field_ref readIndexStatus "req" (![ptrT] "rs"))) in let: "$a1" := (![uint64T] (struct.field_ref readIndexStatus "index" (![ptrT] "rs"))) in - (method_call #pkg_name' #"raft'ptr" #"responseToReadIndexReq" #() (![ptrT] "r")) "$a0" "$a1") in + (method_call #pkg_name' #"raft'ptr" #"responseToReadIndexReq" (![ptrT] "r")) "$a0" "$a1") in do: ("resp" <-[raftpb.Message] "$r0");;; (if: (![uint64T] (struct.field_ref raftpb.Message "To" "resp")) ≠ None then do: (let: "$a0" := (![raftpb.Message] "resp") in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0") else do: #())))) else (if: "$sw" = raftpb.MsgSnapStatus @@ -4628,7 +4628,7 @@ Definition stepLeader : val := else do: #());;; (if: (~ (![boolT] (struct.field_ref raftpb.Message "Reject" "m"))) then - do: ((method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeProbe" #() (![ptrT] "pr")) #());;; + do: ((method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeProbe" (![ptrT] "pr")) #());;; do: (let: "$a0" := #"%x snapshot succeeded, resumed sending replication messages to %x [%s]"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in let: "$sl1" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raftpb.Message "From" "m"))) in @@ -4638,7 +4638,7 @@ Definition stepLeader : val := else let: "$r0" := #(W64 0) in do: ((struct.field_ref tracker.Progress "PendingSnapshot" (![ptrT] "pr")) <-[uint64T] "$r0");;; - do: ((method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeProbe" #() (![ptrT] "pr")) #());;; + do: ((method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeProbe" (![ptrT] "pr")) #());;; do: (let: "$a0" := #"%x snapshot failed, resumed sending replication messages to %x [%s]"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in let: "$sl1" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raftpb.Message "From" "m"))) in @@ -4651,7 +4651,7 @@ Definition stepLeader : val := (if: "$sw" = raftpb.MsgUnreachable then (if: (![tracker.StateType] (struct.field_ref tracker.Progress "State" (![ptrT] "pr"))) = tracker.StateReplicate - then do: ((method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeProbe" #() (![ptrT] "pr")) #()) + then do: ((method_call #tracker.pkg_name' #"Progress'ptr" #"BecomeProbe" (![ptrT] "pr")) #()) else do: #());;; do: (let: "$a0" := #"%x failed to send message to %x because it is unreachable [%s]"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -4689,7 +4689,7 @@ Definition stepLeader : val := (interface.get "Infof" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; return: (#interface.nil) else do: #());;; - do: ((method_call #pkg_name' #"raft'ptr" #"abortLeaderTransfer" #() (![ptrT] "r")) #());;; + do: ((method_call #pkg_name' #"raft'ptr" #"abortLeaderTransfer" (![ptrT] "r")) #());;; do: (let: "$a0" := #"%x [term %d] abort previous transferring leadership to %x"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in let: "$sl1" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "Term" (![ptrT] "r")))) in @@ -4715,10 +4715,10 @@ Definition stepLeader : val := do: ((struct.field_ref raft "electionElapsed" (![ptrT] "r")) <-[intT] "$r0");;; let: "$r0" := (![uint64T] "leadTransferee") in do: ((struct.field_ref raft "leadTransferee" (![ptrT] "r")) <-[uint64T] "$r0");;; - (if: (![uint64T] (struct.field_ref tracker.Progress "Match" (![ptrT] "pr"))) = ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) + (if: (![uint64T] (struct.field_ref tracker.Progress "Match" (![ptrT] "pr"))) = ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) then do: (let: "$a0" := (![uint64T] "leadTransferee") in - (method_call #pkg_name' #"raft'ptr" #"sendTimeoutNow" #() (![ptrT] "r")) "$a0");;; + (method_call #pkg_name' #"raft'ptr" #"sendTimeoutNow" (![ptrT] "r")) "$a0");;; do: (let: "$a0" := #"%x sends MsgTimeoutNow to %x immediately as %x already has up-to-date log"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in let: "$sl1" := (interface.make #""%go #"uint64"%go (![uint64T] "leadTransferee")) in @@ -4727,7 +4727,7 @@ Definition stepLeader : val := (interface.get "Infof" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1") else do: (let: "$a0" := (![uint64T] "leadTransferee") in - (method_call #pkg_name' #"raft'ptr" #"sendAppend" #() (![ptrT] "r")) "$a0")) + (method_call #pkg_name' #"raft'ptr" #"sendAppend" (![ptrT] "r")) "$a0")) else #())))));;; return: (#interface.nil)). @@ -4755,31 +4755,31 @@ Definition stepCandidate : val := let: "$sl1" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "Term" (![ptrT] "r")))) in slice.literal interfaceT ["$sl0"; "$sl1"])) in (interface.get "Infof" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; - return: (![error] (globals.get #pkg_name' #"ErrProposalDropped"%go #())) + return: (![error] (globals.get #pkg_name' #"ErrProposalDropped"%go)) else (if: "$sw" = raftpb.MsgApp then do: (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "Term" "m")) in let: "$a1" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in - (method_call #pkg_name' #"raft'ptr" #"becomeFollower" #() (![ptrT] "r")) "$a0" "$a1");;; + (method_call #pkg_name' #"raft'ptr" #"becomeFollower" (![ptrT] "r")) "$a0" "$a1");;; do: (let: "$a0" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"raft'ptr" #"handleAppendEntries" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"handleAppendEntries" (![ptrT] "r")) "$a0") else (if: "$sw" = raftpb.MsgHeartbeat then do: (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "Term" "m")) in let: "$a1" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in - (method_call #pkg_name' #"raft'ptr" #"becomeFollower" #() (![ptrT] "r")) "$a0" "$a1");;; + (method_call #pkg_name' #"raft'ptr" #"becomeFollower" (![ptrT] "r")) "$a0" "$a1");;; do: (let: "$a0" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"raft'ptr" #"handleHeartbeat" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"handleHeartbeat" (![ptrT] "r")) "$a0") else (if: "$sw" = raftpb.MsgSnap then do: (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "Term" "m")) in let: "$a1" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in - (method_call #pkg_name' #"raft'ptr" #"becomeFollower" #() (![ptrT] "r")) "$a0" "$a1");;; + (method_call #pkg_name' #"raft'ptr" #"becomeFollower" (![ptrT] "r")) "$a0" "$a1");;; do: (let: "$a0" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"raft'ptr" #"handleSnapshot" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"handleSnapshot" (![ptrT] "r")) "$a0") else (if: "$sw" = (![raftpb.MessageType] "myVoteRespType") then @@ -4789,7 +4789,7 @@ Definition stepCandidate : val := let: (("$ret0", "$ret1"), "$ret2") := (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in let: "$a1" := (![raftpb.MessageType] (struct.field_ref raftpb.Message "Type" "m")) in let: "$a2" := (~ (![boolT] (struct.field_ref raftpb.Message "Reject" "m"))) in - (method_call #pkg_name' #"raft'ptr" #"poll" #() (![ptrT] "r")) "$a0" "$a1" "$a2") in + (method_call #pkg_name' #"raft'ptr" #"poll" (![ptrT] "r")) "$a0" "$a1" "$a2") in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in let: "$r2" := "$ret2" in @@ -4809,16 +4809,16 @@ Definition stepCandidate : val := (if: (![StateType] (struct.field_ref raft "state" (![ptrT] "r"))) = StatePreCandidate then do: (let: "$a0" := campaignElection in - (method_call #pkg_name' #"raft'ptr" #"campaign" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"campaign" (![ptrT] "r")) "$a0") else - do: ((method_call #pkg_name' #"raft'ptr" #"becomeLeader" #() (![ptrT] "r")) #());;; - do: ((method_call #pkg_name' #"raft'ptr" #"bcastAppend" #() (![ptrT] "r")) #())) + do: ((method_call #pkg_name' #"raft'ptr" #"becomeLeader" (![ptrT] "r")) #());;; + do: ((method_call #pkg_name' #"raft'ptr" #"bcastAppend" (![ptrT] "r")) #())) else (if: "$sw" = quorum.VoteLost then do: (let: "$a0" := (![uint64T] (struct.field_ref raft "Term" (![ptrT] "r"))) in let: "$a1" := None in - (method_call #pkg_name' #"raft'ptr" #"becomeFollower" #() (![ptrT] "r")) "$a0" "$a1") + (method_call #pkg_name' #"raft'ptr" #"becomeFollower" (![ptrT] "r")) "$a0" "$a1") else #())) else (if: "$sw" = raftpb.MsgTimeoutNow @@ -4848,7 +4848,7 @@ Definition stepFollower : val := let: "$sl1" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "Term" (![ptrT] "r")))) in slice.literal interfaceT ["$sl0"; "$sl1"])) in (interface.get "Infof" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; - return: (![error] (globals.get #pkg_name' #"ErrProposalDropped"%go #())) + return: (![error] (globals.get #pkg_name' #"ErrProposalDropped"%go)) else (if: ![boolT] (struct.field_ref raft "disableProposalForwarding" (![ptrT] "r")) then @@ -4858,12 +4858,12 @@ Definition stepFollower : val := let: "$sl2" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "Term" (![ptrT] "r")))) in slice.literal interfaceT ["$sl0"; "$sl1"; "$sl2"])) in (interface.get "Infof" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; - return: (![error] (globals.get #pkg_name' #"ErrProposalDropped"%go #())) + return: (![error] (globals.get #pkg_name' #"ErrProposalDropped"%go)) else do: #()));;; let: "$r0" := (![uint64T] (struct.field_ref raft "lead" (![ptrT] "r"))) in do: ((struct.field_ref raftpb.Message "To" "m") <-[uint64T] "$r0");;; do: (let: "$a0" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0") else (if: "$sw" = raftpb.MsgApp then @@ -4872,7 +4872,7 @@ Definition stepFollower : val := let: "$r0" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in do: ((struct.field_ref raft "lead" (![ptrT] "r")) <-[uint64T] "$r0");;; do: (let: "$a0" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"raft'ptr" #"handleAppendEntries" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"handleAppendEntries" (![ptrT] "r")) "$a0") else (if: "$sw" = raftpb.MsgHeartbeat then @@ -4881,7 +4881,7 @@ Definition stepFollower : val := let: "$r0" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in do: ((struct.field_ref raft "lead" (![ptrT] "r")) <-[uint64T] "$r0");;; do: (let: "$a0" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"raft'ptr" #"handleHeartbeat" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"handleHeartbeat" (![ptrT] "r")) "$a0") else (if: "$sw" = raftpb.MsgSnap then @@ -4890,7 +4890,7 @@ Definition stepFollower : val := let: "$r0" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in do: ((struct.field_ref raft "lead" (![ptrT] "r")) <-[uint64T] "$r0");;; do: (let: "$a0" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"raft'ptr" #"handleSnapshot" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"handleSnapshot" (![ptrT] "r")) "$a0") else (if: "$sw" = raftpb.MsgTransferLeader then @@ -4906,7 +4906,7 @@ Definition stepFollower : val := let: "$r0" := (![uint64T] (struct.field_ref raft "lead" (![ptrT] "r"))) in do: ((struct.field_ref raftpb.Message "To" "m") <-[uint64T] "$r0");;; do: (let: "$a0" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0") else (if: "$sw" = raftpb.MsgForgetLeader then @@ -4938,7 +4938,7 @@ Definition stepFollower : val := slice.literal interfaceT ["$sl0"; "$sl1"; "$sl2"])) in (interface.get "Infof" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; do: (let: "$a0" := campaignTransfer in - (method_call #pkg_name' #"raft'ptr" #"hup" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"hup" (![ptrT] "r")) "$a0") else (if: "$sw" = raftpb.MsgReadIndex then @@ -4954,7 +4954,7 @@ Definition stepFollower : val := let: "$r0" := (![uint64T] (struct.field_ref raft "lead" (![ptrT] "r"))) in do: ((struct.field_ref raftpb.Message "To" "m") <-[uint64T] "$r0");;; do: (let: "$a0" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0") else (if: "$sw" = raftpb.MsgReadIndexResp then @@ -5033,14 +5033,14 @@ Definition raft__handleAppendEntries : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0");;; + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0");;; return: (#()) else do: #());;; (let: "ok" := (ref_ty boolT (zero_val boolT)) in let: "mlastIndex" := (ref_ty uint64T (zero_val uint64T)) in let: ("$ret0", "$ret1") := (let: "$a0" := (![logSlice] "a") in let: "$a1" := (![uint64T] (struct.field_ref raftpb.Message "Commit" "m")) in - (method_call #pkg_name' #"raftLog'ptr" #"maybeAppend" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" "$a1") in + (method_call #pkg_name' #"raftLog'ptr" #"maybeAppend" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" "$a1") in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("mlastIndex" <-[uint64T] "$r0");;; @@ -5066,16 +5066,16 @@ Definition raft__handleAppendEntries : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0");;; + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0");;; return: (#()) else do: #()));;; do: (let: "$a0" := #"%x [logterm: %d, index: %d] rejected MsgApp [logterm: %d, index: %d] from %x"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in let: "$sl1" := (interface.make #""%go #"uint64"%go (let: ("$ret0", "$ret1") := ((let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "Index" "m")) in - (method_call #pkg_name' #"raftLog'ptr" #"term" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0")) in + (method_call #pkg_name' #"raftLog'ptr" #"term" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0")) in let: "$a0" := "$ret0" in let: "$a1" := "$ret1" in - (method_call #pkg_name' #"raftLog'ptr" #"zeroTermOnOutOfBounds" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" "$a1")) in + (method_call #pkg_name' #"raftLog'ptr" #"zeroTermOnOutOfBounds" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" "$a1")) in let: "$sl2" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raftpb.Message "Index" "m"))) in let: "$sl3" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raftpb.Message "LogTerm" "m"))) in let: "$sl4" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raftpb.Message "Index" "m"))) in @@ -5084,13 +5084,13 @@ Definition raft__handleAppendEntries : val := (interface.get "Debugf" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; let: "hintIndex" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "Index" "m")) in - let: "$a1" := ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in + let: "$a1" := ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in (minUint64 2) "$a0" "$a1") in do: ("hintIndex" <-[uint64T] "$r0");;; let: "hintTerm" := (ref_ty uint64T (zero_val uint64T)) in let: ("$ret0", "$ret1") := (let: "$a0" := (![uint64T] "hintIndex") in let: "$a1" := (![uint64T] (struct.field_ref raftpb.Message "LogTerm" "m")) in - (method_call #pkg_name' #"raftLog'ptr" #"findConflictByTerm" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" "$a1") in + (method_call #pkg_name' #"raftLog'ptr" #"findConflictByTerm" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" "$a1") in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("hintIndex" <-[uint64T] "$r0");;; @@ -5117,7 +5117,7 @@ Definition raft__handleAppendEntries : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0")). + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0")). (* go: raft.go:1855:16 *) Definition raft__handleHeartbeat : val := @@ -5125,7 +5125,7 @@ Definition raft__handleHeartbeat : val := exception_do (let: "r" := (ref_ty ptrT "r") in let: "m" := (ref_ty raftpb.Message "m") in do: (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "Commit" "m")) in - (method_call #pkg_name' #"raftLog'ptr" #"commitTo" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0");;; + (method_call #pkg_name' #"raftLog'ptr" #"commitTo" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0");;; do: (let: "$a0" := (let: "$To" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in let: "$Type" := raftpb.MsgHeartbeatResp in let: "$Context" := (![sliceT] (struct.field_ref raftpb.Message "Context" "m")) in @@ -5145,7 +5145,7 @@ Definition raft__handleHeartbeat : val := "Context" ::= "$Context"; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0")). + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0")). (* go: raft.go:1860:16 *) Definition raft__handleSnapshot : val := @@ -5165,7 +5165,7 @@ Definition raft__handleSnapshot : val := do: ("sindex" <-[uint64T] "$r0");;; do: ("sterm" <-[uint64T] "$r1");;; (if: let: "$a0" := (![raftpb.Snapshot] "s") in - (method_call #pkg_name' #"raft'ptr" #"restore" #() (![ptrT] "r")) "$a0" + (method_call #pkg_name' #"raft'ptr" #"restore" (![ptrT] "r")) "$a0" then do: (let: "$a0" := #"%x [commit: %d] restored snapshot [index: %d, term: %d]"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -5176,7 +5176,7 @@ Definition raft__handleSnapshot : val := (interface.get "Infof" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; do: (let: "$a0" := (let: "$To" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in let: "$Type" := raftpb.MsgAppResp in - let: "$Index" := ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in + let: "$Index" := ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in struct.make raftpb.Message [{ "Type" ::= "$Type"; "To" ::= "$To"; @@ -5193,7 +5193,7 @@ Definition raft__handleSnapshot : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0") else do: (let: "$a0" := #"%x [commit: %d] ignored snapshot [index: %d, term: %d]"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -5221,7 +5221,7 @@ Definition raft__handleSnapshot : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0"))). + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0"))). (* restore recovers the state machine from a snapshot. It restores the log and the configuration of state machine. If this method returns false, the snapshot was @@ -5243,7 +5243,7 @@ Definition raft__restore : val := (interface.get "Warningf" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; do: (let: "$a0" := ((![uint64T] (struct.field_ref raft "Term" (![ptrT] "r"))) + #(W64 1)) in let: "$a1" := None in - (method_call #pkg_name' #"raft'ptr" #"becomeFollower" #() (![ptrT] "r")) "$a0" "$a1");;; + (method_call #pkg_name' #"raft'ptr" #"becomeFollower" (![ptrT] "r")) "$a0" "$a1");;; return: (#false) else do: #());;; let: "found" := (ref_ty boolT (zero_val boolT)) in @@ -5288,10 +5288,10 @@ Definition raft__restore : val := }]) in do: ("id" <-[entryID] "$r0");;; (if: let: "$a0" := (![entryID] "id") in - (method_call #pkg_name' #"raftLog'ptr" #"matchTerm" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" + (method_call #pkg_name' #"raftLog'ptr" #"matchTerm" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" then let: "last" := (ref_ty entryID (zero_val entryID)) in - let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in + let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in do: ("last" <-[entryID] "$r0");;; do: (let: "$a0" := #"%x [commit: %d, lastindex: %d, lastterm: %d] fast-forwarded commit to snapshot [index: %d, term: %d]"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -5303,11 +5303,11 @@ Definition raft__restore : val := slice.literal interfaceT ["$sl0"; "$sl1"; "$sl2"; "$sl3"; "$sl4"; "$sl5"])) in (interface.get "Infof" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; do: (let: "$a0" := (![uint64T] (struct.field_ref raftpb.SnapshotMetadata "Index" (struct.field_ref raftpb.Snapshot "Metadata" "s"))) in - (method_call #pkg_name' #"raftLog'ptr" #"commitTo" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0");;; + (method_call #pkg_name' #"raftLog'ptr" #"commitTo" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0");;; return: (#false) else do: #());;; do: (let: "$a0" := (![raftpb.Snapshot] "s") in - (method_call #pkg_name' #"raftLog'ptr" #"restore" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0");;; + (method_call #pkg_name' #"raftLog'ptr" #"restore" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0");;; let: "$r0" := (let: "$a0" := (![intT] (struct.field_ref tracker.ProgressTracker "MaxInflight" (struct.field_ref raft "trk" (![ptrT] "r")))) in let: "$a1" := (![uint64T] (struct.field_ref tracker.ProgressTracker "MaxInflightBytes" (struct.field_ref raft "trk" (![ptrT] "r")))) in (func_call #tracker.pkg_name' #"MakeProgressTracker"%go) "$a0" "$a1") in @@ -5316,7 +5316,7 @@ Definition raft__restore : val := let: "trk" := (ref_ty tracker.ProgressMap (zero_val tracker.ProgressMap)) in let: "cfg" := (ref_ty tracker.Config (zero_val tracker.Config)) in let: (("$ret0", "$ret1"), "$ret2") := (let: "$a0" := (let: "$Tracker" := (![tracker.ProgressTracker] (struct.field_ref raft "trk" (![ptrT] "r"))) in - let: "$LastIndex" := ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in + let: "$LastIndex" := ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in struct.make confchange.Changer [{ "Tracker" ::= "$Tracker"; "LastIndex" ::= "$LastIndex" @@ -5342,10 +5342,10 @@ Definition raft__restore : val := let: "$a1" := (![raftpb.ConfState] "cs") in let: "$a2" := (let: "$a0" := (![tracker.Config] "cfg") in let: "$a1" := (![tracker.ProgressMap] "trk") in - (method_call #pkg_name' #"raft'ptr" #"switchToConfig" #() (![ptrT] "r")) "$a0" "$a1") in + (method_call #pkg_name' #"raft'ptr" #"switchToConfig" (![ptrT] "r")) "$a0" "$a1") in (func_call #pkg_name' #"assertConfStatesEquivalent"%go) "$a0" "$a1" "$a2");;; let: "last" := (ref_ty entryID (zero_val entryID)) in - let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in + let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in do: ("last" <-[entryID] "$r0");;; do: (let: "$a0" := #"%x [commit: %d, lastindex: %d, lastterm: %d] restored snapshot [index: %d, term: %d]"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in @@ -5368,7 +5368,7 @@ Definition raft__promotable : val := let: "pr" := (ref_ty ptrT (zero_val ptrT)) in let: "$r0" := (Fst (map.get (![tracker.ProgressMap] (struct.field_ref tracker.ProgressTracker "Progress" (struct.field_ref raft "trk" (![ptrT] "r")))) (![uint64T] (struct.field_ref raft "id" (![ptrT] "r"))))) in do: ("pr" <-[ptrT] "$r0");;; - return: ((((![ptrT] "pr") ≠ #null) && (~ (![boolT] (struct.field_ref tracker.Progress "IsLearner" (![ptrT] "pr"))))) && (~ ((method_call #pkg_name' #"raftLog'ptr" #"hasNextOrInProgressSnapshot" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #())))). + return: ((((![ptrT] "pr") ≠ #null) && (~ (![boolT] (struct.field_ref tracker.Progress "IsLearner" (![ptrT] "pr"))))) && (~ ((method_call #pkg_name' #"raftLog'ptr" #"hasNextOrInProgressSnapshot" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #())))). (* go: raft.go:1972:16 *) Definition raft__applyConfChange : val := @@ -5381,20 +5381,20 @@ Definition raft__applyConfChange : val := let: (("$ret0", "$ret1"), "$ret2") := ((λ: <>, exception_do (let: "changer" := (ref_ty confchange.Changer (zero_val confchange.Changer)) in let: "$r0" := (let: "$Tracker" := (![tracker.ProgressTracker] (struct.field_ref raft "trk" (![ptrT] "r"))) in - let: "$LastIndex" := ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in + let: "$LastIndex" := ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in struct.make confchange.Changer [{ "Tracker" ::= "$Tracker"; "LastIndex" ::= "$LastIndex" }]) in do: ("changer" <-[confchange.Changer] "$r0");;; - (if: (method_call #raftpb.pkg_name' #"ConfChangeV2" #"LeaveJoint" "LeaveJoint" #() (![raftpb.ConfChangeV2] "cc")) #() + (if: (method_call #raftpb.pkg_name' #"ConfChangeV2" #"LeaveJoint" (![raftpb.ConfChangeV2] "cc")) #() then - let: (("$ret0", "$ret1"), "$ret2") := (((method_call #confchange.pkg_name' #"Changer" #"LeaveJoint" "LeaveJoint" #() (![confchange.Changer] "changer")) #())) in + let: (("$ret0", "$ret1"), "$ret2") := (((method_call #confchange.pkg_name' #"Changer" #"LeaveJoint" (![confchange.Changer] "changer")) #())) in return: ("$ret0", "$ret1", "$ret2") else (let: "ok" := (ref_ty boolT (zero_val boolT)) in let: "autoLeave" := (ref_ty boolT (zero_val boolT)) in - let: ("$ret0", "$ret1") := ((method_call #raftpb.pkg_name' #"ConfChangeV2" #"EnterJoint" "EnterJoint" #() (![raftpb.ConfChangeV2] "cc")) #()) in + let: ("$ret0", "$ret1") := ((method_call #raftpb.pkg_name' #"ConfChangeV2" #"EnterJoint" (![raftpb.ConfChangeV2] "cc")) #()) in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("autoLeave" <-[boolT] "$r0");;; @@ -5403,11 +5403,11 @@ Definition raft__applyConfChange : val := then let: (("$ret0", "$ret1"), "$ret2") := ((let: "$a0" := (![boolT] "autoLeave") in let: "$a1" := (![sliceT] (struct.field_ref raftpb.ConfChangeV2 "Changes" "cc")) in - (method_call #confchange.pkg_name' #"Changer" #"EnterJoint" "EnterJoint" #() (![confchange.Changer] "changer")) "$a0" "$a1")) in + (method_call #confchange.pkg_name' #"Changer" #"EnterJoint" (![confchange.Changer] "changer")) "$a0" "$a1")) in return: ("$ret0", "$ret1", "$ret2") else do: #())));;; let: (("$ret0", "$ret1"), "$ret2") := ((let: "$a0" := (![sliceT] (struct.field_ref raftpb.ConfChangeV2 "Changes" "cc")) in - (method_call #confchange.pkg_name' #"Changer" #"Simple" "Simple" #() (![confchange.Changer] "changer")) "$a0")) in + (method_call #confchange.pkg_name' #"Changer" #"Simple" (![confchange.Changer] "changer")) "$a0")) in return: ("$ret0", "$ret1", "$ret2")) ) #()) in let: "$r0" := "$ret0" in @@ -5423,7 +5423,7 @@ Definition raft__applyConfChange : val := else do: #());;; return: (let: "$a0" := (![tracker.Config] "cfg") in let: "$a1" := (![tracker.ProgressMap] "trk") in - (method_call #pkg_name' #"raft'ptr" #"switchToConfig" #() (![ptrT] "r")) "$a0" "$a1")). + (method_call #pkg_name' #"raft'ptr" #"switchToConfig" (![ptrT] "r")) "$a0" "$a1")). (* switchToConfig reconfigures this node to use the provided configuration. It updates the in-memory state and, when necessary, carries out additional @@ -5451,7 +5451,7 @@ Definition raft__switchToConfig : val := slice.literal interfaceT ["$sl0"; "$sl1"])) in (interface.get "Infof" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1");;; let: "cs" := (ref_ty raftpb.ConfState (zero_val raftpb.ConfState)) in - let: "$r0" := ((method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"ConfState" #() (struct.field_ref raft "trk" (![ptrT] "r"))) #()) in + let: "$r0" := ((method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"ConfState" (struct.field_ref raft "trk" (![ptrT] "r"))) #()) in do: ("cs" <-[raftpb.ConfState] "$r0");;; let: "ok" := (ref_ty boolT (zero_val boolT)) in let: "pr" := (ref_ty ptrT (zero_val ptrT)) in @@ -5468,7 +5468,7 @@ Definition raft__switchToConfig : val := then do: (let: "$a0" := (![uint64T] (struct.field_ref raft "Term" (![ptrT] "r"))) in let: "$a1" := None in - (method_call #pkg_name' #"raft'ptr" #"becomeFollower" #() (![ptrT] "r")) "$a0" "$a1") + (method_call #pkg_name' #"raft'ptr" #"becomeFollower" (![ptrT] "r")) "$a0" "$a1") else do: #());;; return: (![raftpb.ConfState] "cs") else do: #());;; @@ -5476,8 +5476,8 @@ Definition raft__switchToConfig : val := slice.len "$a0") = #(W64 0)) then return: (![raftpb.ConfState] "cs") else do: #());;; - (if: (method_call #pkg_name' #"raft'ptr" #"maybeCommit" #() (![ptrT] "r")) #() - then do: ((method_call #pkg_name' #"raft'ptr" #"bcastAppend" #() (![ptrT] "r")) #()) + (if: (method_call #pkg_name' #"raft'ptr" #"maybeCommit" (![ptrT] "r")) #() + then do: ((method_call #pkg_name' #"raft'ptr" #"bcastAppend" (![ptrT] "r")) #()) else do: (let: "$a0" := (λ: "id" <>, exception_do (let: <> := (ref_ty ptrT "_") in @@ -5487,17 +5487,17 @@ Definition raft__switchToConfig : val := else do: #());;; do: (let: "$a0" := (![uint64T] "id") in let: "$a1" := #false in - (method_call #pkg_name' #"raft'ptr" #"maybeSendAppend" #() (![ptrT] "r")) "$a0" "$a1")) + (method_call #pkg_name' #"raft'ptr" #"maybeSendAppend" (![ptrT] "r")) "$a0" "$a1")) ) in - (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"Visit" #() (struct.field_ref raft "trk" (![ptrT] "r"))) "$a0"));;; + (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"Visit" (struct.field_ref raft "trk" (![ptrT] "r"))) "$a0"));;; (let: "tOK" := (ref_ty boolT (zero_val boolT)) in - let: ("$ret0", "$ret1") := (map.get ((method_call #quorum.pkg_name' #"JointConfig" #"IDs" "IDs" #() (![quorum.JointConfig] (struct.field_ref tracker.Config "Voters" (struct.field_ref tracker.ProgressTracker "Config" (struct.field_ref raft "trk" (![ptrT] "r")))))) #()) (![uint64T] (struct.field_ref raft "leadTransferee" (![ptrT] "r")))) in + let: ("$ret0", "$ret1") := (map.get ((method_call #quorum.pkg_name' #"JointConfig" #"IDs" (![quorum.JointConfig] (struct.field_ref tracker.Config "Voters" (struct.field_ref tracker.ProgressTracker "Config" (struct.field_ref raft "trk" (![ptrT] "r")))))) #()) (![uint64T] (struct.field_ref raft "leadTransferee" (![ptrT] "r")))) in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: "$r0";;; do: ("tOK" <-[boolT] "$r1");;; (if: (~ (![boolT] "tOK")) && ((![uint64T] (struct.field_ref raft "leadTransferee" (![ptrT] "r"))) ≠ #(W64 0)) - then do: ((method_call #pkg_name' #"raft'ptr" #"abortLeaderTransfer" #() (![ptrT] "r")) #()) + then do: ((method_call #pkg_name' #"raft'ptr" #"abortLeaderTransfer" (![ptrT] "r")) #()) else do: #()));;; return: (![raftpb.ConfState] "cs")). @@ -5506,13 +5506,13 @@ Definition raft__loadState : val := rec: "raft__loadState" "r" "state" := exception_do (let: "r" := (ref_ty ptrT "r") in let: "state" := (ref_ty raftpb.HardState "state") in - (if: ((![uint64T] (struct.field_ref raftpb.HardState "Commit" "state")) < (![uint64T] (struct.field_ref raftLog "committed" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))))) || ((![uint64T] (struct.field_ref raftpb.HardState "Commit" "state")) > ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #())) + (if: ((![uint64T] (struct.field_ref raftpb.HardState "Commit" "state")) < (![uint64T] (struct.field_ref raftLog "committed" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))))) || ((![uint64T] (struct.field_ref raftpb.HardState "Commit" "state")) > ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #())) then do: (let: "$a0" := #"%x state.commit %d is out of range [%d, %d]"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raft "id" (![ptrT] "r")))) in let: "$sl1" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raftpb.HardState "Commit" "state"))) in let: "$sl2" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raftLog "committed" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))))) in - let: "$sl3" := (interface.make #""%go #"uint64"%go ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #())) in + let: "$sl3" := (interface.make #""%go #"uint64"%go ((method_call #pkg_name' #"raftLog'ptr" #"lastIndex" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #())) in slice.literal interfaceT ["$sl0"; "$sl1"; "$sl2"; "$sl3"])) in (interface.get "Panicf" (![Logger] (struct.field_ref raft "logger" (![ptrT] "r")))) "$a0" "$a1") else do: #());;; @@ -5538,7 +5538,7 @@ Definition raft__resetRandomizedElectionTimeout : val := rec: "raft__resetRandomizedElectionTimeout" "r" <> := exception_do (let: "r" := (ref_ty ptrT "r") in let: "$r0" := ((![intT] (struct.field_ref raft "electionTimeout" (![ptrT] "r"))) + (let: "$a0" := (![intT] (struct.field_ref raft "electionTimeout" (![ptrT] "r"))) in - (method_call #pkg_name' #"lockedRand'ptr" #"Intn" #() (![ptrT] (globals.get #pkg_name' #"globalRand"%go #()))) "$a0")) in + (method_call #pkg_name' #"lockedRand'ptr" #"Intn" (![ptrT] (globals.get #pkg_name' #"globalRand"%go))) "$a0")) in do: ((struct.field_ref raft "randomizedElectionTimeout" (![ptrT] "r")) <-[intT] "$r0")). (* go: raft.go:2078:16 *) @@ -5564,7 +5564,7 @@ Definition raft__sendTimeoutNow : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0")). + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0")). (* go: raft.go:2082:16 *) Definition raft__abortLeaderTransfer : val := @@ -5580,10 +5580,10 @@ Definition raft__committedEntryInCurrentTerm : val := rec: "raft__committedEntryInCurrentTerm" "r" <> := exception_do (let: "r" := (ref_ty ptrT "r") in return: ((let: ("$ret0", "$ret1") := ((let: "$a0" := (![uint64T] (struct.field_ref raftLog "committed" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r"))))) in - (method_call #pkg_name' #"raftLog'ptr" #"term" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0")) in + (method_call #pkg_name' #"raftLog'ptr" #"term" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0")) in let: "$a0" := "$ret0" in let: "$a1" := "$ret1" in - (method_call #pkg_name' #"raftLog'ptr" #"zeroTermOnOutOfBounds" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" "$a1") = (![uint64T] (struct.field_ref raft "Term" (![ptrT] "r"))))). + (method_call #pkg_name' #"raftLog'ptr" #"zeroTermOnOutOfBounds" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0" "$a1") = (![uint64T] (struct.field_ref raft "Term" (![ptrT] "r"))))). (* responseToReadIndexReq constructs a response for `req`. If `req` comes from the peer itself, a blank value will be returned. @@ -5690,7 +5690,7 @@ Definition releasePendingReadIndexMessages : val := slice.len "$a0") = #(W64 0) then return: (#()) else do: #());;; - (if: (~ ((method_call #pkg_name' #"raft'ptr" #"committedEntryInCurrentTerm" #() (![ptrT] "r")) #())) + (if: (~ ((method_call #pkg_name' #"raft'ptr" #"committedEntryInCurrentTerm" (![ptrT] "r")) #())) then do: (let: "$a0" := ((let: "$sl0" := (interface.make #""%go #"string"%go #"pending MsgReadIndex should be released only after first commit in current term"%go) in slice.literal interfaceT ["$sl0"])) in @@ -5719,24 +5719,24 @@ Definition sendMsgReadIndexResponse : val := then do: (let: "$a0" := (![uint64T] (struct.field_ref raftLog "committed" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r"))))) in let: "$a1" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"readOnly'ptr" #"addRequest" #() (![ptrT] (struct.field_ref raft "readOnly" (![ptrT] "r")))) "$a0" "$a1");;; + (method_call #pkg_name' #"readOnly'ptr" #"addRequest" (![ptrT] (struct.field_ref raft "readOnly" (![ptrT] "r")))) "$a0" "$a1");;; do: (let: "$a0" := (![uint64T] (struct.field_ref raft "id" (![ptrT] "r"))) in let: "$a1" := (![sliceT] (struct.field_ref raftpb.Entry "Data" (slice.elem_ref raftpb.Entry (![sliceT] (struct.field_ref raftpb.Message "Entries" "m")) #(W64 0)))) in - (method_call #pkg_name' #"readOnly'ptr" #"recvAck" #() (![ptrT] (struct.field_ref raft "readOnly" (![ptrT] "r")))) "$a0" "$a1");;; + (method_call #pkg_name' #"readOnly'ptr" #"recvAck" (![ptrT] (struct.field_ref raft "readOnly" (![ptrT] "r")))) "$a0" "$a1");;; do: (let: "$a0" := (![sliceT] (struct.field_ref raftpb.Entry "Data" (slice.elem_ref raftpb.Entry (![sliceT] (struct.field_ref raftpb.Message "Entries" "m")) #(W64 0)))) in - (method_call #pkg_name' #"raft'ptr" #"bcastHeartbeatWithCtx" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"bcastHeartbeatWithCtx" (![ptrT] "r")) "$a0") else (if: "$sw" = ReadOnlyLeaseBased then (let: "resp" := (ref_ty raftpb.Message (zero_val raftpb.Message)) in let: "$r0" := (let: "$a0" := (![raftpb.Message] "m") in let: "$a1" := (![uint64T] (struct.field_ref raftLog "committed" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r"))))) in - (method_call #pkg_name' #"raft'ptr" #"responseToReadIndexReq" #() (![ptrT] "r")) "$a0" "$a1") in + (method_call #pkg_name' #"raft'ptr" #"responseToReadIndexReq" (![ptrT] "r")) "$a0" "$a1") in do: ("resp" <-[raftpb.Message] "$r0");;; (if: (![uint64T] (struct.field_ref raftpb.Message "To" "resp")) ≠ None then do: (let: "$a0" := (![raftpb.Message] "resp") in - (method_call #pkg_name' #"raft'ptr" #"send" #() (![ptrT] "r")) "$a0") + (method_call #pkg_name' #"raft'ptr" #"send" (![ptrT] "r")) "$a0") else do: #())) else #()))). @@ -5813,7 +5813,7 @@ Definition entsWithConfig : val := "Data" ::= zero_val sliceT }]) in slice.literal raftpb.Entry ["$sl0"])) in - (method_call #pkg_name' #"MemoryStorage'ptr" #"Append" #() (![ptrT] "storage")) "$a0")));;; + (method_call #pkg_name' #"MemoryStorage'ptr" #"Append" (![ptrT] "storage")) "$a0")));;; let: "cfg" := (ref_ty ptrT (zero_val ptrT)) in let: "$r0" := (let: "$a0" := #(W64 1) in let: "$a1" := #(W64 5) in @@ -5832,7 +5832,7 @@ Definition entsWithConfig : val := do: ("sm" <-[ptrT] "$r0");;; do: (let: "$a0" := (![uint64T] (slice.elem_ref uint64T (![sliceT] "terms") ((let: "$a0" := (![sliceT] "terms") in slice.len "$a0") - #(W64 1)))) in - (method_call #pkg_name' #"raft'ptr" #"reset" #() (![ptrT] "sm")) "$a0");;; + (method_call #pkg_name' #"raft'ptr" #"reset" (![ptrT] "sm")) "$a0");;; return: (![ptrT] "sm")). Definition blackHole : go_type := structT [ @@ -5925,7 +5925,7 @@ Definition newTestMemoryStorage : val := Definition raft__readMessages : val := rec: "raft__readMessages" "r" <> := exception_do (let: "r" := (ref_ty ptrT "r") in - do: ((method_call #pkg_name' #"raft'ptr" #"advanceMessagesAfterAppend" #() (![ptrT] "r")) #());;; + do: ((method_call #pkg_name' #"raft'ptr" #"advanceMessagesAfterAppend" (![ptrT] "r")) #());;; let: "msgs" := (ref_ty sliceT (zero_val sliceT)) in let: "$r0" := (![sliceT] (struct.field_ref raft "msgs" (![ptrT] "r"))) in do: ("msgs" <-[sliceT] "$r0");;; @@ -5956,7 +5956,7 @@ Definition raft__stepOrSend : val := then (let: "err" := (ref_ty error (zero_val error)) in let: "$r0" := (let: "$a0" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"raft'ptr" #"Step" #() (![ptrT] "r")) "$a0") in + (method_call #pkg_name' #"raft'ptr" #"Step" (![ptrT] "r")) "$a0") in do: ("err" <-[error] "$r0");;; (if: (![error] "err") ≠ #interface.nil then return: (![error] "err") @@ -5975,14 +5975,14 @@ Definition raft__advanceMessagesAfterAppend : val := exception_do (let: "r" := (ref_ty ptrT "r") in (for: (λ: <>, #true); (λ: <>, Skip) := λ: <>, let: "msgs" := (ref_ty sliceT (zero_val sliceT)) in - let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"takeMessagesAfterAppend" #() (![ptrT] "r")) #()) in + let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"takeMessagesAfterAppend" (![ptrT] "r")) #()) in do: ("msgs" <-[sliceT] "$r0");;; (if: (let: "$a0" := (![sliceT] "msgs") in slice.len "$a0") = #(W64 0) then break: #() else do: #());;; do: (let: "$a0" := (![sliceT] "msgs") in - (method_call #pkg_name' #"raft'ptr" #"stepOrSend" #() (![ptrT] "r")) "$a0"))). + (method_call #pkg_name' #"raft'ptr" #"stepOrSend" (![ptrT] "r")) "$a0"))). (* go: raft2.go:130:6 *) Definition newNetworkWithConfigInit : val := @@ -6114,7 +6114,7 @@ Definition network__send : val := let: "$a1" := #func.nil in (func_call #pkg_name' #"DescribeMessage"%go) "$a0" "$a1")) in slice.literal interfaceT ["$sl0"])) in - (method_call #testing.pkg_name' #"common'ptr" #"Log" #() (struct.field_ref testing.T "common" (![ptrT] (struct.field_ref network "t" (![ptrT] "nw"))))) "$a0") + (method_call #testing.pkg_name' #"common'ptr" #"Log" (struct.field_ref testing.T "common" (![ptrT] (struct.field_ref network "t" (![ptrT] "nw"))))) "$a0") else do: #());;; let: "$r0" := (let: "$a0" := (![raftpb.Message] "m") in (interface.get "Step" (![stateMachine] "p")) "$a0") in @@ -6123,7 +6123,7 @@ Definition network__send : val := let: "$r0" := (let: "$a0" := (let: "$s" := (![sliceT] "msgs") in slice.slice raftpb.Message "$s" #(W64 1) (slice.len "$s")) in let: "$a1" := (let: "$a0" := ((interface.get "readMessages" (![stateMachine] "p")) #()) in - (method_call #pkg_name' #"network'ptr" #"filter" #() (![ptrT] "nw")) "$a0") in + (method_call #pkg_name' #"network'ptr" #"filter" (![ptrT] "nw")) "$a0") in (slice.append sliceT) "$a0" "$a1") in do: ("msgs" <-[sliceT] "$r0"))). @@ -6260,7 +6260,7 @@ Definition testLeaderElection2 : val := "Responses" ::= zero_val sliceT }]) in slice.literal raftpb.Message ["$sl0"])) in - (method_call #pkg_name' #"network'ptr" #"send" #() (![ptrT] (struct.field_ref testLeaderElectionStruct "network" "tt"))) "$a0");;; + (method_call #pkg_name' #"network'ptr" #"send" (![ptrT] (struct.field_ref testLeaderElectionStruct "network" "tt"))) "$a0");;; let: "sm" := (ref_ty ptrT (zero_val ptrT)) in let: "$r0" := (Fst (map.get (![mapT uint64T stateMachine] (struct.field_ref network "peers" (![ptrT] (struct.field_ref testLeaderElectionStruct "network" "tt")))) #(W64 1))) in do: ("sm" <-[ptrT] "$r0");;; @@ -6308,11 +6308,11 @@ Definition NewRawNode : val := let: "$r0" := (![boolT] (struct.field_ref Config "AsyncStorageWrites" (![ptrT] "config"))) in do: ((struct.field_ref RawNode "asyncStorageWrites" (![ptrT] "rn")) <-[boolT] "$r0");;; let: "ss" := (ref_ty SoftState (zero_val SoftState)) in - let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"softState" #() (![ptrT] "r")) #()) in + let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"softState" (![ptrT] "r")) #()) in do: ("ss" <-[SoftState] "$r0");;; let: "$r0" := "ss" in do: ((struct.field_ref RawNode "prevSoftSt" (![ptrT] "rn")) <-[ptrT] "$r0");;; - let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"hardState" #() (![ptrT] "r")) #()) in + let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"hardState" (![ptrT] "r")) #()) in do: ((struct.field_ref RawNode "prevHardSt" (![ptrT] "rn")) <-[raftpb.HardState] "$r0");;; return: (![ptrT] "rn", #interface.nil)). @@ -6322,7 +6322,7 @@ Definition NewRawNode : val := Definition RawNode__Tick : val := rec: "RawNode__Tick" "rn" <> := exception_do (let: "rn" := (ref_ty ptrT "rn") in - do: ((method_call #pkg_name' #"raft'ptr" #"tick" #() (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) #())). + do: ((method_call #pkg_name' #"raft'ptr" #"tick" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) #())). (* TickQuiesced advances the internal logical clock by a single tick without performing any other state machine processing. It allows the caller to avoid @@ -6364,7 +6364,7 @@ Definition RawNode__Campaign : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"Step" #() (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0")). + (method_call #pkg_name' #"raft'ptr" #"Step" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0")). (* Propose proposes data be appended to the raft log. @@ -6399,7 +6399,7 @@ Definition RawNode__Propose : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"Step" #() (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0")). + (method_call #pkg_name' #"raft'ptr" #"Step" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0")). (* ProposeConfChange proposes a config change. See (Node).ProposeConfChange for details. @@ -6421,7 +6421,7 @@ Definition RawNode__ProposeConfChange : val := then return: (![error] "err") else do: #());;; return: (let: "$a0" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"raft'ptr" #"Step" #() (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0")). + (method_call #pkg_name' #"raft'ptr" #"Step" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0")). (* ApplyConfChange applies a config change to the local node. The app must call this when it applies a configuration change, except when it decides to reject @@ -6434,7 +6434,7 @@ Definition RawNode__ApplyConfChange : val := let: "cc" := (ref_ty raftpb.ConfChangeI "cc") in let: "cs" := (ref_ty raftpb.ConfState (zero_val raftpb.ConfState)) in let: "$r0" := (let: "$a0" := ((interface.get "AsV2" (![raftpb.ConfChangeI] "cc")) #()) in - (method_call #pkg_name' #"raft'ptr" #"applyConfChange" #() (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0") in + (method_call #pkg_name' #"raft'ptr" #"applyConfChange" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0") in do: ("cs" <-[raftpb.ConfState] "$r0");;; return: ("cs")). @@ -6448,15 +6448,15 @@ Definition RawNode__Step : val := (if: (let: "$a0" := (![raftpb.MessageType] (struct.field_ref raftpb.Message "Type" "m")) in (func_call #pkg_name' #"IsLocalMsg"%go) "$a0") && (~ (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in (func_call #pkg_name' #"IsLocalMsgTarget"%go) "$a0")) - then return: (![error] (globals.get #pkg_name' #"ErrStepLocalMsg"%go #())) + then return: (![error] (globals.get #pkg_name' #"ErrStepLocalMsg"%go)) else do: #());;; (if: ((let: "$a0" := (![raftpb.MessageType] (struct.field_ref raftpb.Message "Type" "m")) in (func_call #pkg_name' #"IsResponseMsg"%go) "$a0") && (~ (let: "$a0" := (![uint64T] (struct.field_ref raftpb.Message "From" "m")) in (func_call #pkg_name' #"IsLocalMsgTarget"%go) "$a0"))) && ((Fst (map.get (![tracker.ProgressMap] (struct.field_ref tracker.ProgressTracker "Progress" (struct.field_ref raft "trk" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))))) (![uint64T] (struct.field_ref raftpb.Message "From" "m")))) = #null) - then return: (![error] (globals.get #pkg_name' #"ErrStepPeerNotFound"%go #())) + then return: (![error] (globals.get #pkg_name' #"ErrStepPeerNotFound"%go)) else do: #());;; return: (let: "$a0" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"raft'ptr" #"Step" #() (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0")). + (method_call #pkg_name' #"raft'ptr" #"Step" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0")). (* Ready returns the outstanding work that the application needs to handle. This includes appending and applying entries or a snapshot, updating the HardState, @@ -6468,10 +6468,10 @@ Definition RawNode__Ready : val := rec: "RawNode__Ready" "rn" <> := exception_do (let: "rn" := (ref_ty ptrT "rn") in let: "rd" := (ref_ty Ready (zero_val Ready)) in - let: "$r0" := ((method_call #pkg_name' #"RawNode'ptr" #"readyWithoutAccept" #() (![ptrT] "rn")) #()) in + let: "$r0" := ((method_call #pkg_name' #"RawNode'ptr" #"readyWithoutAccept" (![ptrT] "rn")) #()) in do: ("rd" <-[Ready] "$r0");;; do: (let: "$a0" := (![Ready] "rd") in - (method_call #pkg_name' #"RawNode'ptr" #"acceptReady" #() (![ptrT] "rn")) "$a0");;; + (method_call #pkg_name' #"RawNode'ptr" #"acceptReady" (![ptrT] "rn")) "$a0");;; return: (![Ready] "rd")). (* readyWithoutAccept returns a Ready. This is a read-only operation, i.e. there @@ -6485,9 +6485,9 @@ Definition RawNode__readyWithoutAccept : val := let: "$r0" := (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn"))) in do: ("r" <-[ptrT] "$r0");;; let: "rd" := (ref_ty Ready (zero_val Ready)) in - let: "$r0" := (let: "$Entries" := ((method_call #pkg_name' #"raftLog'ptr" #"nextUnstableEnts" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in - let: "$CommittedEntries" := (let: "$a0" := ((method_call #pkg_name' #"RawNode'ptr" #"applyUnstableEntries" #() (![ptrT] "rn")) #()) in - (method_call #pkg_name' #"raftLog'ptr" #"nextCommittedEnts" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0") in + let: "$r0" := (let: "$Entries" := ((method_call #pkg_name' #"raftLog'ptr" #"nextUnstableEnts" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in + let: "$CommittedEntries" := (let: "$a0" := ((method_call #pkg_name' #"RawNode'ptr" #"applyUnstableEntries" (![ptrT] "rn")) #()) in + (method_call #pkg_name' #"raftLog'ptr" #"nextCommittedEnts" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0") in let: "$Messages" := (![sliceT] (struct.field_ref raft "msgs" (![ptrT] "r"))) in struct.make Ready [{ "SoftState" ::= zero_val ptrT; @@ -6501,10 +6501,10 @@ Definition RawNode__readyWithoutAccept : val := }]) in do: ("rd" <-[Ready] "$r0");;; (let: "softSt" := (ref_ty SoftState (zero_val SoftState)) in - let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"softState" #() (![ptrT] "r")) #()) in + let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"softState" (![ptrT] "r")) #()) in do: ("softSt" <-[SoftState] "$r0");;; (if: (~ (let: "$a0" := (![ptrT] (struct.field_ref RawNode "prevSoftSt" (![ptrT] "rn"))) in - (method_call #pkg_name' #"SoftState'ptr" #"equal" #() "softSt") "$a0")) + (method_call #pkg_name' #"SoftState'ptr" #"equal" "softSt") "$a0")) then let: "escapingSoftSt" := (ref_ty SoftState (zero_val SoftState)) in let: "$r0" := (![SoftState] "softSt") in @@ -6513,7 +6513,7 @@ Definition RawNode__readyWithoutAccept : val := do: ((struct.field_ref Ready "SoftState" "rd") <-[ptrT] "$r0") else do: #()));;; (let: "hardSt" := (ref_ty raftpb.HardState (zero_val raftpb.HardState)) in - let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"hardState" #() (![ptrT] "r")) #()) in + let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"hardState" (![ptrT] "r")) #()) in do: ("hardSt" <-[raftpb.HardState] "$r0");;; (if: (~ (let: "$a0" := (![raftpb.HardState] "hardSt") in let: "$a1" := (![raftpb.HardState] (struct.field_ref RawNode "prevHardSt" (![ptrT] "rn"))) in @@ -6522,9 +6522,9 @@ Definition RawNode__readyWithoutAccept : val := let: "$r0" := (![raftpb.HardState] "hardSt") in do: ((struct.field_ref Ready "HardState" "rd") <-[raftpb.HardState] "$r0") else do: #()));;; - (if: (method_call #pkg_name' #"raftLog'ptr" #"hasNextUnstableSnapshot" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #() + (if: (method_call #pkg_name' #"raftLog'ptr" #"hasNextUnstableSnapshot" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #() then - let: "$r0" := (![raftpb.Snapshot] ((method_call #pkg_name' #"raftLog'ptr" #"nextUnstableSnapshot" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #())) in + let: "$r0" := (![raftpb.Snapshot] ((method_call #pkg_name' #"raftLog'ptr" #"nextUnstableSnapshot" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #())) in do: ((struct.field_ref Ready "Snapshot" "rd") <-[raftpb.Snapshot] "$r0") else do: #());;; (if: (let: "$a0" := (![sliceT] (struct.field_ref raft "readStates" (![ptrT] "r"))) in @@ -6533,7 +6533,7 @@ Definition RawNode__readyWithoutAccept : val := let: "$r0" := (![sliceT] (struct.field_ref raft "readStates" (![ptrT] "r"))) in do: ((struct.field_ref Ready "ReadStates" "rd") <-[sliceT] "$r0") else do: #());;; - let: "$r0" := (let: "$a0" := ((method_call #pkg_name' #"raft'ptr" #"hardState" #() (![ptrT] "r")) #()) in + let: "$r0" := (let: "$a0" := ((method_call #pkg_name' #"raft'ptr" #"hardState" (![ptrT] "r")) #()) in let: "$a1" := (![raftpb.HardState] (struct.field_ref RawNode "prevHardSt" (![ptrT] "rn"))) in let: "$a2" := (let: "$a0" := (![sliceT] (struct.field_ref Ready "Entries" "rd")) in slice.len "$a0") in @@ -6611,7 +6611,7 @@ Definition needStorageAppendRespMsg : val := rec: "needStorageAppendRespMsg" "r" "rd" := exception_do (let: "rd" := (ref_ty Ready "rd") in let: "r" := (ref_ty ptrT "r") in - return: (((method_call #pkg_name' #"raftLog'ptr" #"hasNextOrInProgressUnstableEnts" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) || (~ (let: "$a0" := (![raftpb.Snapshot] (struct.field_ref Ready "Snapshot" "rd")) in + return: (((method_call #pkg_name' #"raftLog'ptr" #"hasNextOrInProgressUnstableEnts" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) || (~ (let: "$a0" := (![raftpb.Snapshot] (struct.field_ref Ready "Snapshot" "rd")) in (func_call #pkg_name' #"IsEmptySnap"%go) "$a0")))). (* newStorageAppendMsg creates the message that should be sent to the local @@ -6714,10 +6714,10 @@ Definition newStorageAppendRespMsg : val := "Responses" ::= zero_val sliceT }]) in do: ("m" <-[raftpb.Message] "$r0");;; - (if: (method_call #pkg_name' #"raftLog'ptr" #"hasNextOrInProgressUnstableEnts" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #() + (if: (method_call #pkg_name' #"raftLog'ptr" #"hasNextOrInProgressUnstableEnts" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #() then let: "last" := (ref_ty entryID (zero_val entryID)) in - let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in + let: "$r0" := ((method_call #pkg_name' #"raftLog'ptr" #"lastEntryID" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) in do: ("last" <-[entryID] "$r0");;; let: "$r0" := (![uint64T] (struct.field_ref entryID "index" "last")) in do: ((struct.field_ref raftpb.Message "Index" "m") <-[uint64T] "$r0");;; @@ -6899,7 +6899,7 @@ Definition RawNode__acceptReady : val := do: ((struct.field_ref raft "msgs" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) <-[sliceT] "$r0");;; let: "$r0" := #slice.nil in do: ((struct.field_ref raft "msgsAfterAppend" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) <-[sliceT] "$r0");;; - do: ((method_call #pkg_name' #"raftLog'ptr" #"acceptUnstable" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))))) #());;; + do: ((method_call #pkg_name' #"raftLog'ptr" #"acceptUnstable" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))))) #());;; (if: int_gt (let: "$a0" := (![sliceT] (struct.field_ref Ready "CommittedEntries" "rd")) in slice.len "$a0") #(W64 0) then @@ -6913,8 +6913,8 @@ Definition RawNode__acceptReady : val := do: (let: "$a0" := (![uint64T] "index") in let: "$a1" := (let: "$a0" := (![sliceT] "ents") in (func_call #pkg_name' #"entsSize"%go) "$a0") in - let: "$a2" := ((method_call #pkg_name' #"RawNode'ptr" #"applyUnstableEntries" #() (![ptrT] "rn")) #()) in - (method_call #pkg_name' #"raftLog'ptr" #"acceptApplying" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))))) "$a0" "$a1" "$a2") + let: "$a2" := ((method_call #pkg_name' #"RawNode'ptr" #"applyUnstableEntries" (![ptrT] "rn")) #()) in + (method_call #pkg_name' #"raftLog'ptr" #"acceptApplying" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))))) "$a0" "$a1" "$a2") else do: #());;; do: (let: "$a0" := (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn"))) in (func_call #pkg_name' #"traceReady"%go) "$a0")). @@ -6939,14 +6939,14 @@ Definition RawNode__HasReady : val := let: "$r0" := (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn"))) in do: ("r" <-[ptrT] "$r0");;; (let: "softSt" := (ref_ty SoftState (zero_val SoftState)) in - let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"softState" #() (![ptrT] "r")) #()) in + let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"softState" (![ptrT] "r")) #()) in do: ("softSt" <-[SoftState] "$r0");;; (if: (~ (let: "$a0" := (![ptrT] (struct.field_ref RawNode "prevSoftSt" (![ptrT] "rn"))) in - (method_call #pkg_name' #"SoftState'ptr" #"equal" #() "softSt") "$a0")) + (method_call #pkg_name' #"SoftState'ptr" #"equal" "softSt") "$a0")) then return: (#true) else do: #()));;; (let: "hardSt" := (ref_ty raftpb.HardState (zero_val raftpb.HardState)) in - let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"hardState" #() (![ptrT] "r")) #()) in + let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"hardState" (![ptrT] "r")) #()) in do: ("hardSt" <-[raftpb.HardState] "$r0");;; (if: (~ (let: "$a0" := (![raftpb.HardState] "hardSt") in (func_call #pkg_name' #"IsEmptyHardState"%go) "$a0")) && (~ (let: "$a0" := (![raftpb.HardState] "hardSt") in @@ -6954,7 +6954,7 @@ Definition RawNode__HasReady : val := (func_call #pkg_name' #"isHardStateEqual"%go) "$a0" "$a1")) then return: (#true) else do: #()));;; - (if: (method_call #pkg_name' #"raftLog'ptr" #"hasNextUnstableSnapshot" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #() + (if: (method_call #pkg_name' #"raftLog'ptr" #"hasNextUnstableSnapshot" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #() then return: (#true) else do: #());;; (if: (int_gt (let: "$a0" := (![sliceT] (struct.field_ref raft "msgs" (![ptrT] "r"))) in @@ -6962,8 +6962,8 @@ Definition RawNode__HasReady : val := slice.len "$a0") #(W64 0)) then return: (#true) else do: #());;; - (if: ((method_call #pkg_name' #"raftLog'ptr" #"hasNextUnstableEnts" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) || (let: "$a0" := ((method_call #pkg_name' #"RawNode'ptr" #"applyUnstableEntries" #() (![ptrT] "rn")) #()) in - (method_call #pkg_name' #"raftLog'ptr" #"hasNextCommittedEnts" #() (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0") + (if: ((method_call #pkg_name' #"raftLog'ptr" #"hasNextUnstableEnts" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) #()) || (let: "$a0" := ((method_call #pkg_name' #"RawNode'ptr" #"applyUnstableEntries" (![ptrT] "rn")) #()) in + (method_call #pkg_name' #"raftLog'ptr" #"hasNextCommittedEnts" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r")))) "$a0") then return: (#true) else do: #());;; (if: (let: "$a0" := (![sliceT] (struct.field_ref raft "readStates" (![ptrT] "r"))) in @@ -6994,7 +6994,7 @@ Definition RawNode__Advance : val := let: "i" := ref_ty uint64T "i" in let: "m" := ref_ty raftpb.Message "m" in let: "$r0" := (let: "$a0" := (![raftpb.Message] "m") in - (method_call #pkg_name' #"raft'ptr" #"Step" #() (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0") in + (method_call #pkg_name' #"raft'ptr" #"Step" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0") in do: "$r0";;; let: "$r0" := (struct.make raftpb.Message [{ "Type" ::= zero_val raftpb.MessageType; @@ -7075,7 +7075,7 @@ Definition RawNode__WithProgress : val := let: "$a2" := (![tracker.Progress] "p") in (![funcT] "visitor") "$a0" "$a1" "$a2")) ) in - (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"Visit" #() (struct.field_ref raft "trk" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn"))))) "$a0")). + (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"Visit" (struct.field_ref raft "trk" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn"))))) "$a0")). (* ReportUnreachable reports the given node is not reachable for the last send. @@ -7102,7 +7102,7 @@ Definition RawNode__ReportUnreachable : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"Step" #() (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0") in + (method_call #pkg_name' #"raft'ptr" #"Step" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0") in do: "$r0"). (* ReportSnapshot reports the status of the sent snapshot. @@ -7135,7 +7135,7 @@ Definition RawNode__ReportSnapshot : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"Step" #() (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0") in + (method_call #pkg_name' #"raft'ptr" #"Step" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0") in do: "$r0"). (* TransferLeader tries to transfer leadership to the given transferee. @@ -7163,7 +7163,7 @@ Definition RawNode__TransferLeader : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"Step" #() (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0") in + (method_call #pkg_name' #"raft'ptr" #"Step" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0") in do: "$r0"). (* ForgetLeader forgets a follower's current leader, changing it to None. @@ -7190,7 +7190,7 @@ Definition RawNode__ForgetLeader : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"Step" #() (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0")). + (method_call #pkg_name' #"raft'ptr" #"Step" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0")). (* ReadIndex requests a read state. The read state will be set in ready. Read State has a read index. Once the application advances further than the read @@ -7227,7 +7227,7 @@ Definition RawNode__ReadIndex : val := "Context" ::= zero_val sliceT; "Responses" ::= zero_val sliceT }]) in - (method_call #pkg_name' #"raft'ptr" #"Step" #() (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0") in + (method_call #pkg_name' #"raft'ptr" #"Step" (![ptrT] (struct.field_ref RawNode "raft" (![ptrT] "rn")))) "$a0") in do: "$r0"). (* go: read_only.go:45:6 *) @@ -7464,14 +7464,14 @@ Definition getProgressCopy : val := let: "p" := (ref_ty tracker.Progress (zero_val tracker.Progress)) in let: "$r0" := (![tracker.Progress] (![ptrT] "pr")) in do: ("p" <-[tracker.Progress] "$r0");;; - let: "$r0" := ((method_call #tracker.pkg_name' #"Inflights'ptr" #"Clone" #() (![ptrT] (struct.field_ref tracker.Progress "Inflights" (![ptrT] "pr")))) #()) in + let: "$r0" := ((method_call #tracker.pkg_name' #"Inflights'ptr" #"Clone" (![ptrT] (struct.field_ref tracker.Progress "Inflights" (![ptrT] "pr")))) #()) in do: ((struct.field_ref tracker.Progress "Inflights" "p") <-[ptrT] "$r0");;; let: "$r0" := #null in do: ("pr" <-[ptrT] "$r0");;; let: "$r0" := (![tracker.Progress] "p") in do: (map.insert (![mapT uint64T tracker.Progress] "m") (![uint64T] "id") "$r0")) ) in - (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"Visit" #() (struct.field_ref raft "trk" (![ptrT] "r"))) "$a0");;; + (method_call #tracker.pkg_name' #"ProgressTracker'ptr" #"Visit" (struct.field_ref raft "trk" (![ptrT] "r"))) "$a0");;; return: (![mapT uint64T tracker.Progress] "m")). (* go: status.go:56:6 *) @@ -7489,9 +7489,9 @@ Definition getBasicStatus : val := "LeadTransferee" ::= "$LeadTransferee" }]) in do: ("s" <-[BasicStatus] "$r0");;; - let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"hardState" #() (![ptrT] "r")) #()) in + let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"hardState" (![ptrT] "r")) #()) in do: ((struct.field_ref BasicStatus "HardState" "s") <-[raftpb.HardState] "$r0");;; - let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"softState" #() (![ptrT] "r")) #()) in + let: "$r0" := ((method_call #pkg_name' #"raft'ptr" #"softState" (![ptrT] "r")) #()) in do: ((struct.field_ref BasicStatus "SoftState" "s") <-[SoftState] "$r0");;; let: "$r0" := (![uint64T] (struct.field_ref raftLog "applied" (![ptrT] (struct.field_ref raft "raftLog" (![ptrT] "r"))))) in do: ((struct.field_ref BasicStatus "Applied" "s") <-[uint64T] "$r0");;; @@ -7513,7 +7513,7 @@ Definition getStatus : val := (func_call #pkg_name' #"getProgressCopy"%go) "$a0") in do: ((struct.field_ref Status "Progress" "s") <-[mapT uint64T tracker.Progress] "$r0") else do: #());;; - let: "$r0" := ((method_call #tracker.pkg_name' #"Config'ptr" #"Clone" #() (struct.field_ref tracker.ProgressTracker "Config" (struct.field_ref raft "trk" (![ptrT] "r")))) #()) in + let: "$r0" := ((method_call #tracker.pkg_name' #"Config'ptr" #"Clone" (struct.field_ref tracker.ProgressTracker "Config" (struct.field_ref raft "trk" (![ptrT] "r")))) #()) in do: ((struct.field_ref Status "Config" "s") <-[tracker.Config] "$r0");;; return: (![Status] "s")). @@ -7567,7 +7567,7 @@ Definition Status__String : val := exception_do (let: "s" := (ref_ty Status "s") in let: "err" := (ref_ty error (zero_val error)) in let: "b" := (ref_ty sliceT (zero_val sliceT)) in - let: ("$ret0", "$ret1") := ((method_call #pkg_name' #"Status" #"MarshalJSON" "MarshalJSON" #() (![Status] "s")) #()) in + let: ("$ret0", "$ret1") := ((method_call #pkg_name' #"Status" #"MarshalJSON" (![Status] "s")) #()) in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: ("b" <-[sliceT] "$r0");;; @@ -7611,8 +7611,8 @@ Definition MemoryStorage__SetHardState : val := rec: "MemoryStorage__SetHardState" "ms" "st" := with_defer: (let: "ms" := (ref_ty ptrT "ms") in let: "st" := (ref_ty raftpb.HardState "st") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; - do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; + do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in "$defer" <-[funcT] (let: "$oldf" := (![funcT] "$defer") in (λ: <>, "$f" #();; @@ -7631,8 +7631,8 @@ Definition MemoryStorage__Entries : val := let: "maxSize" := (ref_ty uint64T "maxSize") in let: "hi" := (ref_ty uint64T "hi") in let: "lo" := (ref_ty uint64T "lo") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; - do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; + do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in "$defer" <-[funcT] (let: "$oldf" := (![funcT] "$defer") in (λ: <>, "$f" #();; @@ -7643,19 +7643,19 @@ Definition MemoryStorage__Entries : val := let: "$r0" := (![uint64T] (struct.field_ref raftpb.Entry "Index" (slice.elem_ref raftpb.Entry (![sliceT] (struct.field_ref MemoryStorage "ents" (![ptrT] "ms"))) #(W64 0)))) in do: ("offset" <-[uint64T] "$r0");;; (if: (![uint64T] "lo") ≤ (![uint64T] "offset") - then return: (#slice.nil, ![error] (globals.get #pkg_name' #"ErrCompacted"%go #())) + then return: (#slice.nil, ![error] (globals.get #pkg_name' #"ErrCompacted"%go)) else do: #());;; - (if: (![uint64T] "hi") > (((method_call #pkg_name' #"MemoryStorage'ptr" #"lastIndex" #() (![ptrT] "ms")) #()) + #(W64 1)) + (if: (![uint64T] "hi") > (((method_call #pkg_name' #"MemoryStorage'ptr" #"lastIndex" (![ptrT] "ms")) #()) + #(W64 1)) then do: (let: "$a0" := #"entries' hi(%d) is out of bound lastindex(%d)"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] "hi")) in - let: "$sl1" := (interface.make #""%go #"uint64"%go ((method_call #pkg_name' #"MemoryStorage'ptr" #"lastIndex" #() (![ptrT] "ms")) #())) in + let: "$sl1" := (interface.make #""%go #"uint64"%go ((method_call #pkg_name' #"MemoryStorage'ptr" #"lastIndex" (![ptrT] "ms")) #())) in slice.literal interfaceT ["$sl0"; "$sl1"])) in (interface.get "Panicf" ((func_call #pkg_name' #"getLogger"%go) #())) "$a0" "$a1") else do: #());;; (if: (let: "$a0" := (![sliceT] (struct.field_ref MemoryStorage "ents" (![ptrT] "ms"))) in slice.len "$a0") = #(W64 1) - then return: (#slice.nil, ![error] (globals.get #pkg_name' #"ErrUnavailable"%go #())) + then return: (#slice.nil, ![error] (globals.get #pkg_name' #"ErrUnavailable"%go)) else do: #());;; let: "ents" := (ref_ty sliceT (zero_val sliceT)) in let: "$r0" := (let: "$a0" := (let: "$s" := (![sliceT] (struct.field_ref MemoryStorage "ents" (![ptrT] "ms"))) in @@ -7675,8 +7675,8 @@ Definition MemoryStorage__Term : val := rec: "MemoryStorage__Term" "ms" "i" := with_defer: (let: "ms" := (ref_ty ptrT "ms") in let: "i" := (ref_ty uint64T "i") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; - do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; + do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in "$defer" <-[funcT] (let: "$oldf" := (![funcT] "$defer") in (λ: <>, "$f" #();; @@ -7687,11 +7687,11 @@ Definition MemoryStorage__Term : val := let: "$r0" := (![uint64T] (struct.field_ref raftpb.Entry "Index" (slice.elem_ref raftpb.Entry (![sliceT] (struct.field_ref MemoryStorage "ents" (![ptrT] "ms"))) #(W64 0)))) in do: ("offset" <-[uint64T] "$r0");;; (if: (![uint64T] "i") < (![uint64T] "offset") - then return: (#(W64 0), ![error] (globals.get #pkg_name' #"ErrCompacted"%go #())) + then return: (#(W64 0), ![error] (globals.get #pkg_name' #"ErrCompacted"%go)) else do: #());;; (if: int_geq ((![uint64T] "i") - (![uint64T] "offset")) (let: "$a0" := (![sliceT] (struct.field_ref MemoryStorage "ents" (![ptrT] "ms"))) in slice.len "$a0") - then return: (#(W64 0), ![error] (globals.get #pkg_name' #"ErrUnavailable"%go #())) + then return: (#(W64 0), ![error] (globals.get #pkg_name' #"ErrUnavailable"%go)) else do: #());;; return: (![uint64T] (struct.field_ref raftpb.Entry "Term" (slice.elem_ref raftpb.Entry (![sliceT] (struct.field_ref MemoryStorage "ents" (![ptrT] "ms"))) ((![uint64T] "i") - (![uint64T] "offset")))), #interface.nil)). @@ -7701,15 +7701,15 @@ Definition MemoryStorage__Term : val := Definition MemoryStorage__LastIndex : val := rec: "MemoryStorage__LastIndex" "ms" <> := with_defer: (let: "ms" := (ref_ty ptrT "ms") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; - do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; + do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in "$defer" <-[funcT] (let: "$oldf" := (![funcT] "$defer") in (λ: <>, "$f" #();; "$oldf" #() )));;; do: ((struct.field_ref inMemStorageCallStats "lastIndex" (struct.field_ref MemoryStorage "callStats" (![ptrT] "ms"))) <-[intT] ((![intT] (struct.field_ref inMemStorageCallStats "lastIndex" (struct.field_ref MemoryStorage "callStats" (![ptrT] "ms")))) + #(W64 1)));;; - return: ((method_call #pkg_name' #"MemoryStorage'ptr" #"lastIndex" #() (![ptrT] "ms")) #(), #interface.nil)). + return: ((method_call #pkg_name' #"MemoryStorage'ptr" #"lastIndex" (![ptrT] "ms")) #(), #interface.nil)). (* go: storage.go:181:26 *) Definition MemoryStorage__lastIndex : val := @@ -7724,15 +7724,15 @@ Definition MemoryStorage__lastIndex : val := Definition MemoryStorage__FirstIndex : val := rec: "MemoryStorage__FirstIndex" "ms" <> := with_defer: (let: "ms" := (ref_ty ptrT "ms") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; - do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; + do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in "$defer" <-[funcT] (let: "$oldf" := (![funcT] "$defer") in (λ: <>, "$f" #();; "$oldf" #() )));;; do: ((struct.field_ref inMemStorageCallStats "firstIndex" (struct.field_ref MemoryStorage "callStats" (![ptrT] "ms"))) <-[intT] ((![intT] (struct.field_ref inMemStorageCallStats "firstIndex" (struct.field_ref MemoryStorage "callStats" (![ptrT] "ms")))) + #(W64 1)));;; - return: ((method_call #pkg_name' #"MemoryStorage'ptr" #"firstIndex" #() (![ptrT] "ms")) #(), #interface.nil)). + return: ((method_call #pkg_name' #"MemoryStorage'ptr" #"firstIndex" (![ptrT] "ms")) #(), #interface.nil)). (* go: storage.go:193:26 *) Definition MemoryStorage__firstIndex : val := @@ -7746,8 +7746,8 @@ Definition MemoryStorage__firstIndex : val := Definition MemoryStorage__Snapshot : val := rec: "MemoryStorage__Snapshot" "ms" <> := with_defer: (let: "ms" := (ref_ty ptrT "ms") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; - do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; + do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in "$defer" <-[funcT] (let: "$oldf" := (![funcT] "$defer") in (λ: <>, "$f" #();; @@ -7764,8 +7764,8 @@ Definition MemoryStorage__ApplySnapshot : val := rec: "MemoryStorage__ApplySnapshot" "ms" "snap" := with_defer: (let: "ms" := (ref_ty ptrT "ms") in let: "snap" := (ref_ty raftpb.Snapshot "snap") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; - do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; + do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in "$defer" <-[funcT] (let: "$oldf" := (![funcT] "$defer") in (λ: <>, "$f" #();; @@ -7778,7 +7778,7 @@ Definition MemoryStorage__ApplySnapshot : val := let: "$r0" := (![uint64T] (struct.field_ref raftpb.SnapshotMetadata "Index" (struct.field_ref raftpb.Snapshot "Metadata" "snap"))) in do: ("snapIndex" <-[uint64T] "$r0");;; (if: (![uint64T] "msIndex") ≥ (![uint64T] "snapIndex") - then return: (![error] (globals.get #pkg_name' #"ErrSnapOutOfDate"%go #())) + then return: (![error] (globals.get #pkg_name' #"ErrSnapOutOfDate"%go)) else do: #());;; let: "$r0" := (![raftpb.Snapshot] "snap") in do: ((struct.field_ref MemoryStorage "snapshot" (![ptrT] "ms")) <-[raftpb.Snapshot] "$r0");;; @@ -7806,8 +7806,8 @@ Definition MemoryStorage__CreateSnapshot : val := let: "data" := (ref_ty sliceT "data") in let: "cs" := (ref_ty ptrT "cs") in let: "i" := (ref_ty uint64T "i") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; - do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; + do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in "$defer" <-[funcT] (let: "$oldf" := (![funcT] "$defer") in (λ: <>, "$f" #();; @@ -7818,16 +7818,16 @@ Definition MemoryStorage__CreateSnapshot : val := return: (struct.make raftpb.Snapshot [{ "Data" ::= zero_val sliceT; "Metadata" ::= zero_val raftpb.SnapshotMetadata - }], ![error] (globals.get #pkg_name' #"ErrSnapOutOfDate"%go #())) + }], ![error] (globals.get #pkg_name' #"ErrSnapOutOfDate"%go)) else do: #());;; let: "offset" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := (![uint64T] (struct.field_ref raftpb.Entry "Index" (slice.elem_ref raftpb.Entry (![sliceT] (struct.field_ref MemoryStorage "ents" (![ptrT] "ms"))) #(W64 0)))) in do: ("offset" <-[uint64T] "$r0");;; - (if: (![uint64T] "i") > ((method_call #pkg_name' #"MemoryStorage'ptr" #"lastIndex" #() (![ptrT] "ms")) #()) + (if: (![uint64T] "i") > ((method_call #pkg_name' #"MemoryStorage'ptr" #"lastIndex" (![ptrT] "ms")) #()) then do: (let: "$a0" := #"snapshot %d is out of bound lastindex(%d)"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] "i")) in - let: "$sl1" := (interface.make #""%go #"uint64"%go ((method_call #pkg_name' #"MemoryStorage'ptr" #"lastIndex" #() (![ptrT] "ms")) #())) in + let: "$sl1" := (interface.make #""%go #"uint64"%go ((method_call #pkg_name' #"MemoryStorage'ptr" #"lastIndex" (![ptrT] "ms")) #())) in slice.literal interfaceT ["$sl0"; "$sl1"])) in (interface.get "Panicf" ((func_call #pkg_name' #"getLogger"%go) #())) "$a0" "$a1") else do: #());;; @@ -7853,8 +7853,8 @@ Definition MemoryStorage__Compact : val := rec: "MemoryStorage__Compact" "ms" "compactIndex" := with_defer: (let: "ms" := (ref_ty ptrT "ms") in let: "compactIndex" := (ref_ty uint64T "compactIndex") in - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; - do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; + do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in "$defer" <-[funcT] (let: "$oldf" := (![funcT] "$defer") in (λ: <>, "$f" #();; @@ -7864,13 +7864,13 @@ Definition MemoryStorage__Compact : val := let: "$r0" := (![uint64T] (struct.field_ref raftpb.Entry "Index" (slice.elem_ref raftpb.Entry (![sliceT] (struct.field_ref MemoryStorage "ents" (![ptrT] "ms"))) #(W64 0)))) in do: ("offset" <-[uint64T] "$r0");;; (if: (![uint64T] "compactIndex") ≤ (![uint64T] "offset") - then return: (![error] (globals.get #pkg_name' #"ErrCompacted"%go #())) + then return: (![error] (globals.get #pkg_name' #"ErrCompacted"%go)) else do: #());;; - (if: (![uint64T] "compactIndex") > ((method_call #pkg_name' #"MemoryStorage'ptr" #"lastIndex" #() (![ptrT] "ms")) #()) + (if: (![uint64T] "compactIndex") > ((method_call #pkg_name' #"MemoryStorage'ptr" #"lastIndex" (![ptrT] "ms")) #()) then do: (let: "$a0" := #"compact %d is out of bound lastindex(%d)"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] "compactIndex")) in - let: "$sl1" := (interface.make #""%go #"uint64"%go ((method_call #pkg_name' #"MemoryStorage'ptr" #"lastIndex" #() (![ptrT] "ms")) #())) in + let: "$sl1" := (interface.make #""%go #"uint64"%go ((method_call #pkg_name' #"MemoryStorage'ptr" #"lastIndex" (![ptrT] "ms")) #())) in slice.literal interfaceT ["$sl0"; "$sl1"])) in (interface.get "Panicf" ((func_call #pkg_name' #"getLogger"%go) #())) "$a0" "$a1") else do: #());;; @@ -7907,15 +7907,15 @@ Definition MemoryStorage__Append : val := slice.len "$a0") = #(W64 0) then return: (#interface.nil) else do: #());;; - do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; - do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in + do: ((method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) #());;; + do: (let: "$f" := (method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (struct.field_ref MemoryStorage "Mutex" (![ptrT] "ms"))) in "$defer" <-[funcT] (let: "$oldf" := (![funcT] "$defer") in (λ: <>, "$f" #();; "$oldf" #() )));;; let: "first" := (ref_ty uint64T (zero_val uint64T)) in - let: "$r0" := ((method_call #pkg_name' #"MemoryStorage'ptr" #"firstIndex" #() (![ptrT] "ms")) #()) in + let: "$r0" := ((method_call #pkg_name' #"MemoryStorage'ptr" #"firstIndex" (![ptrT] "ms")) #()) in do: ("first" <-[uint64T] "$r0");;; let: "last" := (ref_ty uint64T (zero_val uint64T)) in let: "$r0" := (((![uint64T] (struct.field_ref raftpb.Entry "Index" (slice.elem_ref raftpb.Entry (![sliceT] "entries") #(W64 0)))) + (let: "$a0" := (![sliceT] "entries") in @@ -7952,7 +7952,7 @@ Definition MemoryStorage__Append : val := do: ((struct.field_ref MemoryStorage "ents" (![ptrT] "ms")) <-[sliceT] "$r0") else do: (let: "$a0" := #"missing log entry [last: %d, append at: %d]"%go in - let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go ((method_call #pkg_name' #"MemoryStorage'ptr" #"lastIndex" #() (![ptrT] "ms")) #())) in + let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go ((method_call #pkg_name' #"MemoryStorage'ptr" #"lastIndex" (![ptrT] "ms")) #())) in let: "$sl1" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raftpb.Entry "Index" (slice.elem_ref raftpb.Entry (![sliceT] "entries") #(W64 0))))) in slice.literal interfaceT ["$sl0"; "$sl1"])) in (interface.get "Panicf" ((func_call #pkg_name' #"getLogger"%go) #())) "$a0" "$a1")));;; @@ -8042,7 +8042,7 @@ Definition StateType__MarshalJSON : val := rec: "StateType__MarshalJSON" "st" <> := exception_do (let: "st" := (ref_ty StateType "st") in return: (string.to_bytes (let: "$a0" := #"%q"%go in - let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"string"%go ((method_call #pkg_name' #"StateType" #"String" "String" #() (![StateType] "st")) #())) in + let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"string"%go ((method_call #pkg_name' #"StateType" #"String" (![StateType] "st")) #())) in slice.literal interfaceT ["$sl0"])) in (func_call #fmt.pkg_name' #"Sprintf"%go) "$a0" "$a1"), #interface.nil)). @@ -8062,7 +8062,7 @@ Definition IsLocalMsg : val := rec: "IsLocalMsg" "msgt" := exception_do (let: "msgt" := (ref_ty raftpb.MessageType "msgt") in return: (let: "$a0" := (![raftpb.MessageType] "msgt") in - let: "$a1" := (let: "$a" := (globals.get #pkg_name' #"isLocalMsg"%go #()) in + let: "$a1" := (let: "$a" := (globals.get #pkg_name' #"isLocalMsg"%go) in array.slice "$a" #(W64 0) (array.len (arrayT 23 boolT))) in (func_call #pkg_name' #"isMsgInArray"%go) "$a0" "$a1")). @@ -8071,7 +8071,7 @@ Definition IsResponseMsg : val := rec: "IsResponseMsg" "msgt" := exception_do (let: "msgt" := (ref_ty raftpb.MessageType "msgt") in return: (let: "$a0" := (![raftpb.MessageType] "msgt") in - let: "$a1" := (let: "$a" := (globals.get #pkg_name' #"isResponseMsg"%go #()) in + let: "$a1" := (let: "$a" := (globals.get #pkg_name' #"isResponseMsg"%go) in array.slice "$a" #(W64 0) (array.len (arrayT 23 boolT))) in (func_call #pkg_name' #"isMsgInArray"%go) "$a0" "$a1")). @@ -8123,7 +8123,7 @@ Definition DescribeHardState : val := let: "$a2" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref raftpb.HardState "Commit" "hs"))) in slice.literal interfaceT ["$sl0"])) in (func_call #fmt.pkg_name' #"Fprintf"%go) "$a0" "$a1" "$a2");;; - return: ((method_call #strings.pkg_name' #"Builder'ptr" #"String" #() "buf") #())). + return: ((method_call #strings.pkg_name' #"Builder'ptr" #"String" "buf") #())). (* go: util.go:91:6 *) Definition DescribeSoftState : val := @@ -8140,10 +8140,10 @@ Definition DescribeConfState : val := rec: "DescribeConfState" "state" := exception_do (let: "state" := (ref_ty raftpb.ConfState "state") in return: (let: "$a0" := #"Voters:%v VotersOutgoing:%v Learners:%v LearnersNext:%v AutoLeave:%v"%go in - let: "$a1" := ((let: "$sl0" := (interface.make slice' (![sliceT] (struct.field_ref raftpb.ConfState "Voters" "state"))) in - let: "$sl1" := (interface.make slice' (![sliceT] (struct.field_ref raftpb.ConfState "VotersOutgoing" "state"))) in - let: "$sl2" := (interface.make slice' (![sliceT] (struct.field_ref raftpb.ConfState "Learners" "state"))) in - let: "$sl3" := (interface.make slice' (![sliceT] (struct.field_ref raftpb.ConfState "LearnersNext" "state"))) in + let: "$a1" := ((let: "$sl0" := (interface.make #"slice'"%go (![sliceT] (struct.field_ref raftpb.ConfState "Voters" "state"))) in + let: "$sl1" := (interface.make #"slice'"%go (![sliceT] (struct.field_ref raftpb.ConfState "VotersOutgoing" "state"))) in + let: "$sl2" := (interface.make #"slice'"%go (![sliceT] (struct.field_ref raftpb.ConfState "Learners" "state"))) in + let: "$sl3" := (interface.make #"slice'"%go (![sliceT] (struct.field_ref raftpb.ConfState "LearnersNext" "state"))) in let: "$sl4" := (interface.make #""%go #"bool"%go (![boolT] (struct.field_ref raftpb.ConfState "AutoLeave" "state"))) in slice.literal interfaceT ["$sl0"; "$sl1"; "$sl2"; "$sl3"; "$sl4"])) in (func_call #fmt.pkg_name' #"Sprintf"%go) "$a0" "$a1")). @@ -8179,7 +8179,7 @@ Definition DescribeReady : val := slice.literal interfaceT ["$sl0"])) in (func_call #fmt.pkg_name' #"Fprint"%go) "$a0" "$a1");;; do: (let: "$a0" := #(W8 10) in - (method_call #strings.pkg_name' #"Builder'ptr" #"WriteByte" #() "buf") "$a0") + (method_call #strings.pkg_name' #"Builder'ptr" #"WriteByte" "buf") "$a0") else do: #());;; (if: (~ (let: "$a0" := (![raftpb.HardState] (struct.field_ref Ready "HardState" "rd")) in (func_call #pkg_name' #"IsEmptyHardState"%go) "$a0")) @@ -8191,7 +8191,7 @@ Definition DescribeReady : val := slice.literal interfaceT ["$sl0"])) in (func_call #fmt.pkg_name' #"Fprintf"%go) "$a0" "$a1" "$a2");;; do: (let: "$a0" := #(W8 10) in - (method_call #strings.pkg_name' #"Builder'ptr" #"WriteByte" #() "buf") "$a0") + (method_call #strings.pkg_name' #"Builder'ptr" #"WriteByte" "buf") "$a0") else do: #());;; (if: int_gt (let: "$a0" := (![sliceT] (struct.field_ref Ready "ReadStates" "rd")) in slice.len "$a0") #(W64 0) @@ -8199,7 +8199,7 @@ Definition DescribeReady : val := do: (let: "$a0" := (interface.make #strings.pkg_name' #"Builder'ptr" "buf") in let: "$a1" := #"ReadStates %v "%go in - let: "$a2" := ((let: "$sl0" := (interface.make slice' (![sliceT] (struct.field_ref Ready "ReadStates" "rd"))) in + let: "$a2" := ((let: "$sl0" := (interface.make #"slice'"%go (![sliceT] (struct.field_ref Ready "ReadStates" "rd"))) in slice.literal interfaceT ["$sl0"])) in (func_call #fmt.pkg_name' #"Fprintf"%go) "$a0" "$a1" "$a2") else do: #());;; @@ -8208,7 +8208,7 @@ Definition DescribeReady : val := then do: (let: "$a0" := #"Entries: "%go in - (method_call #strings.pkg_name' #"Builder'ptr" #"WriteString" #() "buf") "$a0");;; + (method_call #strings.pkg_name' #"Builder'ptr" #"WriteString" "buf") "$a0");;; do: (let: "$a0" := (interface.make #strings.pkg_name' #"Builder'ptr" "buf") in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"string"%go (let: "$a0" := (![sliceT] (struct.field_ref Ready "Entries" "rd")) in let: "$a1" := (![EntryFormatter] "f") in @@ -8232,7 +8232,7 @@ Definition DescribeReady : val := then do: (let: "$a0" := #"CommittedEntries: "%go in - (method_call #strings.pkg_name' #"Builder'ptr" #"WriteString" #() "buf") "$a0");;; + (method_call #strings.pkg_name' #"Builder'ptr" #"WriteString" "buf") "$a0");;; do: (let: "$a0" := (interface.make #strings.pkg_name' #"Builder'ptr" "buf") in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"string"%go (let: "$a0" := (![sliceT] (struct.field_ref Ready "CommittedEntries" "rd")) in let: "$a1" := (![EntryFormatter] "f") in @@ -8245,7 +8245,7 @@ Definition DescribeReady : val := then do: (let: "$a0" := #"Messages: "%go in - (method_call #strings.pkg_name' #"Builder'ptr" #"WriteString" #() "buf") "$a0");;; + (method_call #strings.pkg_name' #"Builder'ptr" #"WriteString" "buf") "$a0");;; do: (let: "$range" := (![sliceT] (struct.field_ref Ready "Messages" "rd")) in slice.for_range raftpb.Message "$range" (λ: <> "msg", let: "msg" := ref_ty raftpb.Message "msg" in @@ -8256,14 +8256,14 @@ Definition DescribeReady : val := slice.literal interfaceT ["$sl0"])) in (func_call #fmt.pkg_name' #"Fprint"%go) "$a0" "$a1");;; do: (let: "$a0" := #(W8 10) in - (method_call #strings.pkg_name' #"Builder'ptr" #"WriteByte" #() "buf") "$a0"))) + (method_call #strings.pkg_name' #"Builder'ptr" #"WriteByte" "buf") "$a0"))) else do: #());;; - (if: int_gt ((method_call #strings.pkg_name' #"Builder'ptr" #"Len" #() "buf") #()) #(W64 0) + (if: int_gt ((method_call #strings.pkg_name' #"Builder'ptr" #"Len" "buf") #()) #(W64 0) then return: (let: "$a0" := #"Ready MustSync=%t: %s"%go in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"bool"%go (![boolT] (struct.field_ref Ready "MustSync" "rd"))) in - let: "$sl1" := (interface.make #""%go #"string"%go ((method_call #strings.pkg_name' #"Builder'ptr" #"String" #() "buf") #())) in + let: "$sl1" := (interface.make #""%go #"string"%go ((method_call #strings.pkg_name' #"Builder'ptr" #"String" "buf") #())) in slice.literal interfaceT ["$sl0"; "$sl1"])) in (func_call #fmt.pkg_name' #"Sprintf"%go) "$a0" "$a1") else do: #());;; @@ -8358,7 +8358,7 @@ Definition describeMessageWithIndent : val := do: (let: "$a0" := (let: "$a0" := (![raftpb.Entry] "e") in let: "$a1" := (![EntryFormatter] "f") in (func_call #pkg_name' #"DescribeEntry"%go) "$a0" "$a1") in - (method_call #bytes.pkg_name' #"Buffer'ptr" #"WriteString" #() "buf") "$a0")));;; + (method_call #bytes.pkg_name' #"Buffer'ptr" #"WriteString" "buf") "$a0")));;; do: (let: "$a0" := (interface.make #bytes.pkg_name' #"Buffer'ptr" "buf") in let: "$a1" := #" %s]"%go in @@ -8393,12 +8393,12 @@ Definition describeMessageWithIndent : val := let: "m" := ref_ty raftpb.Message "m" in do: (let: "$a0" := #" "%go in - (method_call #bytes.pkg_name' #"Buffer'ptr" #"WriteString" #() "buf") "$a0");;; + (method_call #bytes.pkg_name' #"Buffer'ptr" #"WriteString" "buf") "$a0");;; do: (let: "$a0" := (let: "$a0" := ((![stringT] "indent") + #" "%go) in let: "$a1" := (![raftpb.Message] "m") in let: "$a2" := (![EntryFormatter] "f") in (func_call #pkg_name' #"describeMessageWithIndent"%go) "$a0" "$a1" "$a2") in - (method_call #bytes.pkg_name' #"Buffer'ptr" #"WriteString" #() "buf") "$a0")));;; + (method_call #bytes.pkg_name' #"Buffer'ptr" #"WriteString" "buf") "$a0")));;; do: (let: "$a0" := (interface.make #bytes.pkg_name' #"Buffer'ptr" "buf") in let: "$a1" := #" %s]"%go in @@ -8406,7 +8406,7 @@ Definition describeMessageWithIndent : val := slice.literal interfaceT ["$sl0"])) in (func_call #fmt.pkg_name' #"Fprintf"%go) "$a0" "$a1" "$a2") else do: #());;; - return: ((method_call #bytes.pkg_name' #"Buffer'ptr" #"String" #() "buf") #())). + return: ((method_call #bytes.pkg_name' #"Buffer'ptr" #"String" "buf") #())). (* go: util.go:191:6 *) Definition describeTarget : val := @@ -8440,7 +8440,7 @@ Definition DescribeEntry : val := let: "$r0" := (λ: "data", exception_do (let: "data" := (ref_ty sliceT "data") in return: (let: "$a0" := #"%q"%go in - let: "$a1" := ((let: "$sl0" := (interface.make slice' (![sliceT] "data")) in + let: "$a1" := ((let: "$sl0" := (interface.make #"slice'"%go (![sliceT] "data")) in slice.literal interfaceT ["$sl0"])) in (func_call #fmt.pkg_name' #"Sprintf"%go) "$a0" "$a1")) ) in @@ -8466,7 +8466,7 @@ Definition DescribeEntry : val := let: "cc" := (ref_ty raftpb.ConfChange (zero_val raftpb.ConfChange)) in (let: "err" := (ref_ty error (zero_val error)) in let: "$r0" := (let: "$a0" := (![sliceT] (struct.field_ref raftpb.Entry "Data" "e")) in - (method_call #raftpb.pkg_name' #"ConfChange'ptr" #"Unmarshal" #() "cc") "$a0") in + (method_call #raftpb.pkg_name' #"ConfChange'ptr" #"Unmarshal" "cc") "$a0") in do: ("err" <-[error] "$r0");;; (if: (![error] "err") ≠ #interface.nil then @@ -8482,7 +8482,7 @@ Definition DescribeEntry : val := let: "cc" := (ref_ty raftpb.ConfChangeV2 (zero_val raftpb.ConfChangeV2)) in (let: "err" := (ref_ty error (zero_val error)) in let: "$r0" := (let: "$a0" := (![sliceT] (struct.field_ref raftpb.Entry "Data" "e")) in - (method_call #raftpb.pkg_name' #"ConfChangeV2'ptr" #"Unmarshal" #() "cc") "$a0") in + (method_call #raftpb.pkg_name' #"ConfChangeV2'ptr" #"Unmarshal" "cc") "$a0") in do: ("err" <-[error] "$r0");;; (if: (![error] "err") ≠ #interface.nil then @@ -8522,12 +8522,12 @@ Definition DescribeEntries : val := let: "$a1" := (![EntryFormatter] "f") in (func_call #pkg_name' #"DescribeEntry"%go) "$a0" "$a1") + #" "%go) in - (method_call #bytes.pkg_name' #"Buffer'ptr" #"WriteString" #() "buf") "$a0") in + (method_call #bytes.pkg_name' #"Buffer'ptr" #"WriteString" "buf") "$a0") in let: "$r0" := "$ret0" in let: "$r1" := "$ret1" in do: "$r0";;; do: "$r1"));;; - return: ((method_call #bytes.pkg_name' #"Buffer'ptr" #"String" #() "buf") #())). + return: ((method_call #bytes.pkg_name' #"Buffer'ptr" #"String" "buf") #())). (* go: util.go:256:6 *) Definition entsSize : val := @@ -8537,7 +8537,7 @@ Definition entsSize : val := do: (let: "$range" := (![sliceT] "ents") in slice.for_range raftpb.Entry "$range" (λ: <> "ent", let: "ent" := ref_ty raftpb.Entry "ent" in - do: ("size" <-[entryEncodingSize] ((![entryEncodingSize] "size") + ((method_call #raftpb.pkg_name' #"Entry'ptr" #"Size" #() "ent") #())))));;; + do: ("size" <-[entryEncodingSize] ((![entryEncodingSize] "size") + ((method_call #raftpb.pkg_name' #"Entry'ptr" #"Size" "ent") #())))));;; return: (![entryEncodingSize] "size")). (* limitSize returns the longest prefix of the given entries slice, such that @@ -8555,14 +8555,14 @@ Definition limitSize : val := then return: (![sliceT] "ents") else do: #());;; let: "size" := (ref_ty intT (zero_val intT)) in - let: "$r0" := ((method_call #raftpb.pkg_name' #"Entry'ptr" #"Size" #() (slice.elem_ref raftpb.Entry (![sliceT] "ents") #(W64 0))) #()) in + let: "$r0" := ((method_call #raftpb.pkg_name' #"Entry'ptr" #"Size" (slice.elem_ref raftpb.Entry (![sliceT] "ents") #(W64 0))) #()) in do: ("size" <-[intT] "$r0");;; (let: "limit" := (ref_ty intT (zero_val intT)) in let: "$r0" := #(W64 1) in do: ("limit" <-[intT] "$r0");;; (for: (λ: <>, int_lt (![intT] "limit") (let: "$a0" := (![sliceT] "ents") in slice.len "$a0")); (λ: <>, do: ("limit" <-[intT] ((![intT] "limit") + #(W64 1)))) := λ: <>, - do: ("size" <-[intT] ((![intT] "size") + ((method_call #raftpb.pkg_name' #"Entry'ptr" #"Size" #() (slice.elem_ref raftpb.Entry (![sliceT] "ents") (![intT] "limit"))) #())));;; + do: ("size" <-[intT] ((![intT] "size") + ((method_call #raftpb.pkg_name' #"Entry'ptr" #"Size" (slice.elem_ref raftpb.Entry (![sliceT] "ents") (![intT] "limit"))) #())));;; (if: (![intT] "size") > (![entryEncodingSize] "maxSize") then return: (let: "$s" := (![sliceT] "ents") in @@ -8601,7 +8601,7 @@ Definition assertConfStatesEquivalent : val := let: "l" := (ref_ty Logger "l") in let: "err" := (ref_ty error (zero_val error)) in let: "$r0" := (let: "$a0" := (![raftpb.ConfState] "cs2") in - (method_call #raftpb.pkg_name' #"ConfState" #"Equivalent" "Equivalent" #() (![raftpb.ConfState] "cs1")) "$a0") in + (method_call #raftpb.pkg_name' #"ConfState" #"Equivalent" (![raftpb.ConfState] "cs1")) "$a0") in do: ("err" <-[error] "$r0");;; (if: (![error] "err") = #interface.nil then return: (#()) @@ -8652,186 +8652,186 @@ Definition vars' : list (go_string * go_type) := [("defaultLogger"%go, ptrT); (" Definition functions' : list (go_string * val) := [("newLog"%go, newLog); ("newLogWithSize"%go, newLogWithSize); ("SetLogger"%go, SetLogger); ("ResetDefaultLogger"%go, ResetDefaultLogger); ("getLogger"%go, getLogger); ("header"%go, header); ("isHardStateEqual"%go, isHardStateEqual); ("IsEmptyHardState"%go, IsEmptyHardState); ("IsEmptySnap"%go, IsEmptySnap); ("setupNode"%go, setupNode); ("StartNode"%go, StartNode); ("RestartNode"%go, RestartNode); ("newNode"%go, newNode); ("confChangeToMsg"%go, confChangeToMsg); ("newRaft"%go, newRaft); ("stepLeader"%go, stepLeader); ("stepCandidate"%go, stepCandidate); ("stepFollower"%go, stepFollower); ("logSliceFromMsgApp"%go, logSliceFromMsgApp); ("releasePendingReadIndexMessages"%go, releasePendingReadIndexMessages); ("sendMsgReadIndexResponse"%go, sendMsgReadIndexResponse); ("newTestConfig"%go, newTestConfig); ("entsWithConfig"%go, entsWithConfig); ("preVoteConfig"%go, preVoteConfig); ("idsBySize"%go, idsBySize); ("withPeers"%go, withPeers); ("newTestMemoryStorage"%go, newTestMemoryStorage); ("newNetworkWithConfigInit"%go, newNetworkWithConfigInit); ("testLeaderElection2"%go, testLeaderElection2); ("NewRawNode"%go, NewRawNode); ("MustSync"%go, MustSync); ("needStorageAppendMsg"%go, needStorageAppendMsg); ("needStorageAppendRespMsg"%go, needStorageAppendRespMsg); ("newStorageAppendMsg"%go, newStorageAppendMsg); ("newStorageAppendRespMsg"%go, newStorageAppendRespMsg); ("needStorageApplyMsg"%go, needStorageApplyMsg); ("needStorageApplyRespMsg"%go, needStorageApplyRespMsg); ("newStorageApplyMsg"%go, newStorageApplyMsg); ("newStorageApplyRespMsg"%go, newStorageApplyRespMsg); ("newReadOnly"%go, newReadOnly); ("traceInitState"%go, traceInitState); ("traceReady"%go, traceReady); ("traceCommit"%go, traceCommit); ("traceReplicate"%go, traceReplicate); ("traceBecomeFollower"%go, traceBecomeFollower); ("traceBecomeCandidate"%go, traceBecomeCandidate); ("traceBecomeLeader"%go, traceBecomeLeader); ("traceChangeConfEvent"%go, traceChangeConfEvent); ("traceConfChangeEvent"%go, traceConfChangeEvent); ("traceSendMessage"%go, traceSendMessage); ("traceReceiveMessage"%go, traceReceiveMessage); ("getProgressCopy"%go, getProgressCopy); ("getBasicStatus"%go, getBasicStatus); ("getStatus"%go, getStatus); ("NewMemoryStorage"%go, NewMemoryStorage); ("pbEntryID"%go, pbEntryID); ("isMsgInArray"%go, isMsgInArray); ("IsLocalMsg"%go, IsLocalMsg); ("IsResponseMsg"%go, IsResponseMsg); ("IsLocalMsgTarget"%go, IsLocalMsgTarget); ("voteRespMsgType"%go, voteRespMsgType); ("DescribeHardState"%go, DescribeHardState); ("DescribeSoftState"%go, DescribeSoftState); ("DescribeConfState"%go, DescribeConfState); ("DescribeSnapshot"%go, DescribeSnapshot); ("DescribeReady"%go, DescribeReady); ("DescribeMessage"%go, DescribeMessage); ("describeMessageWithIndent"%go, describeMessageWithIndent); ("describeTarget"%go, describeTarget); ("DescribeEntry"%go, DescribeEntry); ("DescribeEntries"%go, DescribeEntries); ("entsSize"%go, entsSize); ("limitSize"%go, limitSize); ("payloadSize"%go, payloadSize); ("payloadsSize"%go, payloadsSize); ("assertConfStatesEquivalent"%go, assertConfStatesEquivalent); ("extend"%go, extend)]. Definition msets' : list (go_string * (list (go_string * val))) := [("raftLog"%go, []); ("raftLog'ptr"%go, [("String"%go, raftLog__String); ("acceptApplying"%go, raftLog__acceptApplying); ("acceptUnstable"%go, raftLog__acceptUnstable); ("allEntries"%go, raftLog__allEntries); ("append"%go, raftLog__append); ("appliedTo"%go, raftLog__appliedTo); ("commitTo"%go, raftLog__commitTo); ("entries"%go, raftLog__entries); ("findConflict"%go, raftLog__findConflict); ("findConflictByTerm"%go, raftLog__findConflictByTerm); ("firstIndex"%go, raftLog__firstIndex); ("hasNextCommittedEnts"%go, raftLog__hasNextCommittedEnts); ("hasNextOrInProgressSnapshot"%go, raftLog__hasNextOrInProgressSnapshot); ("hasNextOrInProgressUnstableEnts"%go, raftLog__hasNextOrInProgressUnstableEnts); ("hasNextUnstableEnts"%go, raftLog__hasNextUnstableEnts); ("hasNextUnstableSnapshot"%go, raftLog__hasNextUnstableSnapshot); ("isUpToDate"%go, raftLog__isUpToDate); ("lastEntryID"%go, raftLog__lastEntryID); ("lastIndex"%go, raftLog__lastIndex); ("matchTerm"%go, raftLog__matchTerm); ("maxAppliableIndex"%go, raftLog__maxAppliableIndex); ("maybeAppend"%go, raftLog__maybeAppend); ("maybeCommit"%go, raftLog__maybeCommit); ("mustCheckOutOfBounds"%go, raftLog__mustCheckOutOfBounds); ("nextCommittedEnts"%go, raftLog__nextCommittedEnts); ("nextUnstableEnts"%go, raftLog__nextUnstableEnts); ("nextUnstableSnapshot"%go, raftLog__nextUnstableSnapshot); ("restore"%go, raftLog__restore); ("scan"%go, raftLog__scan); ("slice"%go, raftLog__slice); ("snapshot"%go, raftLog__snapshot); ("stableSnapTo"%go, raftLog__stableSnapTo); ("stableTo"%go, raftLog__stableTo); ("term"%go, raftLog__term); ("zeroTermOnOutOfBounds"%go, raftLog__zeroTermOnOutOfBounds)]); ("unstable"%go, []); ("unstable'ptr"%go, [("acceptInProgress"%go, unstable__acceptInProgress); ("maybeFirstIndex"%go, unstable__maybeFirstIndex); ("maybeLastIndex"%go, unstable__maybeLastIndex); ("maybeTerm"%go, unstable__maybeTerm); ("mustCheckOutOfBounds"%go, unstable__mustCheckOutOfBounds); ("nextEntries"%go, unstable__nextEntries); ("nextSnapshot"%go, unstable__nextSnapshot); ("restore"%go, unstable__restore); ("shrinkEntriesArray"%go, unstable__shrinkEntriesArray); ("slice"%go, unstable__slice); ("stableSnapTo"%go, unstable__stableSnapTo); ("stableTo"%go, unstable__stableTo); ("truncateAndAppend"%go, unstable__truncateAndAppend)]); ("DefaultLogger"%go, [("Fatalln"%go, (λ: "$recv", - method_call #log.pkg_name' #"Logger'ptr" #"Fatalln" #() (struct.field_get DefaultLogger "Logger" "$recv") - )); ("Flags"%go, (λ: "$recv", - method_call #log.pkg_name' #"Logger'ptr" #"Flags" #() (struct.field_get DefaultLogger "Logger" "$recv") - )); ("Output"%go, (λ: "$recv", - method_call #log.pkg_name' #"Logger'ptr" #"Output" #() (struct.field_get DefaultLogger "Logger" "$recv") - )); ("Panicln"%go, (λ: "$recv", - method_call #log.pkg_name' #"Logger'ptr" #"Panicln" #() (struct.field_get DefaultLogger "Logger" "$recv") - )); ("Prefix"%go, (λ: "$recv", - method_call #log.pkg_name' #"Logger'ptr" #"Prefix" #() (struct.field_get DefaultLogger "Logger" "$recv") - )); ("Print"%go, (λ: "$recv", - method_call #log.pkg_name' #"Logger'ptr" #"Print" #() (struct.field_get DefaultLogger "Logger" "$recv") - )); ("Printf"%go, (λ: "$recv", - method_call #log.pkg_name' #"Logger'ptr" #"Printf" #() (struct.field_get DefaultLogger "Logger" "$recv") - )); ("Println"%go, (λ: "$recv", - method_call #log.pkg_name' #"Logger'ptr" #"Println" #() (struct.field_get DefaultLogger "Logger" "$recv") - )); ("SetFlags"%go, (λ: "$recv", - method_call #log.pkg_name' #"Logger'ptr" #"SetFlags" #() (struct.field_get DefaultLogger "Logger" "$recv") - )); ("SetOutput"%go, (λ: "$recv", - method_call #log.pkg_name' #"Logger'ptr" #"SetOutput" #() (struct.field_get DefaultLogger "Logger" "$recv") - )); ("SetPrefix"%go, (λ: "$recv", - method_call #log.pkg_name' #"Logger'ptr" #"SetPrefix" #() (struct.field_get DefaultLogger "Logger" "$recv") - )); ("Writer"%go, (λ: "$recv", - method_call #log.pkg_name' #"Logger'ptr" #"Writer" #() (struct.field_get DefaultLogger "Logger" "$recv") - )); ("output"%go, (λ: "$recv", - method_call #log.pkg_name' #"Logger'ptr" #"output" #() (struct.field_get DefaultLogger "Logger" "$recv") - ))]); ("DefaultLogger'ptr"%go, [("Debug"%go, DefaultLogger__Debug); ("Debugf"%go, DefaultLogger__Debugf); ("EnableDebug"%go, DefaultLogger__EnableDebug); ("EnableTimestamps"%go, DefaultLogger__EnableTimestamps); ("Error"%go, DefaultLogger__Error); ("Errorf"%go, DefaultLogger__Errorf); ("Fatal"%go, DefaultLogger__Fatal); ("Fatalf"%go, DefaultLogger__Fatalf); ("Fatalln"%go, (λ: "$recvAddr", - method_call #log.pkg_name' #"Logger'ptr" #"Fatalln" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) - )); ("Flags"%go, (λ: "$recvAddr", - method_call #log.pkg_name' #"Logger'ptr" #"Flags" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) - )); ("Info"%go, DefaultLogger__Info); ("Infof"%go, DefaultLogger__Infof); ("Output"%go, (λ: "$recvAddr", - method_call #log.pkg_name' #"Logger'ptr" #"Output" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) - )); ("Panic"%go, DefaultLogger__Panic); ("Panicf"%go, DefaultLogger__Panicf); ("Panicln"%go, (λ: "$recvAddr", - method_call #log.pkg_name' #"Logger'ptr" #"Panicln" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) - )); ("Prefix"%go, (λ: "$recvAddr", - method_call #log.pkg_name' #"Logger'ptr" #"Prefix" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) - )); ("Print"%go, (λ: "$recvAddr", - method_call #log.pkg_name' #"Logger'ptr" #"Print" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) - )); ("Printf"%go, (λ: "$recvAddr", - method_call #log.pkg_name' #"Logger'ptr" #"Printf" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) - )); ("Println"%go, (λ: "$recvAddr", - method_call #log.pkg_name' #"Logger'ptr" #"Println" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) - )); ("SetFlags"%go, (λ: "$recvAddr", - method_call #log.pkg_name' #"Logger'ptr" #"SetFlags" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) - )); ("SetOutput"%go, (λ: "$recvAddr", - method_call #log.pkg_name' #"Logger'ptr" #"SetOutput" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) - )); ("SetPrefix"%go, (λ: "$recvAddr", - method_call #log.pkg_name' #"Logger'ptr" #"SetPrefix" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) - )); ("Warning"%go, DefaultLogger__Warning); ("Warningf"%go, DefaultLogger__Warningf); ("Writer"%go, (λ: "$recvAddr", - method_call #log.pkg_name' #"Logger'ptr" #"Writer" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) - )); ("output"%go, (λ: "$recvAddr", - method_call #log.pkg_name' #"Logger'ptr" #"output" #() (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) - ))]); ("SnapshotStatus"%go, []); ("SnapshotStatus'ptr"%go, []); ("SoftState"%go, []); ("SoftState'ptr"%go, [("equal"%go, SoftState__equal)]); ("Ready"%go, [("equal"%go, (λ: "$recv", - method_call #pkg_name' #"SoftState'ptr" #"equal" #() (struct.field_get Ready "SoftState" "$recv") - ))]); ("Ready'ptr"%go, [("Descriptor"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"Descriptor" #() (struct.field_ref Ready "HardState" "$recvAddr") - )); ("Marshal"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"Marshal" #() (struct.field_ref Ready "HardState" "$recvAddr") - )); ("MarshalTo"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"MarshalTo" #() (struct.field_ref Ready "HardState" "$recvAddr") - )); ("MarshalToSizedBuffer"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"MarshalToSizedBuffer" #() (struct.field_ref Ready "HardState" "$recvAddr") - )); ("ProtoMessage"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"ProtoMessage" #() (struct.field_ref Ready "HardState" "$recvAddr") - )); ("Reset"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"Reset" #() (struct.field_ref Ready "HardState" "$recvAddr") - )); ("Size"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"Size" #() (struct.field_ref Ready "HardState" "$recvAddr") - )); ("String"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"String" #() (struct.field_ref Ready "HardState" "$recvAddr") - )); ("Unmarshal"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"Unmarshal" #() (struct.field_ref Ready "HardState" "$recvAddr") - )); ("XXX_DiscardUnknown"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_DiscardUnknown" #() (struct.field_ref Ready "HardState" "$recvAddr") - )); ("XXX_Marshal"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Marshal" #() (struct.field_ref Ready "HardState" "$recvAddr") - )); ("XXX_Merge"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Merge" #() (struct.field_ref Ready "HardState" "$recvAddr") - )); ("XXX_Size"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Size" #() (struct.field_ref Ready "HardState" "$recvAddr") - )); ("XXX_Unmarshal"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Unmarshal" #() (struct.field_ref Ready "HardState" "$recvAddr") - )); ("equal"%go, (λ: "$recvAddr", - method_call #pkg_name' #"SoftState'ptr" #"equal" #() (![ptrT] (struct.field_ref Ready "SoftState" "$recvAddr")) - ))]); ("Peer"%go, []); ("Peer'ptr"%go, []); ("msgWithResult"%go, []); ("msgWithResult'ptr"%go, []); ("node"%go, []); ("node'ptr"%go, [("Advance"%go, node__Advance); ("ApplyConfChange"%go, node__ApplyConfChange); ("Campaign"%go, node__Campaign); ("ForgetLeader"%go, node__ForgetLeader); ("Propose"%go, node__Propose); ("ProposeConfChange"%go, node__ProposeConfChange); ("ReadIndex"%go, node__ReadIndex); ("Ready"%go, node__Ready); ("ReportSnapshot"%go, node__ReportSnapshot); ("ReportUnreachable"%go, node__ReportUnreachable); ("Status"%go, node__Status); ("Step"%go, node__Step); ("Stop"%go, node__Stop); ("Tick"%go, node__Tick); ("TransferLeadership"%go, node__TransferLeadership); ("run"%go, node__run); ("step"%go, node__step); ("stepWait"%go, node__stepWait); ("stepWithWaitOption"%go, node__stepWithWaitOption)]); ("ReadOnlyOption"%go, []); ("ReadOnlyOption'ptr"%go, []); ("lockedRand"%go, []); ("lockedRand'ptr"%go, [("Intn"%go, lockedRand__Intn)]); ("CampaignType"%go, []); ("CampaignType'ptr"%go, []); ("StateType"%go, [("MarshalJSON"%go, StateType__MarshalJSON); ("String"%go, StateType__String)]); ("StateType'ptr"%go, [("MarshalJSON"%go, (λ: "$recvAddr", - method_call #pkg_name' #"StateType" #"MarshalJSON" "MarshalJSON" #() (![StateType] "$recvAddr") - )); ("String"%go, (λ: "$recvAddr", - method_call #pkg_name' #"StateType" #"String" "String" #() (![StateType] "$recvAddr") - ))]); ("Config"%go, []); ("Config'ptr"%go, [("validate"%go, Config__validate)]); ("raft"%go, []); ("raft'ptr"%go, [("Step"%go, raft__Step); ("abortLeaderTransfer"%go, raft__abortLeaderTransfer); ("advanceMessagesAfterAppend"%go, raft__advanceMessagesAfterAppend); ("appendEntry"%go, raft__appendEntry); ("appliedSnap"%go, raft__appliedSnap); ("appliedTo"%go, raft__appliedTo); ("applyConfChange"%go, raft__applyConfChange); ("bcastAppend"%go, raft__bcastAppend); ("bcastHeartbeat"%go, raft__bcastHeartbeat); ("bcastHeartbeatWithCtx"%go, raft__bcastHeartbeatWithCtx); ("becomeCandidate"%go, raft__becomeCandidate); ("becomeFollower"%go, raft__becomeFollower); ("becomeLeader"%go, raft__becomeLeader); ("becomePreCandidate"%go, raft__becomePreCandidate); ("campaign"%go, raft__campaign); ("committedEntryInCurrentTerm"%go, raft__committedEntryInCurrentTerm); ("handleAppendEntries"%go, raft__handleAppendEntries); ("handleHeartbeat"%go, raft__handleHeartbeat); ("handleSnapshot"%go, raft__handleSnapshot); ("hardState"%go, raft__hardState); ("hasLeader"%go, raft__hasLeader); ("hasUnappliedConfChanges"%go, raft__hasUnappliedConfChanges); ("hup"%go, raft__hup); ("increaseUncommittedSize"%go, raft__increaseUncommittedSize); ("loadState"%go, raft__loadState); ("maybeCommit"%go, raft__maybeCommit); ("maybeSendAppend"%go, raft__maybeSendAppend); ("maybeSendSnapshot"%go, raft__maybeSendSnapshot); ("pastElectionTimeout"%go, raft__pastElectionTimeout); ("poll"%go, raft__poll); ("promotable"%go, raft__promotable); ("readMessages"%go, raft__readMessages); ("reduceUncommittedSize"%go, raft__reduceUncommittedSize); ("reset"%go, raft__reset); ("resetRandomizedElectionTimeout"%go, raft__resetRandomizedElectionTimeout); ("responseToReadIndexReq"%go, raft__responseToReadIndexReq); ("restore"%go, raft__restore); ("send"%go, raft__send); ("sendAppend"%go, raft__sendAppend); ("sendHeartbeat"%go, raft__sendHeartbeat); ("sendTimeoutNow"%go, raft__sendTimeoutNow); ("softState"%go, raft__softState); ("stepOrSend"%go, raft__stepOrSend); ("switchToConfig"%go, raft__switchToConfig); ("takeMessagesAfterAppend"%go, raft__takeMessagesAfterAppend); ("tick"%go, raft__tick); ("tickElection"%go, raft__tickElection); ("tickHeartbeat"%go, raft__tickHeartbeat)]); ("stepFunc"%go, []); ("stepFunc'ptr"%go, []); ("blackHole"%go, [("Step"%go, blackHole__Step); ("advanceMessagesAfterAppend"%go, blackHole__advanceMessagesAfterAppend); ("readMessages"%go, blackHole__readMessages)]); ("blackHole'ptr"%go, [("Step"%go, (λ: "$recvAddr", - method_call #pkg_name' #"blackHole" #"Step" "Step" #() (![blackHole] "$recvAddr") - )); ("advanceMessagesAfterAppend"%go, (λ: "$recvAddr", - method_call #pkg_name' #"blackHole" #"advanceMessagesAfterAppend" "advanceMessagesAfterAppend" #() (![blackHole] "$recvAddr") - )); ("readMessages"%go, (λ: "$recvAddr", - method_call #pkg_name' #"blackHole" #"readMessages" "readMessages" #() (![blackHole] "$recvAddr") - ))]); ("connem"%go, []); ("connem'ptr"%go, []); ("network"%go, []); ("network'ptr"%go, [("filter"%go, network__filter); ("send"%go, network__send)]); ("testMemoryStorageOptions"%go, []); ("testMemoryStorageOptions'ptr"%go, []); ("testLeaderElectionStruct"%go, [("filter"%go, (λ: "$recv", - method_call #pkg_name' #"network'ptr" #"filter" #() (struct.field_get testLeaderElectionStruct "network" "$recv") - )); ("send"%go, (λ: "$recv", - method_call #pkg_name' #"network'ptr" #"send" #() (struct.field_get testLeaderElectionStruct "network" "$recv") - ))]); ("testLeaderElectionStruct'ptr"%go, [("filter"%go, (λ: "$recvAddr", - method_call #pkg_name' #"network'ptr" #"filter" #() (![ptrT] (struct.field_ref testLeaderElectionStruct "network" "$recvAddr")) - )); ("send"%go, (λ: "$recvAddr", - method_call #pkg_name' #"network'ptr" #"send" #() (![ptrT] (struct.field_ref testLeaderElectionStruct "network" "$recvAddr")) - ))]); ("RawNode"%go, []); ("RawNode'ptr"%go, [("Advance"%go, RawNode__Advance); ("ApplyConfChange"%go, RawNode__ApplyConfChange); ("BasicStatus"%go, RawNode__BasicStatus); ("Bootstrap"%go, RawNode__Bootstrap); ("Campaign"%go, RawNode__Campaign); ("ForgetLeader"%go, RawNode__ForgetLeader); ("HasReady"%go, RawNode__HasReady); ("Propose"%go, RawNode__Propose); ("ProposeConfChange"%go, RawNode__ProposeConfChange); ("ReadIndex"%go, RawNode__ReadIndex); ("Ready"%go, RawNode__Ready); ("ReportSnapshot"%go, RawNode__ReportSnapshot); ("ReportUnreachable"%go, RawNode__ReportUnreachable); ("Status"%go, RawNode__Status); ("Step"%go, RawNode__Step); ("Tick"%go, RawNode__Tick); ("TickQuiesced"%go, RawNode__TickQuiesced); ("TransferLeader"%go, RawNode__TransferLeader); ("WithProgress"%go, RawNode__WithProgress); ("acceptReady"%go, RawNode__acceptReady); ("applyUnstableEntries"%go, RawNode__applyUnstableEntries); ("readyWithoutAccept"%go, RawNode__readyWithoutAccept)]); ("ProgressType"%go, []); ("ProgressType'ptr"%go, []); ("ReadState"%go, []); ("ReadState'ptr"%go, []); ("readIndexStatus"%go, []); ("readIndexStatus'ptr"%go, []); ("readOnly"%go, []); ("readOnly'ptr"%go, [("addRequest"%go, readOnly__addRequest); ("advance"%go, readOnly__advance); ("lastPendingRequestCtx"%go, readOnly__lastPendingRequestCtx); ("recvAck"%go, readOnly__recvAck)]); ("TracingEvent"%go, []); ("TracingEvent'ptr"%go, []); ("Status"%go, [("MarshalJSON"%go, Status__MarshalJSON); ("String"%go, Status__String)]); ("Status'ptr"%go, [("Descriptor"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"Descriptor" #() (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) - )); ("Marshal"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"Marshal" #() (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) - )); ("MarshalJSON"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Status" #"MarshalJSON" "MarshalJSON" #() (![Status] "$recvAddr") - )); ("MarshalTo"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"MarshalTo" #() (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) - )); ("MarshalToSizedBuffer"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"MarshalToSizedBuffer" #() (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) - )); ("ProtoMessage"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"ProtoMessage" #() (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) - )); ("Reset"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"Reset" #() (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) - )); ("Size"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"Size" #() (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) - )); ("String"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Status" #"String" "String" #() (![Status] "$recvAddr") - )); ("Unmarshal"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"Unmarshal" #() (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) - )); ("XXX_DiscardUnknown"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_DiscardUnknown" #() (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) - )); ("XXX_Marshal"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Marshal" #() (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) - )); ("XXX_Merge"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Merge" #() (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) - )); ("XXX_Size"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Size" #() (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) - )); ("XXX_Unmarshal"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Unmarshal" #() (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) - )); ("equal"%go, (λ: "$recvAddr", - method_call #pkg_name' #"SoftState'ptr" #"equal" #() (struct.field_ref BasicStatus "SoftState" (struct.field_ref Status "BasicStatus" "$recvAddr")) - ))]); ("BasicStatus"%go, []); ("BasicStatus'ptr"%go, [("Descriptor"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"Descriptor" #() (struct.field_ref BasicStatus "HardState" "$recvAddr") - )); ("Marshal"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"Marshal" #() (struct.field_ref BasicStatus "HardState" "$recvAddr") - )); ("MarshalTo"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"MarshalTo" #() (struct.field_ref BasicStatus "HardState" "$recvAddr") - )); ("MarshalToSizedBuffer"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"MarshalToSizedBuffer" #() (struct.field_ref BasicStatus "HardState" "$recvAddr") - )); ("ProtoMessage"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"ProtoMessage" #() (struct.field_ref BasicStatus "HardState" "$recvAddr") - )); ("Reset"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"Reset" #() (struct.field_ref BasicStatus "HardState" "$recvAddr") - )); ("Size"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"Size" #() (struct.field_ref BasicStatus "HardState" "$recvAddr") - )); ("String"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"String" #() (struct.field_ref BasicStatus "HardState" "$recvAddr") - )); ("Unmarshal"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"Unmarshal" #() (struct.field_ref BasicStatus "HardState" "$recvAddr") - )); ("XXX_DiscardUnknown"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_DiscardUnknown" #() (struct.field_ref BasicStatus "HardState" "$recvAddr") - )); ("XXX_Marshal"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Marshal" #() (struct.field_ref BasicStatus "HardState" "$recvAddr") - )); ("XXX_Merge"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Merge" #() (struct.field_ref BasicStatus "HardState" "$recvAddr") - )); ("XXX_Size"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Size" #() (struct.field_ref BasicStatus "HardState" "$recvAddr") - )); ("XXX_Unmarshal"%go, (λ: "$recvAddr", - method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Unmarshal" #() (struct.field_ref BasicStatus "HardState" "$recvAddr") - )); ("equal"%go, (λ: "$recvAddr", - method_call #pkg_name' #"SoftState'ptr" #"equal" #() (struct.field_ref BasicStatus "SoftState" "$recvAddr") - ))]); ("inMemStorageCallStats"%go, []); ("inMemStorageCallStats'ptr"%go, []); ("MemoryStorage"%go, []); ("MemoryStorage'ptr"%go, [("Append"%go, MemoryStorage__Append); ("ApplySnapshot"%go, MemoryStorage__ApplySnapshot); ("Compact"%go, MemoryStorage__Compact); ("CreateSnapshot"%go, MemoryStorage__CreateSnapshot); ("Entries"%go, MemoryStorage__Entries); ("FirstIndex"%go, MemoryStorage__FirstIndex); ("InitialState"%go, MemoryStorage__InitialState); ("LastIndex"%go, MemoryStorage__LastIndex); ("Lock"%go, (λ: "$recvAddr", - method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #() (struct.field_ref MemoryStorage "Mutex" "$recvAddr") - )); ("SetHardState"%go, MemoryStorage__SetHardState); ("Snapshot"%go, MemoryStorage__Snapshot); ("Term"%go, MemoryStorage__Term); ("TryLock"%go, (λ: "$recvAddr", - method_call #sync.pkg_name' #"Mutex'ptr" #"TryLock" #() (struct.field_ref MemoryStorage "Mutex" "$recvAddr") - )); ("Unlock"%go, (λ: "$recvAddr", - method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" #() (struct.field_ref MemoryStorage "Mutex" "$recvAddr") - )); ("firstIndex"%go, MemoryStorage__firstIndex); ("lastIndex"%go, MemoryStorage__lastIndex); ("lockSlow"%go, (λ: "$recvAddr", - method_call #sync.pkg_name' #"Mutex'ptr" #"lockSlow" #() (struct.field_ref MemoryStorage "Mutex" "$recvAddr") - )); ("unlockSlow"%go, (λ: "$recvAddr", - method_call #sync.pkg_name' #"Mutex'ptr" #"unlockSlow" #() (struct.field_ref MemoryStorage "Mutex" "$recvAddr") - ))]); ("entryID"%go, []); ("entryID'ptr"%go, []); ("logSlice"%go, [("lastEntryID"%go, logSlice__lastEntryID); ("lastIndex"%go, logSlice__lastIndex); ("valid"%go, logSlice__valid)]); ("logSlice'ptr"%go, [("lastEntryID"%go, (λ: "$recvAddr", - method_call #pkg_name' #"logSlice" #"lastEntryID" "lastEntryID" #() (![logSlice] "$recvAddr") - )); ("lastIndex"%go, (λ: "$recvAddr", - method_call #pkg_name' #"logSlice" #"lastIndex" "lastIndex" #() (![logSlice] "$recvAddr") - )); ("valid"%go, (λ: "$recvAddr", - method_call #pkg_name' #"logSlice" #"valid" "valid" #() (![logSlice] "$recvAddr") - ))]); ("EntryFormatter"%go, []); ("EntryFormatter'ptr"%go, []); ("entryEncodingSize"%go, []); ("entryEncodingSize'ptr"%go, []); ("entryPayloadSize"%go, []); ("entryPayloadSize'ptr"%go, [])]. + method_call #log.pkg_name' #"Logger'ptr" #"Fatalln" (struct.field_get DefaultLogger "Logger" "$recv") + )%V); ("Flags"%go, (λ: "$recv", + method_call #log.pkg_name' #"Logger'ptr" #"Flags" (struct.field_get DefaultLogger "Logger" "$recv") + )%V); ("Output"%go, (λ: "$recv", + method_call #log.pkg_name' #"Logger'ptr" #"Output" (struct.field_get DefaultLogger "Logger" "$recv") + )%V); ("Panicln"%go, (λ: "$recv", + method_call #log.pkg_name' #"Logger'ptr" #"Panicln" (struct.field_get DefaultLogger "Logger" "$recv") + )%V); ("Prefix"%go, (λ: "$recv", + method_call #log.pkg_name' #"Logger'ptr" #"Prefix" (struct.field_get DefaultLogger "Logger" "$recv") + )%V); ("Print"%go, (λ: "$recv", + method_call #log.pkg_name' #"Logger'ptr" #"Print" (struct.field_get DefaultLogger "Logger" "$recv") + )%V); ("Printf"%go, (λ: "$recv", + method_call #log.pkg_name' #"Logger'ptr" #"Printf" (struct.field_get DefaultLogger "Logger" "$recv") + )%V); ("Println"%go, (λ: "$recv", + method_call #log.pkg_name' #"Logger'ptr" #"Println" (struct.field_get DefaultLogger "Logger" "$recv") + )%V); ("SetFlags"%go, (λ: "$recv", + method_call #log.pkg_name' #"Logger'ptr" #"SetFlags" (struct.field_get DefaultLogger "Logger" "$recv") + )%V); ("SetOutput"%go, (λ: "$recv", + method_call #log.pkg_name' #"Logger'ptr" #"SetOutput" (struct.field_get DefaultLogger "Logger" "$recv") + )%V); ("SetPrefix"%go, (λ: "$recv", + method_call #log.pkg_name' #"Logger'ptr" #"SetPrefix" (struct.field_get DefaultLogger "Logger" "$recv") + )%V); ("Writer"%go, (λ: "$recv", + method_call #log.pkg_name' #"Logger'ptr" #"Writer" (struct.field_get DefaultLogger "Logger" "$recv") + )%V); ("output"%go, (λ: "$recv", + method_call #log.pkg_name' #"Logger'ptr" #"output" (struct.field_get DefaultLogger "Logger" "$recv") + )%V)]); ("DefaultLogger'ptr"%go, [("Debug"%go, DefaultLogger__Debug); ("Debugf"%go, DefaultLogger__Debugf); ("EnableDebug"%go, DefaultLogger__EnableDebug); ("EnableTimestamps"%go, DefaultLogger__EnableTimestamps); ("Error"%go, DefaultLogger__Error); ("Errorf"%go, DefaultLogger__Errorf); ("Fatal"%go, DefaultLogger__Fatal); ("Fatalf"%go, DefaultLogger__Fatalf); ("Fatalln"%go, (λ: "$recvAddr", + method_call #log.pkg_name' #"Logger'ptr" #"Fatalln" (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) + )%V); ("Flags"%go, (λ: "$recvAddr", + method_call #log.pkg_name' #"Logger'ptr" #"Flags" (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) + )%V); ("Info"%go, DefaultLogger__Info); ("Infof"%go, DefaultLogger__Infof); ("Output"%go, (λ: "$recvAddr", + method_call #log.pkg_name' #"Logger'ptr" #"Output" (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) + )%V); ("Panic"%go, DefaultLogger__Panic); ("Panicf"%go, DefaultLogger__Panicf); ("Panicln"%go, (λ: "$recvAddr", + method_call #log.pkg_name' #"Logger'ptr" #"Panicln" (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) + )%V); ("Prefix"%go, (λ: "$recvAddr", + method_call #log.pkg_name' #"Logger'ptr" #"Prefix" (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) + )%V); ("Print"%go, (λ: "$recvAddr", + method_call #log.pkg_name' #"Logger'ptr" #"Print" (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) + )%V); ("Printf"%go, (λ: "$recvAddr", + method_call #log.pkg_name' #"Logger'ptr" #"Printf" (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) + )%V); ("Println"%go, (λ: "$recvAddr", + method_call #log.pkg_name' #"Logger'ptr" #"Println" (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) + )%V); ("SetFlags"%go, (λ: "$recvAddr", + method_call #log.pkg_name' #"Logger'ptr" #"SetFlags" (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) + )%V); ("SetOutput"%go, (λ: "$recvAddr", + method_call #log.pkg_name' #"Logger'ptr" #"SetOutput" (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) + )%V); ("SetPrefix"%go, (λ: "$recvAddr", + method_call #log.pkg_name' #"Logger'ptr" #"SetPrefix" (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) + )%V); ("Warning"%go, DefaultLogger__Warning); ("Warningf"%go, DefaultLogger__Warningf); ("Writer"%go, (λ: "$recvAddr", + method_call #log.pkg_name' #"Logger'ptr" #"Writer" (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) + )%V); ("output"%go, (λ: "$recvAddr", + method_call #log.pkg_name' #"Logger'ptr" #"output" (![ptrT] (struct.field_ref DefaultLogger "Logger" "$recvAddr")) + )%V)]); ("SnapshotStatus"%go, []); ("SnapshotStatus'ptr"%go, []); ("SoftState"%go, []); ("SoftState'ptr"%go, [("equal"%go, SoftState__equal)]); ("Ready"%go, [("equal"%go, (λ: "$recv", + method_call #pkg_name' #"SoftState'ptr" #"equal" (struct.field_get Ready "SoftState" "$recv") + )%V)]); ("Ready'ptr"%go, [("Descriptor"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"Descriptor" (struct.field_ref Ready "HardState" "$recvAddr") + )%V); ("Marshal"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"Marshal" (struct.field_ref Ready "HardState" "$recvAddr") + )%V); ("MarshalTo"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"MarshalTo" (struct.field_ref Ready "HardState" "$recvAddr") + )%V); ("MarshalToSizedBuffer"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"MarshalToSizedBuffer" (struct.field_ref Ready "HardState" "$recvAddr") + )%V); ("ProtoMessage"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"ProtoMessage" (struct.field_ref Ready "HardState" "$recvAddr") + )%V); ("Reset"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"Reset" (struct.field_ref Ready "HardState" "$recvAddr") + )%V); ("Size"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"Size" (struct.field_ref Ready "HardState" "$recvAddr") + )%V); ("String"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"String" (struct.field_ref Ready "HardState" "$recvAddr") + )%V); ("Unmarshal"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"Unmarshal" (struct.field_ref Ready "HardState" "$recvAddr") + )%V); ("XXX_DiscardUnknown"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_DiscardUnknown" (struct.field_ref Ready "HardState" "$recvAddr") + )%V); ("XXX_Marshal"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Marshal" (struct.field_ref Ready "HardState" "$recvAddr") + )%V); ("XXX_Merge"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Merge" (struct.field_ref Ready "HardState" "$recvAddr") + )%V); ("XXX_Size"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Size" (struct.field_ref Ready "HardState" "$recvAddr") + )%V); ("XXX_Unmarshal"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Unmarshal" (struct.field_ref Ready "HardState" "$recvAddr") + )%V); ("equal"%go, (λ: "$recvAddr", + method_call #pkg_name' #"SoftState'ptr" #"equal" (![ptrT] (struct.field_ref Ready "SoftState" "$recvAddr")) + )%V)]); ("Peer"%go, []); ("Peer'ptr"%go, []); ("msgWithResult"%go, []); ("msgWithResult'ptr"%go, []); ("node"%go, []); ("node'ptr"%go, [("Advance"%go, node__Advance); ("ApplyConfChange"%go, node__ApplyConfChange); ("Campaign"%go, node__Campaign); ("ForgetLeader"%go, node__ForgetLeader); ("Propose"%go, node__Propose); ("ProposeConfChange"%go, node__ProposeConfChange); ("ReadIndex"%go, node__ReadIndex); ("Ready"%go, node__Ready); ("ReportSnapshot"%go, node__ReportSnapshot); ("ReportUnreachable"%go, node__ReportUnreachable); ("Status"%go, node__Status); ("Step"%go, node__Step); ("Stop"%go, node__Stop); ("Tick"%go, node__Tick); ("TransferLeadership"%go, node__TransferLeadership); ("run"%go, node__run); ("step"%go, node__step); ("stepWait"%go, node__stepWait); ("stepWithWaitOption"%go, node__stepWithWaitOption)]); ("ReadOnlyOption"%go, []); ("ReadOnlyOption'ptr"%go, []); ("lockedRand"%go, []); ("lockedRand'ptr"%go, [("Intn"%go, lockedRand__Intn)]); ("CampaignType"%go, []); ("CampaignType'ptr"%go, []); ("StateType"%go, [("MarshalJSON"%go, StateType__MarshalJSON); ("String"%go, StateType__String)]); ("StateType'ptr"%go, [("MarshalJSON"%go, (λ: "$recvAddr", + method_call #pkg_name' #"StateType" #"MarshalJSON" (![StateType] "$recvAddr") + )%V); ("String"%go, (λ: "$recvAddr", + method_call #pkg_name' #"StateType" #"String" (![StateType] "$recvAddr") + )%V)]); ("Config"%go, []); ("Config'ptr"%go, [("validate"%go, Config__validate)]); ("raft"%go, []); ("raft'ptr"%go, [("Step"%go, raft__Step); ("abortLeaderTransfer"%go, raft__abortLeaderTransfer); ("advanceMessagesAfterAppend"%go, raft__advanceMessagesAfterAppend); ("appendEntry"%go, raft__appendEntry); ("appliedSnap"%go, raft__appliedSnap); ("appliedTo"%go, raft__appliedTo); ("applyConfChange"%go, raft__applyConfChange); ("bcastAppend"%go, raft__bcastAppend); ("bcastHeartbeat"%go, raft__bcastHeartbeat); ("bcastHeartbeatWithCtx"%go, raft__bcastHeartbeatWithCtx); ("becomeCandidate"%go, raft__becomeCandidate); ("becomeFollower"%go, raft__becomeFollower); ("becomeLeader"%go, raft__becomeLeader); ("becomePreCandidate"%go, raft__becomePreCandidate); ("campaign"%go, raft__campaign); ("committedEntryInCurrentTerm"%go, raft__committedEntryInCurrentTerm); ("handleAppendEntries"%go, raft__handleAppendEntries); ("handleHeartbeat"%go, raft__handleHeartbeat); ("handleSnapshot"%go, raft__handleSnapshot); ("hardState"%go, raft__hardState); ("hasLeader"%go, raft__hasLeader); ("hasUnappliedConfChanges"%go, raft__hasUnappliedConfChanges); ("hup"%go, raft__hup); ("increaseUncommittedSize"%go, raft__increaseUncommittedSize); ("loadState"%go, raft__loadState); ("maybeCommit"%go, raft__maybeCommit); ("maybeSendAppend"%go, raft__maybeSendAppend); ("maybeSendSnapshot"%go, raft__maybeSendSnapshot); ("pastElectionTimeout"%go, raft__pastElectionTimeout); ("poll"%go, raft__poll); ("promotable"%go, raft__promotable); ("readMessages"%go, raft__readMessages); ("reduceUncommittedSize"%go, raft__reduceUncommittedSize); ("reset"%go, raft__reset); ("resetRandomizedElectionTimeout"%go, raft__resetRandomizedElectionTimeout); ("responseToReadIndexReq"%go, raft__responseToReadIndexReq); ("restore"%go, raft__restore); ("send"%go, raft__send); ("sendAppend"%go, raft__sendAppend); ("sendHeartbeat"%go, raft__sendHeartbeat); ("sendTimeoutNow"%go, raft__sendTimeoutNow); ("softState"%go, raft__softState); ("stepOrSend"%go, raft__stepOrSend); ("switchToConfig"%go, raft__switchToConfig); ("takeMessagesAfterAppend"%go, raft__takeMessagesAfterAppend); ("tick"%go, raft__tick); ("tickElection"%go, raft__tickElection); ("tickHeartbeat"%go, raft__tickHeartbeat)]); ("stepFunc"%go, []); ("stepFunc'ptr"%go, []); ("blackHole"%go, [("Step"%go, blackHole__Step); ("advanceMessagesAfterAppend"%go, blackHole__advanceMessagesAfterAppend); ("readMessages"%go, blackHole__readMessages)]); ("blackHole'ptr"%go, [("Step"%go, (λ: "$recvAddr", + method_call #pkg_name' #"blackHole" #"Step" (![blackHole] "$recvAddr") + )%V); ("advanceMessagesAfterAppend"%go, (λ: "$recvAddr", + method_call #pkg_name' #"blackHole" #"advanceMessagesAfterAppend" (![blackHole] "$recvAddr") + )%V); ("readMessages"%go, (λ: "$recvAddr", + method_call #pkg_name' #"blackHole" #"readMessages" (![blackHole] "$recvAddr") + )%V)]); ("connem"%go, []); ("connem'ptr"%go, []); ("network"%go, []); ("network'ptr"%go, [("filter"%go, network__filter); ("send"%go, network__send)]); ("testMemoryStorageOptions"%go, []); ("testMemoryStorageOptions'ptr"%go, []); ("testLeaderElectionStruct"%go, [("filter"%go, (λ: "$recv", + method_call #pkg_name' #"network'ptr" #"filter" (struct.field_get testLeaderElectionStruct "network" "$recv") + )%V); ("send"%go, (λ: "$recv", + method_call #pkg_name' #"network'ptr" #"send" (struct.field_get testLeaderElectionStruct "network" "$recv") + )%V)]); ("testLeaderElectionStruct'ptr"%go, [("filter"%go, (λ: "$recvAddr", + method_call #pkg_name' #"network'ptr" #"filter" (![ptrT] (struct.field_ref testLeaderElectionStruct "network" "$recvAddr")) + )%V); ("send"%go, (λ: "$recvAddr", + method_call #pkg_name' #"network'ptr" #"send" (![ptrT] (struct.field_ref testLeaderElectionStruct "network" "$recvAddr")) + )%V)]); ("RawNode"%go, []); ("RawNode'ptr"%go, [("Advance"%go, RawNode__Advance); ("ApplyConfChange"%go, RawNode__ApplyConfChange); ("BasicStatus"%go, RawNode__BasicStatus); ("Bootstrap"%go, RawNode__Bootstrap); ("Campaign"%go, RawNode__Campaign); ("ForgetLeader"%go, RawNode__ForgetLeader); ("HasReady"%go, RawNode__HasReady); ("Propose"%go, RawNode__Propose); ("ProposeConfChange"%go, RawNode__ProposeConfChange); ("ReadIndex"%go, RawNode__ReadIndex); ("Ready"%go, RawNode__Ready); ("ReportSnapshot"%go, RawNode__ReportSnapshot); ("ReportUnreachable"%go, RawNode__ReportUnreachable); ("Status"%go, RawNode__Status); ("Step"%go, RawNode__Step); ("Tick"%go, RawNode__Tick); ("TickQuiesced"%go, RawNode__TickQuiesced); ("TransferLeader"%go, RawNode__TransferLeader); ("WithProgress"%go, RawNode__WithProgress); ("acceptReady"%go, RawNode__acceptReady); ("applyUnstableEntries"%go, RawNode__applyUnstableEntries); ("readyWithoutAccept"%go, RawNode__readyWithoutAccept)]); ("ProgressType"%go, []); ("ProgressType'ptr"%go, []); ("ReadState"%go, []); ("ReadState'ptr"%go, []); ("readIndexStatus"%go, []); ("readIndexStatus'ptr"%go, []); ("readOnly"%go, []); ("readOnly'ptr"%go, [("addRequest"%go, readOnly__addRequest); ("advance"%go, readOnly__advance); ("lastPendingRequestCtx"%go, readOnly__lastPendingRequestCtx); ("recvAck"%go, readOnly__recvAck)]); ("TracingEvent"%go, []); ("TracingEvent'ptr"%go, []); ("Status"%go, [("MarshalJSON"%go, Status__MarshalJSON); ("String"%go, Status__String)]); ("Status'ptr"%go, [("Descriptor"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"Descriptor" (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) + )%V); ("Marshal"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"Marshal" (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) + )%V); ("MarshalJSON"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Status" #"MarshalJSON" (![Status] "$recvAddr") + )%V); ("MarshalTo"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"MarshalTo" (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) + )%V); ("MarshalToSizedBuffer"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"MarshalToSizedBuffer" (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) + )%V); ("ProtoMessage"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"ProtoMessage" (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) + )%V); ("Reset"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"Reset" (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) + )%V); ("Size"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"Size" (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) + )%V); ("String"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Status" #"String" (![Status] "$recvAddr") + )%V); ("Unmarshal"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"Unmarshal" (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) + )%V); ("XXX_DiscardUnknown"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_DiscardUnknown" (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) + )%V); ("XXX_Marshal"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Marshal" (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) + )%V); ("XXX_Merge"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Merge" (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) + )%V); ("XXX_Size"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Size" (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) + )%V); ("XXX_Unmarshal"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Unmarshal" (struct.field_ref BasicStatus "HardState" (struct.field_ref Status "BasicStatus" "$recvAddr")) + )%V); ("equal"%go, (λ: "$recvAddr", + method_call #pkg_name' #"SoftState'ptr" #"equal" (struct.field_ref BasicStatus "SoftState" (struct.field_ref Status "BasicStatus" "$recvAddr")) + )%V)]); ("BasicStatus"%go, []); ("BasicStatus'ptr"%go, [("Descriptor"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"Descriptor" (struct.field_ref BasicStatus "HardState" "$recvAddr") + )%V); ("Marshal"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"Marshal" (struct.field_ref BasicStatus "HardState" "$recvAddr") + )%V); ("MarshalTo"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"MarshalTo" (struct.field_ref BasicStatus "HardState" "$recvAddr") + )%V); ("MarshalToSizedBuffer"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"MarshalToSizedBuffer" (struct.field_ref BasicStatus "HardState" "$recvAddr") + )%V); ("ProtoMessage"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"ProtoMessage" (struct.field_ref BasicStatus "HardState" "$recvAddr") + )%V); ("Reset"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"Reset" (struct.field_ref BasicStatus "HardState" "$recvAddr") + )%V); ("Size"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"Size" (struct.field_ref BasicStatus "HardState" "$recvAddr") + )%V); ("String"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"String" (struct.field_ref BasicStatus "HardState" "$recvAddr") + )%V); ("Unmarshal"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"Unmarshal" (struct.field_ref BasicStatus "HardState" "$recvAddr") + )%V); ("XXX_DiscardUnknown"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_DiscardUnknown" (struct.field_ref BasicStatus "HardState" "$recvAddr") + )%V); ("XXX_Marshal"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Marshal" (struct.field_ref BasicStatus "HardState" "$recvAddr") + )%V); ("XXX_Merge"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Merge" (struct.field_ref BasicStatus "HardState" "$recvAddr") + )%V); ("XXX_Size"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Size" (struct.field_ref BasicStatus "HardState" "$recvAddr") + )%V); ("XXX_Unmarshal"%go, (λ: "$recvAddr", + method_call #raftpb.pkg_name' #"HardState'ptr" #"XXX_Unmarshal" (struct.field_ref BasicStatus "HardState" "$recvAddr") + )%V); ("equal"%go, (λ: "$recvAddr", + method_call #pkg_name' #"SoftState'ptr" #"equal" (struct.field_ref BasicStatus "SoftState" "$recvAddr") + )%V)]); ("inMemStorageCallStats"%go, []); ("inMemStorageCallStats'ptr"%go, []); ("MemoryStorage"%go, []); ("MemoryStorage'ptr"%go, [("Append"%go, MemoryStorage__Append); ("ApplySnapshot"%go, MemoryStorage__ApplySnapshot); ("Compact"%go, MemoryStorage__Compact); ("CreateSnapshot"%go, MemoryStorage__CreateSnapshot); ("Entries"%go, MemoryStorage__Entries); ("FirstIndex"%go, MemoryStorage__FirstIndex); ("InitialState"%go, MemoryStorage__InitialState); ("LastIndex"%go, MemoryStorage__LastIndex); ("Lock"%go, (λ: "$recvAddr", + method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" (struct.field_ref MemoryStorage "Mutex" "$recvAddr") + )%V); ("SetHardState"%go, MemoryStorage__SetHardState); ("Snapshot"%go, MemoryStorage__Snapshot); ("Term"%go, MemoryStorage__Term); ("TryLock"%go, (λ: "$recvAddr", + method_call #sync.pkg_name' #"Mutex'ptr" #"TryLock" (struct.field_ref MemoryStorage "Mutex" "$recvAddr") + )%V); ("Unlock"%go, (λ: "$recvAddr", + method_call #sync.pkg_name' #"Mutex'ptr" #"Unlock" (struct.field_ref MemoryStorage "Mutex" "$recvAddr") + )%V); ("firstIndex"%go, MemoryStorage__firstIndex); ("lastIndex"%go, MemoryStorage__lastIndex); ("lockSlow"%go, (λ: "$recvAddr", + method_call #sync.pkg_name' #"Mutex'ptr" #"lockSlow" (struct.field_ref MemoryStorage "Mutex" "$recvAddr") + )%V); ("unlockSlow"%go, (λ: "$recvAddr", + method_call #sync.pkg_name' #"Mutex'ptr" #"unlockSlow" (struct.field_ref MemoryStorage "Mutex" "$recvAddr") + )%V)]); ("entryID"%go, []); ("entryID'ptr"%go, []); ("logSlice"%go, [("lastEntryID"%go, logSlice__lastEntryID); ("lastIndex"%go, logSlice__lastIndex); ("valid"%go, logSlice__valid)]); ("logSlice'ptr"%go, [("lastEntryID"%go, (λ: "$recvAddr", + method_call #pkg_name' #"logSlice" #"lastEntryID" (![logSlice] "$recvAddr") + )%V); ("lastIndex"%go, (λ: "$recvAddr", + method_call #pkg_name' #"logSlice" #"lastIndex" (![logSlice] "$recvAddr") + )%V); ("valid"%go, (λ: "$recvAddr", + method_call #pkg_name' #"logSlice" #"valid" (![logSlice] "$recvAddr") + )%V)]); ("EntryFormatter"%go, []); ("EntryFormatter'ptr"%go, []); ("entryEncodingSize"%go, []); ("entryEncodingSize'ptr"%go, []); ("entryPayloadSize"%go, []); ("entryPayloadSize'ptr"%go, [])]. Definition initialize' : val := rec: "initialize'" <> := @@ -8855,7 +8855,7 @@ Definition initialize' : val := do: fmt.initialize';;; do: raftpb.initialize';;; do: errors.initialize';;; - let: "$r0" := (ref_ty DefaultLogger (let: "$Logger" := (let: "$a0" := (interface.make #os.pkg_name' #"File'ptr" (![ptrT] (globals.get #os.pkg_name' #"Stderr"%go #()))) in + let: "$r0" := (ref_ty DefaultLogger (let: "$Logger" := (let: "$a0" := (interface.make #os.pkg_name' #"File'ptr" (![ptrT] (globals.get #os.pkg_name' #"Stderr"%go))) in let: "$a1" := #"raft"%go in let: "$a2" := #(W64 log.LstdFlags) in (func_call #log.pkg_name' #"New"%go) "$a0" "$a1" "$a2") in @@ -8863,8 +8863,8 @@ Definition initialize' : val := "Logger" ::= "$Logger"; "debug" ::= zero_val boolT }])) in - do: ((globals.get #pkg_name' #"defaultLogger"%go #()) <-[ptrT] "$r0");;; - let: "$r0" := (ref_ty DefaultLogger (let: "$Logger" := (let: "$a0" := (![io.Writer] (globals.get #io.pkg_name' #"Discard"%go #())) in + do: ((globals.get #pkg_name' #"defaultLogger"%go) <-[ptrT] "$r0");;; + let: "$r0" := (ref_ty DefaultLogger (let: "$Logger" := (let: "$a0" := (![io.Writer] (globals.get #io.pkg_name' #"Discard"%go)) in let: "$a1" := #""%go in let: "$a2" := #(W64 0) in (func_call #log.pkg_name' #"New"%go) "$a0" "$a1" "$a2") in @@ -8872,55 +8872,55 @@ Definition initialize' : val := "Logger" ::= "$Logger"; "debug" ::= zero_val boolT }])) in - do: ((globals.get #pkg_name' #"discardLogger"%go #()) <-[ptrT] "$r0");;; - let: "$r0" := (interface.make #pkg_name' #"DefaultLogger'ptr" (![ptrT] (globals.get #pkg_name' #"defaultLogger"%go #()))) in - do: ((globals.get #pkg_name' #"raftLogger"%go #()) <-[Logger] "$r0");;; + do: ((globals.get #pkg_name' #"discardLogger"%go) <-[ptrT] "$r0");;; + let: "$r0" := (interface.make #pkg_name' #"DefaultLogger'ptr" (![ptrT] (globals.get #pkg_name' #"defaultLogger"%go))) in + do: ((globals.get #pkg_name' #"raftLogger"%go) <-[Logger] "$r0");;; let: "$r0" := (struct.make raftpb.HardState [{ "Term" ::= zero_val uint64T; "Vote" ::= zero_val uint64T; "Commit" ::= zero_val uint64T }]) in - do: ((globals.get #pkg_name' #"emptyState"%go #()) <-[raftpb.HardState] "$r0");;; + do: ((globals.get #pkg_name' #"emptyState"%go) <-[raftpb.HardState] "$r0");;; let: "$r0" := (let: "$a0" := #"raft: stopped"%go in (func_call #errors.pkg_name' #"New"%go) "$a0") in - do: ((globals.get #pkg_name' #"ErrStopped"%go #()) <-[error] "$r0");;; + do: ((globals.get #pkg_name' #"ErrStopped"%go) <-[error] "$r0");;; let: "$r0" := (let: "$a0" := #"raft proposal dropped"%go in (func_call #errors.pkg_name' #"New"%go) "$a0") in - do: ((globals.get #pkg_name' #"ErrProposalDropped"%go #()) <-[error] "$r0");;; + do: ((globals.get #pkg_name' #"ErrProposalDropped"%go) <-[error] "$r0");;; let: "$r0" := (ref_ty lockedRand (struct.make lockedRand [{ "mu" ::= zero_val sync.Mutex }])) in - do: ((globals.get #pkg_name' #"globalRand"%go #()) <-[ptrT] "$r0");;; + do: ((globals.get #pkg_name' #"globalRand"%go) <-[ptrT] "$r0");;; let: "$r0" := ((let: "$ar0" := #"StateFollower"%go in let: "$ar1" := #"StateCandidate"%go in let: "$ar2" := #"StateLeader"%go in let: "$ar3" := #"StatePreCandidate"%go in array.literal ["$ar0"; "$ar1"; "$ar2"; "$ar3"])) in - do: ((globals.get #pkg_name' #"stmap"%go #()) <-[arrayT 4 stringT] "$r0");;; + do: ((globals.get #pkg_name' #"stmap"%go) <-[arrayT 4 stringT] "$r0");;; let: "$r0" := (let: "$a0" := #"break"%go in (func_call #errors.pkg_name' #"New"%go) "$a0") in - do: ((globals.get #pkg_name' #"errBreak"%go #()) <-[error] "$r0");;; + do: ((globals.get #pkg_name' #"errBreak"%go) <-[error] "$r0");;; let: "$r0" := (ref_ty blackHole (struct.make blackHole [{ }])) in - do: ((globals.get #pkg_name' #"nopStepper"%go #()) <-[ptrT] "$r0");;; + do: ((globals.get #pkg_name' #"nopStepper"%go) <-[ptrT] "$r0");;; let: "$r0" := (let: "$a0" := #"raft: cannot step raft local message"%go in (func_call #errors.pkg_name' #"New"%go) "$a0") in - do: ((globals.get #pkg_name' #"ErrStepLocalMsg"%go #()) <-[error] "$r0");;; + do: ((globals.get #pkg_name' #"ErrStepLocalMsg"%go) <-[error] "$r0");;; let: "$r0" := (let: "$a0" := #"raft: cannot step as peer not found"%go in (func_call #errors.pkg_name' #"New"%go) "$a0") in - do: ((globals.get #pkg_name' #"ErrStepPeerNotFound"%go #()) <-[error] "$r0");;; + do: ((globals.get #pkg_name' #"ErrStepPeerNotFound"%go) <-[error] "$r0");;; let: "$r0" := (let: "$a0" := #"requested index is unavailable due to compaction"%go in (func_call #errors.pkg_name' #"New"%go) "$a0") in - do: ((globals.get #pkg_name' #"ErrCompacted"%go #()) <-[error] "$r0");;; + do: ((globals.get #pkg_name' #"ErrCompacted"%go) <-[error] "$r0");;; let: "$r0" := (let: "$a0" := #"requested index is older than the existing snapshot"%go in (func_call #errors.pkg_name' #"New"%go) "$a0") in - do: ((globals.get #pkg_name' #"ErrSnapOutOfDate"%go #()) <-[error] "$r0");;; + do: ((globals.get #pkg_name' #"ErrSnapOutOfDate"%go) <-[error] "$r0");;; let: "$r0" := (let: "$a0" := #"requested entry at index is unavailable"%go in (func_call #errors.pkg_name' #"New"%go) "$a0") in - do: ((globals.get #pkg_name' #"ErrUnavailable"%go #()) <-[error] "$r0");;; + do: ((globals.get #pkg_name' #"ErrUnavailable"%go) <-[error] "$r0");;; let: "$r0" := (let: "$a0" := #"snapshot is temporarily unavailable"%go in (func_call #errors.pkg_name' #"New"%go) "$a0") in - do: ((globals.get #pkg_name' #"ErrSnapshotTemporarilyUnavailable"%go #()) <-[error] "$r0");;; + do: ((globals.get #pkg_name' #"ErrSnapshotTemporarilyUnavailable"%go) <-[error] "$r0");;; let: "$r0" := ((let: "$ar0" := #true in let: "$ar1" := #true in let: "$ar2" := (zero_val boolT) in @@ -8945,7 +8945,7 @@ Definition initialize' : val := let: "$ar21" := #true in let: "$ar22" := #true in array.literal ["$ar0"; "$ar1"; "$ar2"; "$ar3"; "$ar4"; "$ar5"; "$ar6"; "$ar7"; "$ar8"; "$ar9"; "$ar10"; "$ar11"; "$ar12"; "$ar13"; "$ar14"; "$ar15"; "$ar16"; "$ar17"; "$ar18"; "$ar19"; "$ar20"; "$ar21"; "$ar22"])) in - do: ((globals.get #pkg_name' #"isLocalMsg"%go #()) <-[arrayT 23 boolT] "$r0");;; + do: ((globals.get #pkg_name' #"isLocalMsg"%go) <-[arrayT 23 boolT] "$r0");;; let: "$r0" := ((let: "$ar0" := (zero_val boolT) in let: "$ar1" := (zero_val boolT) in let: "$ar2" := (zero_val boolT) in @@ -8970,14 +8970,14 @@ Definition initialize' : val := let: "$ar21" := (zero_val boolT) in let: "$ar22" := #true in array.literal ["$ar0"; "$ar1"; "$ar2"; "$ar3"; "$ar4"; "$ar5"; "$ar6"; "$ar7"; "$ar8"; "$ar9"; "$ar10"; "$ar11"; "$ar12"; "$ar13"; "$ar14"; "$ar15"; "$ar16"; "$ar17"; "$ar18"; "$ar19"; "$ar20"; "$ar21"; "$ar22"])) in - do: ((globals.get #pkg_name' #"isResponseMsg"%go #()) <-[arrayT 23 boolT] "$r0");;; + do: ((globals.get #pkg_name' #"isResponseMsg"%go) <-[arrayT 23 boolT] "$r0");;; do: ((λ: <>, exception_do (let: "$r0" := (func_call #pkg_name' #"stepFollower"%go) in - do: ((globals.get #pkg_name' #"stepFollowerGlobal"%go #()) <-[funcT] "$r0");;; + do: ((globals.get #pkg_name' #"stepFollowerGlobal"%go) <-[funcT] "$r0");;; let: "$r0" := (func_call #pkg_name' #"stepCandidate"%go) in - do: ((globals.get #pkg_name' #"stepCandidateGlobal"%go #()) <-[funcT] "$r0");;; + do: ((globals.get #pkg_name' #"stepCandidateGlobal"%go) <-[funcT] "$r0");;; let: "$r0" := (func_call #pkg_name' #"stepLeader"%go) in - do: ((globals.get #pkg_name' #"stepLeaderGlobal"%go #()) <-[funcT] "$r0")) + do: ((globals.get #pkg_name' #"stepLeaderGlobal"%go) <-[funcT] "$r0")) ) #())) ). diff --git a/new/code/go_etcd_io/raft/v3/quorum.v b/new/code/go_etcd_io/raft/v3/quorum.v index 7096fd3dd..3f975e610 100644 --- a/new/code/go_etcd_io/raft/v3/quorum.v +++ b/new/code/go_etcd_io/raft/v3/quorum.v @@ -23,9 +23,9 @@ Definition JointConfig__String : val := exception_do (let: "c" := (ref_ty JointConfig "c") in (if: int_gt (let: "$a0" := (![MajorityConfig] (array.elem_ref MajorityConfig (![JointConfig] "c") #(W64 1))) in map.len "$a0") #(W64 0) - then return: ((((method_call #pkg_name' #"MajorityConfig" #"String" "String" #() (![MajorityConfig] (array.elem_ref MajorityConfig (![JointConfig] "c") #(W64 0)))) #()) + #"&&"%go) + ((method_call #pkg_name' #"MajorityConfig" #"String" "String" #() (![MajorityConfig] (array.elem_ref MajorityConfig (![JointConfig] "c") #(W64 1)))) #())) + then return: ((((method_call #pkg_name' #"MajorityConfig" #"String" (![MajorityConfig] (array.elem_ref MajorityConfig (![JointConfig] "c") #(W64 0)))) #()) + #"&&"%go) + ((method_call #pkg_name' #"MajorityConfig" #"String" (![MajorityConfig] (array.elem_ref MajorityConfig (![JointConfig] "c") #(W64 1)))) #())) else do: #());;; - return: ((method_call #pkg_name' #"MajorityConfig" #"String" "String" #() (![MajorityConfig] (array.elem_ref MajorityConfig (![JointConfig] "c") #(W64 0)))) #())). + return: ((method_call #pkg_name' #"MajorityConfig" #"String" (![MajorityConfig] (array.elem_ref MajorityConfig (![JointConfig] "c") #(W64 0)))) #())). Definition unit : go_type := structT [ ]. @@ -70,7 +70,7 @@ Definition JointConfig__Describe : val := exception_do (let: "c" := (ref_ty JointConfig "c") in let: "l" := (ref_ty AckedIndexer "l") in return: (let: "$a0" := (![AckedIndexer] "l") in - (method_call #pkg_name' #"MajorityConfig" #"Describe" "Describe" #() ((method_call #pkg_name' #"JointConfig" #"IDs" "IDs" #() (![JointConfig] "c")) #())) "$a0")). + (method_call #pkg_name' #"MajorityConfig" #"Describe" "Describe" #() ((method_call #pkg_name' #"JointConfig" #"IDs" (![JointConfig] "c")) #())) "$a0")). Definition Index : go_type := uint64T. @@ -85,11 +85,11 @@ Definition JointConfig__CommittedIndex : val := let: "l" := (ref_ty AckedIndexer "l") in let: "idx0" := (ref_ty Index (zero_val Index)) in let: "$r0" := (let: "$a0" := (![AckedIndexer] "l") in - (method_call #pkg_name' #"MajorityConfig" #"CommittedIndex" "CommittedIndex" #() (![MajorityConfig] (array.elem_ref MajorityConfig (![JointConfig] "c") #(W64 0)))) "$a0") in + (method_call #pkg_name' #"MajorityConfig" #"CommittedIndex" (![MajorityConfig] (array.elem_ref MajorityConfig (![JointConfig] "c") #(W64 0)))) "$a0") in do: ("idx0" <-[Index] "$r0");;; let: "idx1" := (ref_ty Index (zero_val Index)) in let: "$r0" := (let: "$a0" := (![AckedIndexer] "l") in - (method_call #pkg_name' #"MajorityConfig" #"CommittedIndex" "CommittedIndex" #() (![MajorityConfig] (array.elem_ref MajorityConfig (![JointConfig] "c") #(W64 1)))) "$a0") in + (method_call #pkg_name' #"MajorityConfig" #"CommittedIndex" (![MajorityConfig] (array.elem_ref MajorityConfig (![JointConfig] "c") #(W64 1)))) "$a0") in do: ("idx1" <-[Index] "$r0");;; (if: (![Index] "idx0") < (![Index] "idx1") then return: (![Index] "idx0") @@ -113,11 +113,11 @@ Definition JointConfig__VoteResult : val := let: "votes" := (ref_ty (mapT uint64T boolT) "votes") in let: "r1" := (ref_ty VoteResult (zero_val VoteResult)) in let: "$r0" := (let: "$a0" := (![mapT uint64T boolT] "votes") in - (method_call #pkg_name' #"MajorityConfig" #"VoteResult" "VoteResult" #() (![MajorityConfig] (array.elem_ref MajorityConfig (![JointConfig] "c") #(W64 0)))) "$a0") in + (method_call #pkg_name' #"MajorityConfig" #"VoteResult" (![MajorityConfig] (array.elem_ref MajorityConfig (![JointConfig] "c") #(W64 0)))) "$a0") in do: ("r1" <-[VoteResult] "$r0");;; let: "r2" := (ref_ty VoteResult (zero_val VoteResult)) in let: "$r0" := (let: "$a0" := (![mapT uint64T boolT] "votes") in - (method_call #pkg_name' #"MajorityConfig" #"VoteResult" "VoteResult" #() (![MajorityConfig] (array.elem_ref MajorityConfig (![JointConfig] "c") #(W64 1)))) "$a0") in + (method_call #pkg_name' #"MajorityConfig" #"VoteResult" (![MajorityConfig] (array.elem_ref MajorityConfig (![JointConfig] "c") #(W64 1)))) "$a0") in do: ("r2" <-[VoteResult] "$r0");;; (if: (![VoteResult] "r1") = (![VoteResult] "r2") then return: (![VoteResult] "r1") @@ -141,7 +141,7 @@ Definition MajorityConfig__String : val := slice.literal uint64T ["$sl0"])) in (slice.append sliceT) "$a0" "$a1") in do: ("sl" <-[sliceT] "$r0")));;; - do: (let: "$a0" := (interface.make slice' (![sliceT] "sl")) in + do: (let: "$a0" := (interface.make #"slice'"%go (![sliceT] "sl")) in let: "$a1" := (λ: "i" "j", exception_do (let: "j" := (ref_ty intT "j") in let: "i" := (ref_ty intT "i") in @@ -150,22 +150,22 @@ Definition MajorityConfig__String : val := (func_call #sort.pkg_name' #"Slice"%go) "$a0" "$a1");;; let: "buf" := (ref_ty strings.Builder (zero_val strings.Builder)) in do: (let: "$a0" := #(W8 40) in - (method_call #strings.pkg_name' #"Builder'ptr" #"WriteByte" #() "buf") "$a0");;; + (method_call #strings.pkg_name' #"Builder'ptr" #"WriteByte" "buf") "$a0");;; do: (let: "$range" := (![sliceT] "sl") in slice.for_range uint64T "$range" (λ: "i" <>, let: "i" := ref_ty uint64T "i" in (if: int_gt (![intT] "i") #(W64 0) then do: (let: "$a0" := #(W8 32) in - (method_call #strings.pkg_name' #"Builder'ptr" #"WriteByte" #() "buf") "$a0") + (method_call #strings.pkg_name' #"Builder'ptr" #"WriteByte" "buf") "$a0") else do: #());;; do: (let: "$a0" := (interface.make #strings.pkg_name' #"Builder'ptr" "buf") in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"uint64"%go (![uint64T] (slice.elem_ref uint64T (![sliceT] "sl") (![intT] "i")))) in slice.literal interfaceT ["$sl0"])) in (func_call #fmt.pkg_name' #"Fprint"%go) "$a0" "$a1")));;; do: (let: "$a0" := #(W8 41) in - (method_call #strings.pkg_name' #"Builder'ptr" #"WriteByte" #() "buf") "$a0");;; - return: ((method_call #strings.pkg_name' #"Builder'ptr" #"String" #() "buf") #())). + (method_call #strings.pkg_name' #"Builder'ptr" #"WriteByte" "buf") "$a0");;; + return: ((method_call #strings.pkg_name' #"Builder'ptr" #"String" "buf") #())). Definition tup : go_type := structT [ "id" :: uint64T; @@ -215,7 +215,7 @@ Definition MajorityConfig__Describe : val := slice.literal tup ["$sl0"])) in (slice.append sliceT) "$a0" "$a1") in do: ("info" <-[sliceT] "$r0")));;; - do: (let: "$a0" := (interface.make slice' (![sliceT] "info")) in + do: (let: "$a0" := (interface.make #"slice'"%go (![sliceT] "info")) in let: "$a1" := (λ: "i" "j", exception_do (let: "j" := (ref_ty intT "j") in let: "i" := (ref_ty intT "i") in @@ -233,7 +233,7 @@ Definition MajorityConfig__Describe : val := let: "$r0" := (![intT] "i") in do: ((struct.field_ref tup "bar" (slice.elem_ref tup (![sliceT] "info") (![intT] "i"))) <-[intT] "$r0") else do: #())));;; - do: (let: "$a0" := (interface.make slice' (![sliceT] "info")) in + do: (let: "$a0" := (interface.make #"slice'"%go (![sliceT] "info")) in let: "$a1" := (λ: "i" "j", exception_do (let: "j" := (ref_ty intT "j") in let: "i" := (ref_ty intT "i") in @@ -278,7 +278,7 @@ Definition MajorityConfig__Describe : val := let: "$sl1" := (interface.make #""%go #"uint64"%go (![uint64T] (struct.field_ref tup "id" (slice.elem_ref tup (![sliceT] "info") (![intT] "i"))))) in slice.literal interfaceT ["$sl0"; "$sl1"])) in (func_call #fmt.pkg_name' #"Fprintf"%go) "$a0" "$a1" "$a2")));;; - return: ((method_call #strings.pkg_name' #"Builder'ptr" #"String" #() "buf") #())). + return: ((method_call #strings.pkg_name' #"Builder'ptr" #"String" "buf") #())). (* Slice returns the MajorityConfig as a sorted slice. @@ -293,7 +293,7 @@ Definition MajorityConfig__Slice : val := slice.literal uint64T ["$sl0"])) in (slice.append sliceT) "$a0" "$a1") in do: ("sl" <-[sliceT] "$r0")));;; - do: (let: "$a0" := (interface.make slice' (![sliceT] "sl")) in + do: (let: "$a0" := (interface.make #"slice'"%go (![sliceT] "sl")) in let: "$a1" := (λ: "i" "j", exception_do (let: "j" := (ref_ty intT "j") in let: "i" := (ref_ty intT "i") in @@ -454,30 +454,30 @@ Definition vars' : list (go_string * go_type) := [("_VoteResult_index"%go, array Definition functions' : list (go_string * val) := [("_unused"%go, _unused)]. Definition msets' : list (go_string * (list (go_string * val))) := [("JointConfig"%go, [("CommittedIndex"%go, JointConfig__CommittedIndex); ("Describe"%go, JointConfig__Describe); ("IDs"%go, JointConfig__IDs); ("String"%go, JointConfig__String); ("VoteResult"%go, JointConfig__VoteResult)]); ("JointConfig'ptr"%go, [("CommittedIndex"%go, (λ: "$recvAddr", - method_call #pkg_name' #"JointConfig" #"CommittedIndex" "CommittedIndex" #() (![JointConfig] "$recvAddr") - )); ("Describe"%go, (λ: "$recvAddr", - method_call #pkg_name' #"JointConfig" #"Describe" "Describe" #() (![JointConfig] "$recvAddr") - )); ("IDs"%go, (λ: "$recvAddr", - method_call #pkg_name' #"JointConfig" #"IDs" "IDs" #() (![JointConfig] "$recvAddr") - )); ("String"%go, (λ: "$recvAddr", - method_call #pkg_name' #"JointConfig" #"String" "String" #() (![JointConfig] "$recvAddr") - )); ("VoteResult"%go, (λ: "$recvAddr", - method_call #pkg_name' #"JointConfig" #"VoteResult" "VoteResult" #() (![JointConfig] "$recvAddr") - ))]); ("MajorityConfig"%go, [("CommittedIndex"%go, MajorityConfig__CommittedIndex); ("Describe"%go, MajorityConfig__Describe); ("Slice"%go, MajorityConfig__Slice); ("String"%go, MajorityConfig__String); ("VoteResult"%go, MajorityConfig__VoteResult)]); ("MajorityConfig'ptr"%go, [("CommittedIndex"%go, (λ: "$recvAddr", - method_call #pkg_name' #"MajorityConfig" #"CommittedIndex" "CommittedIndex" #() (![MajorityConfig] "$recvAddr") - )); ("Describe"%go, (λ: "$recvAddr", - method_call #pkg_name' #"MajorityConfig" #"Describe" "Describe" #() (![MajorityConfig] "$recvAddr") - )); ("Slice"%go, (λ: "$recvAddr", - method_call #pkg_name' #"MajorityConfig" #"Slice" "Slice" #() (![MajorityConfig] "$recvAddr") - )); ("String"%go, (λ: "$recvAddr", - method_call #pkg_name' #"MajorityConfig" #"String" "String" #() (![MajorityConfig] "$recvAddr") - )); ("VoteResult"%go, (λ: "$recvAddr", - method_call #pkg_name' #"MajorityConfig" #"VoteResult" "VoteResult" #() (![MajorityConfig] "$recvAddr") - ))]); ("tup"%go, []); ("tup'ptr"%go, []); ("Index"%go, [("String"%go, Index__String)]); ("Index'ptr"%go, [("String"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Index" #"String" "String" #() (![Index] "$recvAddr") - ))]); ("mapAckIndexer"%go, [("AckedIndex"%go, mapAckIndexer__AckedIndex)]); ("mapAckIndexer'ptr"%go, [("AckedIndex"%go, (λ: "$recvAddr", - method_call #pkg_name' #"mapAckIndexer" #"AckedIndex" "AckedIndex" #() (![mapAckIndexer] "$recvAddr") - ))]); ("VoteResult"%go, []); ("VoteResult'ptr"%go, [])]. + method_call #pkg_name' #"JointConfig" #"CommittedIndex" (![JointConfig] "$recvAddr") + )%V); ("Describe"%go, (λ: "$recvAddr", + method_call #pkg_name' #"JointConfig" #"Describe" (![JointConfig] "$recvAddr") + )%V); ("IDs"%go, (λ: "$recvAddr", + method_call #pkg_name' #"JointConfig" #"IDs" (![JointConfig] "$recvAddr") + )%V); ("String"%go, (λ: "$recvAddr", + method_call #pkg_name' #"JointConfig" #"String" (![JointConfig] "$recvAddr") + )%V); ("VoteResult"%go, (λ: "$recvAddr", + method_call #pkg_name' #"JointConfig" #"VoteResult" (![JointConfig] "$recvAddr") + )%V)]); ("MajorityConfig"%go, [("CommittedIndex"%go, MajorityConfig__CommittedIndex); ("Describe"%go, MajorityConfig__Describe); ("Slice"%go, MajorityConfig__Slice); ("String"%go, MajorityConfig__String); ("VoteResult"%go, MajorityConfig__VoteResult)]); ("MajorityConfig'ptr"%go, [("CommittedIndex"%go, (λ: "$recvAddr", + method_call #pkg_name' #"MajorityConfig" #"CommittedIndex" (![MajorityConfig] "$recvAddr") + )%V); ("Describe"%go, (λ: "$recvAddr", + method_call #pkg_name' #"MajorityConfig" #"Describe" (![MajorityConfig] "$recvAddr") + )%V); ("Slice"%go, (λ: "$recvAddr", + method_call #pkg_name' #"MajorityConfig" #"Slice" (![MajorityConfig] "$recvAddr") + )%V); ("String"%go, (λ: "$recvAddr", + method_call #pkg_name' #"MajorityConfig" #"String" (![MajorityConfig] "$recvAddr") + )%V); ("VoteResult"%go, (λ: "$recvAddr", + method_call #pkg_name' #"MajorityConfig" #"VoteResult" (![MajorityConfig] "$recvAddr") + )%V)]); ("tup"%go, []); ("tup'ptr"%go, []); ("Index"%go, [("String"%go, Index__String)]); ("Index'ptr"%go, [("String"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Index" #"String" (![Index] "$recvAddr") + )%V)]); ("mapAckIndexer"%go, [("AckedIndex"%go, mapAckIndexer__AckedIndex)]); ("mapAckIndexer'ptr"%go, [("AckedIndex"%go, (λ: "$recvAddr", + method_call #pkg_name' #"mapAckIndexer" #"AckedIndex" (![mapAckIndexer] "$recvAddr") + )%V)]); ("VoteResult"%go, []); ("VoteResult'ptr"%go, [])]. Definition initialize' : val := rec: "initialize'" <> := @@ -493,7 +493,7 @@ Definition initialize' : val := let: "$ar2" := #(W8 19) in let: "$ar3" := #(W8 26) in array.literal ["$ar0"; "$ar1"; "$ar2"; "$ar3"])) in - do: ((globals.get #pkg_name' #"_VoteResult_index"%go #()) <-[arrayT 4 uint8T] "$r0")) + do: ((globals.get #pkg_name' #"_VoteResult_index"%go) <-[arrayT 4 uint8T] "$r0")) ). End code. diff --git a/new/code/go_etcd_io/raft/v3/tracker.v b/new/code/go_etcd_io/raft/v3/tracker.v index 596926a49..dc1e7f514 100644 --- a/new/code/go_etcd_io/raft/v3/tracker.v +++ b/new/code/go_etcd_io/raft/v3/tracker.v @@ -74,7 +74,7 @@ Definition Inflights__Add : val := exception_do (let: "in" := (ref_ty ptrT "in") in let: "bytes" := (ref_ty uint64T "bytes") in let: "index" := (ref_ty uint64T "index") in - (if: (method_call #pkg_name' #"Inflights'ptr" #"Full" #() (![ptrT] "in")) #() + (if: (method_call #pkg_name' #"Inflights'ptr" #"Full" (![ptrT] "in")) #() then do: (let: "$a0" := (interface.make #""%go #"string"%go #"cannot add into a Full inflights"%go) in Panic "$a0") @@ -90,7 +90,7 @@ Definition Inflights__Add : val := else do: #());;; (if: int_geq (![intT] "next") (let: "$a0" := (![sliceT] (struct.field_ref Inflights "buffer" (![ptrT] "in"))) in slice.len "$a0") - then do: ((method_call #pkg_name' #"Inflights'ptr" #"grow" #() (![ptrT] "in")) #()) + then do: ((method_call #pkg_name' #"Inflights'ptr" #"grow" (![ptrT] "in")) #()) else do: #());;; let: "$r0" := (let: "$index" := (![uint64T] "index") in let: "$bytes" := (![uint64T] "bytes") in @@ -229,7 +229,7 @@ Definition Progress__ResetState : val := do: ((struct.field_ref Progress "PendingSnapshot" (![ptrT] "pr")) <-[uint64T] "$r0");;; let: "$r0" := (![StateType] "state") in do: ((struct.field_ref Progress "State" (![ptrT] "pr")) <-[StateType] "$r0");;; - do: ((method_call #pkg_name' #"Inflights'ptr" #"reset" #() (![ptrT] (struct.field_ref Progress "Inflights" (![ptrT] "pr")))) #())). + do: ((method_call #pkg_name' #"Inflights'ptr" #"reset" (![ptrT] (struct.field_ref Progress "Inflights" (![ptrT] "pr")))) #())). Definition StateProbe : expr := #(W64 0). @@ -248,14 +248,14 @@ Definition Progress__BecomeProbe : val := let: "$r0" := (![uint64T] (struct.field_ref Progress "PendingSnapshot" (![ptrT] "pr"))) in do: ("pendingSnapshot" <-[uint64T] "$r0");;; do: (let: "$a0" := StateProbe in - (method_call #pkg_name' #"Progress'ptr" #"ResetState" #() (![ptrT] "pr")) "$a0");;; + (method_call #pkg_name' #"Progress'ptr" #"ResetState" (![ptrT] "pr")) "$a0");;; let: "$r0" := (let: "$a0" := ((![uint64T] (struct.field_ref Progress "Match" (![ptrT] "pr"))) + #(W64 1)) in let: "$a1" := ((![uint64T] "pendingSnapshot") + #(W64 1)) in (maxUint64 2) "$a0" "$a1") in do: ((struct.field_ref Progress "Next" (![ptrT] "pr")) <-[uint64T] "$r0") else do: (let: "$a0" := StateProbe in - (method_call #pkg_name' #"Progress'ptr" #"ResetState" #() (![ptrT] "pr")) "$a0");;; + (method_call #pkg_name' #"Progress'ptr" #"ResetState" (![ptrT] "pr")) "$a0");;; let: "$r0" := ((![uint64T] (struct.field_ref Progress "Match" (![ptrT] "pr"))) + #(W64 1)) in do: ((struct.field_ref Progress "Next" (![ptrT] "pr")) <-[uint64T] "$r0"));;; let: "$r0" := (let: "$a0" := (![uint64T] (struct.field_ref Progress "sentCommit" (![ptrT] "pr"))) in @@ -272,7 +272,7 @@ Definition Progress__BecomeReplicate : val := rec: "Progress__BecomeReplicate" "pr" <> := exception_do (let: "pr" := (ref_ty ptrT "pr") in do: (let: "$a0" := StateReplicate in - (method_call #pkg_name' #"Progress'ptr" #"ResetState" #() (![ptrT] "pr")) "$a0");;; + (method_call #pkg_name' #"Progress'ptr" #"ResetState" (![ptrT] "pr")) "$a0");;; let: "$r0" := ((![uint64T] (struct.field_ref Progress "Match" (![ptrT] "pr"))) + #(W64 1)) in do: ((struct.field_ref Progress "Next" (![ptrT] "pr")) <-[uint64T] "$r0")). @@ -285,7 +285,7 @@ Definition Progress__BecomeSnapshot : val := exception_do (let: "pr" := (ref_ty ptrT "pr") in let: "snapshoti" := (ref_ty uint64T "snapshoti") in do: (let: "$a0" := StateSnapshot in - (method_call #pkg_name' #"Progress'ptr" #"ResetState" #() (![ptrT] "pr")) "$a0");;; + (method_call #pkg_name' #"Progress'ptr" #"ResetState" (![ptrT] "pr")) "$a0");;; let: "$r0" := (![uint64T] "snapshoti") in do: ((struct.field_ref Progress "PendingSnapshot" (![ptrT] "pr")) <-[uint64T] "$r0");;; let: "$r0" := ((![uint64T] "snapshoti") + #(W64 1)) in @@ -313,9 +313,9 @@ Definition Progress__SentEntries : val := do: ((struct.field_ref Progress "Next" (![ptrT] "pr")) <-[uint64T] ((![uint64T] (struct.field_ref Progress "Next" (![ptrT] "pr"))) + (![intT] "entries")));;; do: (let: "$a0" := ((![uint64T] (struct.field_ref Progress "Next" (![ptrT] "pr"))) - #(W64 1)) in let: "$a1" := (![uint64T] "bytes") in - (method_call #pkg_name' #"Inflights'ptr" #"Add" #() (![ptrT] (struct.field_ref Progress "Inflights" (![ptrT] "pr")))) "$a0" "$a1") + (method_call #pkg_name' #"Inflights'ptr" #"Add" (![ptrT] (struct.field_ref Progress "Inflights" (![ptrT] "pr")))) "$a0" "$a1") else do: #());;; - let: "$r0" := ((method_call #pkg_name' #"Inflights'ptr" #"Full" #() (![ptrT] (struct.field_ref Progress "Inflights" (![ptrT] "pr")))) #()) in + let: "$r0" := ((method_call #pkg_name' #"Inflights'ptr" #"Full" (![ptrT] (struct.field_ref Progress "Inflights" (![ptrT] "pr")))) #()) in do: ((struct.field_ref Progress "MsgAppFlowPaused" (![ptrT] "pr")) <-[boolT] "$r0") else (if: "$sw" = StateProbe @@ -465,7 +465,7 @@ Definition Progress__String : val := slice.literal interfaceT ["$sl0"])) in (func_call #fmt.pkg_name' #"Fprint"%go) "$a0" "$a1") else do: #());;; - (if: (method_call #pkg_name' #"Progress'ptr" #"IsPaused" #() (![ptrT] "pr")) #() + (if: (method_call #pkg_name' #"Progress'ptr" #"IsPaused" (![ptrT] "pr")) #() then do: (let: "$a0" := (interface.make #strings.pkg_name' #"Builder'ptr" "buf") in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"string"%go #" paused"%go) in @@ -488,7 +488,7 @@ Definition Progress__String : val := (func_call #fmt.pkg_name' #"Fprint"%go) "$a0" "$a1") else do: #());;; (let: "n" := (ref_ty intT (zero_val intT)) in - let: "$r0" := ((method_call #pkg_name' #"Inflights'ptr" #"Count" #() (![ptrT] (struct.field_ref Progress "Inflights" (![ptrT] "pr")))) #()) in + let: "$r0" := ((method_call #pkg_name' #"Inflights'ptr" #"Count" (![ptrT] (struct.field_ref Progress "Inflights" (![ptrT] "pr")))) #()) in do: ("n" <-[intT] "$r0");;; (if: int_gt (![intT] "n") #(W64 0) then @@ -497,7 +497,7 @@ Definition Progress__String : val := let: "$a2" := ((let: "$sl0" := (interface.make #""%go #"int"%go (![intT] "n")) in slice.literal interfaceT ["$sl0"])) in (func_call #fmt.pkg_name' #"Fprintf"%go) "$a0" "$a1" "$a2");;; - (if: (method_call #pkg_name' #"Inflights'ptr" #"Full" #() (![ptrT] (struct.field_ref Progress "Inflights" (![ptrT] "pr")))) #() + (if: (method_call #pkg_name' #"Inflights'ptr" #"Full" (![ptrT] (struct.field_ref Progress "Inflights" (![ptrT] "pr")))) #() then do: (let: "$a0" := (interface.make #strings.pkg_name' #"Builder'ptr" "buf") in let: "$a1" := ((let: "$sl0" := (interface.make #""%go #"string"%go #"[full]"%go) in @@ -505,7 +505,7 @@ Definition Progress__String : val := (func_call #fmt.pkg_name' #"Fprint"%go) "$a0" "$a1") else do: #()) else do: #()));;; - return: ((method_call #strings.pkg_name' #"Builder'ptr" #"String" #() "buf") #())). + return: ((method_call #strings.pkg_name' #"Builder'ptr" #"String" "buf") #())). Definition ProgressMap : go_type := mapT uint64T ptrT. @@ -525,7 +525,7 @@ Definition ProgressMap__String : val := slice.literal uint64T ["$sl0"])) in (slice.append sliceT) "$a0" "$a1") in do: ("ids" <-[sliceT] "$r0")));;; - do: (let: "$a0" := (interface.make slice' (![sliceT] "ids")) in + do: (let: "$a0" := (interface.make #"slice'"%go (![sliceT] "ids")) in let: "$a1" := (λ: "i" "j", exception_do (let: "j" := (ref_ty intT "j") in let: "i" := (ref_ty intT "i") in @@ -543,13 +543,13 @@ Definition ProgressMap__String : val := let: "$sl1" := (interface.make #pkg_name' #"Progress'ptr" (Fst (map.get (![ProgressMap] "m") (![uint64T] "id")))) in slice.literal interfaceT ["$sl0"; "$sl1"])) in (func_call #fmt.pkg_name' #"Fprintf"%go) "$a0" "$a1" "$a2")));;; - return: ((method_call #strings.pkg_name' #"Builder'ptr" #"String" #() "buf") #())). + return: ((method_call #strings.pkg_name' #"Builder'ptr" #"String" "buf") #())). (* go: state.go:42:21 *) Definition StateType__String : val := rec: "StateType__String" "st" <> := exception_do (let: "st" := (ref_ty StateType "st") in - return: (![stringT] (array.elem_ref stringT (![arrayT 3 stringT] (globals.get #pkg_name' #"prstmap"%go #())) (![StateType] "st")))). + return: (![stringT] (array.elem_ref stringT (![arrayT 3 stringT] (globals.get #pkg_name' #"prstmap"%go)) (![StateType] "st")))). Definition Config : go_type := structT [ "Voters" :: quorum.JointConfig; @@ -597,7 +597,7 @@ Definition Config__String : val := slice.literal interfaceT ["$sl0"])) in (func_call #fmt.pkg_name' #"Fprint"%go) "$a0" "$a1") else do: #());;; - return: ((method_call #strings.pkg_name' #"Builder'ptr" #"String" #() "buf") #())). + return: ((method_call #strings.pkg_name' #"Builder'ptr" #"String" "buf") #())). (* Clone returns a copy of the Config that shares no memory with the original. @@ -697,8 +697,8 @@ Definition MakeProgressTracker : val := Definition ProgressTracker__ConfState : val := rec: "ProgressTracker__ConfState" "p" <> := exception_do (let: "p" := (ref_ty ptrT "p") in - return: (let: "$Voters" := ((method_call #quorum.pkg_name' #"MajorityConfig" #"Slice" "Slice" #() (![quorum.MajorityConfig] (array.elem_ref quorum.MajorityConfig (![quorum.JointConfig] (struct.field_ref Config "Voters" (struct.field_ref ProgressTracker "Config" (![ptrT] "p")))) #(W64 0)))) #()) in - let: "$VotersOutgoing" := ((method_call #quorum.pkg_name' #"MajorityConfig" #"Slice" "Slice" #() (![quorum.MajorityConfig] (array.elem_ref quorum.MajorityConfig (![quorum.JointConfig] (struct.field_ref Config "Voters" (struct.field_ref ProgressTracker "Config" (![ptrT] "p")))) #(W64 1)))) #()) in + return: (let: "$Voters" := ((method_call #quorum.pkg_name' #"MajorityConfig" #"Slice" (![quorum.MajorityConfig] (array.elem_ref quorum.MajorityConfig (![quorum.JointConfig] (struct.field_ref Config "Voters" (struct.field_ref ProgressTracker "Config" (![ptrT] "p")))) #(W64 0)))) #()) in + let: "$VotersOutgoing" := ((method_call #quorum.pkg_name' #"MajorityConfig" #"Slice" (![quorum.MajorityConfig] (array.elem_ref quorum.MajorityConfig (![quorum.JointConfig] (struct.field_ref Config "Voters" (struct.field_ref ProgressTracker "Config" (![ptrT] "p")))) #(W64 1)))) #()) in let: "$Learners" := ((method_call #quorum.pkg_name' #"MajorityConfig" #"Slice" "Slice" #() (![mapT uint64T (structT [ ])] (struct.field_ref Config "Learners" (struct.field_ref ProgressTracker "Config" (![ptrT] "p"))))) #()) in let: "$LearnersNext" := ((method_call #quorum.pkg_name' #"MajorityConfig" #"Slice" "Slice" #() (![mapT uint64T (structT [ @@ -752,7 +752,7 @@ Definition ProgressTracker__Committed : val := rec: "ProgressTracker__Committed" "p" <> := exception_do (let: "p" := (ref_ty ptrT "p") in return: (let: "$a0" := (interface.make #pkg_name' #"matchAckIndexer" (![ProgressMap] (struct.field_ref ProgressTracker "Progress" (![ptrT] "p")))) in - (method_call #quorum.pkg_name' #"JointConfig" #"CommittedIndex" "CommittedIndex" #() (![quorum.JointConfig] (struct.field_ref Config "Voters" (struct.field_ref ProgressTracker "Config" (![ptrT] "p"))))) "$a0")). + (method_call #quorum.pkg_name' #"JointConfig" #"CommittedIndex" (![quorum.JointConfig] (struct.field_ref Config "Voters" (struct.field_ref ProgressTracker "Config" (![ptrT] "p"))))) "$a0")). (* Visit invokes the supplied closure for all tracked progresses in stable order. @@ -807,9 +807,9 @@ Definition ProgressTracker__QuorumActive : val := let: "$r0" := (![boolT] (struct.field_ref Progress "RecentActive" (![ptrT] "pr"))) in do: (map.insert (![mapT uint64T boolT] "votes") (![uint64T] "id") "$r0")) ) in - (method_call #pkg_name' #"ProgressTracker'ptr" #"Visit" #() (![ptrT] "p")) "$a0");;; + (method_call #pkg_name' #"ProgressTracker'ptr" #"Visit" (![ptrT] "p")) "$a0");;; return: ((let: "$a0" := (![mapT uint64T boolT] "votes") in - (method_call #quorum.pkg_name' #"JointConfig" #"VoteResult" "VoteResult" #() (![quorum.JointConfig] (struct.field_ref Config "Voters" (struct.field_ref ProgressTracker "Config" (![ptrT] "p"))))) "$a0") = quorum.VoteWon)). + (method_call #quorum.pkg_name' #"JointConfig" #"VoteResult" (![quorum.JointConfig] (struct.field_ref Config "Voters" (struct.field_ref ProgressTracker "Config" (![ptrT] "p"))))) "$a0") = quorum.VoteWon)). (* VoterNodes returns a sorted slice of voters. @@ -820,7 +820,7 @@ Definition ProgressTracker__VoterNodes : val := let: "m" := (ref_ty (mapT uint64T (structT [ ])) (zero_val (mapT uint64T (structT [ ])))) in - let: "$r0" := ((method_call #quorum.pkg_name' #"JointConfig" #"IDs" "IDs" #() (![quorum.JointConfig] (struct.field_ref Config "Voters" (struct.field_ref ProgressTracker "Config" (![ptrT] "p"))))) #()) in + let: "$r0" := ((method_call #quorum.pkg_name' #"JointConfig" #"IDs" (![quorum.JointConfig] (struct.field_ref Config "Voters" (struct.field_ref ProgressTracker "Config" (![ptrT] "p"))))) #()) in do: ("m" <-[mapT uint64T (structT [ ])] "$r0");;; let: "nodes" := (ref_ty sliceT (zero_val sliceT)) in @@ -835,7 +835,7 @@ Definition ProgressTracker__VoterNodes : val := slice.literal uint64T ["$sl0"])) in (slice.append sliceT) "$a0" "$a1") in do: ("nodes" <-[sliceT] "$r0")));;; - do: (let: "$a0" := (interface.make slice' (![sliceT] "nodes")) in + do: (let: "$a0" := (interface.make #"slice'"%go (![sliceT] "nodes")) in let: "$a1" := (λ: "i" "j", exception_do (let: "j" := (ref_ty intT "j") in let: "i" := (ref_ty intT "i") in @@ -867,7 +867,7 @@ Definition ProgressTracker__LearnerNodes : val := slice.literal uint64T ["$sl0"])) in (slice.append sliceT) "$a0" "$a1") in do: ("nodes" <-[sliceT] "$r0")));;; - do: (let: "$a0" := (interface.make slice' (![sliceT] "nodes")) in + do: (let: "$a0" := (interface.make #"slice'"%go (![sliceT] "nodes")) in let: "$a1" := (λ: "i" "j", exception_do (let: "j" := (ref_ty intT "j") in let: "i" := (ref_ty intT "i") in @@ -934,7 +934,7 @@ Definition ProgressTracker__TallyVotes : val := else do: ("rejected" <-[intT] ((![intT] "rejected") + #(W64 1))))));;; let: "result" := (ref_ty quorum.VoteResult (zero_val quorum.VoteResult)) in let: "$r0" := (let: "$a0" := (![mapT uint64T boolT] (struct.field_ref ProgressTracker "Votes" (![ptrT] "p"))) in - (method_call #quorum.pkg_name' #"JointConfig" #"VoteResult" "VoteResult" #() (![quorum.JointConfig] (struct.field_ref Config "Voters" (struct.field_ref ProgressTracker "Config" (![ptrT] "p"))))) "$a0") in + (method_call #quorum.pkg_name' #"JointConfig" #"VoteResult" (![quorum.JointConfig] (struct.field_ref Config "Voters" (struct.field_ref ProgressTracker "Config" (![ptrT] "p"))))) "$a0") in do: ("result" <-[quorum.VoteResult] "$r0");;; return: (![intT] "granted", ![intT] "rejected", ![quorum.VoteResult] "result")). @@ -943,20 +943,20 @@ Definition vars' : list (go_string * go_type) := [("prstmap"%go, arrayT 3 string Definition functions' : list (go_string * val) := [("NewInflights"%go, NewInflights); ("MakeProgressTracker"%go, MakeProgressTracker)]. Definition msets' : list (go_string * (list (go_string * val))) := [("inflight"%go, []); ("inflight'ptr"%go, []); ("Inflights"%go, []); ("Inflights'ptr"%go, [("Add"%go, Inflights__Add); ("Clone"%go, Inflights__Clone); ("Count"%go, Inflights__Count); ("FreeLE"%go, Inflights__FreeLE); ("Full"%go, Inflights__Full); ("grow"%go, Inflights__grow); ("reset"%go, Inflights__reset)]); ("Progress"%go, []); ("Progress'ptr"%go, [("BecomeProbe"%go, Progress__BecomeProbe); ("BecomeReplicate"%go, Progress__BecomeReplicate); ("BecomeSnapshot"%go, Progress__BecomeSnapshot); ("CanBumpCommit"%go, Progress__CanBumpCommit); ("IsPaused"%go, Progress__IsPaused); ("MaybeDecrTo"%go, Progress__MaybeDecrTo); ("MaybeUpdate"%go, Progress__MaybeUpdate); ("ResetState"%go, Progress__ResetState); ("SentCommit"%go, Progress__SentCommit); ("SentEntries"%go, Progress__SentEntries); ("String"%go, Progress__String)]); ("ProgressMap"%go, [("String"%go, ProgressMap__String)]); ("ProgressMap'ptr"%go, [("String"%go, (λ: "$recvAddr", - method_call #pkg_name' #"ProgressMap" #"String" "String" #() (![ProgressMap] "$recvAddr") - ))]); ("StateType"%go, [("String"%go, StateType__String)]); ("StateType'ptr"%go, [("String"%go, (λ: "$recvAddr", - method_call #pkg_name' #"StateType" #"String" "String" #() (![StateType] "$recvAddr") - ))]); ("Config"%go, [("String"%go, Config__String)]); ("Config'ptr"%go, [("Clone"%go, Config__Clone); ("String"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Config" #"String" "String" #() (![Config] "$recvAddr") - ))]); ("ProgressTracker"%go, [("String"%go, (λ: "$recv", + method_call #pkg_name' #"ProgressMap" #"String" (![ProgressMap] "$recvAddr") + )%V)]); ("StateType"%go, [("String"%go, StateType__String)]); ("StateType'ptr"%go, [("String"%go, (λ: "$recvAddr", + method_call #pkg_name' #"StateType" #"String" (![StateType] "$recvAddr") + )%V)]); ("Config"%go, [("String"%go, Config__String)]); ("Config'ptr"%go, [("Clone"%go, Config__Clone); ("String"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Config" #"String" (![Config] "$recvAddr") + )%V)]); ("ProgressTracker"%go, [("String"%go, (λ: "$recv", method_call #pkg_name' #"Config" #"String" "String" #() (struct.field_get ProgressTracker "Config" "$recv") - ))]); ("ProgressTracker'ptr"%go, [("Clone"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Config'ptr" #"Clone" #() (struct.field_ref ProgressTracker "Config" "$recvAddr") - )); ("Committed"%go, ProgressTracker__Committed); ("ConfState"%go, ProgressTracker__ConfState); ("IsSingleton"%go, ProgressTracker__IsSingleton); ("LearnerNodes"%go, ProgressTracker__LearnerNodes); ("QuorumActive"%go, ProgressTracker__QuorumActive); ("RecordVote"%go, ProgressTracker__RecordVote); ("ResetVotes"%go, ProgressTracker__ResetVotes); ("String"%go, (λ: "$recvAddr", - method_call #pkg_name' #"Config" #"String" "String" #() (![Config] (struct.field_ref ProgressTracker "Config" "$recvAddr")) - )); ("TallyVotes"%go, ProgressTracker__TallyVotes); ("Visit"%go, ProgressTracker__Visit); ("VoterNodes"%go, ProgressTracker__VoterNodes)]); ("matchAckIndexer"%go, [("AckedIndex"%go, matchAckIndexer__AckedIndex)]); ("matchAckIndexer'ptr"%go, [("AckedIndex"%go, (λ: "$recvAddr", - method_call #pkg_name' #"matchAckIndexer" #"AckedIndex" "AckedIndex" #() (![matchAckIndexer] "$recvAddr") - ))])]. + )%V)]); ("ProgressTracker'ptr"%go, [("Clone"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Config'ptr" #"Clone" (struct.field_ref ProgressTracker "Config" "$recvAddr") + )%V); ("Committed"%go, ProgressTracker__Committed); ("ConfState"%go, ProgressTracker__ConfState); ("IsSingleton"%go, ProgressTracker__IsSingleton); ("LearnerNodes"%go, ProgressTracker__LearnerNodes); ("QuorumActive"%go, ProgressTracker__QuorumActive); ("RecordVote"%go, ProgressTracker__RecordVote); ("ResetVotes"%go, ProgressTracker__ResetVotes); ("String"%go, (λ: "$recvAddr", + method_call #pkg_name' #"Config" #"String" (![Config] (struct.field_ref ProgressTracker "Config" "$recvAddr")) + )%V); ("TallyVotes"%go, ProgressTracker__TallyVotes); ("Visit"%go, ProgressTracker__Visit); ("VoterNodes"%go, ProgressTracker__VoterNodes)]); ("matchAckIndexer"%go, [("AckedIndex"%go, matchAckIndexer__AckedIndex)]); ("matchAckIndexer'ptr"%go, [("AckedIndex"%go, (λ: "$recvAddr", + method_call #pkg_name' #"matchAckIndexer" #"AckedIndex" (![matchAckIndexer] "$recvAddr") + )%V)])]. Definition initialize' : val := rec: "initialize'" <> := @@ -971,7 +971,7 @@ Definition initialize' : val := let: "$ar1" := #"StateReplicate"%go in let: "$ar2" := #"StateSnapshot"%go in array.literal ["$ar0"; "$ar1"; "$ar2"])) in - do: ((globals.get #pkg_name' #"prstmap"%go #()) <-[arrayT 3 stringT] "$r0");;; + do: ((globals.get #pkg_name' #"prstmap"%go) <-[arrayT 3 stringT] "$r0");;; let: "$r0" := (interface.make #pkg_name' #"matchAckIndexer" #null) in do: #()) ). diff --git a/new/golang/defn/chan.v b/new/golang/defn/chan.v index c5d2e1c48..9aba5c353 100644 --- a/new/golang/defn/chan.v +++ b/new/golang/defn/chan.v @@ -10,6 +10,8 @@ Axiom send : val. Axiom select : val. Axiom nil : val. Axiom close : val. +Axiom len : val. +Axiom cap : val. End defns. End chan. diff --git a/new/golang/defn/globals.v b/new/golang/defn/globals.v index 6fc5b9f12..295f113d7 100644 --- a/new/golang/defn/globals.v +++ b/new/golang/defn/globals.v @@ -19,30 +19,26 @@ Definition get_def : val := Program Definition get := unseal (_:seal (@get_def)). Obligation 1. by eexists. Qed. Definition get_unseal : get = _ := seal_eq _. -Definition alloc_and_define_def - (pkg_name : go_string) - (vars : list (go_string * go_type)) - (functions : list (go_string * val)) - (msets : list (go_string * (list (go_string * val)))) : val := - let functions_val := alist_val functions in - let msets_val := alist_val ((λ '(name, mset), (name, alist_val mset)) <$> msets) in - λ: <>, - GlobalPut #pkg_name ((fix alloc (vars : list (go_string * go_type)) : expr := - (match vars with - | Datatypes.nil => alist_val [] - | (pair name t) :: vars => - list.Cons (#name, ref_ty t (zero_val t)) (alloc vars) - end)%E) vars, functions_val, msets_val) +(* XXX: unsealed because user has to prove WPs for this by unfolding. *) +Definition alloc (vars : list (go_string * go_type)) : val := + λ: <>, (fix alloc (vars : list (go_string * go_type)) : expr := + (match vars with + | Datatypes.nil => alist_val [] + | (pair name t) :: vars => + list.Cons (#name, ref_ty t (zero_val t)) (alloc vars) + end)%E) vars . -Program Definition alloc_and_define := unseal (_:seal (@alloc_and_define_def)). Obligation 1. by eexists. Qed. -Definition alloc_and_define_unseal : alloc_and_define = _ := seal_eq _. Definition package_init_def (pkg_name : go_string) vars functions msets : val := + let functions_val := alist_val functions in + let msets_val := alist_val ((λ '(name, mset), (name, alist_val mset)) <$> msets) in λ: "init", match: GlobalGet #pkg_name with SOME <> => #() - | NONE => alloc_and_define pkg_name vars functions msets #() ;; - "init" #() + | NONE => + let: "var_addrs" := alloc vars #() in + GlobalPut #pkg_name ("var_addrs", functions_val, msets_val) ;; + "init" #() end. Program Definition package_init := unseal (_:seal (@package_init_def)). Obligation 1. by eexists. Qed. Definition package_init_unseal : package_init = _ := seal_eq _. diff --git a/new/golang/theory/globals.v b/new/golang/theory/globals.v index 8ba94d1ca..9fee7e9df 100644 --- a/new/golang/theory/globals.v +++ b/new/golang/theory/globals.v @@ -169,25 +169,34 @@ Qed. Class WpGlobalsGet (pkg_name : go_string) (var_name : go_string) (addr : loc) (P : iProp Σ) - := wp_globals_get : ⊢ ∀ Φ, P -∗ (▷ Φ #addr) -∗ - WP (globals.get #pkg_name #var_name) {{ Φ }}. + := wp_globals_get : ⊢ {{{ P }}} (globals.get #pkg_name #var_name) {{{ RET #addr; True }}}. Class WpFuncCall (pkg_name : go_string) (func_name : go_string) (func : val) (P : iProp Σ) - := wp_func_call : ⊢ ∀ Φ, P -∗ (▷ Φ func) -∗ - WP (func_call #pkg_name #func_name) {{ Φ }}. + := wp_func_call : ⊢ {{{ P }}} (func_call #pkg_name #func_name) {{{ RET func; True }}}. Class WpMethodCall (pkg_name : go_string) (type_name : go_string) (func_name : go_string) (m : val) (P : iProp Σ) - := wp_method_call : ⊢ ∀ Φ, P -∗ (▷ Φ m) -∗ - WP (method_call #pkg_name #type_name #func_name) {{ Φ }}. - -Lemma wp_global_get' {pkg_name var_name var_addrs functions msets addr} : + := wp_method_call : ⊢ {{{ P }}} (method_call #pkg_name #type_name #func_name) {{{ RET m; True }}}. + +Class WpGlobalsAlloc (vars : list (go_string * go_type)) (GlobalAddrs : Type) + (var_addrs : GlobalAddrs → list (go_string * loc)) + (own_allocated : GlobalAddrs → iProp Σ) + := wp_globals_alloc : + ⊢ {{{ True }}} + (globals.alloc vars #()) + {{{ (d : GlobalAddrs), + RET (alist_val $ (λ '(pair name addr), (pair name #addr)) <$> var_addrs d); + own_allocated d + }}}. + +Lemma wp_globals_get' {pkg_name var_name var_addrs functions msets addr} : alist_lookup_f var_name var_addrs = Some addr → WpGlobalsGet pkg_name var_name addr (is_global_definitions pkg_name var_addrs functions msets). Proof. intros Hlookup. rewrite /WpGlobalsGet. - iIntros (?) "#Hctx HΦ". + iStartProof. + iIntros (?) "!# #Hctx HΦ". rewrite globals.get_unseal. wp_call. wp_pures. @@ -197,7 +206,7 @@ Proof. iNext. iIntros "_". wp_pures. rewrite alist_lookup_f_fmap Hlookup. - wp_pures. iApply "HΦ". + wp_pures. by iApply "HΦ". Qed. Lemma wp_func_call' {pkg_name func_name var_addrs functions msets func} : @@ -205,7 +214,7 @@ Lemma wp_func_call' {pkg_name func_name var_addrs functions msets func} : WpFuncCall pkg_name func_name func (is_global_definitions pkg_name var_addrs functions msets). Proof. intros Hlookup. rewrite /WpFuncCall. - iIntros (?) "#Hctx HΦ". + iIntros (?) "!# #Hctx HΦ". rewrite func_call_unseal. wp_call. wp_pures. @@ -215,7 +224,7 @@ Proof. iNext. iIntros "_". wp_pures. rewrite Hlookup. - wp_pures. iApply "HΦ". + wp_pures. by iApply "HΦ". Qed. Lemma wp_method_call' {pkg_name type_name method_name var_addrs functions msets m} : @@ -223,7 +232,7 @@ Lemma wp_method_call' {pkg_name type_name method_name var_addrs functions msets WpMethodCall pkg_name type_name method_name m (is_global_definitions pkg_name var_addrs functions msets). Proof. intros Hlookup. rewrite /WpMethodCall. - iIntros (?) "#Hctx HΦ". + iIntros (?) "!# #Hctx HΦ". rewrite method_call_unseal. wp_call. wp_pures. @@ -238,17 +247,9 @@ Proof. rewrite Heq1. wp_pures. rewrite -Heq2. - wp_pures. iApply "HΦ". + wp_pures. by iApply "HΦ". Qed. -(* No generic globals.alloc lemma. WPs for [globals.alloc vars] get proved for - each package individually. This is here so something useful shows up from - [Search]. *) -Lemma there_is_no_generic_lemma_for_globals_alloc_and_define: - ∀ Φ pkg_name vars functions msets, - False -∗ WP (globals.alloc_and_define pkg_name vars functions msets #()) {{ Φ }}. -Proof. iIntros. done. Qed. - End globals. Local Ltac unseal := @@ -259,41 +260,33 @@ Context `{ffi_sem: ffi_semantics} `{!ffi_interp ffi} `{!heapGS Σ}. Context `{!goGlobalsGS Σ}. Lemma wp_package_init - pending Φ + pending (postconds : gmap go_string (iProp Σ)) (pkg_name : go_string) (init_func : val) - vars functions msets - (GoDefns : Type) - (is_defined : GoDefns → iProp Σ) - (is_initialized : GoDefns → iProp Σ) + functions msets + `{!WpGlobalsAlloc vars GlobalAddrs var_addrs own_allocated} + (is_initialized : GlobalAddrs → iProp Σ) + (is_defined : GlobalAddrs → iProp Σ) : - (∀ g, - g !! pkg_name = None → - {{{ own_globals g }}} - globals.alloc_and_define pkg_name vars functions msets #() - {{{ (d : GoDefns) v, RET #(); - is_defined d ∗ - own_globals (<[pkg_name := v]> g) - }}} - ) → - (∀ (d : GoDefns), - is_defined d -∗ + postconds !! pkg_name = Some (∃ d, is_defined d ∗ is_initialized d)%I → + pkg_name ∉ pending → + (∀ (d : GlobalAddrs), + is_global_definitions pkg_name (var_addrs d) functions msets -∗ + own_allocated d -∗ own_globals_tok ({[ pkg_name ]} ∪ pending) postconds -∗ WP init_func #() {{ v, ⌜ v = #tt ⌝ ∗ - □ is_initialized d ∗ + □ (is_defined d ∗ is_initialized d) ∗ own_globals_tok ({[ pkg_name ]} ∪ pending) postconds }} ) → - postconds !! pkg_name = Some (∃ d, is_initialized d)%I → - pkg_name ∉ pending → - own_globals_tok pending postconds -∗ - (∀ (d : GoDefns), is_initialized d -∗ own_globals_tok pending postconds -∗ Φ #()) -∗ - WP (globals.package_init pkg_name vars functions msets init_func) {{ Φ }}. + {{{ own_globals_tok pending postconds }}} + globals.package_init pkg_name vars functions msets init_func + {{{ (d : GlobalAddrs), RET #(); is_defined d ∗ is_initialized d ∗ own_globals_tok pending postconds }}}. Proof. unseal. - intros Hwp_alloc Hwp_init Hpost Hnot_pending. - iIntros "Htok HΦ". + intros Hpost Hnot_pending Hwp_init. + iIntros (?) "Htok HΦ". rewrite globals.package_init_unseal. wp_call. iNamed "Htok". @@ -308,22 +301,26 @@ Proof. iDestruct (big_sepS_elem_of with "Hinited") as "H". { done. } rewrite Hpost /=. - iDestruct "H" as (?) "Hinit". - iApply ("HΦ" with "[$]"). + iDestruct "H" as (?) "#[? ?]". + iApply ("HΦ" with "[-]"). iFrame "∗#%". } (* actually run init *) wp_pures. - wp_apply (Hwp_alloc with "[$]"). + wp_apply wp_globals_alloc. + iIntros "* Halloc". + wp_pures. + wp_bind (GlobalPut _ _). + iApply (wp_GlobalPut with "[$]"). { done. } - iIntros "* [Hdef Hglobals]". + iNext. iIntros "[Hg #Hdef]". wp_pures. - iDestruct (Hwp_init with "[$Hdef] [Hglobals]") as "Hinit". + iDestruct (Hwp_init with "[$Hdef] [$Halloc] [Hg]") as "Hinit". { iFrame "∗#%". iPureIntro. set_solver. } wp_apply (wp_wand with "Hinit"). iIntros (?) "H". - iDestruct "H" as (?) "[#Hinit Htok]". subst. - iApply ("HΦ" with "[$]"). + iDestruct "H" as (?) "[#[? ?] Htok]". subst. + iApply ("HΦ" with "[-]"). iClear "Hinited". clear Hpkg. iNamed "Htok". @@ -365,6 +362,14 @@ Qed. End init. +Global Hint Mode WpGlobalsGet - - - - - - + + - - : typeclass_instances. +Global Hint Mode WpMethodCall - - - - - - + + + - - : typeclass_instances. +Global Hint Mode WpFuncCall - - - - - - + + - - : typeclass_instances. + +Tactic Notation "wp_globals_get" := + (wp_bind (globals.get _ _); + unshelve wp_apply (wp_globals_get with "[]"); [| | tc_solve | |]; try iFrame "#"). + Tactic Notation "wp_func_call" := (wp_bind (func_call _ _); unshelve wp_apply (wp_func_call with "[]"); [| | tc_solve | | ]; try iFrame "#"). diff --git a/new/proof/globals_test.v b/new/proof/globals_test.v index ae2520f9d..a5a08868b 100644 --- a/new/proof/globals_test.v +++ b/new/proof/globals_test.v @@ -3,6 +3,7 @@ From New.code.github_com.mit_pdos.gokv Require globals_test. From Perennial.algebra Require Import map. (* TODO: this should be autogenerated *) +Section autogen. Class GlobalAddrs := { globalB : loc; @@ -11,72 +12,99 @@ Class GlobalAddrs := GlobalX : loc; }. -Definition vars_addrs `{!GlobalAddrs} : list (go_string * loc) := [ - ("globalB"%go, globalB); - ("globalA"%go, globalA); +Definition var_addrs `{!GlobalAddrs} : list (go_string * loc) := [ + ("GlobalX"%go, GlobalX); ("globalY"%go, globalY); - ("GlobalX"%go, GlobalX) + ("globalA"%go, globalA); + ("globalB"%go, globalB) ]. -Section proof. +Context `{!heapGS Σ}. +Context `{!goGlobalsGS Σ}. + +Definition is_defined `{!GlobalAddrs} : iProp Σ := + is_global_definitions globals_test.pkg_name' var_addrs + globals_test.functions' globals_test.msets'. +Context `{!GlobalAddrs}. + +Global Instance wp_globals_get_globalB : + WpGlobalsGet globals_test.pkg_name' "globalB"%go globalB is_defined. +Proof. apply wp_globals_get'. reflexivity. Qed. + +Global Instance wp_globals_get_globalA : + WpGlobalsGet globals_test.pkg_name' "globalA"%go globalA is_defined. +Proof. apply wp_globals_get'. reflexivity. Qed. + +Global Instance wp_globals_get_globalY : + WpGlobalsGet globals_test.pkg_name' "globalY"%go globalY is_defined. +Proof. apply wp_globals_get'. reflexivity. Qed. + +Global Instance wp_globals_get_GlobalX : + WpGlobalsGet globals_test.pkg_name' "GlobalX"%go GlobalX is_defined. +Proof. apply wp_globals_get'. reflexivity. Qed. +Global Instance wp_func_call_foo : + WpFuncCall globals_test.pkg_name' "foo" globals_test.foo is_defined. +Proof. apply wp_func_call'. reflexivity. Qed. + +Global Instance wp_func_call_other : + WpFuncCall globals_test.pkg_name' "other" globals_test.other is_defined. +Proof. apply wp_func_call'. reflexivity. Qed. + +Global Instance wp_func_call_bar : + WpFuncCall globals_test.pkg_name' "bar" globals_test.bar is_defined. +Proof. apply wp_func_call'. reflexivity. Qed. + +Global Instance wp_func_call_main : + WpFuncCall globals_test.pkg_name' "main" globals_test.main is_defined. +Proof. apply wp_func_call'. reflexivity. Qed. + +End autogen. +(* TODO: end autogenerated part *) + +Section proof. Context `{!heapGS Σ}. Context `{!goGlobalsGS Σ}. +Context `{!ghost_varG Σ ()}. -Definition own_initial_globals `{!GlobalAddrs} : iProp Σ := +Definition own_allocated `{!GlobalAddrs} : iProp Σ := "HglobalB" ∷ globalB ↦ (default_val go_string) ∗ "HglobalA" ∷ globalA ↦ (default_val go_string) ∗ "HglobalY" ∷ globalY ↦ (default_val go_string) ∗ "HGlobalX" ∷ GlobalX ↦ (default_val w64). -Lemma wp_define' g : - g !! globals_test.pkg_name' = None → - {{{ own_globals g }}} - globals.alloc_and_define globals_test.pkg_name' globals_test.vars' globals_test.functions' - globals_test.msets' #() - {{{ (_:GlobalAddrs), RET #(); - own_initial_globals - }}}. +Local Instance wp_globals_alloc_inst : + WpGlobalsAlloc globals_test.vars' (@globals_test.GlobalAddrs) (@globals_test.var_addrs) (@own_allocated). Proof. - iIntros (Hlookup ?) "Hunused HΦ". - rewrite globals.alloc_and_define_unseal. + rewrite /WpGlobalsAlloc. + iIntros (?) "!# _ HΦ". wp_call. rewrite -!default_val_eq_zero_val /=. - - wp_alloc globalB_ptr as "?". - wp_pures. - - wp_alloc globalA_ptr as "?". - wp_pures. - - wp_alloc globalY_ptr as "?". - wp_pures. - - wp_alloc GlobalX_ptr as "?". - wp_pures. - - iApply (wp_GlobalPut with "[$]"). - { done. } - iNext. iIntros "H". - + wp_alloc globalB_ptr as "?". wp_pures. + wp_alloc globalA_ptr as "?". wp_pures. + wp_alloc globalY_ptr as "?". wp_pures. + wp_alloc GlobalX_ptr as "?". wp_pures. iApply ("HΦ" $! (ltac:(econstructor) : GlobalAddrs)). iFrame "∗". Qed. -Context `{!GlobalAddrs}. -Definition own_initialized : iProp Σ := +Definition own_initialized `{!GlobalAddrs} : iProp Σ := "HglobalB" ∷ globalB ↦ "b"%go ∗ "HglobalA" ∷ globalA ↦ "a"%go ∗ "HglobalY" ∷ globalY ↦ ""%go ∗ - "HglobalX" ∷ GlobalX ↦ (W64 10) -. + "HglobalX" ∷ GlobalX ↦ (W64 10). + +Definition is_initialized (γtok : gname) `{!GlobalAddrs} : iProp Σ := + inv nroot (ghost_var γtok 1 () ∨ own_initialized). -Lemma wp_initialize' pending postconds : +Lemma wp_initialize' pending postconds γtok : globals_test.pkg_name' ∉ pending → - postconds !! globals_test.pkg_name' = Some own_initialized → + postconds !! globals_test.pkg_name' = Some (∃ (d : GlobalAddrs), is_defined ∗ is_initialized γtok)%I → {{{ own_globals_tok pending postconds }}} globals_test.initialize' #() - {{{ RET #(); is_initialized globals_test.pkg_name' own_initialized }}}. + {{{ (_ : GlobalAddrs), RET #(); + is_defined ∗ is_initialized γtok ∗ own_globals_tok pending postconds + }}}. Proof. iIntros (???) "Hunused HΦ". wp_call. @@ -84,59 +112,61 @@ Proof. { eassumption. } { set_solver. } { (* prove init function *) - iIntros "Hvars Htok". - wp_pures. - wp_apply (wp_define' with "[$]"). - iIntros (?) "[Hdefined Hvars]". - iMod ("Htok" with "[$]") as "Htok". - iNamed "Hdefined". + iIntros "* #Hdefs Hvars Htok". wp_pures. + iNamed "Hvars". + (* go into foo() *) + wp_func_call. wp_call. - wp_apply (wp_globals_get with "[]"); first iFrame "#". + wp_globals_get. wp_store. wp_pures. - wp_apply (wp_globals_get with "[]"); first iFrame "#". + wp_globals_get. wp_store. wp_pures. - wp_apply (wp_globals_get with "[]"); first iFrame "#". + wp_globals_get. wp_store. wp_pures. - wp_apply (wp_globals_get with "[]"); first iFrame "#". + wp_globals_get. wp_load. wp_pures. - wp_apply (wp_globals_get with "[]"); first iFrame "#". + wp_globals_get. wp_store. wp_pures. - wp_apply (wp_globals_get with "[]"); first iFrame "#". + wp_globals_get. wp_store. + iApply wp_fupd. wp_pures. iFrame "Htok". + iSplitR; first done. + unfold is_initialized. + iMod (inv_alloc with "[-]") as "#?". + 2:{ repeat iModIntro. iFrame "#". } + iNext. iRight. iFrame "∗#". } - iIntros "His Htok". iApply "HΦ". - iFrame. Qed. +Context `{!GlobalAddrs}. Lemma wp_main : - {{{ own_initialized }}} - globals_test.main #() + {{{ is_defined ∗ own_initialized }}} + func_call #globals_test.pkg_name' #"main" #() {{{ RET #(); True }}}. Proof. - iIntros (?) "Hpre HΦ". + iIntros (?) "[#Hdef Hpre] HΦ". iNamed "Hpre". - wp_call. - wp_call. - wp_call. - wp_apply wp_globals_get; first iFrame "#". + wp_func_call. wp_call. + wp_func_call. wp_call. + wp_func_call. wp_call. + wp_globals_get. wp_store. wp_pures. - wp_apply wp_globals_get; first iFrame "#". - wp_load. - wp_pures. - wp_apply wp_globals_get; first iFrame "#". + wp_globals_get. + wp_load. wp_pures. + wp_globals_get. wp_load. wp_pures. by iApply "HΦ". @@ -149,14 +179,14 @@ From Perennial.goose_lang.ffi Require Import grove_ffi.adequacy. From New.proof Require Import grove_prelude. Section closed. -Definition globals_testΣ : gFunctors := #[heapΣ ; goGlobalsΣ]. +Definition globals_testΣ : gFunctors := #[heapΣ ; goGlobalsΣ; ghost_varΣ ()]. Lemma globals_test_boot σ (g : goose_lang.global_state) : ffi_initgP g.(global_world) → ffi_initP σ.(world) g.(global_world) → σ.(globals) = ∅ → (* FIXME: this should be abstracted into a "goose_lang.init" predicate or something. *) dist_adequate_failstop [ - ((globals_test.initialize' #() ;; globals_test.main #())%E, σ) ] g (λ _, True). + ((globals_test.initialize' #() ;; func_call #globals_test.pkg_name' #"main" #())%E, σ) ] g (λ _, True). Proof. simpl. intros ? ? Hgempty. @@ -175,18 +205,19 @@ Proof. set (hG' := HeapGS _ _ _). (* overcome impedence mismatch between heapGS (bundled) and gooseGLobalGS+gooseLocalGS (split) proofs *) iIntros "Hglobals". rewrite Hgempty. + iMod (ghost_var_alloc ()) as (γtok) "Hescrow". iMod (go_global_init - (λ _, {[ globals_test.pkg_name' := own_initialized ]}) with "[$]") as - (hGlobals) "[Hpost Hg]". + (λ _, {[ globals_test.pkg_name' := _ ]}) with "[$]") as + (hGlobals) "Hpost". iModIntro. iExists (λ _, True)%I. wp_apply (wp_initialize' with "[$]"). { set_solver. } { rewrite lookup_singleton. done. } - iIntros "Hinit". - iMod (own_package_post_toks_get globals_test.pkg_name' with "[$]") as "[? _]". - { set_solver. } - iMod (is_initialized_get_post with "[$] [$]") as "Hinit". + iIntros "* (Hdef & Hinit & Htok)". + iApply fupd_wp. iInv "Hinit" as ">[Hbad|Hi]" "Hclose". + { iCombine "Hbad Hescrow" gives %[Hbad _]. done. } + iMod ("Hclose" with "[$Hescrow]") as "_". iModIntro. wp_pures. by wp_apply (wp_main with "[$]"). } diff --git a/new/proof/sync.v b/new/proof/sync.v index d04df8823..cc3be82b3 100644 --- a/new/proof/sync.v +++ b/new/proof/sync.v @@ -98,9 +98,6 @@ Proof. } Qed. -Global Hint Mode WpMethodCall - - - - - - + + + - - : typeclass_instances. -Global Hint Mode WpFuncCall - - - - - - + + - - : typeclass_instances. - Lemma wp_Mutex__Lock m R : {{{ is_defined ∗ is_Mutex m R }}} method_call #sync.pkg_name' #"Mutex'ptr" #"Lock" #m #() diff --git a/new_code_axioms/bytes.v b/new_code_axioms/bytes.v index 44ea58748..7da4ca1b5 100644 --- a/new_code_axioms/bytes.v +++ b/new_code_axioms/bytes.v @@ -5,101 +5,9 @@ Section axioms. Context `{ffi_syntax}. Axiom Buffer : go_type. -Axiom Buffer__mset : list (go_string * val). -Axiom Buffer__mset_ptr : list (go_string * val). -Axiom ErrTooLarge : (go_string * go_string). -Axiom Buffer__Bytes : val. -Axiom Buffer__AvailableBuffer : val. -Axiom Buffer__String : val. -Axiom Buffer__Len : val. -Axiom Buffer__Cap : val. -Axiom Buffer__Available : val. -Axiom Buffer__Truncate : val. -Axiom Buffer__Reset : val. -Axiom Buffer__Grow : val. -Axiom Buffer__Write : val. -Axiom Buffer__WriteString : val. Axiom MinRead : Z. -Axiom Buffer__ReadFrom : val. -Axiom Buffer__WriteTo : val. -Axiom Buffer__WriteByte : val. -Axiom Buffer__WriteRune : val. -Axiom Buffer__Read : val. -Axiom Buffer__Next : val. -Axiom Buffer__ReadByte : val. -Axiom Buffer__ReadRune : val. -Axiom Buffer__UnreadRune : val. -Axiom Buffer__UnreadByte : val. -Axiom Buffer__ReadBytes : val. -Axiom Buffer__ReadString : val. -Axiom NewBuffer : val. -Axiom NewBufferString : val. -Axiom Equal : val. -Axiom Compare : val. -Axiom Count : val. -Axiom Contains : val. -Axiom ContainsAny : val. -Axiom ContainsRune : val. -Axiom ContainsFunc : val. -Axiom IndexByte : val. -Axiom LastIndex : val. -Axiom LastIndexByte : val. -Axiom IndexRune : val. -Axiom IndexAny : val. -Axiom LastIndexAny : val. -Axiom SplitN : val. -Axiom SplitAfterN : val. -Axiom Split : val. -Axiom SplitAfter : val. -Axiom Fields : val. -Axiom FieldsFunc : val. -Axiom Join : val. -Axiom HasPrefix : val. -Axiom HasSuffix : val. -Axiom Map : val. -Axiom Repeat : val. -Axiom ToUpper : val. -Axiom ToLower : val. -Axiom ToTitle : val. -Axiom ToUpperSpecial : val. -Axiom ToLowerSpecial : val. -Axiom ToTitleSpecial : val. -Axiom ToValidUTF8 : val. -Axiom Title : val. -Axiom TrimLeftFunc : val. -Axiom TrimRightFunc : val. -Axiom TrimFunc : val. -Axiom TrimPrefix : val. -Axiom TrimSuffix : val. -Axiom IndexFunc : val. -Axiom LastIndexFunc : val. -Axiom Trim : val. -Axiom TrimLeft : val. -Axiom TrimRight : val. -Axiom TrimSpace : val. -Axiom Runes : val. -Axiom Replace : val. -Axiom ReplaceAll : val. -Axiom EqualFold : val. -Axiom Index : val. -Axiom Cut : val. -Axiom Clone : val. -Axiom CutPrefix : val. -Axiom CutSuffix : val. Axiom Reader : go_type. -Axiom Reader__mset : list (go_string * val). -Axiom Reader__mset_ptr : list (go_string * val). -Axiom Reader__Len : val. -Axiom Reader__Size : val. -Axiom Reader__Read : val. -Axiom Reader__ReadAt : val. -Axiom Reader__ReadByte : val. -Axiom Reader__UnreadByte : val. -Axiom Reader__ReadRune : val. -Axiom Reader__UnreadRune : val. -Axiom Reader__Seek : val. -Axiom Reader__WriteTo : val. -Axiom Reader__Reset : val. -Axiom NewReader : val. +Definition pkg_name' : go_string := "bytes". Axiom initialize' : val. + End axioms. diff --git a/new_code_axioms/context.v b/new_code_axioms/context.v index 21dc795db..fa44f5e7f 100644 --- a/new_code_axioms/context.v +++ b/new_code_axioms/context.v @@ -5,49 +5,9 @@ Section axioms. Context `{ffi_syntax}. Axiom Context : go_type. -Axiom Context__mset : list (go_string * val). -Axiom Context__mset_ptr : list (go_string * val). -Axiom Canceled : (go_string * go_string). -Axiom DeadlineExceeded : (go_string * go_string). -Axiom deadlineExceededError__Error : val. -Axiom deadlineExceededError__Timeout : val. -Axiom deadlineExceededError__Temporary : val. -Axiom emptyCtx__Deadline : val. -Axiom emptyCtx__Done : val. -Axiom emptyCtx__Err : val. -Axiom emptyCtx__Value : val. -Axiom backgroundCtx__String : val. -Axiom todoCtx__String : val. -Axiom Background : val. -Axiom TODO : val. Axiom CancelFunc : go_type. -Axiom CancelFunc__mset : list (go_string * val). -Axiom CancelFunc__mset_ptr : list (go_string * val). -Axiom WithCancel : val. Axiom CancelCauseFunc : go_type. -Axiom CancelCauseFunc__mset : list (go_string * val). -Axiom CancelCauseFunc__mset_ptr : list (go_string * val). -Axiom WithCancelCause : val. -Axiom Cause : val. -Axiom AfterFunc : val. -Axiom cancelCtx__Value : val. -Axiom cancelCtx__Done : val. -Axiom cancelCtx__Err : val. -Axiom cancelCtx__String : val. -Axiom WithoutCancel : val. -Axiom withoutCancelCtx__Deadline : val. -Axiom withoutCancelCtx__Done : val. -Axiom withoutCancelCtx__Err : val. -Axiom withoutCancelCtx__Value : val. -Axiom withoutCancelCtx__String : val. -Axiom WithDeadline : val. -Axiom WithDeadlineCause : val. -Axiom timerCtx__Deadline : val. -Axiom timerCtx__String : val. -Axiom WithTimeout : val. -Axiom WithTimeoutCause : val. -Axiom WithValue : val. -Axiom valueCtx__String : val. -Axiom valueCtx__Value : val. +Definition pkg_name' : go_string := "context". Axiom initialize' : val. + End axioms. diff --git a/new_code_axioms/crypto/rand.v b/new_code_axioms/crypto/rand.v index 4e2e5e7d8..5b55cbacc 100644 --- a/new_code_axioms/crypto/rand.v +++ b/new_code_axioms/crypto/rand.v @@ -4,11 +4,7 @@ From New.golang Require Import defn. Section axioms. Context `{ffi_syntax}. -Axiom Reader : (go_string * go_string). -Axiom Read : val. -Axiom reader__Read : val. -Axiom hideAgainReader__Read : val. -Axiom Prime : val. -Axiom Int : val. +Definition pkg_name' : go_string := "crypto/rand". Axiom initialize' : val. + End axioms. diff --git a/new_code_axioms/errors.v b/new_code_axioms/errors.v index 06c5838a2..e45c47520 100644 --- a/new_code_axioms/errors.v +++ b/new_code_axioms/errors.v @@ -4,14 +4,7 @@ From New.golang Require Import defn. Section axioms. Context `{ffi_syntax}. -Axiom New : val. -Axiom errorString__Error : val. -Axiom ErrUnsupported : (go_string * go_string). -Axiom Join : val. -Axiom joinError__Error : val. -Axiom joinError__Unwrap : val. -Axiom Unwrap : val. -Axiom Is : val. -Axiom As : val. +Definition pkg_name' : go_string := "errors". Axiom initialize' : val. + End axioms. diff --git a/new_code_axioms/github_com/stretchr/testify/assert.v b/new_code_axioms/github_com/stretchr/testify/assert.v index 2239a9e96..ca03064c2 100644 --- a/new_code_axioms/github_com/stretchr/testify/assert.v +++ b/new_code_axioms/github_com/stretchr/testify/assert.v @@ -5,337 +5,16 @@ Section axioms. Context `{ffi_syntax}. Axiom CompareType : go_type. -Axiom CompareType__mset : list (go_string * val). -Axiom CompareType__mset_ptr : list (go_string * val). -Axiom Greater : val. -Axiom GreaterOrEqual : val. -Axiom Less : val. -Axiom LessOrEqual : val. -Axiom Positive : val. -Axiom Negative : val. -Axiom Conditionf : val. -Axiom Containsf : val. -Axiom DirExistsf : val. -Axiom ElementsMatchf : val. -Axiom Emptyf : val. -Axiom Equalf : val. -Axiom EqualErrorf : val. -Axiom EqualExportedValuesf : val. -Axiom EqualValuesf : val. -Axiom Errorf : val. -Axiom ErrorAsf : val. -Axiom ErrorContainsf : val. -Axiom ErrorIsf : val. -Axiom Eventuallyf : val. -Axiom EventuallyWithTf : val. -Axiom Exactlyf : val. -Axiom Failf : val. -Axiom FailNowf : val. -Axiom Falsef : val. -Axiom FileExistsf : val. -Axiom Greaterf : val. -Axiom GreaterOrEqualf : val. -Axiom HTTPBodyContainsf : val. -Axiom HTTPBodyNotContainsf : val. -Axiom HTTPErrorf : val. -Axiom HTTPRedirectf : val. -Axiom HTTPStatusCodef : val. -Axiom HTTPSuccessf : val. -Axiom Implementsf : val. -Axiom InDeltaf : val. -Axiom InDeltaMapValuesf : val. -Axiom InDeltaSlicef : val. -Axiom InEpsilonf : val. -Axiom InEpsilonSlicef : val. -Axiom IsDecreasingf : val. -Axiom IsIncreasingf : val. -Axiom IsNonDecreasingf : val. -Axiom IsNonIncreasingf : val. -Axiom IsTypef : val. -Axiom JSONEqf : val. -Axiom Lenf : val. -Axiom Lessf : val. -Axiom LessOrEqualf : val. -Axiom Negativef : val. -Axiom Neverf : val. -Axiom Nilf : val. -Axiom NoDirExistsf : val. -Axiom NoErrorf : val. -Axiom NoFileExistsf : val. -Axiom NotContainsf : val. -Axiom NotEmptyf : val. -Axiom NotEqualf : val. -Axiom NotEqualValuesf : val. -Axiom NotErrorIsf : val. -Axiom NotImplementsf : val. -Axiom NotNilf : val. -Axiom NotPanicsf : val. -Axiom NotRegexpf : val. -Axiom NotSamef : val. -Axiom NotSubsetf : val. -Axiom NotZerof : val. -Axiom Panicsf : val. -Axiom PanicsWithErrorf : val. -Axiom PanicsWithValuef : val. -Axiom Positivef : val. -Axiom Regexpf : val. -Axiom Samef : val. -Axiom Subsetf : val. -Axiom Truef : val. -Axiom WithinDurationf : val. -Axiom WithinRangef : val. -Axiom YAMLEqf : val. -Axiom Zerof : val. -Axiom Assertions__Condition : val. -Axiom Assertions__Conditionf : val. -Axiom Assertions__Contains : val. -Axiom Assertions__Containsf : val. -Axiom Assertions__DirExists : val. -Axiom Assertions__DirExistsf : val. -Axiom Assertions__ElementsMatch : val. -Axiom Assertions__ElementsMatchf : val. -Axiom Assertions__Empty : val. -Axiom Assertions__Emptyf : val. -Axiom Assertions__Equal : val. -Axiom Assertions__EqualError : val. -Axiom Assertions__EqualErrorf : val. -Axiom Assertions__EqualExportedValues : val. -Axiom Assertions__EqualExportedValuesf : val. -Axiom Assertions__EqualValues : val. -Axiom Assertions__EqualValuesf : val. -Axiom Assertions__Equalf : val. -Axiom Assertions__Error : val. -Axiom Assertions__ErrorAs : val. -Axiom Assertions__ErrorAsf : val. -Axiom Assertions__ErrorContains : val. -Axiom Assertions__ErrorContainsf : val. -Axiom Assertions__ErrorIs : val. -Axiom Assertions__ErrorIsf : val. -Axiom Assertions__Errorf : val. -Axiom Assertions__Eventually : val. -Axiom Assertions__EventuallyWithT : val. -Axiom Assertions__EventuallyWithTf : val. -Axiom Assertions__Eventuallyf : val. -Axiom Assertions__Exactly : val. -Axiom Assertions__Exactlyf : val. -Axiom Assertions__Fail : val. -Axiom Assertions__FailNow : val. -Axiom Assertions__FailNowf : val. -Axiom Assertions__Failf : val. -Axiom Assertions__False : val. -Axiom Assertions__Falsef : val. -Axiom Assertions__FileExists : val. -Axiom Assertions__FileExistsf : val. -Axiom Assertions__Greater : val. -Axiom Assertions__GreaterOrEqual : val. -Axiom Assertions__GreaterOrEqualf : val. -Axiom Assertions__Greaterf : val. -Axiom Assertions__HTTPBodyContains : val. -Axiom Assertions__HTTPBodyContainsf : val. -Axiom Assertions__HTTPBodyNotContains : val. -Axiom Assertions__HTTPBodyNotContainsf : val. -Axiom Assertions__HTTPError : val. -Axiom Assertions__HTTPErrorf : val. -Axiom Assertions__HTTPRedirect : val. -Axiom Assertions__HTTPRedirectf : val. -Axiom Assertions__HTTPStatusCode : val. -Axiom Assertions__HTTPStatusCodef : val. -Axiom Assertions__HTTPSuccess : val. -Axiom Assertions__HTTPSuccessf : val. -Axiom Assertions__Implements : val. -Axiom Assertions__Implementsf : val. -Axiom Assertions__InDelta : val. -Axiom Assertions__InDeltaMapValues : val. -Axiom Assertions__InDeltaMapValuesf : val. -Axiom Assertions__InDeltaSlice : val. -Axiom Assertions__InDeltaSlicef : val. -Axiom Assertions__InDeltaf : val. -Axiom Assertions__InEpsilon : val. -Axiom Assertions__InEpsilonSlice : val. -Axiom Assertions__InEpsilonSlicef : val. -Axiom Assertions__InEpsilonf : val. -Axiom Assertions__IsDecreasing : val. -Axiom Assertions__IsDecreasingf : val. -Axiom Assertions__IsIncreasing : val. -Axiom Assertions__IsIncreasingf : val. -Axiom Assertions__IsNonDecreasing : val. -Axiom Assertions__IsNonDecreasingf : val. -Axiom Assertions__IsNonIncreasing : val. -Axiom Assertions__IsNonIncreasingf : val. -Axiom Assertions__IsType : val. -Axiom Assertions__IsTypef : val. -Axiom Assertions__JSONEq : val. -Axiom Assertions__JSONEqf : val. -Axiom Assertions__Len : val. -Axiom Assertions__Lenf : val. -Axiom Assertions__Less : val. -Axiom Assertions__LessOrEqual : val. -Axiom Assertions__LessOrEqualf : val. -Axiom Assertions__Lessf : val. -Axiom Assertions__Negative : val. -Axiom Assertions__Negativef : val. -Axiom Assertions__Never : val. -Axiom Assertions__Neverf : val. -Axiom Assertions__Nil : val. -Axiom Assertions__Nilf : val. -Axiom Assertions__NoDirExists : val. -Axiom Assertions__NoDirExistsf : val. -Axiom Assertions__NoError : val. -Axiom Assertions__NoErrorf : val. -Axiom Assertions__NoFileExists : val. -Axiom Assertions__NoFileExistsf : val. -Axiom Assertions__NotContains : val. -Axiom Assertions__NotContainsf : val. -Axiom Assertions__NotEmpty : val. -Axiom Assertions__NotEmptyf : val. -Axiom Assertions__NotEqual : val. -Axiom Assertions__NotEqualValues : val. -Axiom Assertions__NotEqualValuesf : val. -Axiom Assertions__NotEqualf : val. -Axiom Assertions__NotErrorIs : val. -Axiom Assertions__NotErrorIsf : val. -Axiom Assertions__NotImplements : val. -Axiom Assertions__NotImplementsf : val. -Axiom Assertions__NotNil : val. -Axiom Assertions__NotNilf : val. -Axiom Assertions__NotPanics : val. -Axiom Assertions__NotPanicsf : val. -Axiom Assertions__NotRegexp : val. -Axiom Assertions__NotRegexpf : val. -Axiom Assertions__NotSame : val. -Axiom Assertions__NotSamef : val. -Axiom Assertions__NotSubset : val. -Axiom Assertions__NotSubsetf : val. -Axiom Assertions__NotZero : val. -Axiom Assertions__NotZerof : val. -Axiom Assertions__Panics : val. -Axiom Assertions__PanicsWithError : val. -Axiom Assertions__PanicsWithErrorf : val. -Axiom Assertions__PanicsWithValue : val. -Axiom Assertions__PanicsWithValuef : val. -Axiom Assertions__Panicsf : val. -Axiom Assertions__Positive : val. -Axiom Assertions__Positivef : val. -Axiom Assertions__Regexp : val. -Axiom Assertions__Regexpf : val. -Axiom Assertions__Same : val. -Axiom Assertions__Samef : val. -Axiom Assertions__Subset : val. -Axiom Assertions__Subsetf : val. -Axiom Assertions__True : val. -Axiom Assertions__Truef : val. -Axiom Assertions__WithinDuration : val. -Axiom Assertions__WithinDurationf : val. -Axiom Assertions__WithinRange : val. -Axiom Assertions__WithinRangef : val. -Axiom Assertions__YAMLEq : val. -Axiom Assertions__YAMLEqf : val. -Axiom Assertions__Zero : val. -Axiom Assertions__Zerof : val. -Axiom IsIncreasing : val. -Axiom IsNonIncreasing : val. -Axiom IsDecreasing : val. -Axiom IsNonDecreasing : val. Axiom TestingT : go_type. -Axiom TestingT__mset : list (go_string * val). -Axiom TestingT__mset_ptr : list (go_string * val). Axiom ComparisonAssertionFunc : go_type. -Axiom ComparisonAssertionFunc__mset : list (go_string * val). -Axiom ComparisonAssertionFunc__mset_ptr : list (go_string * val). Axiom ValueAssertionFunc : go_type. -Axiom ValueAssertionFunc__mset : list (go_string * val). -Axiom ValueAssertionFunc__mset_ptr : list (go_string * val). Axiom BoolAssertionFunc : go_type. -Axiom BoolAssertionFunc__mset : list (go_string * val). -Axiom BoolAssertionFunc__mset_ptr : list (go_string * val). Axiom ErrorAssertionFunc : go_type. -Axiom ErrorAssertionFunc__mset : list (go_string * val). -Axiom ErrorAssertionFunc__mset_ptr : list (go_string * val). Axiom Comparison : go_type. -Axiom Comparison__mset : list (go_string * val). -Axiom Comparison__mset_ptr : list (go_string * val). -Axiom ObjectsAreEqual : val. -Axiom ObjectsExportedFieldsAreEqual : val. -Axiom ObjectsAreEqualValues : val. -Axiom CallerInfo : val. -Axiom FailNow : val. -Axiom Fail : val. -Axiom Implements : val. -Axiom NotImplements : val. -Axiom IsType : val. -Axiom Equal : val. -Axiom Same : val. -Axiom NotSame : val. -Axiom EqualValues : val. -Axiom EqualExportedValues : val. -Axiom Exactly : val. -Axiom NotNil : val. -Axiom Nil : val. -Axiom Empty : val. -Axiom NotEmpty : val. -Axiom Len : val. -Axiom True : val. -Axiom False : val. -Axiom NotEqual : val. -Axiom NotEqualValues : val. -Axiom Contains : val. -Axiom NotContains : val. -Axiom Subset : val. -Axiom NotSubset : val. -Axiom ElementsMatch : val. -Axiom Condition : val. Axiom PanicTestFunc : go_type. -Axiom PanicTestFunc__mset : list (go_string * val). -Axiom PanicTestFunc__mset_ptr : list (go_string * val). -Axiom Panics : val. -Axiom PanicsWithValue : val. -Axiom PanicsWithError : val. -Axiom NotPanics : val. -Axiom WithinDuration : val. -Axiom WithinRange : val. -Axiom InDelta : val. -Axiom InDeltaSlice : val. -Axiom InDeltaMapValues : val. -Axiom InEpsilon : val. -Axiom InEpsilonSlice : val. -Axiom NoError : val. -Axiom Error : val. -Axiom EqualError : val. -Axiom ErrorContains : val. -Axiom Regexp : val. -Axiom NotRegexp : val. -Axiom Zero : val. -Axiom NotZero : val. -Axiom FileExists : val. -Axiom NoFileExists : val. -Axiom DirExists : val. -Axiom NoDirExists : val. -Axiom JSONEq : val. -Axiom YAMLEq : val. -Axiom Eventually : val. Axiom CollectT : go_type. -Axiom CollectT__mset : list (go_string * val). -Axiom CollectT__mset_ptr : list (go_string * val). -Axiom CollectT__Errorf : val. -Axiom CollectT__FailNow : val. -Axiom CollectT__Reset : val. -Axiom CollectT__Copy : val. -Axiom EventuallyWithT : val. -Axiom Never : val. -Axiom ErrorIs : val. -Axiom NotErrorIs : val. -Axiom ErrorAs : val. -Axiom AnError : (go_string * go_string). Axiom Assertions : go_type. -Axiom Assertions__mset : list (go_string * val). -Axiom Assertions__mset_ptr : list (go_string * val). -Axiom New : val. -Axiom HTTPSuccess : val. -Axiom HTTPRedirect : val. -Axiom HTTPError : val. -Axiom HTTPStatusCode : val. -Axiom HTTPBody : val. -Axiom HTTPBodyContains : val. -Axiom HTTPBodyNotContains : val. +Definition pkg_name' : go_string := "github.com/stretchr/testify/assert". Axiom initialize' : val. + End axioms. diff --git a/new_code_axioms/go_etcd_io/raft/v3/confchange.v b/new_code_axioms/go_etcd_io/raft/v3/confchange.v index 5514741f0..63b9ba391 100644 --- a/new_code_axioms/go_etcd_io/raft/v3/confchange.v +++ b/new_code_axioms/go_etcd_io/raft/v3/confchange.v @@ -5,12 +5,7 @@ Section axioms. Context `{ffi_syntax}. Axiom Changer : go_type. -Axiom Changer__mset : list (go_string * val). -Axiom Changer__mset_ptr : list (go_string * val). -Axiom Changer__EnterJoint : val. -Axiom Changer__LeaveJoint : val. -Axiom Changer__Simple : val. -Axiom Describe : val. -Axiom Restore : val. +Definition pkg_name' : go_string := "go.etcd.io/raft/v3/confchange". Axiom initialize' : val. + End axioms. diff --git a/new_code_axioms/go_etcd_io/raft/v3/quorum/slices64.v b/new_code_axioms/go_etcd_io/raft/v3/quorum/slices64.v index bad424324..86eaf16d9 100644 --- a/new_code_axioms/go_etcd_io/raft/v3/quorum/slices64.v +++ b/new_code_axioms/go_etcd_io/raft/v3/quorum/slices64.v @@ -4,6 +4,7 @@ From New.golang Require Import defn. Section axioms. Context `{ffi_syntax}. -Axiom Sort : val. +Definition pkg_name' : go_string := "go.etcd.io/raft/v3/quorum/slices64". Axiom initialize' : val. + End axioms. diff --git a/new_code_axioms/io.v b/new_code_axioms/io.v index f68c2a09c..afd2f542c 100644 --- a/new_code_axioms/io.v +++ b/new_code_axioms/io.v @@ -7,137 +7,34 @@ Context `{ffi_syntax}. Axiom SeekStart : Z. Axiom SeekCurrent : Z. Axiom SeekEnd : Z. -Axiom ErrShortWrite : (go_string * go_string). -Axiom ErrShortBuffer : (go_string * go_string). -Axiom EOF : (go_string * go_string). -Axiom ErrUnexpectedEOF : (go_string * go_string). -Axiom ErrNoProgress : (go_string * go_string). Axiom Reader : go_type. -Axiom Reader__mset : list (go_string * val). -Axiom Reader__mset_ptr : list (go_string * val). Axiom Writer : go_type. -Axiom Writer__mset : list (go_string * val). -Axiom Writer__mset_ptr : list (go_string * val). Axiom Closer : go_type. -Axiom Closer__mset : list (go_string * val). -Axiom Closer__mset_ptr : list (go_string * val). Axiom Seeker : go_type. -Axiom Seeker__mset : list (go_string * val). -Axiom Seeker__mset_ptr : list (go_string * val). Axiom ReadWriter : go_type. -Axiom ReadWriter__mset : list (go_string * val). -Axiom ReadWriter__mset_ptr : list (go_string * val). Axiom ReadCloser : go_type. -Axiom ReadCloser__mset : list (go_string * val). -Axiom ReadCloser__mset_ptr : list (go_string * val). Axiom WriteCloser : go_type. -Axiom WriteCloser__mset : list (go_string * val). -Axiom WriteCloser__mset_ptr : list (go_string * val). Axiom ReadWriteCloser : go_type. -Axiom ReadWriteCloser__mset : list (go_string * val). -Axiom ReadWriteCloser__mset_ptr : list (go_string * val). Axiom ReadSeeker : go_type. -Axiom ReadSeeker__mset : list (go_string * val). -Axiom ReadSeeker__mset_ptr : list (go_string * val). Axiom ReadSeekCloser : go_type. -Axiom ReadSeekCloser__mset : list (go_string * val). -Axiom ReadSeekCloser__mset_ptr : list (go_string * val). Axiom WriteSeeker : go_type. -Axiom WriteSeeker__mset : list (go_string * val). -Axiom WriteSeeker__mset_ptr : list (go_string * val). Axiom ReadWriteSeeker : go_type. -Axiom ReadWriteSeeker__mset : list (go_string * val). -Axiom ReadWriteSeeker__mset_ptr : list (go_string * val). Axiom ReaderFrom : go_type. -Axiom ReaderFrom__mset : list (go_string * val). -Axiom ReaderFrom__mset_ptr : list (go_string * val). Axiom WriterTo : go_type. -Axiom WriterTo__mset : list (go_string * val). -Axiom WriterTo__mset_ptr : list (go_string * val). Axiom ReaderAt : go_type. -Axiom ReaderAt__mset : list (go_string * val). -Axiom ReaderAt__mset_ptr : list (go_string * val). Axiom WriterAt : go_type. -Axiom WriterAt__mset : list (go_string * val). -Axiom WriterAt__mset_ptr : list (go_string * val). Axiom ByteReader : go_type. -Axiom ByteReader__mset : list (go_string * val). -Axiom ByteReader__mset_ptr : list (go_string * val). Axiom ByteScanner : go_type. -Axiom ByteScanner__mset : list (go_string * val). -Axiom ByteScanner__mset_ptr : list (go_string * val). Axiom ByteWriter : go_type. -Axiom ByteWriter__mset : list (go_string * val). -Axiom ByteWriter__mset_ptr : list (go_string * val). Axiom RuneReader : go_type. -Axiom RuneReader__mset : list (go_string * val). -Axiom RuneReader__mset_ptr : list (go_string * val). Axiom RuneScanner : go_type. -Axiom RuneScanner__mset : list (go_string * val). -Axiom RuneScanner__mset_ptr : list (go_string * val). Axiom StringWriter : go_type. -Axiom StringWriter__mset : list (go_string * val). -Axiom StringWriter__mset_ptr : list (go_string * val). -Axiom WriteString : val. -Axiom ReadAtLeast : val. -Axiom ReadFull : val. -Axiom CopyN : val. -Axiom Copy : val. -Axiom CopyBuffer : val. -Axiom LimitReader : val. Axiom LimitedReader : go_type. -Axiom LimitedReader__mset : list (go_string * val). -Axiom LimitedReader__mset_ptr : list (go_string * val). -Axiom LimitedReader__Read : val. -Axiom NewSectionReader : val. Axiom SectionReader : go_type. -Axiom SectionReader__mset : list (go_string * val). -Axiom SectionReader__mset_ptr : list (go_string * val). -Axiom SectionReader__Read : val. -Axiom SectionReader__Seek : val. -Axiom SectionReader__ReadAt : val. -Axiom SectionReader__Size : val. -Axiom SectionReader__Outer : val. Axiom OffsetWriter : go_type. -Axiom OffsetWriter__mset : list (go_string * val). -Axiom OffsetWriter__mset_ptr : list (go_string * val). -Axiom NewOffsetWriter : val. -Axiom OffsetWriter__Write : val. -Axiom OffsetWriter__WriteAt : val. -Axiom OffsetWriter__Seek : val. -Axiom TeeReader : val. -Axiom teeReader__Read : val. -Axiom Discard : (go_string * go_string). -Axiom discard__Write : val. -Axiom discard__WriteString : val. -Axiom discard__ReadFrom : val. -Axiom NopCloser : val. -Axiom nopCloser__Close : val. -Axiom nopCloserWriterTo__Close : val. -Axiom nopCloserWriterTo__WriteTo : val. -Axiom ReadAll : val. -Axiom eofReader__Read : val. -Axiom multiReader__Read : val. -Axiom multiReader__WriteTo : val. -Axiom MultiReader : val. -Axiom multiWriter__Write : val. -Axiom multiWriter__WriteString : val. -Axiom MultiWriter : val. -Axiom onceError__Store : val. -Axiom onceError__Load : val. -Axiom ErrClosedPipe : (go_string * go_string). Axiom PipeReader : go_type. -Axiom PipeReader__mset : list (go_string * val). -Axiom PipeReader__mset_ptr : list (go_string * val). -Axiom PipeReader__Read : val. -Axiom PipeReader__Close : val. -Axiom PipeReader__CloseWithError : val. Axiom PipeWriter : go_type. -Axiom PipeWriter__mset : list (go_string * val). -Axiom PipeWriter__mset_ptr : list (go_string * val). -Axiom PipeWriter__Write : val. -Axiom PipeWriter__Close : val. -Axiom PipeWriter__CloseWithError : val. -Axiom Pipe : val. +Definition pkg_name' : go_string := "io". Axiom initialize' : val. + End axioms. diff --git a/new_code_axioms/math.v b/new_code_axioms/math.v index 19c11df96..0bd5384e1 100644 --- a/new_code_axioms/math.v +++ b/new_code_axioms/math.v @@ -4,19 +4,6 @@ From New.golang Require Import defn. Section axioms. Context `{ffi_syntax}. -Axiom Abs : val. -Axiom Acosh : val. -Axiom Asin : val. -Axiom Acos : val. -Axiom Asinh : val. -Axiom Atan : val. -Axiom Atan2 : val. -Axiom Atanh : val. -Axiom Inf : val. -Axiom NaN : val. -Axiom IsNaN : val. -Axiom IsInf : val. -Axiom Cbrt : val. Axiom E : expr. Axiom Pi : expr. Axiom Phi : expr. @@ -47,59 +34,7 @@ Axiom MaxUint8 : Z. Axiom MaxUint16 : Z. Axiom MaxUint32 : Z. Axiom MaxUint64 : Z. -Axiom Copysign : val. -Axiom Dim : val. -Axiom Max : val. -Axiom Min : val. -Axiom Erf : val. -Axiom Erfc : val. -Axiom Erfinv : val. -Axiom Erfcinv : val. -Axiom Exp : val. -Axiom Exp2 : val. -Axiom Expm1 : val. -Axiom Floor : val. -Axiom Ceil : val. -Axiom Trunc : val. -Axiom Round : val. -Axiom RoundToEven : val. -Axiom FMA : val. -Axiom Frexp : val. -Axiom Gamma : val. -Axiom Hypot : val. -Axiom J0 : val. -Axiom Y0 : val. -Axiom J1 : val. -Axiom Y1 : val. -Axiom Jn : val. -Axiom Yn : val. -Axiom Ldexp : val. -Axiom Lgamma : val. -Axiom Log : val. -Axiom Log10 : val. -Axiom Log2 : val. -Axiom Log1p : val. -Axiom Logb : val. -Axiom Ilogb : val. -Axiom Mod : val. -Axiom Modf : val. -Axiom Nextafter32 : val. -Axiom Nextafter : val. -Axiom Pow : val. -Axiom Pow10 : val. -Axiom Remainder : val. -Axiom Signbit : val. -Axiom Cos : val. -Axiom Sin : val. -Axiom Sincos : val. -Axiom Sinh : val. -Axiom Cosh : val. -Axiom Sqrt : val. -Axiom Tan : val. -Axiom Tanh : val. -Axiom Float32bits : val. -Axiom Float32frombits : val. -Axiom Float64bits : val. -Axiom Float64frombits : val. +Definition pkg_name' : go_string := "math". Axiom initialize' : val. + End axioms. diff --git a/new_code_axioms/math/big.v b/new_code_axioms/math/big.v index 9d970bcb5..fb9c286a9 100644 --- a/new_code_axioms/math/big.v +++ b/new_code_axioms/math/big.v @@ -4,25 +4,13 @@ From New.golang Require Import defn. Section axioms. Context `{ffi_syntax}. -Axiom Accuracy__String : val. Axiom Word : go_type. -Axiom Word__mset : list (go_string * val). -Axiom Word__mset_ptr : list (go_string * val). -Axiom decimal__String : val. Axiom Float : go_type. -Axiom Float__mset : list (go_string * val). -Axiom Float__mset_ptr : list (go_string * val). Axiom ErrNaN : go_type. -Axiom ErrNaN__mset : list (go_string * val). -Axiom ErrNaN__mset_ptr : list (go_string * val). -Axiom ErrNaN__Error : val. -Axiom NewFloat : val. Axiom MaxExp : Z. Axiom MinExp : Z. Axiom MaxPrec : Z. Axiom RoundingMode : go_type. -Axiom RoundingMode__mset : list (go_string * val). -Axiom RoundingMode__mset_ptr : list (go_string * val). Axiom ToNearestEven : expr. Axiom ToNearestAway : expr. Axiom ToZero : expr. @@ -30,160 +18,13 @@ Axiom AwayFromZero : expr. Axiom ToNegativeInf : expr. Axiom ToPositiveInf : expr. Axiom Accuracy : go_type. -Axiom Accuracy__mset : list (go_string * val). -Axiom Accuracy__mset_ptr : list (go_string * val). Axiom Below : expr. Axiom Exact : expr. Axiom Above : expr. -Axiom Float__SetPrec : val. -Axiom Float__SetMode : val. -Axiom Float__Prec : val. -Axiom Float__MinPrec : val. -Axiom Float__Mode : val. -Axiom Float__Acc : val. -Axiom Float__Sign : val. -Axiom Float__MantExp : val. -Axiom Float__SetMantExp : val. -Axiom Float__Signbit : val. -Axiom Float__IsInf : val. -Axiom Float__IsInt : val. -Axiom Float__SetUint64 : val. -Axiom Float__SetInt64 : val. -Axiom Float__SetFloat64 : val. -Axiom Float__SetInt : val. -Axiom Float__SetRat : val. -Axiom Float__SetInf : val. -Axiom Float__Set : val. -Axiom Float__Copy : val. -Axiom Float__Uint64 : val. -Axiom Float__Int64 : val. -Axiom Float__Float32 : val. -Axiom Float__Float64 : val. -Axiom Float__Int : val. -Axiom Float__Rat : val. -Axiom Float__Abs : val. -Axiom Float__Neg : val. -Axiom Float__Add : val. -Axiom Float__Sub : val. -Axiom Float__Mul : val. -Axiom Float__Quo : val. -Axiom Float__Cmp : val. -Axiom Float__SetString : val. -Axiom Float__Parse : val. -Axiom ParseFloat : val. -Axiom Float__Scan : val. -Axiom Float__GobEncode : val. -Axiom Float__GobDecode : val. -Axiom Float__MarshalText : val. -Axiom Float__UnmarshalText : val. -Axiom Float__Text : val. -Axiom Float__String : val. -Axiom Float__Append : val. -Axiom Float__Format : val. Axiom Int : go_type. -Axiom Int__mset : list (go_string * val). -Axiom Int__mset_ptr : list (go_string * val). -Axiom Int__Sign : val. -Axiom Int__SetInt64 : val. -Axiom Int__SetUint64 : val. -Axiom NewInt : val. -Axiom Int__Set : val. -Axiom Int__Bits : val. -Axiom Int__SetBits : val. -Axiom Int__Abs : val. -Axiom Int__Neg : val. -Axiom Int__Add : val. -Axiom Int__Sub : val. -Axiom Int__Mul : val. -Axiom Int__MulRange : val. -Axiom Int__Binomial : val. -Axiom Int__Quo : val. -Axiom Int__Rem : val. -Axiom Int__QuoRem : val. -Axiom Int__Div : val. -Axiom Int__Mod : val. -Axiom Int__DivMod : val. -Axiom Int__Cmp : val. -Axiom Int__CmpAbs : val. -Axiom Int__Int64 : val. -Axiom Int__Uint64 : val. -Axiom Int__IsInt64 : val. -Axiom Int__IsUint64 : val. -Axiom Int__Float64 : val. -Axiom Int__SetString : val. -Axiom Int__SetBytes : val. -Axiom Int__Bytes : val. -Axiom Int__FillBytes : val. -Axiom Int__BitLen : val. -Axiom Int__TrailingZeroBits : val. -Axiom Int__Exp : val. -Axiom Int__GCD : val. -Axiom Int__Rand : val. -Axiom Int__ModInverse : val. -Axiom Jacobi : val. -Axiom Int__ModSqrt : val. -Axiom Int__Lsh : val. -Axiom Int__Rsh : val. -Axiom Int__Bit : val. -Axiom Int__SetBit : val. -Axiom Int__And : val. -Axiom Int__AndNot : val. -Axiom Int__Or : val. -Axiom Int__Xor : val. -Axiom Int__Not : val. -Axiom Int__Sqrt : val. -Axiom Int__Text : val. -Axiom Int__Append : val. -Axiom Int__String : val. -Axiom Int__Format : val. -Axiom byteReader__ReadByte : val. -Axiom byteReader__UnreadByte : val. -Axiom Int__Scan : val. -Axiom Int__GobEncode : val. -Axiom Int__GobDecode : val. -Axiom Int__MarshalText : val. -Axiom Int__UnmarshalText : val. -Axiom Int__MarshalJSON : val. -Axiom Int__UnmarshalJSON : val. -Axiom nat__String : val. Axiom MaxBase : expr. -Axiom Int__ProbablyPrime : val. Axiom Rat : go_type. -Axiom Rat__mset : list (go_string * val). -Axiom Rat__mset_ptr : list (go_string * val). -Axiom NewRat : val. -Axiom Rat__SetFloat64 : val. -Axiom Rat__Float32 : val. -Axiom Rat__Float64 : val. -Axiom Rat__SetFrac : val. -Axiom Rat__SetFrac64 : val. -Axiom Rat__SetInt : val. -Axiom Rat__SetInt64 : val. -Axiom Rat__SetUint64 : val. -Axiom Rat__Set : val. -Axiom Rat__Abs : val. -Axiom Rat__Neg : val. -Axiom Rat__Inv : val. -Axiom Rat__Sign : val. -Axiom Rat__IsInt : val. -Axiom Rat__Num : val. -Axiom Rat__Denom : val. -Axiom Rat__Cmp : val. -Axiom Rat__Add : val. -Axiom Rat__Sub : val. -Axiom Rat__Mul : val. -Axiom Rat__Quo : val. -Axiom Rat__Scan : val. -Axiom Rat__SetString : val. -Axiom Rat__String : val. -Axiom Rat__RatString : val. -Axiom Rat__FloatString : val. -Axiom Rat__FloatPrec : val. -Axiom Rat__GobEncode : val. -Axiom Rat__GobDecode : val. -Axiom Rat__MarshalText : val. -Axiom Rat__UnmarshalText : val. -Axiom RoundingMode__String : val. -Axiom Float__Sqrt : val. +Definition pkg_name' : go_string := "math/big". Axiom initialize' : val. + End axioms. diff --git a/new_code_axioms/math/rand.v b/new_code_axioms/math/rand.v index a8c6c631e..ad8a48402 100644 --- a/new_code_axioms/math/rand.v +++ b/new_code_axioms/math/rand.v @@ -4,62 +4,11 @@ From New.golang Require Import defn. Section axioms. Context `{ffi_syntax}. -Axiom Rand__ExpFloat64 : val. -Axiom Rand__NormFloat64 : val. Axiom Source : go_type. -Axiom Source__mset : list (go_string * val). -Axiom Source__mset_ptr : list (go_string * val). Axiom Source64 : go_type. -Axiom Source64__mset : list (go_string * val). -Axiom Source64__mset_ptr : list (go_string * val). -Axiom NewSource : val. Axiom Rand : go_type. -Axiom Rand__mset : list (go_string * val). -Axiom Rand__mset_ptr : list (go_string * val). -Axiom New : val. -Axiom Rand__Seed : val. -Axiom Rand__Int63 : val. -Axiom Rand__Uint32 : val. -Axiom Rand__Uint64 : val. -Axiom Rand__Int31 : val. -Axiom Rand__Int : val. -Axiom Rand__Int63n : val. -Axiom Rand__Int31n : val. -Axiom Rand__Intn : val. -Axiom Rand__Float64 : val. -Axiom Rand__Float32 : val. -Axiom Rand__Perm : val. -Axiom Rand__Shuffle : val. -Axiom Rand__Read : val. -Axiom runtimeSource__Int63 : val. -Axiom runtimeSource__Seed : val. -Axiom runtimeSource__Uint64 : val. -Axiom Seed : val. -Axiom Int63 : val. -Axiom Uint32 : val. -Axiom Uint64 : val. -Axiom Int31 : val. -Axiom Int : val. -Axiom Int63n : val. -Axiom Int31n : val. -Axiom Intn : val. -Axiom Float64 : val. -Axiom Float32 : val. -Axiom Perm : val. -Axiom Shuffle : val. -Axiom Read : val. -Axiom NormFloat64 : val. -Axiom ExpFloat64 : val. -Axiom lockedSource__Int63 : val. -Axiom lockedSource__Uint64 : val. -Axiom lockedSource__Seed : val. -Axiom rngSource__Seed : val. -Axiom rngSource__Int63 : val. -Axiom rngSource__Uint64 : val. Axiom Zipf : go_type. -Axiom Zipf__mset : list (go_string * val). -Axiom Zipf__mset_ptr : list (go_string * val). -Axiom NewZipf : val. -Axiom Zipf__Uint64 : val. +Definition pkg_name' : go_string := "math/rand". Axiom initialize' : val. + End axioms. diff --git a/new_code_axioms/os.v b/new_code_axioms/os.v index eddaf0c84..d3502a223 100644 --- a/new_code_axioms/os.v +++ b/new_code_axioms/os.v @@ -4,80 +4,13 @@ From New.golang Require Import defn. Section axioms. Context `{ffi_syntax}. -Axiom File__Readdir : val. -Axiom File__Readdirnames : val. Axiom DirEntry : go_type. -Axiom DirEntry__mset : list (go_string * val). -Axiom DirEntry__mset_ptr : list (go_string * val). -Axiom File__ReadDir : val. -Axiom ReadDir : val. -Axiom CopyFS : val. -Axiom Expand : val. -Axiom ExpandEnv : val. -Axiom Getenv : val. -Axiom LookupEnv : val. -Axiom Setenv : val. -Axiom Unsetenv : val. -Axiom Clearenv : val. -Axiom Environ : val. -Axiom ErrInvalid : (go_string * go_string). -Axiom ErrPermission : (go_string * go_string). -Axiom ErrExist : (go_string * go_string). -Axiom ErrNotExist : (go_string * go_string). -Axiom ErrClosed : (go_string * go_string). -Axiom ErrNoDeadline : (go_string * go_string). -Axiom ErrDeadlineExceeded : (go_string * go_string). Axiom PathError : go_type. -Axiom PathError__mset : list (go_string * val). -Axiom PathError__mset_ptr : list (go_string * val). Axiom SyscallError : go_type. -Axiom SyscallError__mset : list (go_string * val). -Axiom SyscallError__mset_ptr : list (go_string * val). -Axiom SyscallError__Error : val. -Axiom SyscallError__Unwrap : val. -Axiom SyscallError__Timeout : val. -Axiom NewSyscallError : val. -Axiom IsExist : val. -Axiom IsNotExist : val. -Axiom IsPermission : val. -Axiom IsTimeout : val. -Axiom ErrProcessDone : (go_string * go_string). Axiom Process : go_type. -Axiom Process__mset : list (go_string * val). -Axiom Process__mset_ptr : list (go_string * val). Axiom ProcAttr : go_type. -Axiom ProcAttr__mset : list (go_string * val). -Axiom ProcAttr__mset_ptr : list (go_string * val). Axiom Signal : go_type. -Axiom Signal__mset : list (go_string * val). -Axiom Signal__mset_ptr : list (go_string * val). -Axiom Getpid : val. -Axiom Getppid : val. -Axiom FindProcess : val. -Axiom StartProcess : val. -Axiom Process__Release : val. -Axiom Process__Kill : val. -Axiom Process__Wait : val. -Axiom Process__Signal : val. -Axiom ProcessState__UserTime : val. -Axiom ProcessState__SystemTime : val. -Axiom ProcessState__Exited : val. -Axiom ProcessState__Success : val. -Axiom ProcessState__Sys : val. -Axiom ProcessState__SysUsage : val. -Axiom Interrupt : (go_string * go_string). -Axiom Kill : (go_string * go_string). Axiom ProcessState : go_type. -Axiom ProcessState__mset : list (go_string * val). -Axiom ProcessState__mset_ptr : list (go_string * val). -Axiom ProcessState__Pid : val. -Axiom ProcessState__String : val. -Axiom ProcessState__ExitCode : val. -Axiom Executable : val. -Axiom File__Name : val. -Axiom Stdin : (go_string * go_string). -Axiom Stdout : (go_string * go_string). -Axiom Stderr : (go_string * go_string). Axiom O_RDONLY : expr. Axiom O_WRONLY : expr. Axiom O_RDWR : expr. @@ -90,97 +23,12 @@ Axiom SEEK_SET : expr. Axiom SEEK_CUR : expr. Axiom SEEK_END : expr. Axiom LinkError : go_type. -Axiom LinkError__mset : list (go_string * val). -Axiom LinkError__mset_ptr : list (go_string * val). -Axiom LinkError__Error : val. -Axiom LinkError__Unwrap : val. -Axiom File__Read : val. -Axiom File__ReadAt : val. -Axiom File__ReadFrom : val. -Axiom noReadFrom__ReadFrom : val. -Axiom File__Write : val. -Axiom File__WriteAt : val. -Axiom File__WriteTo : val. -Axiom noWriteTo__WriteTo : val. -Axiom File__Seek : val. -Axiom File__WriteString : val. -Axiom Mkdir : val. -Axiom Chdir : val. -Axiom Open : val. -Axiom Create : val. -Axiom OpenFile : val. -Axiom Rename : val. -Axiom Readlink : val. -Axiom TempDir : val. -Axiom UserCacheDir : val. -Axiom UserConfigDir : val. -Axiom UserHomeDir : val. -Axiom Chmod : val. -Axiom File__Chmod : val. -Axiom File__SetDeadline : val. -Axiom File__SetReadDeadline : val. -Axiom File__SetWriteDeadline : val. -Axiom File__SyscallConn : val. -Axiom DirFS : val. -Axiom dirFS__Open : val. -Axiom dirFS__ReadFile : val. -Axiom dirFS__ReadDir : val. -Axiom dirFS__Stat : val. -Axiom ReadFile : val. -Axiom WriteFile : val. -Axiom File__Close : val. -Axiom Chown : val. -Axiom Lchown : val. -Axiom File__Chown : val. -Axiom File__Truncate : val. -Axiom File__Sync : val. -Axiom Chtimes : val. -Axiom File__Chdir : val. -Axiom File__Fd : val. -Axiom NewFile : val. Axiom DevNull : string. -Axiom Truncate : val. -Axiom Remove : val. -Axiom Link : val. -Axiom Symlink : val. -Axiom unixDirent__Name : val. -Axiom unixDirent__IsDir : val. -Axiom unixDirent__Type : val. -Axiom unixDirent__Info : val. -Axiom unixDirent__String : val. -Axiom Getwd : val. -Axiom MkdirAll : val. -Axiom RemoveAll : val. Axiom PathSeparator : expr. Axiom PathListSeparator : expr. -Axiom IsPathSeparator : val. -Axiom Pipe : val. -Axiom Args : (go_string * go_string). -Axiom Getuid : val. -Axiom Geteuid : val. -Axiom Getgid : val. -Axiom Getegid : val. -Axiom Getgroups : val. -Axiom Exit : val. -Axiom rawConn__Control : val. -Axiom rawConn__Read : val. -Axiom rawConn__Write : val. -Axiom Stat : val. -Axiom Lstat : val. -Axiom File__Stat : val. -Axiom Hostname : val. -Axiom CreateTemp : val. -Axiom MkdirTemp : val. -Axiom Getpagesize : val. Axiom File : go_type. -Axiom File__mset : list (go_string * val). -Axiom File__mset_ptr : list (go_string * val). Axiom FileInfo : go_type. -Axiom FileInfo__mset : list (go_string * val). -Axiom FileInfo__mset_ptr : list (go_string * val). Axiom FileMode : go_type. -Axiom FileMode__mset : list (go_string * val). -Axiom FileMode__mset_ptr : list (go_string * val). Axiom ModeDir : expr. Axiom ModeAppend : expr. Axiom ModeExclusive : expr. @@ -196,12 +44,7 @@ Axiom ModeSticky : expr. Axiom ModeIrregular : expr. Axiom ModeType : expr. Axiom ModePerm : expr. -Axiom fileStat__Name : val. -Axiom fileStat__IsDir : val. -Axiom SameFile : val. -Axiom fileStat__Size : val. -Axiom fileStat__Mode : val. -Axiom fileStat__ModTime : val. -Axiom fileStat__Sys : val. +Definition pkg_name' : go_string := "os". Axiom initialize' : val. + End axioms. diff --git a/new_code_axioms/slices.v b/new_code_axioms/slices.v index 3fd3249eb..1c09b7970 100644 --- a/new_code_axioms/slices.v +++ b/new_code_axioms/slices.v @@ -4,46 +4,7 @@ From New.golang Require Import defn. Section axioms. Context `{ffi_syntax}. -Axiom All : val. -Axiom Backward : val. -Axiom Values : val. -Axiom AppendSeq : val. -Axiom Collect : val. -Axiom Sorted : val. -Axiom SortedFunc : val. -Axiom SortedStableFunc : val. -Axiom Chunk : val. -Axiom Equal : val. -Axiom EqualFunc : val. -Axiom Compare : val. -Axiom CompareFunc : val. -Axiom Index : val. -Axiom IndexFunc : val. -Axiom Contains : val. -Axiom ContainsFunc : val. -Axiom Insert : val. -Axiom Delete : val. -Axiom DeleteFunc : val. -Axiom Replace : val. -Axiom Clone : val. -Axiom Compact : val. -Axiom CompactFunc : val. -Axiom Grow : val. -Axiom Clip : val. -Axiom Reverse : val. -Axiom Concat : val. -Axiom Repeat : val. -Axiom Sort : val. -Axiom SortFunc : val. -Axiom SortStableFunc : val. -Axiom IsSorted : val. -Axiom IsSortedFunc : val. -Axiom Min : val. -Axiom MinFunc : val. -Axiom Max : val. -Axiom MaxFunc : val. -Axiom BinarySearch : val. -Axiom BinarySearchFunc : val. -Axiom xorshift__Next : val. +Definition pkg_name' : go_string := "slices". Axiom initialize' : val. + End axioms. diff --git a/new_code_axioms/sort.v b/new_code_axioms/sort.v index e18456fb8..aad27422e 100644 --- a/new_code_axioms/sort.v +++ b/new_code_axioms/sort.v @@ -4,52 +4,11 @@ From New.golang Require Import defn. Section axioms. Context `{ffi_syntax}. -Axiom Search : val. -Axiom Find : val. -Axiom SearchInts : val. -Axiom SearchFloat64s : val. -Axiom SearchStrings : val. -Axiom IntSlice__Search : val. -Axiom Float64Slice__Search : val. -Axiom StringSlice__Search : val. -Axiom Slice : val. -Axiom SliceStable : val. -Axiom SliceIsSorted : val. Axiom Interface : go_type. -Axiom Interface__mset : list (go_string * val). -Axiom Interface__mset_ptr : list (go_string * val). -Axiom Sort : val. -Axiom xorshift__Next : val. -Axiom reverse__Less : val. -Axiom Reverse : val. -Axiom IsSorted : val. Axiom IntSlice : go_type. -Axiom IntSlice__mset : list (go_string * val). -Axiom IntSlice__mset_ptr : list (go_string * val). -Axiom IntSlice__Len : val. -Axiom IntSlice__Less : val. -Axiom IntSlice__Swap : val. -Axiom IntSlice__Sort : val. Axiom Float64Slice : go_type. -Axiom Float64Slice__mset : list (go_string * val). -Axiom Float64Slice__mset_ptr : list (go_string * val). -Axiom Float64Slice__Len : val. -Axiom Float64Slice__Less : val. -Axiom Float64Slice__Swap : val. -Axiom Float64Slice__Sort : val. Axiom StringSlice : go_type. -Axiom StringSlice__mset : list (go_string * val). -Axiom StringSlice__mset_ptr : list (go_string * val). -Axiom StringSlice__Len : val. -Axiom StringSlice__Less : val. -Axiom StringSlice__Swap : val. -Axiom StringSlice__Sort : val. -Axiom Ints : val. -Axiom Float64s : val. -Axiom Strings : val. -Axiom IntsAreSorted : val. -Axiom Float64sAreSorted : val. -Axiom StringsAreSorted : val. -Axiom Stable : val. +Definition pkg_name' : go_string := "sort". Axiom initialize' : val. + End axioms. diff --git a/new_code_axioms/strconv.v b/new_code_axioms/strconv.v index fc2adcfc2..c1a948a20 100644 --- a/new_code_axioms/strconv.v +++ b/new_code_axioms/strconv.v @@ -4,54 +4,9 @@ From New.golang Require Import defn. Section axioms. Context `{ffi_syntax}. -Axiom ParseBool : val. -Axiom FormatBool : val. -Axiom AppendBool : val. -Axiom ParseComplex : val. -Axiom ParseFloat : val. -Axiom ErrRange : (go_string * go_string). -Axiom ErrSyntax : (go_string * go_string). Axiom NumError : go_type. -Axiom NumError__mset : list (go_string * val). -Axiom NumError__mset_ptr : list (go_string * val). -Axiom NumError__Error : val. -Axiom NumError__Unwrap : val. Axiom IntSize : Z. -Axiom ParseUint : val. -Axiom ParseInt : val. -Axiom Atoi : val. -Axiom FormatComplex : val. -Axiom decimal__String : val. -Axiom decimal__Assign : val. -Axiom decimal__Shift : val. -Axiom decimal__Round : val. -Axiom decimal__RoundDown : val. -Axiom decimal__RoundUp : val. -Axiom decimal__RoundedInteger : val. -Axiom FormatFloat : val. -Axiom AppendFloat : val. -Axiom FormatUint : val. -Axiom FormatInt : val. -Axiom Itoa : val. -Axiom AppendInt : val. -Axiom AppendUint : val. -Axiom Quote : val. -Axiom AppendQuote : val. -Axiom QuoteToASCII : val. -Axiom AppendQuoteToASCII : val. -Axiom QuoteToGraphic : val. -Axiom AppendQuoteToGraphic : val. -Axiom QuoteRune : val. -Axiom AppendQuoteRune : val. -Axiom QuoteRuneToASCII : val. -Axiom AppendQuoteRuneToASCII : val. -Axiom QuoteRuneToGraphic : val. -Axiom AppendQuoteRuneToGraphic : val. -Axiom CanBackquote : val. -Axiom UnquoteChar : val. -Axiom QuotedPrefix : val. -Axiom Unquote : val. -Axiom IsPrint : val. -Axiom IsGraphic : val. +Definition pkg_name' : go_string := "strconv". Axiom initialize' : val. + End axioms. diff --git a/new_code_axioms/strings.v b/new_code_axioms/strings.v index e1caf2f1f..ac1506545 100644 --- a/new_code_axioms/strings.v +++ b/new_code_axioms/strings.v @@ -5,98 +5,9 @@ Section axioms. Context `{ffi_syntax}. Axiom Builder : go_type. -Axiom Builder__mset : list (go_string * val). -Axiom Builder__mset_ptr : list (go_string * val). -Axiom Builder__String : val. -Axiom Builder__Len : val. -Axiom Builder__Cap : val. -Axiom Builder__Reset : val. -Axiom Builder__Grow : val. -Axiom Builder__Write : val. -Axiom Builder__WriteByte : val. -Axiom Builder__WriteRune : val. -Axiom Builder__WriteString : val. -Axiom Clone : val. -Axiom Compare : val. Axiom Reader : go_type. -Axiom Reader__mset : list (go_string * val). -Axiom Reader__mset_ptr : list (go_string * val). -Axiom Reader__Len : val. -Axiom Reader__Size : val. -Axiom Reader__Read : val. -Axiom Reader__ReadAt : val. -Axiom Reader__ReadByte : val. -Axiom Reader__UnreadByte : val. -Axiom Reader__ReadRune : val. -Axiom Reader__UnreadRune : val. -Axiom Reader__Seek : val. -Axiom Reader__WriteTo : val. -Axiom Reader__Reset : val. -Axiom NewReader : val. Axiom Replacer : go_type. -Axiom Replacer__mset : list (go_string * val). -Axiom Replacer__mset_ptr : list (go_string * val). -Axiom NewReplacer : val. -Axiom Replacer__Replace : val. -Axiom Replacer__WriteString : val. -Axiom appendSliceWriter__Write : val. -Axiom appendSliceWriter__WriteString : val. -Axiom stringWriter__WriteString : val. -Axiom genericReplacer__Replace : val. -Axiom genericReplacer__WriteString : val. -Axiom singleStringReplacer__Replace : val. -Axiom singleStringReplacer__WriteString : val. -Axiom byteReplacer__Replace : val. -Axiom byteReplacer__WriteString : val. -Axiom byteStringReplacer__Replace : val. -Axiom byteStringReplacer__WriteString : val. -Axiom Count : val. -Axiom Contains : val. -Axiom ContainsAny : val. -Axiom ContainsRune : val. -Axiom ContainsFunc : val. -Axiom LastIndex : val. -Axiom IndexByte : val. -Axiom IndexRune : val. -Axiom IndexAny : val. -Axiom LastIndexAny : val. -Axiom LastIndexByte : val. -Axiom SplitN : val. -Axiom SplitAfterN : val. -Axiom Split : val. -Axiom SplitAfter : val. -Axiom Fields : val. -Axiom FieldsFunc : val. -Axiom Join : val. -Axiom HasPrefix : val. -Axiom HasSuffix : val. -Axiom Map : val. -Axiom Repeat : val. -Axiom ToUpper : val. -Axiom ToLower : val. -Axiom ToTitle : val. -Axiom ToUpperSpecial : val. -Axiom ToLowerSpecial : val. -Axiom ToTitleSpecial : val. -Axiom ToValidUTF8 : val. -Axiom Title : val. -Axiom TrimLeftFunc : val. -Axiom TrimRightFunc : val. -Axiom TrimFunc : val. -Axiom IndexFunc : val. -Axiom LastIndexFunc : val. -Axiom Trim : val. -Axiom TrimLeft : val. -Axiom TrimRight : val. -Axiom TrimSpace : val. -Axiom TrimPrefix : val. -Axiom TrimSuffix : val. -Axiom Replace : val. -Axiom ReplaceAll : val. -Axiom EqualFold : val. -Axiom Index : val. -Axiom Cut : val. -Axiom CutPrefix : val. -Axiom CutSuffix : val. +Definition pkg_name' : go_string := "strings". Axiom initialize' : val. + End axioms. diff --git a/new_code_axioms/testing.v b/new_code_axioms/testing.v index 49c59a457..0589531fc 100644 --- a/new_code_axioms/testing.v +++ b/new_code_axioms/testing.v @@ -4,128 +4,20 @@ From New.golang Require Import defn. Section axioms. Context `{ffi_syntax}. -Axiom AllocsPerRun : val. -Axiom durationOrCountFlag__String : val. -Axiom durationOrCountFlag__Set : val. Axiom InternalBenchmark : go_type. -Axiom InternalBenchmark__mset : list (go_string * val). -Axiom InternalBenchmark__mset_ptr : list (go_string * val). Axiom B : go_type. -Axiom B__mset : list (go_string * val). -Axiom B__mset_ptr : list (go_string * val). -Axiom B__StartTimer : val. -Axiom B__StopTimer : val. -Axiom B__ResetTimer : val. -Axiom B__SetBytes : val. -Axiom B__ReportAllocs : val. -Axiom B__Elapsed : val. -Axiom B__ReportMetric : val. Axiom BenchmarkResult : go_type. -Axiom BenchmarkResult__mset : list (go_string * val). -Axiom BenchmarkResult__mset_ptr : list (go_string * val). -Axiom BenchmarkResult__NsPerOp : val. -Axiom BenchmarkResult__AllocsPerOp : val. -Axiom BenchmarkResult__AllocedBytesPerOp : val. -Axiom BenchmarkResult__String : val. -Axiom BenchmarkResult__MemString : val. -Axiom RunBenchmarks : val. -Axiom B__Run : val. Axiom PB : go_type. -Axiom PB__mset : list (go_string * val). -Axiom PB__mset_ptr : list (go_string * val). -Axiom PB__Next : val. -Axiom B__RunParallel : val. -Axiom B__SetParallelism : val. -Axiom Benchmark : val. -Axiom discard__Write : val. Axiom CoverBlock : go_type. -Axiom CoverBlock__mset : list (go_string * val). -Axiom CoverBlock__mset_ptr : list (go_string * val). Axiom Cover : go_type. -Axiom Cover__mset : list (go_string * val). -Axiom Cover__mset_ptr : list (go_string * val). -Axiom Coverage : val. -Axiom RegisterCover : val. Axiom InternalExample : go_type. -Axiom InternalExample__mset : list (go_string * val). -Axiom InternalExample__mset_ptr : list (go_string * val). -Axiom RunExamples : val. Axiom InternalFuzzTarget : go_type. -Axiom InternalFuzzTarget__mset : list (go_string * val). -Axiom InternalFuzzTarget__mset_ptr : list (go_string * val). Axiom F : go_type. -Axiom F__mset : list (go_string * val). -Axiom F__mset_ptr : list (go_string * val). -Axiom F__Helper : val. -Axiom F__Fail : val. -Axiom F__Skipped : val. -Axiom F__Add : val. -Axiom F__Fuzz : val. -Axiom fuzzResult__String : val. -Axiom Init : val. -Axiom chattyFlag__IsBoolFlag : val. -Axiom chattyFlag__Set : val. -Axiom chattyFlag__String : val. -Axiom chattyFlag__Get : val. -Axiom chattyPrinter__Updatef : val. -Axiom chattyPrinter__Printf : val. -Axiom Short : val. -Axiom Testing : val. -Axiom CoverMode : val. -Axiom Verbose : val. -Axiom indenter__Write : val. Axiom TB : go_type. -Axiom TB__mset : list (go_string * val). -Axiom TB__mset_ptr : list (go_string * val). Axiom T : go_type. -Axiom T__mset : list (go_string * val). -Axiom T__mset_ptr : list (go_string * val). -Axiom common__Name : val. -Axiom common__Fail : val. -Axiom common__Failed : val. -Axiom common__FailNow : val. -Axiom common__Log : val. -Axiom common__Logf : val. -Axiom common__Error : val. -Axiom common__Errorf : val. -Axiom common__Fatal : val. -Axiom common__Fatalf : val. -Axiom common__Skip : val. -Axiom common__Skipf : val. -Axiom common__SkipNow : val. -Axiom common__Skipped : val. -Axiom common__Helper : val. -Axiom common__Cleanup : val. -Axiom common__TempDir : val. -Axiom common__Setenv : val. -Axiom T__Parallel : val. -Axiom T__Setenv : val. Axiom InternalTest : go_type. -Axiom InternalTest__mset : list (go_string * val). -Axiom InternalTest__mset_ptr : list (go_string * val). -Axiom T__Run : val. -Axiom T__Deadline : val. -Axiom matchStringOnly__MatchString : val. -Axiom matchStringOnly__StartCPUProfile : val. -Axiom matchStringOnly__StopCPUProfile : val. -Axiom matchStringOnly__WriteProfileTo : val. -Axiom matchStringOnly__ImportPath : val. -Axiom matchStringOnly__StartTestLog : val. -Axiom matchStringOnly__StopTestLog : val. -Axiom matchStringOnly__SetPanicOnExit0 : val. -Axiom matchStringOnly__CoordinateFuzzing : val. -Axiom matchStringOnly__RunFuzzWorker : val. -Axiom matchStringOnly__ReadCorpus : val. -Axiom matchStringOnly__CheckCorpus : val. -Axiom matchStringOnly__ResetCoverage : val. -Axiom matchStringOnly__SnapshotCoverage : val. -Axiom matchStringOnly__InitRuntimeCoverage : val. -Axiom Main : val. Axiom M : go_type. -Axiom M__mset : list (go_string * val). -Axiom M__mset_ptr : list (go_string * val). -Axiom MainStart : val. -Axiom M__Run : val. -Axiom RunTests : val. +Definition pkg_name' : go_string := "testing". Axiom initialize' : val. + End axioms. diff --git a/new_partial_axioms/fmt.v b/new_partial_axioms/fmt.v index d833615e8..4c05ca6b4 100644 --- a/new_partial_axioms/fmt.v +++ b/new_partial_axioms/fmt.v @@ -4,64 +4,13 @@ From New.golang Require Import defn. Section axioms. Context `{ffi_syntax}. -Axiom Errorf : val. -Axiom wrapError__Error : val. -Axiom wrapError__Unwrap : val. -Axiom wrapErrors__Error : val. -Axiom wrapErrors__Unwrap : val. Axiom State : go_type. -Axiom State__mset : list (go_string * val). -Axiom State__mset_ptr : list (go_string * val). Axiom Formatter : go_type. -Axiom Formatter__mset : list (go_string * val). -Axiom Formatter__mset_ptr : list (go_string * val). Axiom Stringer : go_type. -Axiom Stringer__mset : list (go_string * val). -Axiom Stringer__mset_ptr : list (go_string * val). Axiom GoStringer : go_type. -Axiom GoStringer__mset : list (go_string * val). -Axiom GoStringer__mset_ptr : list (go_string * val). -Axiom FormatString : val. -Axiom pp__Width : val. -Axiom pp__Precision : val. -Axiom pp__Flag : val. -Axiom pp__Write : val. -Axiom pp__WriteString : val. -Axiom Fprintf : val. -Axiom Printf : val. -Axiom Sprintf : val. -Axiom Appendf : val. -Axiom Fprint : val. -Axiom Print : val. -Axiom Sprint : val. -Axiom Append : val. -Axiom Fprintln : val. -Axiom Println : val. -Axiom Sprintln : val. -Axiom Appendln : val. Axiom ScanState : go_type. -Axiom ScanState__mset : list (go_string * val). -Axiom ScanState__mset_ptr : list (go_string * val). Axiom Scanner : go_type. -Axiom Scanner__mset : list (go_string * val). -Axiom Scanner__mset_ptr : list (go_string * val). -Axiom Scan : val. -Axiom Scanln : val. -Axiom Scanf : val. -Axiom stringReader__Read : val. -Axiom Sscan : val. -Axiom Sscanln : val. -Axiom Sscanf : val. -Axiom Fscan : val. -Axiom Fscanln : val. -Axiom Fscanf : val. -Axiom ss__Read : val. -Axiom ss__ReadRune : val. -Axiom ss__Width : val. -Axiom ss__UnreadRune : val. -Axiom ss__Token : val. -Axiom readRune__ReadRune : val. -Axiom readRune__UnreadRune : val. -Axiom ss__SkipSpace : val. +Definition pkg_name' : go_string := "fmt". Axiom initialize' : val. + End axioms. diff --git a/new_partial_axioms/go_etcd_io/raft/v3/raftpb.v b/new_partial_axioms/go_etcd_io/raft/v3/raftpb.v index 91ee0ca55..18a365032 100644 --- a/new_partial_axioms/go_etcd_io/raft/v3/raftpb.v +++ b/new_partial_axioms/go_etcd_io/raft/v3/raftpb.v @@ -5,33 +5,11 @@ Section axioms. Context `{ffi_syntax}. Axiom ConfChangeI : go_type. -Axiom ConfChangeI__mset : list (go_string * val). -Axiom ConfChangeI__mset_ptr : list (go_string * val). -Axiom MarshalConfChange : val. -Axiom ConfChange__AsV2 : val. -Axiom ConfChange__AsV1 : val. -Axiom ConfChangeV2__AsV2 : val. -Axiom ConfChangeV2__AsV1 : val. -Axiom ConfChangeV2__EnterJoint : val. -Axiom ConfChangeV2__LeaveJoint : val. -Axiom ConfChangesFromString : val. -Axiom ConfChangesToString : val. -Axiom ConfState__Equivalent : val. Axiom EntryType : go_type. -Axiom EntryType__mset : list (go_string * val). -Axiom EntryType__mset_ptr : list (go_string * val). Axiom EntryNormal : expr. Axiom EntryConfChange : expr. Axiom EntryConfChangeV2 : expr. -Axiom EntryType_name : (go_string * go_string). -Axiom EntryType_value : (go_string * go_string). -Axiom EntryType__Enum : val. -Axiom EntryType__String : val. -Axiom EntryType__UnmarshalJSON : val. -Axiom EntryType__EnumDescriptor : val. Axiom MessageType : go_type. -Axiom MessageType__mset : list (go_string * val). -Axiom MessageType__mset_ptr : list (go_string * val). Axiom MsgHup : expr. Axiom MsgBeat : expr. Axiom MsgProp : expr. @@ -56,192 +34,25 @@ Axiom MsgStorageAppendResp : expr. Axiom MsgStorageApply : expr. Axiom MsgStorageApplyResp : expr. Axiom MsgForgetLeader : expr. -Axiom MessageType_name : (go_string * go_string). -Axiom MessageType_value : (go_string * go_string). -Axiom MessageType__Enum : val. -Axiom MessageType__String : val. -Axiom MessageType__UnmarshalJSON : val. -Axiom MessageType__EnumDescriptor : val. Axiom ConfChangeTransition : go_type. -Axiom ConfChangeTransition__mset : list (go_string * val). -Axiom ConfChangeTransition__mset_ptr : list (go_string * val). Axiom ConfChangeTransitionAuto : expr. Axiom ConfChangeTransitionJointImplicit : expr. Axiom ConfChangeTransitionJointExplicit : expr. -Axiom ConfChangeTransition_name : (go_string * go_string). -Axiom ConfChangeTransition_value : (go_string * go_string). -Axiom ConfChangeTransition__Enum : val. -Axiom ConfChangeTransition__String : val. -Axiom ConfChangeTransition__UnmarshalJSON : val. -Axiom ConfChangeTransition__EnumDescriptor : val. Axiom ConfChangeType : go_type. -Axiom ConfChangeType__mset : list (go_string * val). -Axiom ConfChangeType__mset_ptr : list (go_string * val). Axiom ConfChangeAddNode : expr. Axiom ConfChangeRemoveNode : expr. Axiom ConfChangeUpdateNode : expr. Axiom ConfChangeAddLearnerNode : expr. -Axiom ConfChangeType_name : (go_string * go_string). -Axiom ConfChangeType_value : (go_string * go_string). -Axiom ConfChangeType__Enum : val. -Axiom ConfChangeType__String : val. -Axiom ConfChangeType__UnmarshalJSON : val. -Axiom ConfChangeType__EnumDescriptor : val. Axiom Entry : go_type. -Axiom Entry__mset : list (go_string * val). -Axiom Entry__mset_ptr : list (go_string * val). -Axiom Entry__Reset : val. -Axiom Entry__String : val. -Axiom Entry__ProtoMessage : val. -Axiom Entry__Descriptor : val. -Axiom Entry__XXX_Unmarshal : val. -Axiom Entry__XXX_Marshal : val. -Axiom Entry__XXX_Merge : val. -Axiom Entry__XXX_Size : val. -Axiom Entry__XXX_DiscardUnknown : val. Axiom SnapshotMetadata : go_type. -Axiom SnapshotMetadata__mset : list (go_string * val). -Axiom SnapshotMetadata__mset_ptr : list (go_string * val). -Axiom SnapshotMetadata__Reset : val. -Axiom SnapshotMetadata__String : val. -Axiom SnapshotMetadata__ProtoMessage : val. -Axiom SnapshotMetadata__Descriptor : val. -Axiom SnapshotMetadata__XXX_Unmarshal : val. -Axiom SnapshotMetadata__XXX_Marshal : val. -Axiom SnapshotMetadata__XXX_Merge : val. -Axiom SnapshotMetadata__XXX_Size : val. -Axiom SnapshotMetadata__XXX_DiscardUnknown : val. Axiom Snapshot : go_type. -Axiom Snapshot__mset : list (go_string * val). -Axiom Snapshot__mset_ptr : list (go_string * val). -Axiom Snapshot__Reset : val. -Axiom Snapshot__String : val. -Axiom Snapshot__ProtoMessage : val. -Axiom Snapshot__Descriptor : val. -Axiom Snapshot__XXX_Unmarshal : val. -Axiom Snapshot__XXX_Marshal : val. -Axiom Snapshot__XXX_Merge : val. -Axiom Snapshot__XXX_Size : val. -Axiom Snapshot__XXX_DiscardUnknown : val. Axiom Message : go_type. -Axiom Message__mset : list (go_string * val). -Axiom Message__mset_ptr : list (go_string * val). -Axiom Message__Reset : val. -Axiom Message__String : val. -Axiom Message__ProtoMessage : val. -Axiom Message__Descriptor : val. -Axiom Message__XXX_Unmarshal : val. -Axiom Message__XXX_Marshal : val. -Axiom Message__XXX_Merge : val. -Axiom Message__XXX_Size : val. -Axiom Message__XXX_DiscardUnknown : val. Axiom HardState : go_type. -Axiom HardState__mset : list (go_string * val). -Axiom HardState__mset_ptr : list (go_string * val). -Axiom HardState__Reset : val. -Axiom HardState__String : val. -Axiom HardState__ProtoMessage : val. -Axiom HardState__Descriptor : val. -Axiom HardState__XXX_Unmarshal : val. -Axiom HardState__XXX_Marshal : val. -Axiom HardState__XXX_Merge : val. -Axiom HardState__XXX_Size : val. -Axiom HardState__XXX_DiscardUnknown : val. Axiom ConfState : go_type. -Axiom ConfState__mset : list (go_string * val). -Axiom ConfState__mset_ptr : list (go_string * val). -Axiom ConfState__Reset : val. -Axiom ConfState__String : val. -Axiom ConfState__ProtoMessage : val. -Axiom ConfState__Descriptor : val. -Axiom ConfState__XXX_Unmarshal : val. -Axiom ConfState__XXX_Marshal : val. -Axiom ConfState__XXX_Merge : val. -Axiom ConfState__XXX_Size : val. -Axiom ConfState__XXX_DiscardUnknown : val. Axiom ConfChange : go_type. -Axiom ConfChange__mset : list (go_string * val). -Axiom ConfChange__mset_ptr : list (go_string * val). -Axiom ConfChange__Reset : val. -Axiom ConfChange__String : val. -Axiom ConfChange__ProtoMessage : val. -Axiom ConfChange__Descriptor : val. -Axiom ConfChange__XXX_Unmarshal : val. -Axiom ConfChange__XXX_Marshal : val. -Axiom ConfChange__XXX_Merge : val. -Axiom ConfChange__XXX_Size : val. -Axiom ConfChange__XXX_DiscardUnknown : val. Axiom ConfChangeSingle : go_type. -Axiom ConfChangeSingle__mset : list (go_string * val). -Axiom ConfChangeSingle__mset_ptr : list (go_string * val). -Axiom ConfChangeSingle__Reset : val. -Axiom ConfChangeSingle__String : val. -Axiom ConfChangeSingle__ProtoMessage : val. -Axiom ConfChangeSingle__Descriptor : val. -Axiom ConfChangeSingle__XXX_Unmarshal : val. -Axiom ConfChangeSingle__XXX_Marshal : val. -Axiom ConfChangeSingle__XXX_Merge : val. -Axiom ConfChangeSingle__XXX_Size : val. -Axiom ConfChangeSingle__XXX_DiscardUnknown : val. Axiom ConfChangeV2 : go_type. -Axiom ConfChangeV2__mset : list (go_string * val). -Axiom ConfChangeV2__mset_ptr : list (go_string * val). -Axiom ConfChangeV2__Reset : val. -Axiom ConfChangeV2__String : val. -Axiom ConfChangeV2__ProtoMessage : val. -Axiom ConfChangeV2__Descriptor : val. -Axiom ConfChangeV2__XXX_Unmarshal : val. -Axiom ConfChangeV2__XXX_Marshal : val. -Axiom ConfChangeV2__XXX_Merge : val. -Axiom ConfChangeV2__XXX_Size : val. -Axiom ConfChangeV2__XXX_DiscardUnknown : val. -Axiom Entry__Marshal : val. -Axiom Entry__MarshalTo : val. -Axiom Entry__MarshalToSizedBuffer : val. -Axiom SnapshotMetadata__Marshal : val. -Axiom SnapshotMetadata__MarshalTo : val. -Axiom SnapshotMetadata__MarshalToSizedBuffer : val. -Axiom Snapshot__Marshal : val. -Axiom Snapshot__MarshalTo : val. -Axiom Snapshot__MarshalToSizedBuffer : val. -Axiom Message__Marshal : val. -Axiom Message__MarshalTo : val. -Axiom Message__MarshalToSizedBuffer : val. -Axiom HardState__Marshal : val. -Axiom HardState__MarshalTo : val. -Axiom HardState__MarshalToSizedBuffer : val. -Axiom ConfState__Marshal : val. -Axiom ConfState__MarshalTo : val. -Axiom ConfState__MarshalToSizedBuffer : val. -Axiom ConfChange__Marshal : val. -Axiom ConfChange__MarshalTo : val. -Axiom ConfChange__MarshalToSizedBuffer : val. -Axiom ConfChangeSingle__Marshal : val. -Axiom ConfChangeSingle__MarshalTo : val. -Axiom ConfChangeSingle__MarshalToSizedBuffer : val. -Axiom ConfChangeV2__Marshal : val. -Axiom ConfChangeV2__MarshalTo : val. -Axiom ConfChangeV2__MarshalToSizedBuffer : val. -Axiom Entry__Size : val. -Axiom SnapshotMetadata__Size : val. -Axiom Snapshot__Size : val. -Axiom Message__Size : val. -Axiom HardState__Size : val. -Axiom ConfState__Size : val. -Axiom ConfChange__Size : val. -Axiom ConfChangeSingle__Size : val. -Axiom ConfChangeV2__Size : val. -Axiom Entry__Unmarshal : val. -Axiom SnapshotMetadata__Unmarshal : val. -Axiom Snapshot__Unmarshal : val. -Axiom Message__Unmarshal : val. -Axiom HardState__Unmarshal : val. -Axiom ConfState__Unmarshal : val. -Axiom ConfChange__Unmarshal : val. -Axiom ConfChangeSingle__Unmarshal : val. -Axiom ConfChangeV2__Unmarshal : val. -Axiom ErrInvalidLengthRaft : (go_string * go_string). -Axiom ErrIntOverflowRaft : (go_string * go_string). -Axiom ErrUnexpectedEndOfGroupRaft : (go_string * go_string). +Definition pkg_name' : go_string := "go.etcd.io/raft/v3/raftpb". Axiom initialize' : val. + End axioms. diff --git a/new_partial_axioms/log.v b/new_partial_axioms/log.v index 2b85d22c2..253799a2b 100644 --- a/new_partial_axioms/log.v +++ b/new_partial_axioms/log.v @@ -13,41 +13,7 @@ Axiom LUTC : Z. Axiom Lmsgprefix : Z. Axiom LstdFlags : Z. Axiom Logger : go_type. -Axiom Logger__mset : list (go_string * val). -Axiom Logger__mset_ptr : list (go_string * val). -Axiom New : val. -Axiom Logger__SetOutput : val. -Axiom Default : val. -Axiom Logger__Output : val. -Axiom Logger__Print : val. -Axiom Logger__Printf : val. -Axiom Logger__Println : val. -Axiom Logger__Fatal : val. -Axiom Logger__Fatalf : val. -Axiom Logger__Fatalln : val. -Axiom Logger__Panic : val. -Axiom Logger__Panicf : val. -Axiom Logger__Panicln : val. -Axiom Logger__Flags : val. -Axiom Logger__SetFlags : val. -Axiom Logger__Prefix : val. -Axiom Logger__SetPrefix : val. -Axiom Logger__Writer : val. -Axiom SetOutput : val. -Axiom Flags : val. -Axiom SetFlags : val. -Axiom Prefix : val. -Axiom SetPrefix : val. -Axiom Writer : val. -Axiom Print : val. -Axiom Printf : val. -Axiom Println : val. -Axiom Fatal : val. -Axiom Fatalf : val. -Axiom Fatalln : val. -Axiom Panic : val. -Axiom Panicf : val. -Axiom Panicln : val. -Axiom Output : val. +Definition pkg_name' : go_string := "log". Axiom initialize' : val. + End axioms.