MCPcopy Create free account
hub / github.com/R-Fuzz/symsan / construct_task

Method construct_task

parsers/rgd-parser.cpp:541–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

539}
540
541[[gnu::hot]]
542task_t RGDAstParser::construct_task(const clause_t &clause) {
543 task_t task = std::make_shared<rgd::SearchTask>();
544 for (auto const& node: clause) {
545 auto itr = constraint_cache.find(node->label());
546 if (itr != constraint_cache.end()) {
547 task->add_constraint(itr->second, node->kind());
548 continue;
549 }
550 // save the comparison op because we may have negated it
551 // during transformation
552 constraint_t constraint = parse_constraint(node->label());
553 // to maximize the resuability of the AST, the relational operator
554 // is recorded elsewhere
555 if (likely(constraint != nullptr)) {
556 task->add_constraint(constraint, node->kind());
557 constraint_cache.insert({node->label(), constraint});
558 }
559 }
560 if (!task->empty()) {
561 task->finalize();
562 return task;
563 }
564 return nullptr;
565}
566
567// sometimes llvm will zext bool
568dfsan_label RGDAstParser::strip_zext(dfsan_label label) {

Callers

nothing calls this directly

Calls 8

labelMethod · 0.80
add_constraintMethod · 0.80
kindMethod · 0.80
finalizeMethod · 0.80
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected