From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 6790E7EF0D for ; Wed, 10 Feb 2016 20:27:23 +0100 (CET) IronPort-PHdr: 9a23:aZwBTRWmxENBPwfROuWtgud8JQzV8LGtZVwlr6E/grcLSJyIuqrYZhyEt8tkgFKBZ4jH8fUM07OQ6PC/Hzdaqs/b6jgrS99laVwssY0uhQsuAcqIWwXQDcXBSGgEJvlET0Jv5HqhMEJYS47UblzWpWCuv3ZJQk2sfTR8Kum9IIPOlcP/j7n0oM2MJV4Sz2PnO/tbF1afk0b4joEum4xsK6I8mFPig0BjXKBo/15uPk+ZhB3m5829r9ZJ+iVUvO89pYYbCf2pN4xxd7FTDSwnPmYp/4Wr8ECbFUrcrkcbB0kfjBtESy3oyi3Ac9+lvi73sPZn1QGePMvrXfU6Qz2k5KotTwXn3nQpLTk8pUjRlst2xIhSqxKgoVQryojIZ4efPfF+f6X1bNoaQm0HVcFUAX8SSrigZpcCWrJSdd1TqJPw8h5X9UOz Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=antonbachin@yahoo.com; spf=Pass smtp.mailfrom=antonbachin@yahoo.com; spf=None smtp.helo=postmaster@nm21-vm3.bullet.mail.ne1.yahoo.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of antonbachin@yahoo.com) identity=pra; client-ip=98.138.91.151; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="antonbachin@yahoo.com"; x-sender="antonbachin@yahoo.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of antonbachin@yahoo.com designates 98.138.91.151 as permitted sender) identity=mailfrom; client-ip=98.138.91.151; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="antonbachin@yahoo.com"; x-sender="antonbachin@yahoo.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@nm21-vm3.bullet.mail.ne1.yahoo.com) identity=helo; client-ip=98.138.91.151; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="antonbachin@yahoo.com"; x-sender="postmaster@nm21-vm3.bullet.mail.ne1.yahoo.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AZAQDrjbtWmZdbimJegi6BXm0QiEyhDIVEimKBZiGFbAKBOTkTAQEBAQEBAQEQAQEBAQEGDQkJIS6CLYIVAQEDAScZATgBBAsGBUZFEgYyh2YBAwoIDrNYgleFDwEjJwOETgEBAQEBAQEBAgEBAQEBAQEBAQEBDwIEDAIBhgOBbQiCQoQwgy2BDwWOG4RThAqFTIgFGYFDh0YghTJEiimDUiEBgjYegW9LAYhSAQEB X-IPAS-Result: A0AZAQDrjbtWmZdbimJegi6BXm0QiEyhDIVEimKBZiGFbAKBOTkTAQEBAQEBAQEQAQEBAQEGDQkJIS6CLYIVAQEDAScZATgBBAsGBUZFEgYyh2YBAwoIDrNYgleFDwEjJwOETgEBAQEBAQEBAgEBAQEBAQEBAQEBDwIEDAIBhgOBbQiCQoQwgy2BDwWOG4RThAqFTIgFGYFDh0YghTJEiimDUiEBgjYegW9LAYhSAQEB X-IronPort-AV: E=Sophos;i="5.22,426,1449529200"; d="scan'208";a="202531738" Received: from nm21-vm3.bullet.mail.ne1.yahoo.com ([98.138.91.151]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 10 Feb 2016 20:27:22 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1455132440; bh=kXN1KIcSQ0ownVTbDigmxccgTBDTavIQPn1Ap7IuAUg=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=gS8sZe8H9gWTFv1R/eH1Y/IGiawzxEVJOasOMjsNPn0gAL+RwRLCpubN/ufUsFqv+Da9YqpF9Cy57s17VixInXuKLnLfET+Lv/lSTdXf4lDiPM7biSUQvBmc4m04P8E36ch7EN5wECwG2Pjgs/fEFVvEFwXaZhGRc1F6gO1S8hxUREs37/M3XEyvDVr7XzrLqZKrz7E8Tti8ikEdgUgKeAIkqUS7rkTcX6Sy1wFIXxWpMGsDtPLCA7yhcC3Xd03nddfoJ6YzDlyrBOvw2qXJB3yNC5i5p22E+pakN03/5mAi3otL4HR96+xRFRp0Gzkj8Y/X0s2YCPSZaiOMWWzXnQ== Received: from [98.138.100.102] by nm21.bullet.mail.ne1.yahoo.com with NNFMP; 10 Feb 2016 19:27:20 -0000 Received: from [98.138.226.57] by tm101.bullet.mail.ne1.yahoo.com with NNFMP; 10 Feb 2016 19:27:20 -0000 Received: from [127.0.0.1] by smtp208.mail.ne1.yahoo.com with NNFMP; 10 Feb 2016 19:27:20 -0000 X-Yahoo-Newman-Id: 448569.70517.bm@smtp208.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: PLLWNDMVM1kTgUQYfkxlQOjqrF8l9y2p7Rcw5mhsSYasX6c esFLkLLBhe0xvIwoq8bxOXLp_1UFMOHuRsvC4Vem7nIPP6rikY_KgIRMXZ_t q.6SkAFfbsRA85jiBTnhWtDM1YdMT5CW5CcjhS3wp9QegnFBDon751kr_zA8 .s4pOPWTD_7aJjYHAuJrVvcZrufIEXhLNoeTxNbiFm0mQRAOeLnUW5GXxWRl _6GGr9cKOw579uTOiqFhtay6wej4BdoOQV_oa2xh5JEtVjX4rFnRoBvRLq01 lrY33hMV0RheeA.0quQFG_O_wIdYQYIr5TM1QeiIlxKyZ4JumUCxb6mdAKpX 9kdOzgLu6mFHpmY791BapLVZ4tHV_5VF5rjFOBSbVqehur_FY.m3l4FjnO.T tEYYm2KdOeK_VsRDSJzTnBd0a1I7uQ0d3QdQrLqe4uGrzy2GKFsCfnN1g82b fUJ3rPRaHO9Rtqziyv8TljcK3t5W8cimXuTqhoi_6ve2yb81JOhC1A_DoHmr 5yJcUre0O9sEUJwo.WJM0i4cSVTnIKfuFixJWtUIF6NdUKIgJpxyFllQs_SH 5ywj_bQ1Ezta5.3bnlOAfRw-- X-Yahoo-SMTP: ddtAESaswBBsjSthz_dVP91gr2NDfymF Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) From: Anton Bachin In-Reply-To: <56BB694D.1030306@linux-france.org> Date: Wed, 10 Feb 2016 13:27:18 -0600 Cc: caml-list@inria.fr X-Mao-Original-Outgoing-Id: 476825238.250024-bd1f35d07dabc3e45be701dbd0466a51 Content-Transfer-Encoding: quoted-printable Message-Id: <5F24126F-5082-42B8-9FCF-87F924892CA5@yahoo.com> References: <1FE0ECD4-BBD6-48DA-95BD-BB240E07484C@yahoo.com> <56BB694D.1030306@linux-france.org> To: David MENTRE X-Mailer: Apple Mail (2.2070.6) Subject: Re: [Caml-list] =?WINDOWS-1252?Q?=5BANN=5D_Bisect=5Fppx_1=2E0=2E0?= =?WINDOWS-1252?Q?_=96_Modernized_code_coverage_for_OCaml?= Hi David, Thanks for your comments. > * l. 107, 'let try_finally x f h =3D' is not green. The function seems to= be called as l. 108 is green. (Same remark for all defined functions) > https://rleonid.github.io/bisect_ppx/coverage/file0004.html#L107 This is an oversight on our part. We mark expressions in module-level let-bindings, and not the let-bindings themselves. The idea is that the expression is reached if and only if the let-binding is reached. That is why you see the mark on the next line. However, in case the let binding has parameters, our marking is wrong. Right now we handle let x =3D (* mark *) 1 correctly and let f x =3D (* mark *) 1 incorrectly, because that desugars to let f =3D (* no mark! *) fun x -> (* mark *) 1 The actual problem is very likely marks occupying the same location. In any case, I=92ve opened an issue for dealing with this: https://github.com/rleonid/bisect_ppx/issues/81 > * l. 110, 'f x' is not green? 'f' seems to be called if the previous "try= " is green. > https://rleonid.github.io/bisect_ppx/coverage/file0004.html#L110 The =93f x=94 in try is evaluated if and only if the whole try-expression is evaluated =96 unless, perhaps, the *implementation* of exception handling c= an cause a memory or stack overflow exception to occur between these two point= s =96 can someone knowledgeable comment? However, assuming my previous statement = is correct, it=92s not necessary to have a mark in both places. We chose to pu= t the mark on =93try=94 because it is technically very slightly easier to do so. = However, we could be convinced to move it to the expression instead. > * l. 139, '^ ".cmp"' is not green? Once again, this expression seems to e= xecuted by your tests. > https://rleonid.github.io/bisect_ppx/coverage/file0004.html#L139 Thanks. We are now looking into putting marks on function arguments. It will require some investigation to do correctly and legibly for all cases (e.g. = infix operators). Not sure why this wasn=92t done in original Bisect. If we find = a good reason for *not* doing it, we will document it. https://github.com/rleonid/bisect_ppx/issues/82 > * l. 168 and l. 169, 'else' is never coloured? For me, it should be green= l. 168 and red l. 170. > https://rleonid.github.io/bisect_ppx/coverage/file0004.html#L168 To the best of my knowledge, we can=92t get the location of the else keywor= d in an if-then-else in PPX. That=92s why we mark at the start of the subexpression= s. > Overall, I would expect all code lines to be either green, red or yellow,= not without colour (except for comments and type and exception definitions= ). Bisect_ppx colors expressions and not lines =96 the line colors just indica= te whether there is a colored expression on each line. So, yes, while many lin= es in expressions should be colored, some won=92t be =96 for example, from above,= lines containing only delimiters such as =93then=94, =93else=94, and =93end=94. We are looking to extend coverage analysis as much as reasonably possible, = so thanks again, and do let us know if you find any other gaps :) Regards, Anton