diff options
author | Leonardo Alt <leo@ethereum.org> | 2018-10-18 00:00:42 +0800 |
---|---|---|
committer | Leonardo Alt <leo@ethereum.org> | 2018-10-18 00:36:24 +0800 |
commit | c92d3b537db7fdb3b66db800879cc07a23252c73 (patch) | |
tree | 0f052d294651ae56fa976d94aa119fe277aead2a /libsolidity/formal/SymbolicTypes.h | |
parent | 3db1ce0e144b9d35aa894b5e485c0761ab5aa033 (diff) | |
download | dexon-solidity-c92d3b537db7fdb3b66db800879cc07a23252c73.tar dexon-solidity-c92d3b537db7fdb3b66db800879cc07a23252c73.tar.gz dexon-solidity-c92d3b537db7fdb3b66db800879cc07a23252c73.tar.bz2 dexon-solidity-c92d3b537db7fdb3b66db800879cc07a23252c73.tar.lz dexon-solidity-c92d3b537db7fdb3b66db800879cc07a23252c73.tar.xz dexon-solidity-c92d3b537db7fdb3b66db800879cc07a23252c73.tar.zst dexon-solidity-c92d3b537db7fdb3b66db800879cc07a23252c73.zip |
[SMTChecker] Refactor expressions such that they also use SymbolicVariable
Diffstat (limited to 'libsolidity/formal/SymbolicTypes.h')
-rw-r--r-- | libsolidity/formal/SymbolicTypes.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/libsolidity/formal/SymbolicTypes.h b/libsolidity/formal/SymbolicTypes.h index 77822fed..0887fa41 100644 --- a/libsolidity/formal/SymbolicTypes.h +++ b/libsolidity/formal/SymbolicTypes.h @@ -34,18 +34,16 @@ bool isSupportedType(Type::Category _category); bool isSupportedType(Type const& _type); bool isInteger(Type::Category _category); -bool isInteger(Type const& _type); - +bool isRational(Type::Category _category); bool isAddress(Type::Category _category); -bool isAddress(Type const& _type); - bool isNumber(Type::Category _category); -bool isNumber(Type const& _type); - bool isBool(Type::Category _category); -bool isBool(Type const& _type); +bool isFunction(Type::Category _category); -std::shared_ptr<SymbolicVariable> newSymbolicVariable(Type const& _type, std::string const& _uniqueName, smt::SolverInterface& _solver); +/// Returns a new symbolic variable, according to _type. +/// Also returns whether the type is abstract or not, +/// which is true for unsupported types. +std::pair<bool, std::shared_ptr<SymbolicVariable>> newSymbolicVariable(Type const& _type, std::string const& _uniqueName, smt::SolverInterface& _solver); smt::Expression minValue(IntegerType const& _type); smt::Expression maxValue(IntegerType const& _type); |