| 1521 | } |
| 1522 | |
| 1523 | TypingAssignments TransformVerify::getTypings() const { |
| 1524 | auto c = t.src.getTypeConstraints() && t.tgt.getTypeConstraints(); |
| 1525 | |
| 1526 | if (t.precondition) |
| 1527 | c &= t.precondition->getTypeConstraints(); |
| 1528 | |
| 1529 | // return type |
| 1530 | c &= t.src.getType() == t.tgt.getType(); |
| 1531 | |
| 1532 | if (check_each_var) { |
| 1533 | for (auto &i : t.src.instrs()) { |
| 1534 | if (!i.isVoid()) |
| 1535 | c &= i.getType() == tgt_instrs.at(i.getName())->getType(); |
| 1536 | } |
| 1537 | } |
| 1538 | return { std::move(c) }; |
| 1539 | } |
| 1540 | |
| 1541 | void TransformVerify::fixupTypes(const TypingAssignments &ty) { |
| 1542 | if (ty.has_only_one_solution) |