IAI 4.8 “Constraints” - Link type constraints, validation info + experimental toggle
Hey family,
SAMPLE TEXT
We're very excited to announce that starting today IAI fully supports the link type constraints of IAI Classic, further expanded this time around. To sweeten the update further, 4.8 also introduces our first experimental feature logic toggle, enjoy!
IAI 4.8 involves link type constraints (the most abstract levels of our data model) so here's a refresher -
Link type constraints
Want to have only entities as authors of some pieces of art? Want to tie thoughts and feelings exclusively in a new way, or make it so concepts can be linked to their original source system? All of this is possible through constraining link types.
When creating a new link type or updating an existing one, you can constrain which nodes are allowed to be used by links of the type you are in by configuring the allowed node types on either side of any A->B link type.
You wouldn't necessarily want to constrain both sides of "location of" links to only accept "location" nodes, otherwise you won't be able to place people at locations, only locations. To enable that, in all A->B link types, constraints for A and B are separate* - we can constrain what all A's can be differently from B's, so the following logic runs twice, for the A side and B side:
if no constraints exist or the 'All' node type is found as a constraint - any node is considered valid**
otherwise the system checks that the passed node is found as a constraint
*unless you make your link type generalized, in which case A->B and B->A mean the same thing and all specified constraints apply to both sides
**as you can see, having any other node type alongside 'All' on either sides of a link is currently redundant as 'All' encompasses all of them, to give those types some use check the Experimental section of the post
Constraint Validation
You could previously add, view, import and export constraints/requirements into IAI since 3.15 if I'm not wrong (even from IAI Classic backups), it was the validation process of those constraints that was missing - and update 4.8 finally changed that!
You will now see detailed messages about what failed and what passed when attempting to create a new link where the constraints of that link type aren't met, prohibiting you from creating that link:
in the standalone 'Add link' block
in the 'Related nodes' section of all nodes when creating new links through the '+' button
Experimental - Exclusion mode
With Exclusion mode enabled (from Settings), any other types in your list of constraints alongside 'All' are now treated as prohibited types instead of allowed.
E.g. if we have constraints 'Feeling' and 'All' on one side of the link type and Exclusion mode on, feelings won't be allowed when attempting to create links of that type.