#ifndef _VERIFY_H_
#define _VERIFY_H_
#include "ast.h"

char *typeMap(int type);
void Promote(Exp *e, int newtype);
void doError(char *s);
void blankError();
void check_collide(char *id, int nl);
void declareIDlist(IDList *ids, int type, BoundList *bounds);
void declareIDlist_const(IDList *ids, LitExp *lit);
void declareSub(ID_Type *idtp, SubParams *params, int rt, BoundList *arraybounds);
int getType(char *id);
BoundList *getBounds(char *id);
int getIntValue(char *id);
void newFrame();
void dupFrame();
void endFrame();
int getSubType(char *id);
SubParams *getSubParams(char *id);
LitExp *getLitExp(char *id);
void handle_logicexp(int op, Exp *a, Exp *b, LogicExp *z);
void handle_arithexp(int op, Exp *a, Exp *b, ArithExp *z);
void handle_relexp(int op, Exp *x, Exp *y, RelExp *z);
void checkID(ID_Type *idtp, int type);
void initVerify();
void handle_assign(VarExp *var, Exp *expr);
void handle_pass(VarDec *var, Exp *expr);
void handle_return(Exp *expr);
#endif
