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
121
Issues
121
List
Boards
Labels
Service Desk
Milestones
Merge Requests
17
Merge Requests
17
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
62ad011e
Commit
62ad011e
authored
Apr 28, 2010
by
Andrei Paskevich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
provide task_equal
parent
8fbca7c0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
src/core/task.ml
src/core/task.ml
+8
-2
src/core/task.mli
src/core/task.mli
+4
-2
src/driver/driver.ml
src/driver/driver.ml
+1
-1
No files found.
src/core/task.ml
View file @
62ad011e
...
...
@@ -42,12 +42,16 @@ and tdecl =
|
Use
of
theory
|
Clone
of
theory
*
(
ident
*
ident
)
list
let
create_decl
d
=
Decl
d
let
task_known
=
option_apply
Mid
.
empty
(
fun
t
->
t
.
task_known
)
let
task_clone
=
option_apply
Mid
.
empty
(
fun
t
->
t
.
task_clone
)
let
task_used
=
option_apply
Mid
.
empty
(
fun
t
->
t
.
task_used
)
let
task_equal
t1
t2
=
match
t1
,
t2
with
|
Some
t1
,
Some
t2
->
t1
==
t2
|
Some
_
,
None
->
false
|
None
,
Some
_
->
false
|
None
,
None
->
true
module
Task
=
struct
type
t
=
task_hd
...
...
@@ -118,6 +122,8 @@ let add_tdecl task td =
let
add_decl
task
d
=
add_tdecl
task
(
Decl
d
)
let
create_decl
d
=
Decl
d
(* declaration constructors + add_decl *)
let
add_ty_decl
tk
dl
=
add_decl
tk
(
create_ty_decl
dl
)
...
...
src/core/task.mli
View file @
62ad011e
...
...
@@ -41,7 +41,7 @@ and tdecl = private
|
Use
of
theory
|
Clone
of
theory
*
(
ident
*
ident
)
list
val
create_decl
:
decl
->
tdec
l
val
task_equal
:
task
->
task
->
boo
l
val
task_known
:
task
->
known_map
val
task_clone
:
task
->
clone_map
...
...
@@ -49,8 +49,10 @@ val task_used : task -> use_map
(* constructors *)
val
add_tdecl
:
task
->
tdecl
->
task
val
create_decl
:
decl
->
tdecl
val
add_decl
:
task
->
decl
->
task
val
add_tdecl
:
task
->
tdecl
->
task
val
use_export
:
task
->
theory
->
task
val
clone_export
:
task
->
theory
->
th_inst
->
task
...
...
src/driver/driver.ml
View file @
62ad011e
...
...
@@ -265,7 +265,7 @@ module Hsdq = Hashcons.Make (struct
type
t
=
driver_query
let
equal
q1
q2
=
q1
.
query_driver
==
q2
.
query_driver
&&
option_eq
(
==
)
q1
.
query_lclone
q2
.
query_lclone
task_equal
q1
.
query_lclone
q2
.
query_lclone
let
hash
q
=
Hashcons
.
combine
q
.
query_driver
.
drv_tag
(
option_apply
0
(
fun
t
->
1
+
t
.
task_tag
)
q
.
query_lclone
)
...
...
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