MCPcopy Create free account
hub / github.com/csmith-project/csmith / join

Method join

src/FactPointTo.cpp:577–595  ·  view source on GitHub ↗

* return 1 if changed, 0 otherwise */

Source from the content-addressed store, hash-verified

575 * return 1 if changed, 0 otherwise
576 */
577int
578FactPointTo::join(const Fact& f)
579{
580 // right now, only consider facts of same category
581 // intersect diff. categories of facts later?
582 int changed = 0;
583 if (is_related(f)) {
584 const FactPointTo& fact = (const FactPointTo&)f;
585 const vector<const Variable*>& vars = fact.get_point_to_vars();
586 for (size_t i=0; i<vars.size(); i++) {
587 const Variable* v = vars[i];
588 if (!is_variable_in_set(point_to_vars, v)) {
589 point_to_vars.push_back(v);
590 changed = 1;
591 }
592 }
593 }
594 return changed;
595}
596
597/*
598 * join two facts from two visits to the same function

Callers

nothing calls this directly

Calls 2

is_variable_in_setFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected