{"id":21471,"library":"islpy","title":"islpy","description":"Python wrapper around the Integer Set Library (isl), providing operations on integer sets, relations, and affine constraints. Current version 2026.1, released on a rolling basis with no fixed cadence.","status":"active","version":"2026.1","language":"python","source_language":"en","source_url":"https://github.com/inducer/islpy","tags":["isl","polyhedral","integer sets","loop optimization","compiler"],"install":[{"cmd":"pip install islpy","lang":"bash","label":"Standard install"}],"dependencies":[],"imports":[{"note":"Direct import is the standard and only supported pattern.","symbol":"islpy","correct":"import islpy"}],"quickstart":{"code":"import islpy as isl\n\n# Create a basic set: all integer pairs (x, y) with x + y <= 5\ns1 = isl.BasicSet('[n] -> { [x, y] : x + y <= n }')\nprint(s1)\n\n# Create a second set\ns2 = isl.BasicSet('[n] -> { [x, y] : x >= 0 and y >= 0 }')\n\n# Intersection\nintersection = s1.intersect(s2)\nprint(intersection)\n\n# Check if non-empty\nprint(f\"Is empty? {intersection.is_empty()}\")","lang":"python","description":"Basic usage showing creation of integer sets and intersection."},"warnings":[{"fix":"Upgrade to Python 3.10 or later.","message":"Python 3.10 minimum required; islpy dropped support for Python <3.10 in version 2024.x. Attempting to install on older Python will fail.","severity":"breaking","affected_versions":">=2024.0"},{"fix":"Use islpy parsing helpers like isl.BasicSet.read_from_str or carefully double-check syntax.","message":"String-based set representation uses isl's syntax, which can be confusing. Misplacing brackets or missing dimensions leads to errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run: pip install islpy","cause":"islpy not installed in the current Python environment.","error":"ModuleNotFoundError: No module named 'islpy'"},{"fix":"Ensure the string follows isl syntax. For example: '{ [x] : x >= 0 }' or '[n] -> { [x] : x <= n }'.","cause":"The string representation for a set or relation is malformed.","error":"ValueError: could not create isl_basic_set: invalid input"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}