Require Import List.
Require Import String.
Require Import ZArith.
Open Scope list_scope.
Open Scope string_scope.
Open Scope Z_scope.
Require Import StructTactics.
Require Import ImpSyntax.
Require Import ImpCommon.
Require Import ImpExprTransf.
Require Import ImpInterpNock.
Module I := ImpInterpNock.
Definition cfold_aux (e : expr) : expr :=
match e with
| Eop1 op (Eval v) =>
Eval (I.interp_op1 op v)
| Eop2 op (Eval v1) (Eval v2) =>
Eval (I.interp_op2 op v1 v2)
| _ => e
end.
Definition cfold_e : expr -> expr :=
transf_e cfold_aux.
Definition cfold (p : prog) : prog :=
transf_p cfold_e p.
Require Import String.
Require Import ZArith.
Open Scope list_scope.
Open Scope string_scope.
Open Scope Z_scope.
Require Import StructTactics.
Require Import ImpSyntax.
Require Import ImpCommon.
Require Import ImpExprTransf.
Require Import ImpInterpNock.
Module I := ImpInterpNock.
Definition cfold_aux (e : expr) : expr :=
match e with
| Eop1 op (Eval v) =>
Eval (I.interp_op1 op v)
| Eop2 op (Eval v1) (Eval v2) =>
Eval (I.interp_op2 op v1 v2)
| _ => e
end.
Definition cfold_e : expr -> expr :=
transf_e cfold_aux.
Definition cfold (p : prog) : prog :=
transf_p cfold_e p.
This page has been generated by coqdoc