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
119
Issues
119
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
82f6fd2a
Commit
82f6fd2a
authored
May 19, 2011
by
MARCHE Claude
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IDE: fix problems with order of goals when reloading
parent
70fa331b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
9 deletions
+38
-9
src/ide/session.ml
src/ide/session.ml
+37
-8
tests/test-claude.why
tests/test-claude.why
+1
-1
No files found.
src/ide/session.ml
View file @
82f6fd2a
...
...
@@ -840,7 +840,7 @@ and reload_trans _goal_obsolete goal _ tr =
remaining = [ s2, h2 ; ... ]
*)
let
new_goals_map
,
_
remaining
,_
=
let
new_goals_map
,
old_subgoals
,_
=
List
.
fold_left
(
fun
(
new_goals_map
,
old_subgoals
,
count
)
subtask
->
let
id
=
(
Task
.
task_goal
subtask
)
.
Decl
.
pr_name
in
...
...
@@ -850,8 +850,17 @@ and reload_trans _goal_obsolete goal _ tr =
try
let
g
=
Util
.
Mstr
.
find
sum
old_subgoals
in
(* an old subgoal has the same checksum *)
(*
eprintf "Merge phase 1: old goal '%s' -> new goal '%s'@."
g.goal_name subgoal_name;
*)
(
Some
g
,
Util
.
Mstr
.
remove
sum
old_subgoals
)
with
Not_found
->
None
,
old_subgoals
with
Not_found
->
(*
eprintf "Merge phase 1: no old goal -> new goal '%s'@."
subgoal_name;
*)
(
None
,
old_subgoals
)
in
((
count
,
id
,
subgoal_name
,
subtask
,
sum
,
old_subgoal
)
::
new_goals_map
,
old_subgoals
,
count
+
1
))
...
...
@@ -877,15 +886,35 @@ and reload_trans _goal_obsolete goal _ tr =
*)
let
rec
associate_remaining_goals
new_goals_map
remaining
acc
=
match
new_goals_map
with
|
[]
->
acc
|
[]
->
(*
eprintf "Merge phase 3: dropping %d old goals@."
(List.length remaining);
*)
acc
|
(
_
,
id
,
subgoal_name
,
subtask
,
sum
,
old_subgoal
)
::
new_rem
->
let
((
obsolete
,
old_goal
,
rem
)
:
bool
*
goal
option
*
(
string
*
goal
)
list
)
=
match
old_subgoal
with
|
Some
_
->
false
,
old_subgoal
,
remaining
|
Some
_g
->
(*
eprintf "Merge phase 2: old goal '%s' -> new goal '%s'@."
g.goal_name subgoal_name;
*)
(
false
,
old_subgoal
,
remaining
)
|
None
->
match
remaining
with
|
[]
->
false
,
None
,
[]
|
(
_goal_name
,
g
)
::
rem
->
true
,
Some
g
,
rem
|
[]
->
(*
eprintf "Merge phase 2: no old goal -> new goal '%s'@."
subgoal_name;
*)
(
false
,
None
,
[]
)
|
(
_goal_name
,
g
)
::
rem
->
(*
eprintf "Merge phase 2: old goal '%s' -> new goal '%s'@."
g.goal_name subgoal_name;
*)
(
true
,
Some
g
,
rem
)
in
associate_remaining_goals
new_rem
rem
((
id
,
subgoal_name
,
sum
,
subtask
,
old_goal
,
obsolete
)
::
acc
)
...
...
@@ -899,9 +928,9 @@ and reload_trans _goal_obsolete goal _ tr =
reload_any_goal
(
Parent_transf
mtr
)
id
subgoal_name
sum
subtask
old_g
subgoal_obsolete
in
mg
::
acc
)
[]
goals
[]
(
List
.
rev
goals
)
in
mtr
.
subgoals
<-
goals
;
mtr
.
subgoals
<-
(
List
.
rev
goals
)
;
check_transf_proved
mtr
in
apply_transformation
~
callback
tr
.
transf
(
get_task
goal
)
...
...
tests/test-claude.why
View file @
82f6fd2a
...
...
@@ -44,7 +44,7 @@ theory TestSplit
logic bb int
goal G1 : (
"stop_split" aa 0 and bb 1) and ("stop_split" aa 1 and bb 2)
goal G1 : (
aa 5) and ("stop_split" aa 0 and bb 6) and ("stop_split" aa 1 and bb 2)
goal G2 : ("stop_split" aa 0 && bb 1) && ("stop_split" aa 1 && bb 2)
...
...
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