-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better support for detecting arity of a relation #16
Comments
Line 3570 Merge.kif
and Line 3237:
these make superficialPart arity 2. |
I am not sure if we can infer from the domain declarations the arity of a predicate. Do we have any check of completeness of domain declarations? |
We don't, and indeed for the As for
By the way, I'm not sure how to use the Boilerplate codeOn a more philosophical note: I would say both approaches have one major drawback: they are forcing writers of SUO-KIF ontologies to remember to declare that their predicates are The same argument is valid for having to declare the |
I am not sure about the good practices that @apease adopt. Maybe all relations should have domain declarations. Regarding (1), suo-kif is minimal , it doesn’t say nothing about the type system nor the upper level hierarchy. The transformation really needs to deal with the sumo axioms. Item 2 is not a problem, the declarations are for convenience. |
If they are for convenience, then it looks to me that they are optional, and if they are optional then we can't use them safely to figure out the arity of a predicate, which is the subject of this issue. Is that correct, or did I miss something? |
all relations do have domain restrictions. The domain statements are either made directly for each relation or inherited from its parent relations |
Hi @apease, so TransitiveRelation can't inherit domain definition from Relation and Relation doesn't have domain declaration either. |
aha we removed the subrelation on superficial part to solve issue ontologyportal/sumo#16 so I need to add domain statements for it, as well as the other relations for which I made this fix. good catch! |
so I guess one improvement that we can make to |
or run the Sigma Diagnostics function, which already has this |
Right now we detect the arity of fixed arity relations by infering it from the
domain
declarations. For example:From these declarations we can
safelyinfer thatinstance
is a binary operation.The code that does this is here: https://github.com/own-pt/cl-krr/blob/master/suo-kif.lisp#L248-L254
Unfortunately some relations do not have
domain
declarations, likesuperficialPart
.The side effect from this is best explained through an example:
When we don't know the arity of a relation, we simply generate all possible arities (up to a certain maximum), see: https://github.com/own-pt/cl-krr/blob/master/suo-kif.lisp#L440-L453
This means that we end up generating something like this:
Notice the incorrect arity
(SUPERFICIALPART ?ARGS0)
.While Vampire handles this by assuming that
SUPERFICIALPART
is overloaded (I guess!), the latestE
complains:We need to:
E
to accept this invalid code.The text was updated successfully, but these errors were encountered: