Skip to content

robot diff always shows all axioms have changed for blank nodes #1243

@paulmillar

Description

@paulmillar

I'd like to use robot diff to get a summary of the changes in a GitHub pull request, or during development.

For the PR, (in essence) the script run robot on the input files from HEAD and HEAD^ to generate two outputs, and then run robot diff on these two output.

Unfortunately, there are blank nodes, which are assigned random IRIs by the robot diff command. These blank node IRIs are different between the two versions, leading to a large number of "false positives", where robot diff has identified changed assertions that don't reflect changes in the input.

This looks a lot like #1032.

As a primitive work-around, I can filter out these generated IDs using grep; e.g.,

$ robot diff --left ontology_old.ttl --right ontology_new.ttl --labels true \
    | egrep -v '_:genid[0-9]{10}'

However, using grep results in confusing output: the robot diff command lists the number of axioms that are present in one side that are missing from the other:

64 axioms in right ontology but not in left ontology:

Unfortunately, this axiom count doesn't match the number of axioms that are listed.

Also, filtering the output would result in the output missing any real changes involving a blank node.

Somewhat ironically, I'm actually getter better results from converting the ontology to ttl and using the diff command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions