The source code and dockerfile for the GSW2024 AI Lab.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

59 lines
1.2 KiB

4 weeks ago
  1. import sys
  2. if sys.version_info[0] == 2:
  3. raise ImportError('Python 2.x is not supported for pycarl.')
  4. from . import core
  5. from .core import *
  6. from . import infinity, _config
  7. __version__ = "unknown"
  8. try:
  9. from ._version import __version__
  10. except ImportError:
  11. # We're running in a tree that doesn't have a _version.py, so we don't know what our version is.
  12. pass
  13. inf = infinity.Infinity()
  14. def carl_version():
  15. """
  16. Get Carl version.
  17. :return: Version of Carl.
  18. """
  19. return _config.CARL_VERSION
  20. def has_cln():
  21. """
  22. Check if pycarl has support for CLN.
  23. :return: True iff CLN is supported.
  24. """
  25. return _config.CARL_WITH_CLN
  26. def has_parser():
  27. """
  28. Check if pycarl has parsing support.
  29. :return: True iff parsing is supported.
  30. """
  31. return _config.CARL_WITH_PARSER
  32. def print_info():
  33. """
  34. Print information about pycarl.
  35. """
  36. print("Pycarl version {}".format(__version__))
  37. print("Using carl in version {}".format(carl_version()))
  38. print("Support for CLN: {}".format(has_cln()))
  39. print("Support for parsing: {}".format(has_parser()))
  40. def clear_pools():
  41. """
  42. Clear all pools.
  43. """
  44. # clear_monomial_pool()
  45. clear_variable_pool()