Debian Codegraph @

pretyping/locusops.mli

raw symbols SCIP
1 (************************************************************************)
2 (* * The Rocq Prover / The Rocq Development Team *)
3 (* v * Copyright INRIA, CNRS and contributors *)
4 (* <O___,, * (see version control and CREDITS file for authors & dates) *)
5 (* \VV/ **************************************************************)
6 (* // * This file is distributed under the terms of the *)
7 (* * GNU Lesser General Public License Version 2.1 *)
8 (* * (see LICENSE file for the text of the license) *)
9 (************************************************************************)
10
11 open Names
12 open Locus
13
14 (** Utilities on or_var *)
15
16 val or_var_map : ('a -> 'b) -> 'a or_var -> 'b or_var
17
18 (** Utilities on occurrences *)
19
20 val occurrences_map :
21 ('a list -> 'b list) -> 'a occurrences_gen -> 'b occurrences_gen
22
23 (** {6 Counting occurrences} *)
24
25 type occurrences_count
26 (** A counter of occurrences associated to a list of occurrences *)
27
28 (** Three basic functions to initialize, count, and conclude a loop
29 browsing over subterms *)
30
31 val initialize_occurrence_counter : occurrences -> occurrences_count
32 (** Initialize an occurrence_counter *)
33
34 val update_occurrence_counter : occurrences_count -> bool * occurrences_count
35 (** Increase the occurrence counter by one and tell if the current occurrence is selected *)
36
37 val check_used_occurrences : occurrences_count -> unit
38 (** Increase the occurrence counter and tell if the current occurrence is selected *)
39
40 (** Auxiliary functions about occurrence counters *)
41
42 val current_occurrence : occurrences_count -> int
43 (** Tell the value of the current occurrence *)
44
45 val occurrences_done : occurrences_count -> bool
46 (** Tell if there are no more occurrences to select and if the loop
47 can be shortcut *)
48
49 val more_specific_occurrences : occurrences_count -> bool
50 (** Tell if there are no more occurrences to select (or unselect)
51 and if an inner loop can be shortcut *)
52
53 (** {6 Miscellaneous} *)
54
55 val is_selected : int -> occurrences -> bool
56
57 val is_all_occurrences : 'a occurrences_gen -> bool
58
59 val error_invalid_occurrence : int list -> 'a
60
61 (** Usual clauses *)
62
63 val allHypsAndConcl : 'a clause_expr
64 val allHyps : 'a clause_expr
65 val onConcl : 'a clause_expr
66 val nowhere : 'a clause_expr
67 val onHyp : 'a -> 'a clause_expr
68
69 (** Tests *)
70
71 val is_nowhere : 'a clause_expr -> bool
72
73 (** Clause conversion functions, parametrized by a hyp enumeration function *)
74
75 val simple_clause_of : (unit -> Id.t list) -> clause -> simple_clause
76 val concrete_clause_of : (unit -> Id.t list) -> clause -> concrete_clause
77
78 (** Miscellaneous functions *)
79
80 val occurrences_of_hyp : Id.t -> clause -> (occurrences * hyp_location_flag)
81 val occurrences_of_goal : clause -> occurrences
82 val in_every_hyp : clause -> bool
83
84 val clause_with_generic_occurrences : 'a clause_expr -> bool
85 val clause_with_generic_context_selection : 'a clause_expr -> bool