- From: Jos de Bruijn <debruijn@inf.unibz.it>
- Date: Sat, 01 Mar 2008 15:19:10 +0100
- To: Michael Kifer <kifer@cs.sunysb.edu>
- CC: RIF <public-rif-wg@w3.org>
- Message-ID: <47C965DE.7020409@inf.unibz.it>
I updated the grammars according to the e-mail discussion. There are three places where sequences of Unicode characters are used, namely as names of arguments of functions and predicates, as constant identifiers, and as names of variables. I used the same name LITERAL in all three places. To accommodate the fact that FLD allows implication in conditions, I added the implication to the CONDITION production. For uniformity with BLD I kept the RULECONTENT production; however, if such uniformity is not required, the production may be removed and the rules and simply be a CONDITION. FLD Grammar: Ruleset ::= 'Ruleset( ' absolute-IRI? Metadata* Rule* ' ) ' Rule ::= 'Rule( ' absolute-IRI? Metadata* RULECONTENT ' ) ' RULECONTENT ::= 'Forall' Var+ '(' CONDITION (':-' CONDITION)? ')' | CONDITION (':-' CONDITION)? UNITERM ::= TERM '(' (TERM* | (LITERAL '->' TERM)*) ')' CONDITION ::= 'And' '(' CONDITION* ')' | 'Or' '(' CONDITION* ')' | CONDITION ':-' CONDITION | 'Exists' Var+ '(' CONDITION ')' | 'Forall' Var+ '(' CONDITION ')' | 'Neg' CONDITION | 'Naf' CONDITION | ATOMIC ATOMIC ::= Predicate | Equal | Member | Subclass | Frame Predicate ::= UNITERM | 'Builtin ( ' UNITERM ' ) ' Equal ::= TERM '=' TERM Member ::= TERM '#' TERM Subclass ::= TERM '##' TERM Frame ::= TERM '[' (TERM '->' TERM)* ']' TERM ::= Const | Var | Function| Equal | Member | Subclass | Frame Const ::= '"' LITERAL '"^^' SYMSPACE Var ::= '?' LITERAL Function ::= UNITERM | 'Builtin ( ' UNITERM ' ) ' Metadata ::= ' Metadata ( ' METADATALIST ' ) ' METADATALIST ::= absolute-IRI MetadataValue | METADATALIST ' ; ' METADATALIST METADATAVALUE ::= Const | ' [] ' | ' [ ' METADATALIST ' ] ' SYMSPACE ::= absolute-IRI BLD grammar: Ruleset ::= 'Ruleset( ' absolute-IRI? Metadata* Rule* ' ) ' Rule ::= 'Rule( ' absolute-IRI? Metadata* RULECONTENT ' ) ' RULECONTENT ::= 'Forall' Var+ '(' ATOMIC (':-' CONDITION)? ')' | ATOMIC (':-' CONDITION)? UNITERM ::= Const '(' (TERM* | (LITERAL '->' TERM)*) ')' CONDITION ::= 'And' '(' CONDITION* ')' | 'Or' '(' CONDITION* ')' | 'Exists' Var+ '(' CONDITION ')' | ATOMIC ATOMIC ::= Predicate | Equal | Member | Subclass | Frame Predicate ::= UNITERM | 'Builtin ( ' UNITERM ' ) ' Equal ::= TERM '=' TERM Member ::= TERM '#' TERM Subclass ::= TERM '##' TERM Frame ::= TERM '[' (TERM '->' TERM)* ']' TERM ::= Const | Var | Function Const ::= '"' LITERAL '"^^' SYMSPACE Var ::= '?' LITERAL Function ::= UNITERM | 'Builtin ( ' UNITERM ' ) ' Metadata ::= ' Metadata ( ' METADATALIST ' ) ' METADATALIST ::= absolute-IRI METADATAVALUE | METADATALIST ' ; ' METADATALIST METADATAVALUE ::= Const | ' [] ' | ' [ ' METADATALIST ' ] ' SYMSPACE ::= absolute-IRI Best, Jos Michael Kifer wrote: > Jos wrote: >>>> Incidentally, I think there is a problem with the syntax for rules, as >>>> specified in FLD. Namely, a rule is an implication phi :- psi; no >>>> quantification seems to be allowed. In the grammar below I also allowed >>>> rules with universal quantification. >>> There are also quantified formulas. In FLD you can have arbitrary quantifiers. >>> I could have called phi :- psi a "Rule Implication" instead, but "Rule" >>> seemed shorter and acceptable. >> I guess this means an FLD rule set is a set of formulas? > > Yes, because FLD is supposed to cover a possible future FOL dialect, > disjunctive LP, and Lloyd-Topor extensions. > >>> Note that the formal syntax uses "universal" for what BNF calls a "rule". >>> These universals correspond to "Implies" in BNF. Unfortunately, Implies is >>> not so good, if FLD is taken into the account, since FLD can have two kinds >>> of "implies": :- and <-. Currently, <- is not used in FLD, but it could be, >>> so it is better to avoid the confusion. >> Actually, I was proposing to get rid of "Implies" in BNF, because I was >> not convinced of its usefulness. >> >> Could you actually point me out where the implication <- is defined in >> FLD? I could not find it. > > I said that currently FLD *does not* use the classical implication > connective (->), but we might include it in the future (for instance, for > FOL and languages that support Lloyd-Topor extensions). For this reasons, I > avoided calling phi :- psi an "Implication" in the formal syntax of FLD > (not to be confused with the BNF of BLD, which used Implies). > > So, ideally, to be compatible with FLD and to be extensible, it may be > necessary to call the top level nonterminals in BNF "Formula" or "FormulaSet". > I realize that for BLD the names "Rule" and "RuleSet" seem more > appropriate, but if we think about extensible BNF grammars then we might > need to be more general. > > > regards > --michael > >> Best, Jos >> >>> Proposals for better names would be appreciated. >>> >>> >>> --michael >> -- >> debruijn@inf.unibz.it >> >> Jos de Bruijn, http://www.debruijn.net/ >> ---------------------------------------------- >> One man that has a mind and knows it can >> always beat ten men who haven't and don't. >> -- George Bernard Shaw >> >> --------------ms050207030102090906040705 >> Content-Type: application/x-pkcs7-signature; name="smime.p7s" >> Content-Transfer-Encoding: base64 >> Content-Disposition: attachment; filename="smime.p7s" >> Content-Description: S/MIME Cryptographic Signature >> >> MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJEzCC >> AuQwggJNoAMCAQICEB1TmNgyHOKRUL43eSjaINgwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UE >> BhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMT >> I1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA3MDUxMDA3NTMwOFoX >> DTA4MDUwOTA3NTMwOFowRzEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEkMCIG >> CSqGSIb3DQEJARYVZGVicnVpam5AaW5mLnVuaWJ6Lml0MIIBIjANBgkqhkiG9w0BAQEFAAOC >> AQ8AMIIBCgKCAQEA4mJofW3+kMtlQKNG0am5Km+8qlA18tMV9Q5oPrOgBoReGVwbcc1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AEMXgwdjBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1 >> bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElz >> c3VpbmcgQ0ECEB1TmNgyHOKRUL43eSjaINgwgYcGCyqGSIb3DQEJEAILMXigdjBiMQswCQYD >> VQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UE >> AxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECEB1TmNgyHOKRUL43eSja >> INgwDQYJKoZIhvcNAQEBBQAEggEA1A9e2aMo4x/41f/LaGOH79Uws48N4g0fs1X4XuZlE4D/ >> MNRakxWI+GMsBB64CcOJbPybtfTZ6DQMvmni6nDcV7Il5LXJ4epu1B7dHksV7/n3b5gIlpSw >> aYDN9BJuwTXaJu/O3oOyN7wS98tinHOSDHk2uBZgMn4N37ykm/GyUrzMvZA8lERVLepCexga >> RwnvQVtcNxrr3mj5xC+aj4zoyxpcFae1enKYGyp9I0wH4DimqUn2yhQ+aMCHodOSg3cDBI+X >> Dwf8shWAgx1oJfpilpkCQ4lfqYxBccIrwTFQYgfvv5fKklY+6CUFtxUwxXVZ7ZrzxIPudApi >> 0q8T8OJsRQAAAAAAAA== >> --------------ms050207030102090906040705-- >> > > -- debruijn@inf.unibz.it Jos de Bruijn, http://www.debruijn.net/ ---------------------------------------------- One man that has a mind and knows it can always beat ten men who haven't and don't. -- George Bernard Shaw
Received on Saturday, 1 March 2008 14:19:24 UTC