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

« back to all changes in this revision

Viewing changes to ladr/literals.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_LITERALS_H
20
 
#define TP_LITERALS_H
21
 
 
22
 
#include "termflag.h"
23
 
#include "tlist.h"
24
 
 
25
 
/* INTRODUCTION
26
 
*/
27
 
 
28
 
/* Public definitions */
29
 
 
30
 
typedef struct literals * Literals;
31
 
 
32
 
struct literals {
33
 
  BOOL      sign;
34
 
  Term      atom;
35
 
  Literals  next;
36
 
};
37
 
 
38
 
/* End of public definitions */
39
 
 
40
 
/* Public function prototypes from literals.c */
41
 
 
42
 
Literals get_literals(void);
43
 
 
44
 
void free_literals(Literals p);
45
 
 
46
 
void fprint_literals_mem(FILE *fp, int heading);
47
 
 
48
 
void p_literals_mem();
49
 
 
50
 
void zap_literal(Literals l);
51
 
 
52
 
void zap_literals(Literals l);
53
 
 
54
 
Literals new_literal(int sign, Term atom);
55
 
 
56
 
Literals copy_literal(Literals lit);
57
 
 
58
 
Literals append_literal(Literals lits, Literals lit);
59
 
 
60
 
Literals term_to_literals(Term t, Literals lits);
61
 
 
62
 
Term literal_to_term(Literals l);
63
 
 
64
 
Term literals_to_term(Literals l);
65
 
 
66
 
Term lits_to_term(Literals l);
67
 
 
68
 
void free_lits_to_term(Term t);
69
 
 
70
 
int positive_literals(Literals lits);
71
 
 
72
 
int negative_literals(Literals lits);
73
 
 
74
 
BOOL positive_clause(Literals lits);
75
 
 
76
 
BOOL any_clause(Literals lits);
77
 
 
78
 
BOOL negative_clause(Literals lits);
79
 
 
80
 
BOOL mixed_clause(Literals lits);
81
 
 
82
 
int number_of_literals(Literals lits);
83
 
 
84
 
BOOL unit_clause(Literals lits);
85
 
 
86
 
BOOL horn_clause(Literals lits);
87
 
 
88
 
BOOL definite_clause(Literals lits);
89
 
 
90
 
int greatest_variable_in_clause(Literals lits);
91
 
 
92
 
Plist vars_in_clause(Literals lits);
93
 
 
94
 
Ilist varnums_in_clause(Literals lits);
95
 
 
96
 
int number_of_variables(Literals lits);
97
 
 
98
 
BOOL ground_clause(Literals lits);
99
 
 
100
 
Literals copy_literals(Literals lits);
101
 
 
102
 
Literals copy_literals_with_flags(Literals lits);
103
 
 
104
 
Literals copy_literals_with_flag(Literals lits, int flag);
105
 
 
106
 
int literal_number(Literals lits, Literals lit);
107
 
 
108
 
int atom_number(Literals lits, Term atom);
109
 
 
110
 
Literals ith_literal(Literals lits, int i);
111
 
 
112
 
BOOL true_clause(Literals lits);
113
 
 
114
 
BOOL tautology(Literals lits);
115
 
 
116
 
int symbol_occurrences_in_clause(Literals lits, int symnum);
117
 
 
118
 
Literals remove_null_literals(Literals l);
119
 
 
120
 
Literals first_literal_of_sign(Literals lits, BOOL sign);
121
 
 
122
 
Ilist constants_in_clause(Literals lits);
123
 
 
124
 
BOOL clause_ident(Literals lits1, Literals lits2);
125
 
 
126
 
int clause_symbol_count(Literals lits);
127
 
 
128
 
int clause_depth(Literals lits);
129
 
 
130
 
BOOL pos_eq(Literals lit);
131
 
 
132
 
BOOL neg_eq(Literals lit);
133
 
 
134
 
BOOL pos_eq_unit(Literals lits);
135
 
 
136
 
BOOL neg_eq_unit(Literals lits);
137
 
 
138
 
BOOL contains_pos_eq(Literals lits);
139
 
 
140
 
BOOL contains_eq(Literals lits);
141
 
 
142
 
BOOL only_eq(Literals lits);
143
 
 
144
 
int literals_depth(Literals lits);
145
 
 
146
 
Term term_at_position(Literals lits, Ilist pos);
147
 
 
148
 
Ilist pos_predicates(Ilist p, Literals lits);
149
 
 
150
 
#endif  /* conditional compilation of whole file */