#include "termorder.h"

This page has information from files termorder.h and termorder.c.

Contents


Public Routines in File termorder.c

Index

assign_order_methodgreater_multisetlrpoterm_greater
flat_greaterinit_kb_weightslrpo_multisetterm_order
flat_kbo_weightkboterm_compare_ncv
flat_lrpokbo_weightterm_compare_vcp

Details


void assign_order_method(Order_method method);

BOOL flat_greater(Flatterm alpha, Flatterm beta);

int flat_kbo_weight(Flatterm f);

BOOL flat_lrpo(Flatterm s, Flatterm t);

BOOL greater_multiset(Term a1[], int n1, Term a2[], int n2);
Given two arrays of terms, check if the first is greater in the multiset extension of lrpo.
void init_kb_weights(Plist weights);
Plist should be a list of terms, e.g., a=3, g=0. Symbols are written as constants; arity is deduced from the symbol table.
BOOL kbo(Term alpha, Term beta);
Is alpha kbo-greater-than beta?
int kbo_weight(Term t);

BOOL lrpo(Term s, Term t);
This routine checks if Term s > Term t in the Lexicographic Recursive Path Ordering (LRPO), also known as Recursive Path Ordering with Status (RPOS).

Function symbols can have either multiset or left-to-right status (see symbols.c). If all symbols are multiset, this reduces to the Recursive Path Ordering (RPO). If all symbols are left-to-right, this reduces to Lexicographic Path Ordering (LPO).


BOOL lrpo_multiset(Term t1, Term t2);
This routine
Ordertype term_compare_ncv(Term t1, Term t2);
This routine compares two terms. The ordering is total: CONSTANT < COMPLEX < VARIABLE; within type, the order is by VARNUM and lexigocgaphic by SYMNUM. The range of return values is
{SAME_AS, GREATER_THAN, LESS_THAN}.
Ordertype term_compare_vcp(Term t1, Term t2);
This routine compares two terms. The ordering is total: VARIABLE < CONSTANT < COMPLEX; within type, the order is by VARNUM and lexigocgaphic by SYMNUM. The range of return values is
{SAME_AS, GREATER_THAN, LESS_THAN}.
BOOL term_greater(Term alpha, Term beta);
Is alpha > beta in the current term ordering? (LPR, RPO, KBO)
Ordertype term_order(Term alpha, Term beta);
Compare two terms with the current term ordering (LPR, RPO, KBO) Return GREATER_THAN, LESS_THAN, or NOT_COMPARABLE.

Public Definitions in File termorder.h

/* Term ordering method */

typedef enum { LRPO_METHOD,
	       LPO_METHOD,
	       RPO_METHOD,
	       KBO_METHOD
             } Order_method;


Introduction


These activities are projects of the Mathematics and Computer Science Division of Argonne National Laboratory.