| 1813 | } |
| 1814 | |
| 1815 | void SMTEncoder::arithmeticOperation(BinaryOperation const& _op) |
| 1816 | { |
| 1817 | auto type = _op.annotation().commonType; |
| 1818 | solAssert(type, ""); |
| 1819 | solAssert(type->category() == Type::Category::Integer || type->category() == Type::Category::FixedPoint, ""); |
| 1820 | switch (_op.getOperator()) |
| 1821 | { |
| 1822 | case Token::Add: |
| 1823 | case Token::Sub: |
| 1824 | case Token::Mul: |
| 1825 | case Token::Div: |
| 1826 | case Token::Mod: |
| 1827 | { |
| 1828 | auto values = arithmeticOperation( |
| 1829 | _op.getOperator(), |
| 1830 | expr(_op.leftExpression()), |
| 1831 | expr(_op.rightExpression()), |
| 1832 | _op.annotation().commonType, |
| 1833 | _op |
| 1834 | ); |
| 1835 | defineExpr(_op, values.first); |
| 1836 | break; |
| 1837 | } |
| 1838 | default: |
| 1839 | m_unsupportedErrors.warning( |
| 1840 | 5188_error, |
| 1841 | _op.location(), |
| 1842 | "Assertion checker does not yet implement this operator." |
| 1843 | ); |
| 1844 | } |
| 1845 | } |
| 1846 | |
| 1847 | std::pair<smtutil::Expression, smtutil::Expression> SMTEncoder::arithmeticOperation( |
| 1848 | Token _op, |
nothing calls this directly
no test coverage detected