Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
125
Issues
125
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
b0764bad
Commit
b0764bad
authored
Nov 23, 2015
by
MARCHE Claude
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jessie3: update to Frama-C magnesium
parent
a06ea4ee
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
18 deletions
+25
-18
src/jessie/ACSLtoWhy3.ml
src/jessie/ACSLtoWhy3.ml
+17
-12
src/jessie/Makefile.in
src/jessie/Makefile.in
+3
-1
src/jessie/register.ml
src/jessie/register.ml
+5
-5
No files found.
src/jessie/ACSLtoWhy3.ml
View file @
b0764bad
...
...
@@ -421,9 +421,9 @@ let bound_vars = Hashtbl.create 257
let
create_lvar
v
=
let
id
=
Ident
.
id_fresh
v
.
lv_name
in
let
vs
=
Term
.
create_vsymbol
id
(
logic_type
v
.
lv_type
)
in
(*
(*
*)
Self
.
result
"create logic variable %d"
v
.
lv_id
;
*)
(*
*)
Hashtbl
.
add
bound_vars
v
.
lv_id
vs
;
vs
...
...
@@ -437,13 +437,13 @@ let get_lvar lv =
let
program_vars
=
Hashtbl
.
create
257
let
create_var_full
v
=
(**)
Self
.
result
"create program variable %s (%d)"
v
.
vname
v
.
vid
;
(**)
let
id
=
Ident
.
id_fresh
v
.
vname
in
let
ty
,
def
=
ctype_and_default
v
.
vtype
in
let
def
=
Mlw_expr
.
e_app
(
mk_ref
ty
)
[
def
]
in
let
let_defn
,
vs
=
Mlw_expr
.
create_let_pv_defn
id
def
in
(*
Self.result "create program variable %s (%d)" v.vname v.vid;
*)
Hashtbl
.
add
program_vars
v
.
vid
(
vs
,
true
,
ty
);
let_defn
,
vs
...
...
@@ -949,12 +949,12 @@ let binop op e1 e2 =
let
unop
op
e
=
let
ls
,
ty
,
ty'
=
match
op
with
|
Neg
->
(*
*
Unary minus *)
|
Neg
->
(* Unary minus *)
Self
.
not_yet_implemented
"unop Neg"
(* neg32_fun, mlw_int32_type, mlw_int32_type*)
|
BNot
->
(*
*
Bitwise complement (~) *)
|
BNot
->
(* Bitwise complement (~) *)
Self
.
not_yet_implemented
"unop BNot"
|
LNot
->
(*
*
Logical Not (!) *)
|
LNot
->
(* Logical Not (!) *)
Self
.
not_yet_implemented
"unop LNot"
in
Mlw_expr
.
e_app
(
Mlw_expr
.
e_arrow
ls
[
ty
]
ty'
)
[
e
]
...
...
@@ -1299,15 +1299,20 @@ let global (theories,lemmas,functions) g =
let
sym
=
Mlw_expr
.
LetV
pv
in
(
theories
,
lemmas
,
(
Mlw_decl
.
create_val_decl
sym
)
::
functions
)
|
G
Var
Decl
(
_funspec
,
vi
,_
location
)
->
|
G
Fun
Decl
(
_funspec
,
vi
,_
location
)
->
begin
match
vi
.
vname
with
|
"Frama_C_bzero"
|
"Frama_C_copy_block"
->
(
theories
,
lemmas
,
functions
)
|
_
->
let
_
,
pv
=
create_var_full
vi
in
let
sym
=
Mlw_expr
.
LetV
pv
in
(
theories
,
lemmas
,
(
Mlw_decl
.
create_val_decl
sym
)
::
functions
)
(*
let f = fundecl vi in
*)
(
theories
,
lemmas
,
functions
)
end
|
GVarDecl
(
vi
,_
location
)
->
let
_
,
pv
=
create_var_full
vi
in
let
sym
=
Mlw_expr
.
LetV
pv
in
(
theories
,
lemmas
,
(
Mlw_decl
.
create_val_decl
sym
)
::
functions
)
|
GAnnot
(
a
,
loc
)
->
let
(
t
,
l
)
=
logic_decl
~
in_axiomatic
:
false
a
loc
(
theories
,
lemmas
)
in
(
t
,
l
,
functions
)
...
...
src/jessie/Makefile.in
View file @
b0764bad
...
...
@@ -52,7 +52,7 @@ tests: tests/ptests_config
tests/ptests_config
:
Makefile
rm
-rf
tests/ptests_config
echo
"DEFAULT_SUITES="
$(TESTS)
>
tests/ptests_config
echo
"TOPLEVEL_PATH=
"
$(FRAMAC_TOPLEVEL)
>>
tests/ptests_config
echo
"TOPLEVEL_PATH=
$(FRAMAC_TOPLEVEL)
-load-module ./Jessie3.cma"
>>
tests/ptests_config
echo
"FRAMAC_SHARE="
$(FRAMAC_SHARE)
>>
tests/ptests_config
echo
"FRAMAC_PLUGIN=."
>>
tests/ptests_config
echo
"FRAMAC_PLUGIN_GUI=./gui"
>>
tests/ptests_config
...
...
@@ -64,3 +64,5 @@ clean:
rm
-f
$(
addsuffix
.cmo,
$(MODULES)
)
rm
-f
$(
addsuffix
.cmx,
$(MODULES)
)
rm
-f
Jessie3.cma Jessie3.cmxs
register.cmx
:
ACSLtoWhy3.cmx
src/jessie/register.ml
View file @
b0764bad
...
...
@@ -69,10 +69,10 @@ let process () =
List
.
fold_left
(
get_prover
ACSLtoWhy3
.
config
ACSLtoWhy3
.
env
)
[]
[
"Z432"
,
"Z3,4.3.2"
;
"Z
32 "
,
"Z3,3.2
"
;
"C241"
,
"CVC3,2.4.1"
;
"C414"
,
"CVC4,1.4"
;
[
"Z432"
,
"Z3,4.3.2
,
"
;
"Z
440"
,
"Z3,4.4.0,
"
;
"C241"
,
"CVC3,2.4.1
,
"
;
"C414"
,
"CVC4,1.4
,
"
;
"A991"
,
"Alt-Ergo,0.99.1,"
;
]
with
e
->
...
...
@@ -84,7 +84,7 @@ let process () =
ACSLtoWhy3
.
Self
.
result
"Translating to Why3..."
;
ACSLtoWhy3
.
prog
prog
with
e
->
ACSLtoWhy3
.
Self
.
fatal
"Exception raised wh
en loading prover drivers
:@ %a"
ACSLtoWhy3
.
Self
.
fatal
"Exception raised wh
ile translating to Why3
:@ %a"
Exn_printer
.
exn_printer
e
in
try
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment