From 2d015514b890c2c6f5506fa15c5b592209a590ae Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Wed, 19 Mar 2014 19:10:43 +0100 Subject: Adding a Print Strategy vernacular command. It allows to check the transparent status of variables and constants. --- kernel/conv_oracle.ml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'kernel/conv_oracle.ml') diff --git a/kernel/conv_oracle.ml b/kernel/conv_oracle.ml index 32aaacb62..4f2631a66 100644 --- a/kernel/conv_oracle.ml +++ b/kernel/conv_oracle.ml @@ -54,6 +54,12 @@ let set_strategy ({ var_opacity; cst_opacity } as oracle) k l = else Cmap.add c l cst_opacity } | RelKey _ -> Errors.error "set_strategy: RelKey" +let fold_strategy f { var_opacity; cst_opacity; } accu = + let fvar id lvl accu = f (VarKey id) lvl accu in + let fcst cst lvl accu = f (ConstKey cst) lvl accu in + let accu = Id.Map.fold fvar var_opacity accu in + Cmap.fold fcst cst_opacity accu + let get_transp_state { var_opacity; cst_opacity } = (Id.Map.fold (fun id l ts -> if l=Opaque then Id.Pred.remove id ts else ts) -- cgit v1.2.3