You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As raised by goodmami/penman#19 (comment), this breaks code which assumes that all :mod relations are the inverse of :domain, which suggests that they will only link variables, not a variable and a constant (string or number).
So: Should VARIABLE :mod CONSTANTnot be considered equivalent to VARIABLE :domain-of CONSTANT? I.e. is this an exception where :mod has no inverse? Or should we assume that a :domain relation can be headed by a constant?
Or, should we change the guideline for references to treat the figure/table as a named entity, thus putting the constant under name :op1 rather than :mod?
Thus, :domain-of is the inverse of :domain and :mod-of is the inverse of :mod. In order to resolve the idea described in the Guidelines that the inverse of :domain is :mod and vice-versa, I now have a penman.transform.canonicalize_roles() function that normalizes :domain-of to :mod and :mod-of to :domain, but this step is optional.
This method allows both :domain and :mod to links variables with constants, however such edges cannot be inverted as the source of a relation must always be a variable.
From my point of view this issue can be closed. If anything, the Guidelines can be updated to more carefully describe how :domain and :mod can be inverses of the other.
The rule for figure references involves putting a string under
:mod
:Similarly, a number for table references:
As raised by goodmami/penman#19 (comment), this breaks code which assumes that all
:mod
relations are the inverse of:domain
, which suggests that they will only link variables, not a variable and a constant (string or number).So: Should
VARIABLE :mod CONSTANT
not be considered equivalent toVARIABLE :domain-of CONSTANT
? I.e. is this an exception where:mod
has no inverse? Or should we assume that a:domain
relation can be headed by a constant?Or, should we change the guideline for references to treat the figure/table as a named entity, thus putting the constant under
name :op1
rather than:mod
?Related: #194, snowblink14/smatch#10
The text was updated successfully, but these errors were encountered: