BAM
Abstract Machine for Bottom-Up Evaluation with the Push Method
bind.h
Go to the documentation of this file.
1 // ============================================================================
2 // Project: Deductive Database
3 // Filename: bind.h
4 // Purpose: Binding patterns for predicates
5 // Last Change: 04.08.2017
6 // Language: C++
7 // EMail: brass@informatik.uni-halle.de
8 // WWW: http://www.informatik.uni-halle.de/~brass/
9 // Address: Feldschloesschen 15, D-06120 Halle (Saale), GERMANY
10 // Copyright: (c) 2015-2017 by Stefan Brass
11 // License: See file "LICENSE" for copying conditions.
12 // Note: There is no warranty at all - this code may contain bugs.
13 // ============================================================================
14 
15 
22 //=============================================================================
23 // Include File Frame:
24 //=============================================================================
25 
26 #ifndef BIND_INCLUDED
27 #define BIND_INCLUDED
28 
29 //=============================================================================
30 // Used Types and Macros:
31 //=============================================================================
32 
33 #ifndef VER_INCLUDED
34 #include "../base/ver.h"
35 #endif
36 
37 #ifndef STR_INCLUDED
38 #include "../base/str.h"
39 #endif
40 
41 #ifndef CHECK_INCLUDED
42 #include "../base/check.h"
43 #endif
44 
45 //=============================================================================
46 // Exported Types:
47 //=============================================================================
48 
49 //-----------------------------------------------------------------------------
50 // bind_t: Binding patterns for predicates.
51 //-----------------------------------------------------------------------------
52 
53 typedef enum bind_enum {
54  BIND_NULL,
55  BIND_EMPTY,
56  BIND_B,
57  BIND_F,
58  BIND_BB,
59  BIND_BF,
60  BIND_FB,
61  BIND_FF
62 } bind_t;
63 
64 //=============================================================================
65 // Exported Functions:
66 //=============================================================================
67 
68 //-----------------------------------------------------------------------------
69 // bind_valid: Is the parameter a valid element of the enumeration type?
70 //-----------------------------------------------------------------------------
71 
72 #if VER_DEBUG
73 bool bind_valid(bind_t bind);
74 #endif
75 
76 //-----------------------------------------------------------------------------
77 // bind_name: String representation of this binding pattern.
78 //-----------------------------------------------------------------------------
79 
80 str_t bind_name(bind_t bind);
81 
82 //-----------------------------------------------------------------------------
83 // bind_arity: Length of the binding pattern (number of predicate arguments).
84 //-----------------------------------------------------------------------------
85 
86 int bind_arity(bind_t bind);
87 
88 //=============================================================================
89 // End of File:
90 //=============================================================================
91 
92 #endif
93 
const char * str_t
Definition: str.h:41