From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dibyendu Majumdar Subject: Re: SSSA and some C pointer manipulation. Date: Sat, 19 Aug 2017 12:57:43 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from mail-vk0-f47.google.com ([209.85.213.47]:36716 "EHLO mail-vk0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750947AbdHSL5p (ORCPT ); Sat, 19 Aug 2017 07:57:45 -0400 Received: by mail-vk0-f47.google.com with SMTP id u133so39254404vke.3 for ; Sat, 19 Aug 2017 04:57:44 -0700 (PDT) In-Reply-To: Sender: linux-sparse-owner@vger.kernel.org List-Id: linux-sparse@vger.kernel.org To: Christopher Li Cc: Luc Van Oostenryck , Linux-Sparse Hi Chris, On 19 August 2017 at 11:56, Christopher Li wrote: > On 8/19/17, Dibyendu Majumdar wrote: >> I think it is an excellent idea to create a bunch of careful tests to >> assess / validate the changes. Perhaps the tests should cover various >> scenarios including switch statements, gotos, computed gotos, looping >> constructs, etc. And specific uses of globals, pointers, locals etc. >> > > That is the idea for the test suite. To test how sparse handle > different source code. > Yes. I have a growing set of tests but I only check the final result is correct - i.e. the code can be run (both with and without simplifications) and will produce expected results. I do not check whether the Sparse IR is optimum or not, as I have been more focussed on getting the right outcome. > There is also the idea of the debug version of sparse. Instead > having the fix input source. It will do dynamic verification > of sparse at run time. e.g. If there is a slow and reliable way > to generate SSA conversion. Then in the debug version will do > both the slow and reliable way and the new fast and optimal way. > Then compare notes to draw conclusion that the new way *is* better. > AT least not worse than the old way. In this case I want to verify > that, the new method at least cover all the variable converted > by the old method. Including variable used by pointers. > Sure but this is kind of hard to do - because to validate something you need a definition of what is "good" or "expected". Ideally of course the output will be correct and at least as optimum as before - but I would rather it is correct first. Regards Dibyendu