Module MoreAxioms
Require Import Coqlib.
Require Import Errors.
Require Import Maps.
Require Import AST.
Require Import Events.
Require Import Integers.
Require Import Floats.
Require Import Values.
Require Import Memory.
Require Import Globalenvs.
Require Import Smallstep.
Require Import Op.
Axiom external_functions_mem_inject_gen':
forall name sg (
ge1 ge2 :
Senv.t)
(
vargs :
list val) (
m1 :
mem) (
t :
trace)
(
vres :
val) (
m2 :
mem) (
f :
block ->
option (
block *
Z))
(
m1' :
mem) (
vargs' :
list val),
symbols_inject f ge1 ge2 ->
external_call (
EF_external name sg)
ge1 vargs m1 t vres m2 ->
Mem.inject f m1 m1' ->
Val.inject_list f vargs vargs' ->
(
forall b b'
delta,
f b =
Some (
b',
delta) ->
delta = 0) ->
(
forall b b1 b2,
f b1 =
Some (
b, 0) ->
f b2 =
Some (
b, 0) ->
b1 =
b2) ->
(
forall b b'
o k p,
f b =
Some (
b', 0) -> (
Mem.perm m1 b o k p <->
Mem.perm m1'
b'
o k p)) ->
exists (
f' :
meminj) (
vres' :
val) (
m2' :
mem),
external_call (
EF_external name sg)
ge2 vargs'
m1'
t vres'
m2' /\
Val.inject f'
vres vres' /\
Mem.inject f'
m2 m2' /\
Mem.unchanged_on (
loc_unmapped f)
m1 m2 /\
Mem.unchanged_on (
loc_out_of_reach f m1)
m1'
m2' /\
inject_incr f f' /\
inject_separated f f'
m1 m1' /\
(
forall b b'
delta,
f'
b =
Some (
b',
delta) ->
delta = 0) /\
(
forall b b1 b2,
f'
b1 =
Some (
b, 0) ->
f'
b2 =
Some (
b, 0) ->
b1 =
b2) /\
(
forall b b'
o k p,
f'
b =
Some (
b', 0) -> (
Mem.perm m2 b o k p <->
Mem.perm m2'
b'
o k p)).
Axiom inline_asm_mem_inject_gen':
forall txt sg clb (
ge1 ge2 :
Senv.t)
(
vargs :
list val) (
m1 :
mem) (
t :
trace)
(
vres :
val) (
m2 :
mem) (
f :
block ->
option (
block *
Z))
(
m1' :
mem) (
vargs' :
list val),
symbols_inject f ge1 ge2 ->
external_call (
EF_inline_asm txt sg clb)
ge1 vargs m1 t vres m2 ->
Mem.inject f m1 m1' ->
Val.inject_list f vargs vargs' ->
(
forall b b'
delta,
f b =
Some (
b',
delta) ->
delta = 0) ->
(
forall b b1 b2,
f b1 =
Some (
b, 0) ->
f b2 =
Some (
b, 0) ->
b1 =
b2) ->
(
forall b b'
o k p,
f b =
Some (
b', 0) -> (
Mem.perm m1 b o k p <->
Mem.perm m1'
b'
o k p)) ->
exists (
f' :
meminj) (
vres' :
val) (
m2' :
mem),
external_call (
EF_inline_asm txt sg clb)
ge2 vargs'
m1'
t vres'
m2' /\
Val.inject f'
vres vres' /\
Mem.inject f'
m2 m2' /\
Mem.unchanged_on (
loc_unmapped f)
m1 m2 /\
Mem.unchanged_on (
loc_out_of_reach f m1)
m1'
m2' /\
inject_incr f f' /\
inject_separated f f'
m1 m1' /\
(
forall b b'
delta,
f'
b =
Some (
b',
delta) ->
delta = 0) /\
(
forall b b1 b2,
f'
b1 =
Some (
b, 0) ->
f'
b2 =
Some (
b, 0) ->
b1 =
b2) /\
(
forall b b'
o k p,
f'
b =
Some (
b', 0) -> (
Mem.perm m2 b o k p <->
Mem.perm m2'
b'
o k p)).
Lemma external_call_mem_inject_gen':
forall (
ef :
external_function) (
ge1 ge2 :
Senv.t)
(
vargs :
list val) (
m1 :
mem) (
t :
trace)
(
vres :
val) (
m2 :
mem) (
f :
block ->
option (
block *
Z))
(
m1' :
mem) (
vargs' :
list val),
symbols_inject f ge1 ge2 ->
external_call ef ge1 vargs m1 t vres m2 ->
Mem.inject f m1 m1' ->
Val.inject_list f vargs vargs' ->
(
forall b b'
delta,
f b =
Some (
b',
delta) ->
delta = 0) ->
(
forall b b1 b2,
f b1 =
Some (
b, 0) ->
f b2 =
Some (
b, 0) ->
b1 =
b2) ->
(
forall b b'
o k p,
f b =
Some (
b', 0) -> (
Mem.perm m1 b o k p <->
Mem.perm m1'
b'
o k p)) ->
exists (
f' :
meminj) (
vres' :
val) (
m2' :
mem),
external_call ef ge2 vargs'
m1'
t vres'
m2' /\
Val.inject f'
vres vres' /\
Mem.inject f'
m2 m2' /\
Mem.unchanged_on (
loc_unmapped f)
m1 m2 /\
Mem.unchanged_on (
loc_out_of_reach f m1)
m1'
m2' /\
inject_incr f f' /\
inject_separated f f'
m1 m1' /\
(
forall b b'
delta,
f'
b =
Some (
b',
delta) ->
delta = 0) /\
(
forall b b1 b2,
f'
b1 =
Some (
b, 0) ->
f'
b2 =
Some (
b, 0) ->
b1 =
b2) /\
(
forall b b'
o k p,
f'
b =
Some (
b', 0) -> (
Mem.perm m2 b o k p <->
Mem.perm m2'
b'
o k p)).
Proof.