Re: Commutativity of SPDX expressions

Richard Fontana

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.


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.

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…)


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?


Join to automatically receive all group messages.