task.mli 2.11 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
(**************************************************************************)
(*                                                                        *)
(*  Copyright (C) 2010-                                                   *)
(*    Francois Bobot                                                      *)
(*    Jean-Christophe Filliatre                                           *)
(*    Johannes Kanig                                                      *)
(*    Andrei Paskevich                                                    *)
(*                                                                        *)
(*  This software is free software; you can redistribute it and/or        *)
(*  modify it under the terms of the GNU Library General Public           *)
(*  License version 2.1, with the special exception on linking            *)
(*  described in file LICENSE.                                            *)
(*                                                                        *)
(*  This software is distributed in the hope that it will be useful,      *)
(*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *)
(*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                  *)
(*                                                                        *)
(**************************************************************************)

open Ident
open Ty
open Term
open Decl
open Theory2

(** Cloning map *)

Andrei Paskevich's avatar
Andrei Paskevich committed
28
type clone
29
30
31

val cloned_from : clone -> ident -> ident -> bool

Andrei Paskevich's avatar
Andrei Paskevich committed
32
33
val clone_tag : clone -> int

34
35
36
37
38
39
40
41
42
(** Task *)

type task = private {
  task_decl  : decl;
  task_prev  : task option;
  task_known : decl Mid.t;
  task_tag   : int;
}

Andrei Paskevich's avatar
Andrei Paskevich committed
43
44
45
46
(* constructors *)

val init_task : task

47
48
val add_decl : task -> decl -> task

Andrei Paskevich's avatar
Andrei Paskevich committed
49
50
51
52
val split_theory : theory -> Spr.t -> (task * clone) list

val split_theory_full : theory -> (task * clone) list

53
54
55
(* bottom-up, tail-recursive traversal functions *)

val task_fold : ('a -> decl -> 'a) -> 'a -> task -> 'a
Andrei Paskevich's avatar
Andrei Paskevich committed
56

57
58
59
60
61
62
63
64
65
val task_iter : (decl -> unit) -> task -> unit

val task_decls : task -> decl list

(* exceptions *)

exception UnknownIdent of ident
exception RedeclaredIdent of ident