Closed greenTara closed 4 years ago
RuleML/deliberation-ruleml@aed13be (modify to exemplify tuples)
<Data>
to an <Ind>
<if>
and <then>
),
a) duplicate the <slotdep>
element,
b) rename the second one as <slot>
,
c) change constant labels (e.g. "w" becomes "v").
d) Expected to have no validation error at this stage when validated against e.g. datalogPSOA_normal.rnc<formula><Implies>
)
a) Replace slotdep and slot elements with tuple elements in both <Atom>
s in the new rule after <op>
.
b) <tupdep><Tuple>
...
c) <tup><Tuple><arg index="1"><Ind>a</Ind></arg><arg index="2"><Ind>b</Ind></arg><arg index="3"><Ind>c</Ind></arg></Tuple></tup>
<Implies>
)
a) modify contents to merge the contents of the previous two rules (tuples before slots)This instance will at this stage have validation errors regarding tuples (but not slots) when validated against e.g. datalogPSOA_normal.rnc
RuleML/deliberation-ruleml@90c7c5b
<RuleML>
element) down with the corresponding contents of exa/... add include statements for new modules to PSOA drivers ( relaxng/datalogPSOA_normal.rnc ) After "include "modules/individual_expansion_module.rnc", put
#
# DEPENDENT TUPLES INCLUDED
#
include "modules/tupdep_expansion_module.rnc" inherit = ruleml {start |= notAllowed}
Validate.
Change the content model of <Atom>
so that tuples are allowed, and exa/.../datalogPSOA....ruleml validates.
argumentsForAtoms.sequence |= positionalArgumentsForAtoms.sequence, slotsForAtoms.sequence
to
argumentsForAtoms.sequence |=
( positionalArgumentsForAtoms.sequence |
tuplesForAtoms.sequence),
slotsForAtoms.sequence
Add definition of tuplesForAtoms.sequence a) Duplicate the definition of slotsForAtoms.sequence along with its documentation (in ## comments above) which is lines 32-34. b) Replace "slot" with "tup". c) Delete the final item ("restOf ...")
In init module, initialize tupdepTermsForAtoms.sequence and tupTermsForAtoms.sequence
Validate exa/.../datalogPSOA_normal.ruleml. There should be no more JING errors.
Generic Procedure for Creating/Modifying Modules
DONE: Refining the bash scripts so that module validation can be run separately:
DONE: Modifying schema_rnc.php
DONE: Replace the for loop in build_myng2rnc.sh with a call to batch_val_module.sh
Keep line 18, replace lines 19-28 with the call to batch_val_module.sh, similar to line 16.
DONE: Modify exp_myng2rnc.sh to validate the generated RNC driver, and attempt to validate the RuleML instance file
ln -s "${RNC_HOME}modules/" "${TMP_HOME}modules"
"${BASH_HOME}aux_valrnc.sh" "${schemaFile}" This is a call with a single input argument to validate an rnc schema
"${BASH_HOME}aux_valrnc.sh" "${schemaFile}" "${rulemlFile}" This is a call with two input arguments to validate an XML instance ${rulemlFile} against an rnc schema ${schemaFile} .
DONE: Make the extension of the myng code to include tuples.
DONE: Add the myng codes for datalogPSOA_normal.rnc and hornlogPSOA_normal.rnc to the exp... script. Test using the exp... script.
Also, change the hornlog instance by adding a slot inside Expr. Further, change the text to single letters, like in the datalogPSOA instance, and create two more rules to show the tuple features.
DONE: To the exp... script, add calls to the PHP script (result going into $TMP_HOME) using the myng codes for
We use the same myng code as in the corresponding e.g. datalogPSOA_normal.rnc, but change from -s4c to -s50 (for 4xsd) and -s48 (for 4simp) at the end.
Check the result by comparing to the manually written drivers in /relaxng/...4xsd.rnc and /relaxng/...4simp.rnc.
DONE: Once all the calls to the PHP script have been confirmed, change the output directory from TMP_HOME to RNC_HOME. This will overwrite the existing manually-created scripts.
DONE (but not committed, because script fails part way through): Run build_myng2xsd.sh to check. If this runs with no errors, commit.
DONE: Fix the PHP date issue (see recent fix in 1.03).
https://github.com/RuleML/deliberation-ruleml/blob/1.03/relaxng/php-cli.ini
and line 126 of https://github.com/RuleML/deliberation-ruleml/blob/1.03/relaxng/schema_rnc.php
DONE: Experimentally publish the 1.03psoa branch on the RuleML server in a directory called 1.03psoa.
Test using the script build_web2rnc.sh (modified as needed).
Run build_myng2xsd.sh to check. If this runs with no errors, commit.
RuleML/deliberation-ruleml@2eac790 (add tuple feature to PSOA schemas: Partial implementation.) RuleML/deliberation-ruleml@f11de30 (add style attribute to Tuple) RuleML/deliberation-ruleml@fe89bb0 (modify unordered module to include tuples)
In normalizer_module.xslt, change all occurrences of
local-name(.)!= 'arg' and
local-name(.)!='repo' and
to local-name(.)!= 'arg' and local-name(.)!= 'tupdep' and local-name(.)!= 'tup' and local-name(.)!='repo' and
and similarly for other occurrences of arg that are unrelated to the index attribute of arg
Add templates for Tuple, using a simplification of the template for Plex.
<xsl:template match="ruleml:Tuple/*[ruleml:isNode(.)]" mode="phase-1">
The following slotdep commits are relevant to implementation of this issue (chronological order): RuleML/deliberation-ruleml@aed13be (modify to exemplify tuples) RuleML/deliberation-ruleml@90c7c5b
RuleML/deliberation-ruleml@be6f9db (repeat as above for hornlog) RuleML/deliberation-ruleml@d8218fd (uncertainty regarding the static non-PSOA schema) RuleML/deliberation-ruleml@905e295 (modify ordered_groups_expansion_module.rnc and init_expansion_module.rnc as needed) RuleML/deliberation-ruleml@03151ac RuleML/deliberation-ruleml@5320e9e (modify the existing 4xsd drivers to include new tuple modules) RuleML/deliberation-ruleml@33e70d5 (by analogy to above for 4simp) RuleML/deliberation-ruleml@a94f063 (update auto-generate files, e.g. xsd's)