(**************************************************************************)
(*                                                                        *)
(*  This file is part of Frama-C.                                         *)
(*                                                                        *)
(*  Copyright (C) 2007-2010                                               *)
(*    CEA   (Commissariat à l'énergie atomique et aux énergies            *)
(*           alternatives)                                                *)
(*    INRIA (Institut National de Recherche en Informatique et en         *)
(*           Automatique)                                                 *)
(*                                                                        *)
(*  you can redistribute it and/or modify it under the terms of the GNU   *)
(*  Lesser General Public License as published by the Free Software       *)
(*  Foundation, version 2.1.                                              *)
(*                                                                        *)
(*  It is distributed in the hope that it will be useful,                 *)
(*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *)
(*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *)
(*  GNU Lesser General Public License for more details.                   *)
(*                                                                        *)
(*  See the GNU Lesser General Public License version v2.1                *)
(*  for more details (enclosed in the file licenses/LGPLv2.1).            *)
(*                                                                        *)
(**************************************************************************)

type X

type S

logic S_a: -> int field

goal  acc_upd_field_int : forall s : S. 
  acc_field (upd_field (s, S_a, 2), S_a) + 1 = 3

logic S_b: -> int field
axiom ax_field_S_a_b: neq_field(S_a, S_b)

goal  acc_upd_field_int_ned : forall s : S. 
  acc_field (upd_field (s, S_b, 2), S_a) = acc_field (s, S_a)

type S2

logic S_s: -> S2 field
axiom ax_field_S_a_s: neq_field(S_a, S_s)

goal acc_upd_field_neq_sym  : forall s : S.
  acc_field (upd_field (s, S_a, 2), S_s) = acc_field (s, S_s)

goal acc_upd_index : forall t : X farray. forall x : X.
  access (update (t, 1, x), 2) = access (t, 2)

(* TODO : add some more tests... *)
