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.
toggle quoted messageShow quoted text
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.
From: Spdx-legal@... <Spdx-legal@...> On Behalf Of
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.
On Sun, Jul 17, 2022 at 4:08 PM J Lovejoy <opensource@...> wrote:
relying on remembering the order of precedence).
Annex D explains the order of precedence for the operators and use of
I admit, I find the use of parentheses easier to understand overall (than
"Apache-2.0 AND MIT” but I think that’s kind of implicit, no?
I’m not sure it explicitly states that "MIT AND Apache-2.0" is equivalent to
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@...>
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?