https://github.com/nexB/license-expression provides a comprehensive support for parsing, comparing, validating, normalizing and resolving license expressions based on SPDX or any other license identifiers or names. It uses a boolean logic engine behind the scenes to handle this correctly
We should add this to support SPDX license expressions.