From 961e8b83ed03d80226b7e45cf170838a98f689cc Mon Sep 17 00:00:00 2001 From: Jiawei Wang Date: Thu, 2 Jul 2026 16:34:14 +1000 Subject: [PATCH] Update SVF PTATY and mayAlias bindings --- pybind/WPA.cpp | 6 +++--- pysvf/pysvf.pyi | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pybind/WPA.cpp b/pybind/WPA.cpp index 147538e..91db021 100644 --- a/pybind/WPA.cpp +++ b/pybind/WPA.cpp @@ -88,11 +88,11 @@ void bind_andersen_base(py::module& m) { base.dumpPts(id, pts); }, py::arg("id"), py::arg("pts"), "Dump points-to information") .def("alias", [](PublicAndersen& base, NodeID id1, NodeID id2) { - return base.alias(id1, id2) != AliasResult::NoAlias; - }, py::arg("id1"), py::arg("id2"), "Return true if two nodes may, must, or partially alias") - .def("aliasKind", [](PublicAndersen& base, NodeID id1, NodeID id2) { return base.alias(id1, id2); }, py::arg("id1"), py::arg("id2"), "Return the detailed alias classification enum") + .def("mayAlias", [](PublicAndersen& base, NodeID id1, NodeID id2) { + return static_cast(base).mayAlias(id1, id2); + }, py::arg("id1"), py::arg("id2"), "Return true if two nodes may, must, or partially alias") .def("isWorklistEmpty", &PublicAndersen::isWorklistEmpty, "Check if the worklist is empty") .def("popFromWorklist", [](PublicAndersen& base) { return base.popFromWorklist(); diff --git a/pysvf/pysvf.pyi b/pysvf/pysvf.pyi index 93fd29d..597c4d1 100644 --- a/pysvf/pysvf.pyi +++ b/pysvf/pysvf.pyi @@ -2067,8 +2067,8 @@ class AndersenBase: def unionPts(self, id: int, ptd: int) -> bool: ... def unionPts2(self, id: int, ptd: 'PointsTo') -> bool: ... def dumpPts(self, id: int, pts: 'PointsTo') -> None: ... - def alias(self, id1: int, id2: int) -> bool: ... - def aliasKind(self, id1: int, id2: int) -> Any: ... + def alias(self, id1: int, id2: int) -> Any: ... + def mayAlias(self, id1: int, id2: int) -> bool: ... def isWorklistEmpty(self) -> bool: ... def popFromWorklist(self) -> int: ... def getPts(self, id: int) -> 'PointsTo': ...