RuleML / issues-ruleml

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

Add dependent slots to Deliberation PSOA RuleML #78

Closed greenTara closed 4 years ago

greenTara commented 5 years ago

Starting from Deliberation PSOA 1.03, the element ``

`` will be added. It can be used in Atoms like `` JohnTA workloadhigh ``
greenTara commented 5 years ago

Examples will be added to test the new schema modules and illustrating the new language features. The XML files will be added to directories like exa/DatalogPSOA.

greenTara commented 5 years ago

Add slotdep module by duplicating the slot module.

Test using datalog_normal as the starting point (for now). A new schema datalogPSOA_normal.rnc will be added to /relaxng.

A test suite will be added duplicating the example in exa. However, the association will refer to the local schema (datalogPSOA_normal.rnc) because the bash scripts are not yet in use.

An indep_valid_modules file will be added manually.

This step implemented by https://github.com/RuleML/deliberation-ruleml/pull/94/commits/90c7c5bce62131528de98e6272ce22f437c5d8f9 https://github.com/RuleML/deliberation-ruleml/commit/7cbb9556acf495ca0676488f6ef4f9f90d73fdd4

greenTara commented 5 years ago

Extend the content models of <Atom> and <Expr> to include zero or more dependent slots following positional arguments and preceding independent slots. The pattern

slotsForAtoms.sequence |= slotTermsForAtoms.sequence, restOfSlots-edge.choice?

becomes

slotsForAtoms.sequence |= slotdepTermsForAtoms.sequence, slotTermsForAtoms.sequence, restOfSlots-edge.choice?

and similarly for slotsForExpr.sequence.

A test suite hornlogPSOA was added to deal with the case of dependent slots in functional expressions.

Implemented in the following commits: https://github.com/RuleML/deliberation-ruleml/commit/5178e2d509623f00bbd683659c4ad737ff2bd449 https://github.com/RuleML/deliberation-ruleml/commit/be6f9db7c2f8919c945299d19adfb5433bb2bc5a https://github.com/RuleML/deliberation-ruleml/commit/d8218fdfbab7b8e3f0bb04414d36d140c1874c7b https://github.com/RuleML/deliberation-ruleml/commit/905e295c76175937107ebfa9257a72823890a2a3

greenTara commented 5 years ago

Due to the sharing of patterns, these changes lead to changes in the content models of <Plex> and <Uniterm>. It is not clear if this is appropriate, as there is no predicate in a <Plex> for the slots to depend on. Before finalizing this issue, it should be considered to split slotsForExpressions.sequence to create a new pattern slotsForPlexes.sequence that does not allow dependent slots.

rimachaudhari commented 5 years ago

The following commits complete the implementation (anti-chronological): https://github.com/RuleML/deliberation-ruleml/commit/a94f063ed0d1494ecc0f65d127c155999a383791 https://github.com/RuleML/deliberation-ruleml/commit/f25d2adaec4e531b59584c17641aacd8a5510ef5 https://github.com/RuleML/deliberation-ruleml/commit/33e70d5cc244c5ad9ff0a0fb93fcccf3f1f9e370 https://github.com/RuleML/deliberation-ruleml/commit/5320e9e502c485e957b62e92159870ca91615cfc https://github.com/RuleML/deliberation-ruleml/commit/8074c8d5701a534c6ae92ec702a9878e3303503e https://github.com/RuleML/deliberation-ruleml/commit/ecda706637f824c3af78226407aad90ef168ae89 https://github.com/RuleML/deliberation-ruleml/commit/b85e7fe089e19c654c48a0e114b9b76461372825 https://github.com/RuleML/deliberation-ruleml/commit/03151aca6106fb8a6b501fdfc1d49e2731b58e75 https://github.com/RuleML/deliberation-ruleml/commit/905e295c76175937107ebfa9257a72823890a2a3 https://github.com/RuleML/deliberation-ruleml/commit/d8218fdfbab7b8e3f0bb04414d36d140c1874c7b https://github.com/RuleML/deliberation-ruleml/commit/be6f9db7c2f8919c945299d19adfb5433bb2bc5a https://github.com/RuleML/deliberation-ruleml/commit/5178e2d509623f00bbd683659c4ad737ff2bd449 https://github.com/RuleML/deliberation-ruleml/commit/7cbb9556acf495ca0676488f6ef4f9f90d73fdd4 https://github.com/RuleML/deliberation-ruleml/commit/90c7c5bce62131528de98e6272ce22f437c5d8f9 https://github.com/RuleML/deliberation-ruleml/commit/9c0f2d9e072f8102381bab883ade6a7d4c753743 https://github.com/RuleML/deliberation-ruleml/commit/15eef9953492e1597f57d44a75c1a55848b7bc28 https://github.com/RuleML/deliberation-ruleml/commit/aed13be9a1030d5b2d6de7b0f9e2a5b956565c3f https://github.com/RuleML/deliberation-ruleml/commit/93b02d6d7c7a1f4ca6fbe4d57e05395e43951340

rimachaudhari commented 5 years ago

The following commits complete the implementation (anti-chronological): https://github.com/RuleML/deliberation-ruleml/commit/994f573b1ebcf106bf86e677b67fc06d5fa67337 https://github.com/RuleML/deliberation-ruleml/commit/cddce5ece229f848138387bdc1b4a1ecfeeacb51 https://github.com/RuleML/deliberation-ruleml/commit/50d18bb15ae07b1749311c9857bd34c0feec9347

greenTara commented 5 years ago

In normalizer_module.xslt, change all occurrences of

          local-name(.)!='repo' and 
          local-name(.)!='slot' and

to

          local-name(.)!='repo' and 
          local-name(.)!='slotdep' and
          local-name(.)!='slot' and

Also

  <xsl:apply-templates select="ruleml:repo" mode="phase-2"/>
  <xsl:apply-templates select="ruleml:slot" mode="phase-2"/>

to

  <xsl:apply-templates select="ruleml:repo" mode="phase-2"/>
  <xsl:apply-templates select="ruleml:slotdep" mode="phase-2"/>
  <xsl:apply-templates select="ruleml:slot" mode="phase-2"/>

and similarly for other occurrences of slot.