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
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
ea694c6c
Commit
ea694c6c
authored
Apr 23, 2010
by
Andrei Paskevich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- put back "assert false" in Eliminate_inductive
- rewrite Trans.report to stop my eyes bleeding
parent
bbcaf1ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
13 deletions
+9
-13
src/core/trans.ml
src/core/trans.ml
+6
-8
src/core/trans.mli
src/core/trans.mli
+2
-4
src/transform/eliminate_inductive.ml
src/transform/eliminate_inductive.ml
+1
-1
No files found.
src/core/trans.ml
View file @
ea694c6c
...
...
@@ -118,15 +118,13 @@ let notImplemented s = error (NotImplemented s)
let
report
fmt
=
function
|
UnsupportedExpression
(
e
,
s
)
->
let
msg
=
"The transformation doesn't support this expression"
in
Format
.
fprintf
fmt
"@[<hov 3> The transformation doesn't support this expression :@
\n
\
%a@
\n
\
%s@]@
\n
"
Pretty
.
print_expr
e
s
"@[<hov 3> %s:@
\n
%a@
\n
%s@]@
\n
"
msg
Pretty
.
print_expr
e
s
|
UnsupportedDeclaration
(
d
,
s
)
->
let
msg
=
"The transformation doesn't support this declaration"
in
Format
.
fprintf
fmt
"@[<hov 3> The transformation doesn't support this declaration :@
\n
\
%a@
\n
\
%s@]@
\n
"
Pretty
.
print_decl
d
s
"@[<hov 3> %s:@
\n
%a@
\n
%s@]@
\n
"
msg
Pretty
.
print_decl
d
s
|
NotImplemented
(
s
)
->
Format
.
fprintf
fmt
"@[<hov 3> Unimplemented features :@
\n
%s@]@
\n
"
s
Format
.
fprintf
fmt
"@[<hov 3> Unimplemented feature:@
\n
%s@]@
\n
"
s
src/core/trans.mli
View file @
ea694c6c
...
...
@@ -57,10 +57,8 @@ val decl_l : (decl -> decl list list) -> task -> task tlist
val
rewrite
:
(
term
->
term
)
->
(
fmla
->
fmla
)
->
task
->
task
trans
(** exception to use in a transformation *)
type
error
=
|
UnsupportedExpression
of
expr
*
string
|
UnsupportedDeclaration
of
decl
*
string
...
...
@@ -70,7 +68,7 @@ exception Error of error
val
unsupportedExpression
:
expr
->
string
->
'
a
val
unsupportedDeclaration
:
decl
->
string
->
'
a
(** - [expr] is the problematic formula
(** - [expr] is the problematic formula
- [string] explain the problem and
possibly a way to solve it (such as applying another
transforamtion) *)
...
...
@@ -78,5 +76,5 @@ val unsupportedDeclaration : decl -> string -> 'a
val
notImplemented
:
string
->
'
a
(** [string] explain what is not implemented *)
val
report
:
Format
.
formatter
->
error
->
unit
src/transform/eliminate_inductive.ml
View file @
ea694c6c
...
...
@@ -36,7 +36,7 @@ let exi vl (_,f) =
|
Fapp
(
_
,
tl
)
->
let
marry
acc
v
t
=
f_and_simp
acc
(
f_equ
v
t
)
in
List
.
fold_left2
marry
f_true
vl
tl
|
_
->
Trans
.
unsupportedExpression
(
Fmla
f
)
"eliminate_inductive"
|
_
->
assert
false
in
descend
f
...
...
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