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
122
Issues
122
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
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
1c3c58f4
Commit
1c3c58f4
authored
May 24, 2011
by
MARCHE Claude
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved example
parent
88d41d7a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
examples/bts12244.ml
examples/bts12244.ml
+19
-5
tests/test-claude.why
tests/test-claude.why
+2
-0
No files found.
examples/bts12244.ml
View file @
1c3c58f4
...
...
@@ -50,7 +50,7 @@ let two : Term.term = Term.t_const (Term.ConstInt "2")
let
fmla
:
Term
.
term
=
Term
.
t_equ
one
two
let
task
=
Task
.
use_export
None
int_theory
let
goal_id
=
Decl
.
create_prsymbol
(
Ident
.
id_fresh
"G"
)
let
goal_id
=
Decl
.
create_prsymbol
(
Ident
.
id_fresh
"G"
)
let
task
=
Task
.
add_prop_decl
task
Decl
.
Pgoal
goal_id
fmla
(*
...
...
@@ -63,12 +63,26 @@ let split = Trans.lookup_transform_l "split_goal" env
let
task_inline
=
Trans
.
apply
inline
task
let
()
=
printf
"@[task == task_inline ? %b@]@."
(
task
==
task_inline
)
let
task_split
=
let
task_split
=
match
Trans
.
apply
split
task
with
|
[
t
]
->
t
|
_
->
assert
false
let
()
=
printf
"@[task == task_split ? %b@]@."
(
task
==
task_split
)
let
task_checksum
t
=
fprintf
str_formatter
"%a@."
Pretty
.
print_task
t
;
let
s
=
flush_str_formatter
()
in
Digest
.
to_hex
(
Digest
.
string
s
)
let
sum
=
task_checksum
task
let
sum_inline
=
task_checksum
task_inline
let
sum_split
=
task_checksum
task_split
let
()
=
printf
"@[task == task_inline ? %b same checksums ? %b@]@."
(
task
==
task_inline
)
(
sum
=
sum_inline
)
let
()
=
printf
"@[task == task_split ? %b same checksums ? %b@]@."
(
task
==
task_split
)
(
sum
=
sum_split
)
tests/test-claude.why
View file @
1c3c58f4
...
...
@@ -109,6 +109,8 @@ theory TestReal
goal RealAbs1: forall x:real. 100.0 >= abs x >= 1.0 -> x*x >= 1.0
goal T: forall x y:real. abs x <= 1.0 and abs y <= 1.0 -> x - y <= 2.0
end
theory TestFloat
...
...
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