open223 / models.open223.info

Repository of example models for 223
https://models.open223.info/
1 stars 3 forks source link

The "compiler" doesn't seem to be complete #54

Open steveraysteveray opened 2 months ago

steveraysteveray commented 2 months ago

@gtfierro, I was testing our Pritoni file (NIST Example Building 1 Model 1) by downloading the "compiled" version, and was surprised to see that it does not contain all the inferred relations. Here's a screenshot in my environment after I ran the inference engine again. The purple ones were not present in the downloaded compiled file. It took two iterations beyond what was in the compiled file, so are you maybe stopping the iteration too soon? The "uncompiled" version takes 5 iterations.

image

steveraysteveray commented 2 months ago

For what it's worth, LBNL Example Building 4 Model 1 suffers from the same problem - a bunch of s223:connectedTo and related triples are not present in the compiled version, but appear when I run the inferencer again (it ran for 2 more iterations). Here's a snippet of the additional triples inferred: image

gtfierro commented 2 months ago

Very strange!

Here's the loop which does the inference: https://github.com/gtfierro/brick-tq-shacl/blob/main/brick_tq_shacl/topquadrant_shacl.py#L81

It should just be running the SHACL inference until the output file doesn't change in size (# of triples), but I will dig in more

steveraysteveray commented 2 months ago

Isn't line 81 the problem?

        while previous_size != current_size and current_iter < _MAX_EXTERNAL_LOOPS:

...and _MAX_EXTERNAL_LOOPS is set to 3.

gtfierro commented 2 months ago

Aha! Good find. Let me change that and see how it affects things