RuleML / issues-ruleml

A repository solely for RuleML issues. No schemas or documents should be committed here.
3 stars 3 forks source link

Add Subclass to Deliberation #84

Closed tmitsi closed 4 years ago

tmitsi commented 4 years ago

Subclass is not yet implemented in Deliberation PSOA (while the PSOA presentation syntax supports it). The <Subclass>, <sub> and <super> elements will be added e.g.:

<Subclass>
  <sub><Rel>Teacher</Rel></sub>
  <super><Rel>Scholar</Rel></super>
</Subclass>
tmitsi commented 4 years ago

Add subclass_expansion_module based on the equal_expansion_module.

Subclass-specific changes in subclass_expansion_module:

tmitsi commented 4 years ago

In init_expansion module:

tmitsi commented 4 years ago

Modify schema_rnc.php to include the subclass module, e.g.:

$quant_subclass = 3;
...

$needSubclass = extractBit($bquant, $quant_subclass);
...

    // Include Subclass
    if ($needSubclass){
      echo "#\n# SUBCLASS INCLUDED\n";
      echo "#\n".'include "' . $modulesLocation .
          'subclass_expansion_module.rnc"'."$end\n";
    }
tmitsi commented 4 years ago

Modify relevant config scripts in bash folder (e.g., bash/config_rnc.txt) to include new bits (initially for PSOA anchor languages).

greenTara commented 4 years ago

It would be good to justify some decisions for later reference.

  1. Why is degree forbidden on Subclass? ( inspite of fuzzy containment being a well-known concept)
  2. Why is the datt pattern initialized as empty?
greenTara commented 4 years ago

There are other occurrences of “Equal” in the modules that have not yet been addressed e.g. stripe skipping, style.

greenTara commented 4 years ago

Because the edges will be skippable, the normalizer and compactifier need to be modified.

tmitsi commented 4 years ago
greenTara commented 4 years ago

For other formula nodes, the degree edge is brought into the "header" part of the content model through the pattern TruthValuedConnective.header. This is the line that is in the equal module, but was deleted for Subclass. In PSOA drivers, the degree module is not included because fuzzy logic is not part of PSOA semantics (yet). Therefore the degree element is not defined in the PSOA grammars, and the TruthValuedConnective line has no effect on those syntaxes. However, the subclass concept is not limited to PSOA, and I believe it would make sense to allow the degree element to occur on Subclass when PSOA and Deliberation are merged in the next version. Therefore it would make sense to me to not remove the line about TruthValuedConnective in 1.03-psoa.

greenTara commented 4 years ago

The map attributes apply certain properties to formulas that are nested within the element on which they appear. For example, mapMaterial would affect a nested Implies, having the same effect as a material attribute on the Implies element. Because Subclass does not contain nested implications, the map attributes do not make sense on Subclass.

The justification for departing from the template of the Equal element concerning the line

Empty-datt.choice |=notAllowed

to become

Subclass-datt.choice |=empty

is as follows: There are no required attributes on the Subclass element. None of the formerly-default attributes (e.g. mapMaterial) are applicable to Subclass. Therefore the datt (default attributes) pattern is set to empty.

greenTara commented 4 years ago

The changes to attribute module and stripe-skipping module look correct. In the latter case, a relaxed serialization instance should be tested where the sub and super edges are skipped.