Skip to content
Snippets Groups Projects
Commit 714a13d3 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[test] test case for reported issue

parent 7d62b3d0
No related branches found
No related tags found
No related merge requests found
/* run.config
MACRO: PTEST_MAKE_MODULE make FRAMAC_USER_OFLAGS="-package why3" FRAMAC_USER_BFLAGS="-package why3"
MODULE: @PTEST_DIR@/@PTEST_NAME@.cmxs
OPT:
*/
/*@ predicate load(char * x) = \true ; */
/*@ why3 load("List"); */
open Logic_typing
open Cil_types
let load_theory = function
| { pred_content = Papp (_, [], [ { term_node = TConst(LStr _name) } ] ) } ->
let open Why3 in ignore (
Theory.import_namespace Theory.empty_ns [_name]
)
| _ -> assert false
let typing ~typing_context ~loc lexprs =
ignore loc ;
let type_predicate =
typing_context.type_predicate typing_context (Lenv.empty ())
in
let predicates = List.map type_predicate lexprs in
List.iter load_theory predicates ;
Ext_preds predicates
let () =
Logic_typing.register_global_extension "why3" false typing
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment