/********************************************************************************
*
* File: typecheck.h
* Title: Type-checking for OQL
* Programmer: Leonidas Fegaras, UTA
* Date: 4/10/97
*
********************************************************************************/

typedef Expr Type;

bool commutative ( Expr x );

bool idempotent ( Expr x );

Expr type_of ( Expr e, Schema vars );

Expr type_of ( Expr e );

bool extentp ( Expr e );

Expr get_extent ( Type tp );

Expr convert ( Expr e );

Type typecheck ( Expr e, Schema &cvars, Schema &lvars );

type_error ( string msg, Expr e );

Type fresh_type_variable ();

class type_exception {};

Type expand_type ( Type tp);

Expr eliminate_type_vars ( Expr e );
