Lisp dumping sometimes puts use of properties before their declaration
I'm using the Java API with a .fpp-options file containing simply:
[Tuning]
dumpOntology = 1
I pipe the standard output in a file to get the lisp expressions so I can read them afterwards, see https://bitbucket.org/dtsarkov/factplusplus/issues/69/way-to-save-load-a-set-of-facts.
However sometimes the output I get is like:
(range http://www.semanticweb.org/ywen/ontologies/2016/10/untitled-ontology-31#hasName (string))
(defdatarole http://www.semanticweb.org/ywen/ontologies/2016/10/untitled-ontology-31#hasName)
where defdatarole happens after data role use. And this fails to parse. Since the grammar is not context free, if hasName is used before it is declared, then parsing fails with a "Error at input line 1: unknown concept constructor".
Comments (4)
-
repo owner -
repo owner As a workaround you can simply sort the output file. This way all the definitions will go before all other axioms
-
repo owner - changed status to resolved
Fix
#70by printing all declarations before logical axioms→ <<cset 6fb582fb4830>>
-
repo owner Fix
#70by printing all declarations before logical axioms→ <<cset 6759972c71ad>>
- Log in to comment
Thanks for the report. The old version used to print the data roles upfront. Seems like it had been lost at some point. I'll look to restore the correct functionality.