Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
why3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nils Fitinghoff
why3
Commits
0558b653
Commit
0558b653
authored
6 years ago
by
Guillaume Melquiond
Browse files
Options
Downloads
Patches
Plain Diff
Reduce memory consumption of Why3.
This decreases the memory consumption by 10% on multiprecision/add.mlw.
parent
8e5da6fb
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/transform/apply.ml
+3
-3
3 additions, 3 deletions
src/transform/apply.ml
with
3 additions
and
3 deletions
src/transform/apply.ml
+
3
−
3
View file @
0558b653
...
...
@@ -296,7 +296,7 @@ let rewrite_list opt rev with_terms hl h1 =
(* Used to find the equality we are rewriting on *)
(* TODO here should fold with a boolean stating if we found equality yet to
not go through all possible hypotheses *)
fold_decl
(
fun
d
(
acclp
,
accterm
)
->
fold_decl
(
fun
d
(
(
acclp
,
accterm
)
as
acc
)
->
match
d
.
d_node
with
|
Dprop
(
Paxiom
,
pr
,
t
)
when
Ident
.
id_equal
pr
.
pr_name
h
.
pr_name
->
let
lp
,
lv
,
f
=
intros
t
in
...
...
@@ -311,10 +311,10 @@ let rewrite_list opt rev with_terms hl h1 =
let
new_lp
,
new_term
=
if
opt
then
try
replace_subst
lp
lv
t1
t2
with_terms
accterm
with
Arg_trans
_
->
(
acc
lp
,
accterm
)
with
Arg_trans
_
->
acc
else
replace_subst
lp
lv
t1
t2
with_terms
accterm
in
new_lp
@
acclp
,
new_term
|
_
->
(
acc
lp
,
accterm
)
)
(
lp
,
term
)
in
|
_
->
acc
)
(
lp
,
term
)
in
let
do_all
=
List
.
fold_left
(
fun
acc
h
->
Trans
.
bind
acc
(
do_h
h
))
found_term
hl
in
(* Pass the premises as new goals. Replace the former toberewritten
hypothesis to the new rewritten one *)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment