<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://pdkb.chivanet.org/wiki/index.php?action=history&amp;feed=atom&amp;title=MELD_features%2FAppendix_C%2F0</id>
		<title>MELD features/Appendix C/0 - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://pdkb.chivanet.org/wiki/index.php?action=history&amp;feed=atom&amp;title=MELD_features%2FAppendix_C%2F0"/>
		<link rel="alternate" type="text/html" href="https://pdkb.chivanet.org/wiki/index.php?title=MELD_features/Appendix_C/0&amp;action=history"/>
		<updated>2026-05-14T10:49:28Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.29.1</generator>

	<entry>
		<id>https://pdkb.chivanet.org/wiki/index.php?title=MELD_features/Appendix_C/0&amp;diff=990&amp;oldid=prev</id>
		<title>DavidWhitten: Created page with &quot;&lt;noinclude&gt; MELD features &lt;/noinclude&gt; = Appendix C: BNF Grammar for MELD =  This BNF can be used to check for syntactic well-formedness of a MELD formula, and -- coupled...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pdkb.chivanet.org/wiki/index.php?title=MELD_features/Appendix_C/0&amp;diff=990&amp;oldid=prev"/>
				<updated>2019-09-30T18:27:36Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;noinclude&amp;gt; &lt;a href=&quot;/wiki/index.php/MELD_features&quot; title=&quot;MELD features&quot;&gt;MELD features&lt;/a&gt; &amp;lt;/noinclude&amp;gt; = Appendix C: BNF Grammar for MELD =  This BNF can be used to check for syntactic well-formedness of a MELD formula, and -- coupled...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;noinclude&amp;gt; [[MELD features]] &amp;lt;/noinclude&amp;gt;&lt;br /&gt;
= Appendix C: BNF Grammar for MELD =&lt;br /&gt;
&lt;br /&gt;
This BNF can be used to check for syntactic well-formedness of a MELD formula, and -- coupled with the 650 formulas above in Appendix A, -- to check a MELD formula for semantic well-formedness as well.&lt;br /&gt;
&lt;br /&gt;
Assume the following Terminals (token-level non-terminals)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;Character&amp;gt;&lt;br /&gt;
 &amp;lt;String&amp;gt;&lt;br /&gt;
 &amp;lt;Number&amp;gt;&lt;br /&gt;
 &amp;lt;Symbol&amp;gt;&lt;br /&gt;
 &amp;lt;Variable&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Assume the following MELD data object:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Constant&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The empty expansion is:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;epsilon&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 ;; Syntactic Constraints&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Formula&amp;gt; ::=           #$True&lt;br /&gt;
        |               #$False&lt;br /&gt;
        |               &amp;lt;Variable&amp;gt;&lt;br /&gt;
        |               &amp;lt;Literal&amp;gt;&lt;br /&gt;
        |               &amp;lt;NotForm&amp;gt;&lt;br /&gt;
        |               &amp;lt;AndForm&amp;gt;&lt;br /&gt;
        |               &amp;lt;OrForm&amp;gt;&lt;br /&gt;
        |               &amp;lt;XorForm&amp;gt;&lt;br /&gt;
        |               &amp;lt;ImpForm&amp;gt;&lt;br /&gt;
        |               &amp;lt;EquivForm&amp;gt;&lt;br /&gt;
        |               &amp;lt;UnivForm&amp;gt;&lt;br /&gt;
        |               &amp;lt;ExistForm&amp;gt;&lt;br /&gt;
        |               &amp;lt;ExistExactForm&amp;gt;   &lt;br /&gt;
        |               &amp;lt;ExistUBoundForm&amp;gt;  &lt;br /&gt;
        |               &amp;lt;ExistLBoundForm&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Formula-Seq&amp;gt; ::=       &amp;lt;Formula&amp;gt; &amp;lt;Formula-Seq&amp;gt;&lt;br /&gt;
        |               . &amp;lt;Variable&amp;gt;&lt;br /&gt;
        |               &amp;lt;epsilon&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;NotForm&amp;gt; ::=           ( #$not &amp;lt;Formula&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;AndForm&amp;gt; ::=           ( #$and &amp;lt;Formula-Seq&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;OrForm&amp;gt; ::=            ( #$or &amp;lt;Formula-Seq&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;XorForm&amp;gt; ::=           ( #$xor &amp;lt;Formula&amp;gt; &amp;lt;Formula&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;ImpForm&amp;gt; ::=           ( #$implies &amp;lt;Formula&amp;gt; &amp;lt;Formula&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;EquivForm&amp;gt; ::=         ( #$equivalent &amp;lt;Formula&amp;gt; &amp;lt;Formula&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;UnivForm&amp;gt; ::=          ( #$forAll &amp;lt;Variable&amp;gt; &amp;lt;Formula&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;ExistForm&amp;gt; ::=         ( #$thereExists &amp;lt;Variable&amp;gt; &amp;lt;Formula&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;ExistExactForm&amp;gt; ::=    ( #$thereExistExactly &amp;lt;1stOrderTerm&amp;gt; &amp;lt;Variable&amp;gt; &amp;lt;Formula&amp;gt; ) &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;ExistUBoundForm&amp;gt; ::=   ( #$thereExistAtMost  &amp;lt;1stOrderTerm&amp;gt; &amp;lt;Variable&amp;gt;  &amp;lt;Formula&amp;gt; ) &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;ExistLBoundForm&amp;gt; ::=   ( #$thereExistAtLeast &amp;lt;1stOrderTerm&amp;gt; &amp;lt;Variable&amp;gt;  &amp;lt;Formula&amp;gt; ) &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Literal&amp;gt; ::=           &amp;lt;AtomicFormula&amp;gt;&lt;br /&gt;
        |               ( #$not &amp;lt;AtomicFormula&amp;gt; )&lt;br /&gt;
        &lt;br /&gt;
 &amp;lt;AtomicFormula&amp;gt; ::=     ( &amp;lt;Predicate&amp;gt; &amp;lt;Argument-Seq&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Argument-Seq&amp;gt; ::=      &amp;lt;2ndOrderTerm&amp;gt; &amp;lt;Argument-Seq&amp;gt;&lt;br /&gt;
        |               . &amp;lt;Variable&amp;gt;&lt;br /&gt;
        |               &amp;lt;epsilon&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Predicate&amp;gt; ::=         &amp;lt;Rep1stOrderTerm&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;FunctionExp&amp;gt; ::=       ( &amp;lt;Function&amp;gt; &amp;lt;Argument-Seq&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Function&amp;gt; ::=          &amp;lt;Rep1stOrderTerm&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;2ndOrderTerm&amp;gt; ::=      &amp;lt;1stOrderTerm&amp;gt;&lt;br /&gt;
        |               &amp;lt;Formula&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;1stOrderTerm&amp;gt; ::=      &amp;lt;Rep1stOrderTerm&amp;gt;&lt;br /&gt;
        |               &amp;lt;PrimitiveTerm&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Rep1stOrderTerm&amp;gt; ::=   &amp;lt;Constant&amp;gt;&lt;br /&gt;
        |               &amp;lt;FunctionExp&amp;gt;&lt;br /&gt;
        |               &amp;lt;Variable&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;PrimitiveTerm&amp;gt; ::=     &amp;lt;Character&amp;gt;&lt;br /&gt;
        |               &amp;lt;String&amp;gt;&lt;br /&gt;
        |               &amp;lt;Number&amp;gt;&lt;br /&gt;
        |               &amp;lt;Symbol&amp;gt;&lt;br /&gt;
        |               &amp;lt;Variable&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 ;; Semantic Constraints&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;ExistExactForm&amp;gt; :                 &lt;br /&gt;
&lt;br /&gt;
 1st arg must denote a positive integer &lt;br /&gt;
                                       &lt;br /&gt;
For &amp;lt;ExistUBoundForm&amp;gt; :                 &lt;br /&gt;
&lt;br /&gt;
 1st arg must denote a positive integer &lt;br /&gt;
                                       &lt;br /&gt;
&lt;br /&gt;
For &amp;lt;ExistLBoundForm&amp;gt; :                &lt;br /&gt;
&lt;br /&gt;
 1st arg must denote a positive integer &lt;br /&gt;
&lt;br /&gt;
For &amp;lt;Function&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
 when &amp;lt;Function&amp;gt; is ground &lt;br /&gt;
  (#$isa &amp;lt;Function&amp;gt; #$NonPredicateFunction) must be true&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;Predicate&amp;gt; :&lt;br /&gt;
 when &amp;lt;Predicate&amp;gt; is ground&lt;br /&gt;
 (#$isa &amp;lt;Predicate&amp;gt; #$Predicate) must be true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Relation Arity Constraints:&lt;br /&gt;
 &lt;br /&gt;
 For &amp;lt;FunctionExp&amp;gt; :&lt;br /&gt;
 when &amp;lt;Function&amp;gt; is ground&lt;br /&gt;
 either &lt;br /&gt;
   (#$isa &amp;lt;Function&amp;gt; #$VariableArityRelation)&lt;br /&gt;
 or &lt;br /&gt;
   (#$arity &amp;lt;Function&amp;gt; &amp;lt;N&amp;gt;)&lt;br /&gt;
   and&lt;br /&gt;
   &amp;lt;N&amp;gt; is a non-negative integer&lt;br /&gt;
   and&lt;br /&gt;
   if &amp;lt;Argument-Seq&amp;gt; is terminated by . &amp;lt;Variable&amp;gt; &lt;br /&gt;
      the number of &amp;lt;2ndOrderTerm&amp;gt;s in &amp;lt;Argument-Seq&amp;gt;&lt;br /&gt;
      must be less than or equal to &amp;lt;N&amp;gt;&lt;br /&gt;
   else the number of &amp;lt;2ndOrderTerm&amp;gt;s in &amp;lt;Argument-Seq&amp;gt; &lt;br /&gt;
        must be equal to &amp;lt;N&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 For &amp;lt;AtomicFormula&amp;gt; :&lt;br /&gt;
 &lt;br /&gt;
 when &amp;lt;Predicate&amp;gt; is ground&lt;br /&gt;
 either&lt;br /&gt;
   (#$isa &amp;lt;Predicate&amp;gt; #$VariableArityRelation)&lt;br /&gt;
 &lt;br /&gt;
 or &lt;br /&gt;
   (#$arity &amp;lt;Predicate&amp;gt; &amp;lt;N&amp;gt;)&lt;br /&gt;
   and&lt;br /&gt;
   &amp;lt;N&amp;gt; is a non-negative integer&lt;br /&gt;
   and&lt;br /&gt;
   if &amp;lt;Argument-Seq&amp;gt; is terminated by . &amp;lt;Variable&amp;gt; &lt;br /&gt;
      the number of &amp;lt;2ndOrderTerm&amp;gt;s in &amp;lt;Argument-Seq&amp;gt;&lt;br /&gt;
      must be less than or equal to &amp;lt;N&amp;gt;&lt;br /&gt;
   else the number of &amp;lt;2ndOrderTerm&amp;gt;s in &amp;lt;Argument-Seq&amp;gt; &lt;br /&gt;
      must be equal to &amp;lt;N&amp;gt;                &lt;br /&gt;
&lt;br /&gt;
Relation Argument Constraints:&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;FunctionExp&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
each term in &amp;lt;Argument-Seq&amp;gt; must satisfy all applicable arg constraints&lt;br /&gt;
(e.g., #$arg1Isa, #$interArgIsa2-1, ...)&lt;br /&gt;
&lt;br /&gt;
or &amp;lt;AtomicFormula&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
each term in &amp;lt;Argument-Seq&amp;gt; must satisfy all applicable arg constraints&lt;br /&gt;
(e.g., #$arg1Isa, #$interArgIsa2-1, ...)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>DavidWhitten</name></author>	</entry>

	</feed>