1
/**************************************************************/
2
/* ********************************************************** */
4
/* * INTERFACE FOR ALL ORDERING IMPLEMENTATIONS * */
6
/* * $Module: ORDER * */
8
/* * Copyright (C) 1997, 2000, 2001 MPI fuer Informatik * */
10
/* * This program is free software; you can redistribute * */
11
/* * it and/or modify it under the terms of the FreeBSD * */
14
/* * This program is distributed in the hope that it will * */
15
/* * be useful, but WITHOUT ANY WARRANTY; without even * */
16
/* * the implied warranty of MERCHANTABILITY or FITNESS * */
17
/* * FOR A PARTICULAR PURPOSE. See the LICENCE file * */
18
/* * for more details. * */
21
/* $Revision: 1.4 $ * */
23
/* $Date: 2010-02-22 14:09:58 $ * */
24
/* $Author: weidenb $ * */
27
/* * Christoph Weidenbach * */
28
/* * MPI fuer Informatik * */
29
/* * Stuhlsatzenhausweg 85 * */
30
/* * 66123 Saarbruecken * */
31
/* * Email: spass@mpi-inf.mpg.de * */
34
/* ********************************************************** */
35
/**************************************************************/
38
/* $RCSfile: order.h,v $ */
43
/**************************************************************/
45
/**************************************************************/
52
/**************************************************************/
53
/* TYPES and GLOBAL VARIABLES */
54
/**************************************************************/
56
typedef enum { ord_UNCOMPARABLE,
59
ord_GREATER_THAN } ord_RESULT;
61
/* This array is used to count variable occurrences in two terms. */
62
/* It may be used by any available ordering. */
63
extern NAT ord_VARCOUNT[symbol__MAXSTANDARDVAR][2];
65
/* A precedence is needed in almost every ordering function. */
66
/* For performance reasons it is stored in a global variable, */
67
/* instead of passing it to all those functions, which are */
68
/* often recursive. Nevertheless this variable must not be */
70
extern PRECEDENCE ord_PRECEDENCE;
72
/**************************************************************/
73
/* INLINE FUNCTIONS */
74
/**************************************************************/
76
static __inline__ ord_RESULT ord_Uncomparable(void)
78
return ord_UNCOMPARABLE;
81
static __inline__ ord_RESULT ord_Equal(void)
86
static __inline__ ord_RESULT ord_GreaterThan(void)
88
return ord_GREATER_THAN;
91
static __inline__ ord_RESULT ord_SmallerThan(void)
93
return ord_SMALLER_THAN;
96
static __inline__ BOOL ord_IsGreaterThan(ord_RESULT Res)
98
return ord_GREATER_THAN == Res;
101
static __inline__ BOOL ord_IsNotGreaterThan(ord_RESULT Res)
103
return ord_GREATER_THAN != Res;
106
static __inline__ BOOL ord_IsSmallerThan(ord_RESULT Res)
108
return ord_SMALLER_THAN == Res;
111
static __inline__ BOOL ord_IsNotSmallerThan(ord_RESULT Res)
113
return ord_SMALLER_THAN != Res;
116
static __inline__ BOOL ord_IsEqual(ord_RESULT Res)
118
return ord_EQUAL == Res;
121
static __inline__ BOOL ord_IsUncomparable(ord_RESULT Res)
123
return ord_UNCOMPARABLE == Res;
128
/**************************************************************/
130
/**************************************************************/
132
ord_RESULT ord_Not(ord_RESULT);
133
ord_RESULT ord_CompareAux(TERM, TERM, FLAGSTORE, PRECEDENCE, BOOL);
134
ord_RESULT ord_Compare(TERM, TERM, FLAGSTORE, PRECEDENCE);
135
ord_RESULT ord_CompareSkolem(TERM, TERM, FLAGSTORE, PRECEDENCE);
136
ord_RESULT ord_ContCompare(CONTEXT, TERM, CONTEXT, TERM, FLAGSTORE, PRECEDENCE);
137
BOOL ord_CompareEqual(TERM, TERM, FLAGSTORE);
138
BOOL ord_ContGreater(CONTEXT, TERM, CONTEXT, TERM, FLAGSTORE, PRECEDENCE);
139
ord_RESULT ord_LiteralCompare(TERM,BOOL,TERM,BOOL,BOOL, FLAGSTORE, PRECEDENCE);
140
void ord_Print(ord_RESULT);
141
ord_RESULT ord_LiteralCompareAux(TERM, BOOL, TERM, BOOL, BOOL, BOOL, FLAGSTORE, PRECEDENCE);
143
void ord_CompareCountVars(TERM, int);
144
BOOL ord_CompareVarsSubset(TERM, TERM);
145
BOOL ord_ContGreaterSkolemSubst(CONTEXT, TERM, CONTEXT, TERM, FLAGSTORE, PRECEDENCE);