From 457dc09cdc3546d70eb347d35ad28ffca1621f7d Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 15 Aug 2013 14:40:26 +0200 Subject: Added ezsat api for creation of anonymous vectors --- libs/ezsat/ezsat.cc | 8 ++++++++ libs/ezsat/ezsat.h | 1 + 2 files changed, 9 insertions(+) (limited to 'libs') diff --git a/libs/ezsat/ezsat.cc b/libs/ezsat/ezsat.cc index 4258fb6f..27e74e01 100644 --- a/libs/ezsat/ezsat.cc +++ b/libs/ezsat/ezsat.cc @@ -667,6 +667,14 @@ std::vector ezSAT::vec_const_unsigned(uint64_t value, int bits) return vec; } +std::vector ezSAT::vec_var(int bits) +{ + std::vector vec; + for (int i = 0; i < bits; i++) + vec.push_back(literal()); + return vec; +} + std::vector ezSAT::vec_var(std::string name, int bits) { std::vector vec; diff --git a/libs/ezsat/ezsat.h b/libs/ezsat/ezsat.h index 4a6a7278..3fb5fcaf 100644 --- a/libs/ezsat/ezsat.h +++ b/libs/ezsat/ezsat.h @@ -208,6 +208,7 @@ public: std::vector vec_const_signed(int64_t value, int bits); std::vector vec_const_unsigned(uint64_t value, int bits); + std::vector vec_var(int bits); std::vector vec_var(std::string name, int bits); std::vector vec_cast(const std::vector &vec1, int toBits, bool signExtend = false); -- cgit v1.2.3