ontologyportal / sumo

Suggested Upper Merged Ontology (SUMO)
226 stars 71 forks source link

test framework: add extra meta-predicate `(ontology ...)` that specify the kif files needed. #218

Open arademaker opened 4 years ago

arademaker commented 4 years ago

In many .tq files in tests directory, I see the predicates:

where can I find information about these predicates and/or more information about the format .tq that seems to be a supersede of SUO-KIF (.kif files). Actually, files in this directory are named as TQGNN.kif.tq.

arademaker commented 4 years ago

what are the .html files (e.g. TQG9.kif-res.html) in the tests directory? Do we still need them?

apease commented 4 years ago

These are just meta-predicates, not part of SUMO, that are keywords for a testing framework. It's been a number of years since I used these. I don't think they were written up, but it would be good to revive them

apease commented 4 years ago

I don't see .html files at https://github.com/ontologyportal/sumo/tree/master/tests . Are these just in your local directory? They should get created when running the testing framework.

arademaker commented 4 years ago

I believe the .html files were not deleted when I was running SigmaKEE directly the SUMO work tree.

apease commented 4 years ago

ok, it's safe to delete them

apease commented 4 years ago

InferenceTestSuite.java is the relevant class to run the TQs

apease@apease-ThinkPad-T460s:~/workspace/sigmakee$ java -Xmx7g -classpath /home/apease/workspace/sigmakee/build/classes:/home/apease/workspace/sigmakee/build/lib/:/home/apease/workspace/sigmakee/lib/ com.articulate.sigma.InferenceTestSuite InferenceTestSuite class options: -h - show this help screen -t - run named test file in config.xml inferenceTestDir -it - run test files known to pass in the given mode in config.xml inferenceTestDir

apease commented 4 years ago

it looks like we just have four metapredicates, handled in the code in InferenceTestSuite

                if (formula.startsWith("(note")) 
                    note = formula.substring(6,formula.length()-1);
                else if (formula.startsWith("(query")) 
                    query = formula.substring(7,formula.length()-1);
                else if (formula.startsWith("(answer")) 
                    answerList.add(formula.substring(8,formula.length()-1));
                else if (formula.startsWith("(time")) 
                    timeout = Integer.parseInt(formula.substring(6,formula.length()-1));
                else 
                    kb.tell(formula); 

I'll see about adding one for "file" (which could have multiple entries to allow for loading several files), which would override the constituent list in config.xml, if present