int main() { #define TEST_CNT 2 FILE *ifps[TEST_CNT]; FILE *ofps[TEST_CNT]; char in[128], out[128]; for (int i = 0; i < TEST_CNT; i++) { sprintf(in, "/tmp/byyl/test4_%d.in", i + 1); ifps[i] = fopen(in, "r"); check_fopen(ifps[i], in); } for (int i = 0; i < TEST_CNT; i++) { sprintf(out, "/tmp/byyl/test4_%d.out", i + 1); ofps[i] = fopen(out, "w"); check_fopen(ofps[i], out); } for (int i = 0; i < Vn_COUNT; i++) { Vs[i].V = Vn_table[i]; } for (int i = 0; i < Vt_COUNT; i++) { OPG_matrix_head[i] = Vt_table[i]; } OPG_matrix_head[Vt_COUNT] = EOI; firstVT(); print_firstVT(); lastVT(); print_lastVT(); make_OPG_matrix(); print_OPM(); make_prec_func(); print_pf(); for (int i = 0; i < TEST_CNT; i++) { if (OPG_parser(ifps[i])) { fprintf(ofps[i], "true"); } else { fprintf(ofps[i], "false"); } fclose(ifps[i]); fclose(ofps[i]); } return 0; }
void LFSCProof::print( std::ostream& s, int ind ){ LFSCProof* p = rplProof ? rplProof : lambdaPrintMap[this]; if( p ){ p->print( s, ind ); }else{ if( lambdaMap.find( this )!=lambdaMap.end() && printCounter>0 ){ print_warning( "Warning: printing out lambda abstracted proof more than once"); #ifdef IGNORE_PRINT_MULTI_LAMBDA return; #endif } //if( printCounter>0 ){ // return; //} printCounter++; indent( s, ind ); print_pf( s, ind ); } }