/usr/include/ladr/attrib.h is in libladr-dev 0.0.200902a-2.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | /* Copyright (C) 2006, 2007 William McCune
This file is part of the LADR Deduction Library.
The LADR Deduction Library is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License,
version 2.
The LADR Deduction Library 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the LADR Deduction Library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef TP_ATTRIB_H
#define TP_ATTRIB_H
#include "unify.h"
/* INTRODUCTION
This package is about lists of attributes. Each attribute is
a pair (attribute-id, attribute-value). Each attribute-id
is associated with a data type.
<P>
To use an attribute, you first have to call register_attribute(),
giving and ID, name, and type of the attribute.
The ID is used with the "set" and "get" operations.
<P>
For example,
<PRE>
register_attribute(label_attr, "label", STRING_ATTRIBUTE);
...
Attribute a = set_string_attribute(NULL, label_attr, "clause_32");
...
char *s = get_string_attribute(a, label_attr, 1);
</PRE>
*/
/* Public definitions */
typedef enum { INT_ATTRIBUTE,
STRING_ATTRIBUTE,
TERM_ATTRIBUTE
} Attribute_type;
typedef struct attribute * Attribute;
/* End of public definitions */
/* Public function prototypes from attrib.c */
void fprint_attrib_mem(FILE *fp, BOOL heading);
void p_attrib_mem();
int register_attribute(char *name, Attribute_type type);
void declare_term_attribute_inheritable(int id);
Attribute set_int_attribute(Attribute a, int id, int val);
int get_int_attribute(Attribute a, int id, int n);
BOOL exists_attribute(Attribute a, int id);
Attribute set_term_attribute(Attribute a, int id, Term val);
void replace_term_attribute(Attribute a, int id, Term val, int n);
void replace_int_attribute(Attribute a, int id, int val, int n);
Term get_term_attribute(Attribute a, int id, int n);
Term get_term_attributes(Attribute a, int id);
Attribute set_string_attribute(Attribute a, int id, char *val);
char *get_string_attribute(Attribute a, int id, int n);
BOOL string_attribute_member(Attribute a, int id, char *s);
void zap_attributes(Attribute a);
Attribute delete_attributes(Attribute a, int id);
Attribute cat_att(Attribute a, Attribute b);
Term build_attr_term(Attribute a);
Term attributes_to_term(Attribute a, char *operator);
int attribute_name_to_id(char *name);
Attribute term_to_attributes(Term t, char *operator);
Attribute inheritable_att_instances(Attribute a, Context subst);
Attribute copy_attributes(Attribute a);
void instantiate_inheritable_attributes(Attribute a, Context subst);
void renumber_vars_attributes(Attribute attrs, int vmap[], int max_vars);
void set_vars_attributes(Attribute attrs, char *vnames[], int max_vars);
Plist vars_in_attributes(Attribute attrs);
int label_att(void);
BOOL attributes_contain_variables(Attribute a);
Attribute copy_int_attribute(Attribute source, Attribute dest, int attr_id);
Attribute copy_string_attribute(Attribute source, Attribute dest, int attr_id);
Attribute copy_term_attribute(Attribute source, Attribute dest, int attr_id);
#endif /* conditional compilation of whole file */
|