Added ezsat api for creation of anonymous vectors
authorClifford Wolf <clifford@clifford.at>
Thu, 15 Aug 2013 12:40:26 +0000 (14:40 +0200)
committerClifford Wolf <clifford@clifford.at>
Thu, 15 Aug 2013 12:40:26 +0000 (14:40 +0200)
libs/ezsat/ezsat.cc
libs/ezsat/ezsat.h

index 4258fb6fe6bcd72cd998e87b8e4e521e5f1a6514..27e74e010a1ccee773106ca28da49d3a72219a7c 100644 (file)
@@ -667,6 +667,14 @@ std::vector<int> ezSAT::vec_const_unsigned(uint64_t value, int bits)
        return vec;
 }
 
+std::vector<int> ezSAT::vec_var(int bits)
+{
+       std::vector<int> vec;
+       for (int i = 0; i < bits; i++)
+               vec.push_back(literal());
+       return vec;
+}
+
 std::vector<int> ezSAT::vec_var(std::string name, int bits)
 {
        std::vector<int> vec;
index 4a6a72785008886af6903e488f09ed4ee6f335d3..3fb5fcaf65d681ab903f53a07a5268ffcf874d9c 100644 (file)
@@ -208,6 +208,7 @@ public:
 
        std::vector<int> vec_const_signed(int64_t value, int bits);
        std::vector<int> vec_const_unsigned(uint64_t value, int bits);
+       std::vector<int> vec_var(int bits);
        std::vector<int> vec_var(std::string name, int bits);
        std::vector<int> vec_cast(const std::vector<int> &vec1, int toBits, bool signExtend = false);