Re: Commutativity of SPDX expressions


Gary O'Neall
 

I've always assumed the AND and OR operators to be commutative and the SPDX Java tools take full advantage of the commutative properties when comparing license expressions.

I would welcome a pull request to Annex D to clarify this since at least one member of the community found this ambiguous and/or confusing.

Gary

-----Original Message-----
From: Spdx-legal@... <Spdx-legal@...> On Behalf Of
Richard Fontana
Sent: Sunday, July 17, 2022 2:36 PM
To: J Lovejoy <opensource@...>
Cc: SPDX-legal <spdx-legal@...>
Subject: Re: Commutativity of SPDX expressions

The order of operations is a different issue, I think. I guess the SPDX spec
assumes, as you say, that commutativity of AND and OR is implicit (like
counterpart operations in propositional logic), but this implicit property was
not obvious to one Fedora contributor.

Richard

On Sun, Jul 17, 2022 at 4:08 PM J Lovejoy <opensource@...> wrote:

Hi Richard,

Annex D explains the order of precedence for the operators and use of
parentheses.
https://spdx.github.io/spdx-spec/SPDX-license-expressions/

I admit, I find the use of parentheses easier to understand overall (than
relying on remembering the order of precedence).

I’m not sure it explicitly states that "MIT AND Apache-2.0" is equivalent to
"Apache-2.0 AND MIT” but I think that’s kind of implicit, no?

I also think this entire annex could use a re-write to make it a bit
more user-friendly (on the topic of improving documentation…)

Jilayne

On Jul 17, 2022, at 12:21 PM, Richard Fontana <rfontana@...>
wrote:

I'm working on some draft documentation for Fedora around use of
SPDX expressions in RPM spec file License: fields. I was surprised
to apparently not see anything in the SPDX spec that says that the
AND and OR operators are commutative. I want to assert that the
expression "MIT AND Apache-2.0" is equivalent to "Apache-2.0 AND
MIT". Does the SPDX spec actually take no position on this?

Richard







Join {Spdx-legal@lists.spdx.org to automatically receive all group messages.