Exemple #1
0
 def get_installed_version(self):
     with TemporaryPath([self.bindings_dir]):
         try:
             import CVC4
             return CVC4.Configuration_getVersionString()
         except ImportError:
             if "CVC4" in sys.modules:
                 del sys.modules["CVC4"]
             return None
Exemple #2
0
 def get_installed_version(self):
     with TemporaryPath([self.bindings_dir]):
         version = None
         try:
             import CVC4
             version = CVC4.Configuration_getVersionString()
         finally:
             if "CVC4" in sys.modules:
                 del sys.modules["CVC4"]
             # Return None, without raising an exception
             # pylint: disable=lost-exception
             return version
Exemple #3
0
 def get_installed_version(self):
     with TemporaryPath([self.bindings_dir]):
         version = None
         try:
             import picosat
             version = picosat.picosat_version()
         finally:
             if "picosat" in sys.modules:
                 del sys.modules["picosat"]
             # Return None, without raising an exception
             # pylint: disable=lost-exception
             return version
Exemple #4
0
 def get_installed_version(self):
     with TemporaryPath([self.bindings_dir]):
         version = None
         try:
             import z3
             (major, minor, ver, _) = z3.get_version()
             version = "%d.%d.%d" % (major, minor, ver)
         finally:
             if "z3" in sys.modules:
                 del sys.modules["z3"]
             # Return None, without raising an exception
             # pylint: disable=lost-exception
             return version
Exemple #5
0
 def get_installed_version(self):
     with TemporaryPath([self.bindings_dir]):
         version = None
         try:
             import repycudd
             doc = repycudd.DOCSTRING
             m = re.match(r"^PyCUDD (\d+\.\d+\.\d+).*", doc)
             if m is not None:
                 version = m.group(1)
         finally:
             if "repycudd" in sys.modules:
                 del sys.modules["repycudd"]
             # Return None, without raising an exception
             # pylint: disable=lost-exception
             return version
Exemple #6
0
 def get_installed_version(self):
     with TemporaryPath([self.bindings_dir]):
         version = None
         try:
             import yicespy
             v = yicespy.__dict__['__YICES_VERSION']
             m = yicespy.__dict__['__YICES_VERSION_MAJOR']
             p = yicespy.__dict__['__YICES_VERSION_PATCHLEVEL']
             version = "%d.%d.%d" % (v, m, p)
         finally:
             if "yicespy" in sys.modules:
                 del sys.modules["yicespy"]
             # Return None, without raising an exception
             # pylint: disable=lost-exception
             return version
Exemple #7
0
 def get_installed_version(self):
     with TemporaryPath([self.bindings_dir]):
         version = None
         try:
             import mathsat
             version_str = mathsat.msat_get_version()
             m = re.match(r"^MathSAT5 version (\d+\.\d+\.\d+) .*$",
                          version_str)
             if m is not None:
                 version = m.group(1)
         finally:
             if "mathsat" in sys.modules:
                 del sys.modules["mathsat"]
             # Return None, without raising an exception
             # pylint: disable=lost-exception
             return version
Exemple #8
0
 def get_installed_version(self):
     with TemporaryPath([self.bindings_dir]):
         version = None
         vfile = os.path.join(self.extract_path, "boolector", "VERSION")
         try:
             # The version is read from a file, but we first check
             # if the module is installed
             # pylint: disable=unused-import
             import boolector
             with open(vfile) as f:
                 version = f.read().strip()
         finally:
             if "boolector" in sys.modules:
                 del sys.modules["boolector"]
             # Return None, without raising an exception
             # pylint: disable=lost-exception
             return version