verifier/Verifier.cpp
// intersect two states. Return true if the intersection is not empty
intersect two states. Return true if the intersection is not empty
intersect two states . Return true if the intersection is not empty
bool Verifier::intersect(State& s1, State& s2, State& res) {
	set<int> expr_set(s1.exprs.begin(), s1.exprs.end());
	expr_set.insert(s2.exprs.begin(), s2.exprs.end());
	res.exprs = vector<int>(expr_set.begin(), expr_set.end());
	Conjunct combined;
	insert_state_to_eqls(s1, combined);
	insert_state_to_eqls(s2, combined);
	bool flag = convert_eqls_to_state(combined, res);
	return flag;
}
bool Verifier :: intersect ( State & s1 , State & s2 , State & res ) { set < int > expr_set ( s1 . exprs . begin ( ) , s1 . exprs . end ( ) ) ; expr_set . insert ( s2 . exprs . begin ( ) , s2 . exprs . end ( ) ) ; res . exprs = vector < int > ( expr_set . begin ( ) , expr_set . end ( ) ) ; Conjunct combined ; insert_state_to_eqls ( s1 , combined ) ; insert_state_to_eqls ( s2 , combined ) ; bool flag = convert_eqls_to_state ( combined , res ) ; return flag ; }
intersect two states.
intersect two states .
// printf("intersect\n"); //	if (debug_cnt >= 0) { //		printf("S1:\n"); //		// printf("%d %d\n", (int) s1.exprs.size(), (int) flag); //		dump_state(s1); //		printf("S2:\n"); //		dump_state(s2); //		if (flag) { //			printf("Res:\n"); //			dump_state(res); //		} else { //			printf("Res: Empty\n"); //		} //		printf("\n"); //		debug_cnt--; //	}