This document describes the syntax accepted by this implementation of Plausible Logic. Whitespace and CommentsBefore or after any token can be any amount of whitespace. Comments are treated as whitespace. comment1 ::= "%" {anything-not-"\n"} ("\n" | end-of-file) comment2 ::= "/*" comment2' comment2' ::= "*/" | any-character comment2' Identifiersname1 ::= lower-case-letter {letter | digit | "_"} name2 ::= upper-case-letter {letter | digit | "_"} Literalsconstant ::= name1 variable ::= name2 argument ::= constant | variable argList ::= "(" argument {"," argument} ")" literal ::= ["~"] name1 [argList] Formulasformula ::= formula "->" consequent | consequent consequent ::= consequent "|" disjunct | disjunct disjunct ::= disjunct "&" conjunct | conjunct conjunct ::= literal | "(" formula ")" | "~" conjunct | "/\" formulaSet | "\/" formulaSet formulaSet ::= "{" "}" | "{" formula {"," formula} "}" Rulesrule ::= strictRule | plausibleRule | defeater strictRule ::= antecedent "->" formula plausibleRule ::= antecedent "=>" formula defeater ::= antecedent "-\" formula antecedent ::= formulaSet | consequent DescriptionsDescriptions are stored in text files with names that end in ".d". description ::= {dStatement "."} dStatement ::= fact | plausibleRule | defeater fact ::= formula Here is an example Plausible description that can be parsed:
TheoriesTheories should be automatically generated from descriptions. The user only needs to add priorities. Theories are stored in text files with names that end in ".t". A Theory statement usually ends in ".", but some (for research hacking purposes) need to bypass the usual consistency checks. These end with a "!". theory ::= {statement "." | statement "!"} statement ::= rule | label ":" rule | priority priority ::= label ">" label label ::= name2 Here is an example Plausible theory that can be parsed:
Tagged FormulasA query to this system is a tagged formula; a formula to be proved, tagged by the level of proof required. At present the formula must be grounded, that is contains no variables. taggedFormula ::= plusMinus proofSymbol formula plusMinus ::= "+" | "-" proofSymbol ::= "d" | "l" | "p" | "s" |