Discussion List Archives

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ddlm-group] Handling of missing and null in dREL

  • To: "james.r.hester@gmail.com" <james.r.hester@gmail.com>, "Group finalisingDDLm and associated dictionaries" <ddlm-group@iucr.org>
  • Subject: Re: [ddlm-group] Handling of missing and null in dREL
  • From: "Bollinger, John C" <John.Bollinger@STJUDE.ORG>
  • Date: Tue, 21 Jan 2020 22:36:09 +0000
  • Accept-Language: en-US
  • ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=passsmtp.mailfrom=stjude.org; dmarc=pass action=none header.from=stjude.org;dkim=pass header.d=stjude.org; arc=none
  • ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901;h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;bh=dtTr6b57AreAc4IdZ0D6DmeCBouVzRndZBkmHuK/lKM=;b=cuY798yL9t0O+stsG98KD6lW6fDuUHVzSsN99Th+0ed+SjZ8eEyWkTSFj7UF/iNY6WJnpONR/PgrzAt+7I0o0pX48Ad6D6bFPqYPVRC6zVy8WM2wn7CaoUqqP2KfpaeAJK8WlH/LeFTx8ysCFNXveED6Z8GFOPEL7WlsD5Lrz0M4PXoJLO/vk/0RukZdbxolGNy9zfGi+MGZtEQ1u/ZtECS7UwXzhnUj4wcZLn+9akdeSWu3lh9T1b9XWQ2qCgeiAg+6knAOSGXgWhgoJjAwruedyaJNpr8ZK21gmF6Dz8ALe43jwcqs/d++vTFs06mO59kRlFpf/SbLBYAUysEG6Q==
  • ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;b=mrxSTSnXPBV5GvEEdU1F6y38Ug8KzgvBIhn2A0toguZ2tRfBNTAlx0Z7YFNpULCJMWA1Id4nFZ9kyZFYxbD71r6/shG35zncMg2Z7KPLB/I8gW1ka+9ezNULHgfn4m65/SMei/98dm9wqtZ89tqLgS4VYXNhcJ8PLbJJ/NknGB4KyUF0IwjVd8KIrPo0pKdVtv2KD2j+OsrKv/lwjZZu5oA+mUVTb4hqHwNn3x1vB4Jz37PV1WUYtkoxoEXZEeXayeUdPIQ9s+KWb94YpQjCyLCFAYvDTrNMzJgInjohogXAv2eBaCEVgVTNWhpalKXT/feSlXQDH8SEjb0QSp7s4g==
  • authentication-results: spf=none (sender IP is )smtp.mailfrom=John.Bollinger@STJUDE.ORG;
  • In-Reply-To: <CAM+dB2dFjxUnYRwVUH1gN6SKoSg8CQMRvfw-kHJmTk2axJ4+aA@mail.gmail.com>
  • IronPort-SDR: On/7HS/ptoaZWoYDQAoTNEQpvE/IP4Wiu5n9c5mo9w5ciH3ixipD0wInW5rp7Plc22UCJgbGEfi0wf2bMxyVU9RCCeNApM/ddNUkfWw7FMIFxuI8LSAQtBDkZ+ZcTLU2EcfDQ03esjmKFXbrCSZHxbVaPFJQJKbltuTcs1N/PRUzLBBzKdgn3FUpJiaLoFYx0OYXzhgBXkpyinYIyV6ZBqhTi8Pd81CI77ld62oR71ulqklaFIb14wszo4VQYEeEtwF/5oMIhArGOaRGZ/DUAVb5bneM65FPEMCRdsM+++g=
  • References: <CAM+dB2dFjxUnYRwVUH1gN6SKoSg8CQMRvfw-kHJmTk2axJ4+aA@mail.gmail.com>

Dear James and DDLm group,

 

A Happy New Year and best wishes to you all.

 

Regarding the proposed specifications for the evaluation of dREL expressions and function calls involving null and missing values,

 

- I am supposing that the dREL behaviors described are meant to be applicable to values that have emerged as missing or null from the computation of unspecified values by applicable methods and the substitution of default values for null where that applies.  Perhaps the context will make that clear, but it’s important to account for the fact that for these particular values there is a potential to confuse the lexical value that is syntactically associated with a given data name in a given data file with the value to which that data name evaluates in a dREL method.

 

- Regarding "A value of missing implies that all values in the domain of the data name are possible": I suspect that that wording is chosen to preclude the possibility that a missing value could be outside the domain of the data name.  It also conveys a sense that nothing but its domain is known about the value, however, which is not necessarily true for computable quantities where some inputs to the computation are known.  I might instead say something more along the lines of "A value of missing implies that no specific value for the data name is available."

 

- The three-value logic described for expressions involving missing values seems sensible to me.

 

- I am uncertain at the moment what the implication is of the sort function returning missing, but I suggest that it should be specified to sort all missing values to one end (the tail end would be my choice) despite the inconsistency inherent in that.  As an alternative, a function that could be used to filter the missing values from sort()'s and other functions' inputs might satisfactorily address the same needs.

 

- I agree with Herbert that it is necessary to have a function or operation that can be used to test whether a value is missing, and the same for testing whether a value is null.

 

- Semantics: "The behaviour of arithmetic operators and built-in mathematical functions is undefined for null arguments" is manifestly untrue in light of the following sentence, "These functions will therefore return missing if any arguments are null," which constitutes a definition of the behavior.  The bit about being undefined should probably just be dropped.

 

- Following from my first point, it should be reasonable to suppose that the only null values that dREL has to be concerned about are those that convey a sense of “not applicable”.  In view of that, I would choose altogether different semantics for expressions involving null and mathematical functions with null arguments, much more parallel to the semantics for expressions involving missing: any arithmetic, equality, or relational expression of which at least one operand is null evaluates to null, and any built-in mathematical function with at least one null argument returns null.  Note that this does not preclude an ISNULL operator or function (however spelled) that is considered to be outside all the aforementioned categories.

 

- Although it probably would follow from a sufficiently clear description of the rules for missing and null values individually, it might nevertheless be worthwhile to explicitly describe how expressions with both a missing and a null operand behave.  (Per my formulation of the results of expressions involving null, such expressions would yield null.)

 

 

Best Regards,

 

John

 

--

John C. Bollinger, Ph.D.

Computing and X-Ray Scientist

Department of Structural Biology

St. Jude Children's Research Hospital

John.Bollinger@StJude.org

(901) 595-3166 [office]

www.stjude.org

 

 

 

From: ddlm-group [mailto:ddlm-group-bounces@iucr.org] On Behalf Of James Hester
Sent: Tuesday, January 14, 2020 12:09 AM
To: ddlm-group <ddlm-group@iucr.org>
Subject: [ddlm-group] Handling of missing and null in dREL

 

Caution: External Sender

 

Dear DDLm group,

 

Happy New Year to all.

 

In preparing the Volume G chapter on dREL I noticed that, while 'missing' and 'null' have been added to dREL as values, there was no discussion about how they would behave when appearing in expressions. I have therefore composed the following two paragraphs, and would appreciate any insight you might have as to problems with the behaviour as stated.  While the behaviour for 'missing' is a standard 3-valued logic, the behaviour of null has essentially been dreamt up by me.  Note that 'missing' refers to a data value of '?' in a CIF file and null refers to '.'.

 

If there are no objections, these paragraphs will eventually find their way into the standard via Volume G.

 

thanks,

James.

===========

 

Computations with missing and null values

A value of missing implies that all values in the domain of the data name are possible. Unless otherwise stated, missing values propagate: where missing is an argument to an arithmetic operator or mathematical function, the result will also be missing. Logical operations follow the rules of three-valued logic: A OR missing is true iff A is true, otherwise the result is missing. Likewise, A AND missing is false iff A is false, otherwise the result is missing. An equality test between two values, where at least one is missing, will result in missing. Comparisons between values, where at least one is missing, result in missing. The latter behaviour means that the built-in 'sort' function will return missing if any of the elements of the sorted list have a value of missing. dREL methods may not explicitly test for missing values; the result of comparing missing with missing is missing.

The behaviour of arithmetic operators and built-in mathematical functions is undefined for null arguments. These functions will therefore return missing if any arguments are null. Logical operations and comparisons with null also behave identically to missing, with the important exception that equality with null can be tested. dREL methods can therefore invoke particular behaviour where null is part of the domain of a data value, and this will often serve to specify the interpretation of null in the context of the defined data name.

 

--

T +61 (02) 9717 9907
F +61 (02) 9717 3145
M +61 (04) 0249 4148



Email Disclaimer: www.stjude.org/emaildisclaimer
Consultation Disclaimer: www.stjude.org/consultationdisclaimer
_______________________________________________
ddlm-group mailing list
ddlm-group@iucr.org
http://mailman.iucr.org/cgi-bin/mailman/listinfo/ddlm-group

Reply to: [list | sender only]
International Union of Crystallography

Scientific Union Member of the International Science Council (admitted 1947). Member of CODATA, the ISC Committee on Data. Partner with UNESCO, the United Nations Educational, Scientific and Cultural Organization in the International Year of Crystallography 2014.

International Science Council Scientific Freedom Policy

The IUCr observes the basic policy of non-discrimination and affirms the right and freedom of scientists to associate in international scientific activity without regard to such factors as ethnic origin, religion, citizenship, language, political stance, gender, sex or age, in accordance with the Statutes of the International Council for Science.