From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id D3F9F3857C49 for ; Tue, 2 Aug 2022 07:58:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D3F9F3857C49 Received: by mail-pg1-x52a.google.com with SMTP id 12so11734877pga.1 for ; Tue, 02 Aug 2022 00:58:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=gmvRbzFpfutUT6gNVhdztsx15ib8fCDBb4iRJA2NJAY=; b=0oMa2DzsekTJf1y1tvkK2mDY6A5ux2VI9f1YDth/0RpyvDTSrQf/CAsdFD1wKwGAH3 aBV13KTDmqH5qDX/vEZzFlPOJURP+Tq+8SXrgPx3tFDjqD28mB4rHdObZUQQEPVF1//k NN4zLH8kLIXNxShFXtQDO5cKmkg6OJ3fdRMw0Md+nq31k0CL00gmk1zJE8SjuUHD01Dq f10EexP+/jSbOnGCNoflin6yjJzzQJS6p+Qwr8DEdsPAR8VsxtSrPAKYPxeJmlyOukeF HhkGh4DNDbh/TFS4IwAvphowJ3DPmmRIa6Z6GlMB2b99WkbilKBV3EFptyTy03eRG3qg rMQQ== X-Gm-Message-State: ACgBeo2lxXio8w8br3Vj53T9550VHFG60UcjXTChIS2HnxuSKps87jID stKLoM3l2nCoMbCeHtZuHkQF3Q== X-Google-Smtp-Source: AA6agR6OViCTHXM/bMoRdHjjubP5peaWFwrKs5yIkMcB2n3FEsMT7aJKCvZ3QXq6eSDalMrceI9XVw== X-Received: by 2002:a65:6bc9:0:b0:41b:ee12:257e with SMTP id e9-20020a656bc9000000b0041bee12257emr9119478pgw.121.1659427096785; Tue, 02 Aug 2022 00:58:16 -0700 (PDT) Received: from [172.16.184.103] ([103.175.111.222]) by smtp.gmail.com with ESMTPSA id w4-20020a17090a1b8400b001f32f242020sm8847225pjc.43.2022.08.02.00.58.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Aug 2022 00:58:16 -0700 (PDT) Message-ID: <451bb5f5-ed93-b0ae-237c-9b5d893592a7@woven-planet.global> Date: Tue, 2 Aug 2022 09:58:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] Add condition coverage profiling Content-Language: en-US From: =?UTF-8?Q?J=c3=b8rgen_Kvalsvik?= To: Sebastian Huber , gcc-patches@gcc.gnu.org References: <20220715113938.19068-1-jorgen.kvalsvik@woven-planet.global> <612b05e8-2caf-b406-0964-03272befb650@embedded-brains.de> <371c5653-59a8-6ca5-819b-76ab74e86625@woven-planet.global> In-Reply-To: <371c5653-59a8-6ca5-819b-76ab74e86625@woven-planet.global> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2022 07:58:20 -0000 On 15/07/2022 15:47, Jørgen Kvalsvik wrote: > On 15/07/2022 15:31, Sebastian Huber wrote: >> On 15.07.22 13:47, Jørgen Kvalsvik via Gcc-patches wrote: >>> 2. New vocabulary for the output - decisions for, well, the decisions. It also >>> writes at most one line per condition: >>> >>>     decisions covered 1/4 >>>     condition  0 not covered (true false) >>>     condition  1 not covered (true) >> >> Do we really have multiple decisions? I think we have only one decision composed >> of conditions and zero or more boolean operators. We have variants of condition >> outcomes. >> > > Maybe, I'm not sure - you could argue that since a fixture of boolean > "dominates" the outcome (either by short circuiting subsequent terms or masking > preceding terms) then that fixture is a decision which leads to one of two > outcomes. The other parameters may change but they wouldn't change the > decision. You have 2^N inputs but only N+1 decisions. Personally the "variants" > phrasing doesn't feel right to me. > > That being said I'm open to making this whatever the maintainers feel is > appropriate. Coming back to this, this is the terms + definitions gracefully borrowed from wiki [1]: Condition A condition is a leaf-level Boolean expression (it cannot be broken down into simpler Boolean expressions). Decision A Boolean expression composed of conditions and zero or more Boolean operators. A decision without a Boolean operator is a condition. Condition coverage Every condition in a decision in the program has taken all possible outcomes at least once. Decision coverage Every point of entry and exit in the program has been invoked at least once, and every decision in the program has taken all possible outcomes at least once. I agree that decisions n/m, based on these definitions, is not the best output unless it is specifically overloaded to mean "the family of bit vectors that cover some conditions". Not great. Based on this established terminology I can think of a few good candidates: condition outcomes covered n/m outcomes covered n/m What do you think? [1] https://en.wikipedia.org/wiki/Modified_condition/decision_coverage