Skip to content

Add an OWL 2 DL profile check to the ROBOT tests - #53

Merged
jclerman merged 1 commit into
mainfrom
add-dl-profile-check
Nov 29, 2026
Merged

jclerman merged 1 commit into
mainfrom
add-dl-profile-check

Conversation

@jclerman

Copy link
Copy Markdown
Collaborator

Closes #52

Summary

Adds robot validate-profile --profile DL to tests/scripts/robot-check.sh, so the robot-integrity CI job fails if RadLex.owl uses a property or class it doesn't declare, or has any other OWL 2 DL violation.

Details

  • tests/scripts/robot-check.sh: after the reasoner check, runs robot validate-profile --input RadLex.owl --profile DL --output dl-profile-report.txt.
  • .github/workflows/robot-integrity.yml: if that step fails, uploads dl-profile-report.txt as the robot-dl-profile-report artifact, following the existing upload steps.
  • .gitignore: ignores dl-profile-report.txt, like the other generated reports.
  • docs/TESTING.md, docs/CONTRIBUTING.md: describe the new check and its report.

How I checked it, locally with ROBOT 1.9.11:

  • On the current RadLex.owl, the check passes (OWL 2 DL Profile Report: [Ontology and imports closure in profile]) and takes about 3 seconds. The whole robot-check.sh, reasoner included, passes.
  • On a toy ontology that uses an undeclared custom annotation property, it fails (exit 1) and the report says Use of undeclared annotation property: <http://example.org/undeclaredProp> in annotation ....

Motivation

The SPARQL-query-based checks can't detect a custom annotation property that is used but not declared: ROBOT loads the ontology through OWLAPI, which adds the missing owl:AnnotationProperty declarations before the queries run. Only OWL's built-in annotation properties (rdfs:label, rdfs:comment, owl:deprecated, etc.) may be used undeclared. This came up in review of #51; see #52.

🤖 Generated with Claude Code

@averde15

Copy link
Copy Markdown

this sounds good to me

@averde15

Copy link
Copy Markdown

Hey Jeff- Do you need this approved by Michael and or Tarik prior to the version update?

@jclerman
jclerman force-pushed the add-dl-profile-check branch from fb588e4 to d46a057 Compare November 27, 2026 17:57
@jclerman
jclerman requested a review from averde15 November 27, 2026 17:58
@jclerman

Copy link
Copy Markdown
Collaborator Author

Hey Jeff- Do you need this approved by Michael and or Tarik prior to the version update?

Hi @averde15 - yes, a review/approval by one of them would be great. This PR is small and adds an integrity check which would have caught an issue we had to find/fix manually recently. It's not critical pre-release, but it'd be nice. The more integrity checks we have, the easier it is to guarantee a clean ontology to consumers.

The SPARQL-query-based checks can't detect a property that is used but
not declared, because OWLAPI adds the missing declarations when ROBOT
loads the ontology. `robot validate-profile --profile DL` does catch it,
along with other OWL 2 DL violations. Run it in robot-check.sh, upload
its report from CI on failure, ignore the report file, and document it.

Closes #52

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jclerman
jclerman force-pushed the add-dl-profile-check branch from d46a057 to d74aab6 Compare November 29, 2026 03:10
@jclerman
jclerman merged commit 9eb5471 into main Nov 29, 2026
2 checks passed
@jclerman
jclerman deleted the add-dl-profile-check branch November 29, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an OWL 2 DL profile check to catch undeclared properties

2 participants