~ubuntu-branches/ubuntu/saucy/ladr/saucy

« back to all changes in this revision

Viewing changes to ladr/lindex.h.bak

  • Committer: Package Import Robot
  • Author(s): Frank Lichtenheld
  • Date: 2013-05-25 11:43:32 UTC
  • mfrom: (5.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20130525114332-lkzco1dti2hwrf7v
Tags: 0.0.200911a-2
* QA upload.
* Upload to unstable.
* Change maintainer to QA group.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  Copyright (C) 2006, 2007 William McCune
2
 
 
3
 
    This file is part of the LADR Deduction Library.
4
 
 
5
 
    The LADR Deduction Library is free software; you can redistribute it
6
 
    and/or modify it under the terms of the GNU General Public License,
7
 
    version 2.
8
 
 
9
 
    The LADR Deduction Library is distributed in the hope that it will be
10
 
    useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
    GNU General Public License for more details.
13
 
 
14
 
    You should have received a copy of the GNU General Public License
15
 
    along with the LADR Deduction Library; if not, write to the Free Software
16
 
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17
 
*/
18
 
 
19
 
#ifndef TP_LINDEX_H
20
 
#define TP_LINDEX_H
21
 
 
22
 
#include "mindex.h"
23
 
#include "maximal.h"
24
 
#include "topform.h"
25
 
 
26
 
/* INTRODUCTION
27
 
This is a simple package that can be used when you need a pair
28
 
of indexes (Mindexes), one for positive literals, and one for negative
29
 
literals.  The name Lindex means "literal index".
30
 
<P>
31
 
When you allocate the Lindex (lindex_init()), you
32
 
specify the parameters as you would for two separate Mindexes.
33
 
When you insert into or delete from the Lindex, you give a clause,
34
 
and each literal of the clause is indexed: positive literals
35
 
go into the positive component of the Lindex, and negative literals
36
 
go into the negative component.
37
 
<P>
38
 
There are no retrieval operations in this package.  Instead, use
39
 
the retrieval operations from the Mindex package on the appropriate
40
 
member (positive or negative) of the pair.
41
 
<P>
42
 
See the package "mindex" for information on the initialization
43
 
parameters and retrieval operations.
44
 
*/
45
 
 
46
 
/* Public definitions */
47
 
 
48
 
typedef struct lindex * Lindex;
49
 
 
50
 
struct lindex {
51
 
  Mindex pos;   /* index for positive literals */
52
 
  Mindex neg;   /* index for negative literals */
53
 
  Lindex next;  /* for avail list */
54
 
};
55
 
 
56
 
/* End of public definitions */
57
 
 
58
 
/* Public function prototypes from lindex.c */
59
 
 
60
 
void fprint_lindex_mem(FILE *fp, BOOL heading);
61
 
 
62
 
void p_lindex_mem();
63
 
 
64
 
Lindex lindex_init(Mindextype pos_mtype, Uniftype pos_utype, int pos_fpa_depth,
65
 
                   Mindextype neg_mtype, Uniftype neg_utype, int neg_fpa_depth);
66
 
 
67
 
void lindex_destroy(Lindex ldx);
68
 
 
69
 
void lindex_update(Lindex ldx, Topform c, Indexop op);
70
 
 
71
 
void lindex_update_first(Lindex ldx, Topform c, Indexop op);
72
 
 
73
 
BOOL lindex_empty(Lindex idx);
74
 
 
75
 
BOOL lindex_backtrack(Lindex idx);
76
 
 
77
 
#endif  /* conditional compilation of whole file */