Theory guardedsignedoverflow

(*
 * Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
 * Copyright (c) 2022 Apple Inc. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-2-Clause
 *)

theory guardedsignedoverflow
imports "AutoCorres2.CTranslation"
begin


declare [[guarded_integer_conversion=true]]
install_C_file "guardedsignedoverflow.c"

context guardedsignedoverflow_global_addresses
begin
unbundle f_variables
lemma "Γ ⊢ ⦃ c = sint ´c & c ≤ 117 ⦄ ´ret' :== CALL f()
           ⦃ sint ´ret' = c + 10 ⦄"
  apply vcg
  apply safe
  oops

end

end