diff options
author | Leonardo Alt <leonardoaltt@gmail.com> | 2018-02-17 16:35:37 +0800 |
---|---|---|
committer | Leonardo Alt <leonardoaltt@gmail.com> | 2018-03-01 01:05:20 +0800 |
commit | 21c6b80fc98f6d584f240a47d4a01827768f18f3 (patch) | |
tree | bdd168818053f5d983fb57bcef9c36f2738541cb /libsolidity/formal/SSAVariable.h | |
parent | 3b2851ee4163bcfbca9e4e23650dfeee1a06653a (diff) | |
download | dexon-solidity-21c6b80fc98f6d584f240a47d4a01827768f18f3.tar.gz dexon-solidity-21c6b80fc98f6d584f240a47d4a01827768f18f3.tar.zst dexon-solidity-21c6b80fc98f6d584f240a47d4a01827768f18f3.zip |
Supported types listed in SSAVariable
Diffstat (limited to 'libsolidity/formal/SSAVariable.h')
-rw-r--r-- | libsolidity/formal/SSAVariable.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libsolidity/formal/SSAVariable.h b/libsolidity/formal/SSAVariable.h index 3d7eb80c..b87693c2 100644 --- a/libsolidity/formal/SSAVariable.h +++ b/libsolidity/formal/SSAVariable.h @@ -34,6 +34,8 @@ class Declaration; class SSAVariable { public: + /// @param _decl Used to determine the type and forwarded to the symbolic var. + /// @param _interface Forwarded to the symbolic var such that it can give constraints to the solver. explicit SSAVariable(Declaration const* _decl, smt::SolverInterface& _interface); SSAVariable(SSAVariable const&) = default; @@ -61,9 +63,14 @@ public: return valueAtSequence(_seq); } + /// These two functions forward the call to the symbolic var + /// which generates the constraints according to the type. void setZeroValue(); void setUnknownValue(); + /// So far Int is supported. + static bool supportedType(Type const* _decl); + private: smt::Expression valueAtSequence(int _seq) const { @@ -72,6 +79,8 @@ private: std::shared_ptr<SymbolicVariable> m_symbVar = nullptr; int m_currentSequenceCounter; + /// The next free sequence counter is a shared pointer because we want + /// the copy and the copied to share it. std::shared_ptr<int> m_nextFreeSequenceCounter; }; |