]> matita.cs.unibo.it Git - helm.git/blob - helm/software/components/ng_tactics/andOrTree.mli
Preparing for 0.5.9 release.
[helm.git] / helm / software / components / ng_tactics / andOrTree.mli
1 (*
2     ||M||  This file is part of HELM, an Hypertextual, Electronic        
3     ||A||  Library of Mathematics, developed at the Computer Science     
4     ||T||  Department, University of Bologna, Italy.                     
5     ||I||                                                                
6     ||T||  HELM is free software; you can redistribute it and/or         
7     ||A||  modify it under the terms of the GNU General Public License   
8     \   /  version 2 or (at your option) any later version.      
9      \ /   This software is distributed as is, NO WARRANTY.     
10       V_______________________________________________________________ *)
11
12 (* $Id: nCic.ml 9058 2008-10-13 17:42:30Z tassi $ *)
13
14 type andT
15 type orT
16
17 type ('s,'g) tree = ([ `And of 's | `Or ], 'g) ZipTree.tree
18 type ('a,'s,'g) position = ('a,[ `And of 's | `Or ], 'g) ZipTree.position
19
20 type ('s,'g) subtreeA = 
21   Solution of 's | Todo of (andT,'s,'g) position
22
23 type ('s,'g) subtreeO = 
24   Unexplored | Alternatives of (orT,'s,'g) position
25
26 (* fails if Nil *)
27 val start : ('s,'g) tree -> (andT,'s,'g) position
28
29 val upA    : (andT,'s,'g) position -> (orT,'s,'g) position option
30 val upO    : (orT,'s,'g) position -> (andT,'s,'g) position 
31 val downA : (andT,'s,'g) position -> ('s,'g) subtreeO
32 val downO  : (orT,'s,'g) position -> ('s,'g) subtreeA
33 val downOr : (orT,'s,'g) position -> ('s,'g) subtreeA
34
35 val left  : ('a,'s,'g) position -> ('a,'s,'g) position option
36 val right : ('a,'s,'g) position -> ('a,'s,'g) position option
37
38 val is_top : (orT,'s,'g) position -> bool
39 val is_nil : (andT,'s,'g) position -> bool
40 val is_solved_leaf : (orT,'s,'g) position -> bool
41
42 val get_leaf_solution : (orT,'s,'g) position -> 's
43
44 val root: ('a,'s,'g) position -> ('s,'g) tree
45
46 val getA: (andT,'s,'g) position -> 's * 'g
47 val getO: (orT,'s,'g) position -> 'g
48 val setA: 's -> 'g -> (andT,'s,'g) position -> (andT,'s,'g) position
49 val setO: 'g -> (orT,'s,'g) position -> (orT,'s,'g) position
50
51 val inject: ('s,'g) tree -> ('a,'s,'g) position -> ('a,'s,'g) position
52 val eject: ('a,'s,'g) position -> ('s,'g) tree
53
54 val dump: ('g -> string) -> 
55             ('a,'s,'g) position -> Format.formatter -> unit
56
57