In Section 3, we report on extensive experimentation with the system and comparison with several other systems. In the next section we describe the approach, comment on the various compo- nents and illustrate them with fragments of a termination proof. We will only present the main intuitions in order to make the paper reasonably self-contained. Space restrictions do not allow us to give a formal account of this theory. The theoretical foundations of Polytool are formulated and proved in (9). More precisely, the system implements the constraint-based approach to termi- nation analysis, presented in (6), but extended to non-linear, polynomial level mappings and norms. Polytool is based on a termination condition that is rooted on acceptability (2). This is a direct extension of the well-founded orders based on (semi-)linear level mappings and norms that are used in most of the existing LP termination analysis systems. The aim of Polytool is to extend the power of existing termination analysers by using well-founded orders based on polynomial interpretations. As it is not possible to decouple Poly from domain (move domain outside Poly and group or parameterize root calculation methods by specific supported domains), each method should validate Poly and it's domain, handle they as a whole, and throw some kind of error if Poly domain and root calculation method is not compatible.Īlso, in addition to mentioned bug with factor(p), I've found that Poly somehow wrong handles coefficients which are finite field elements.In this system description, we present Polytool, a fully automated system for proving left-termination of denite logic programs (LPs). Also besides improving documentation, it would be nice if API will be solid and clear. That leads to wrong or unexpected results. But not all methods handles this fact as they should, and in some cases they ignore or discard Poly domain. This makes sense, because domain is a nature of polynomial coefficients, and coefficients are strongly coupled to polynomial itself. There are so many ways to calculate roots of polynomials:Īll of them are methods of Poly class or accepts Poly instance as input. SymPy API here looks inconsistent and confusing. In : p = Poly( x ** 7 - x, domain = GF( 7)) p Out: Poly( x ** 7 - x, x, modulus = 7) The issue seems to arise in ._symbolic_factor() The docstring does say it should work on polynomials with various domains, and it almost does work. Maybe this too should be more precise about what's allowed and what's not, and raise an exception when the domain is not appropriate. Method 2, the roots() function, also has docs that make it relatively clear that this is intended for expressing roots in radicals. Maybe the docstring for Poly.all_roots() should be more clear about this as well, and maybe the method should raise an exception when the domain is other than QQ. That class's documentation is explicit that it is currently intended only for finding real and complex roots of polynomials with rational coefficients. You talked about five methods for finding roots: Just from a quick look, I think this is partly a documentation issue, but also maybe we should be raising more exceptions, and there may also be one bug in there as well.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |