| 1727 | } |
| 1728 | |
| 1729 | expr Memory::mkInput(const char *name, const ParamAttrs &attrs0) { |
| 1730 | unsigned max_bid = has_null_block + num_globals_src + next_ptr_input++; |
| 1731 | assert(max_bid < num_nonlocals_src); |
| 1732 | |
| 1733 | // FIXME: doesn't consider physical ptrs |
| 1734 | // consider how to do POR? |
| 1735 | |
| 1736 | auto attrs = attrs0; |
| 1737 | attrs.set(ParamAttrs::IsArg); |
| 1738 | Pointer p(*this, name, attrs); |
| 1739 | auto bid = p.getShortBid(); |
| 1740 | |
| 1741 | state->addAxiom(bid.ule(max_bid)); |
| 1742 | state->addAxiom(!Pointer(*this, max_bid, false).isStackAllocated(false)); |
| 1743 | |
| 1744 | AliasSet alias(*this); |
| 1745 | alias.setMayAliasUpTo(false, max_bid); |
| 1746 | |
| 1747 | for (auto [byval_bid, is_const] : byval_blks) { |
| 1748 | state->addAxiom(bid != byval_bid); |
| 1749 | alias.setNoAlias(false, byval_bid); |
| 1750 | } |
| 1751 | ptr_alias.emplace(p.getBid(), std::move(alias)); |
| 1752 | |
| 1753 | return std::move(p).release(); |
| 1754 | } |
| 1755 | |
| 1756 | pair<expr, expr> Memory::mkUndefInput(const ParamAttrs &attrs0) { |
| 1757 | unsigned bits = bits_for_offset + bits_for_bid - Pointer::hasLocalBit(); |
nothing calls this directly
no test coverage detected