$Id: SwishScript.txt,v 1.8 2003/12/19 15:51:41 graham Exp $ -------------------------------------------------------------------------------- Swish script syntax summary. The syntax is based on Notation3, with extensions introduced by '@' keywords. graph is: { notation3 } name name :- { notation3 } name is: prefix:local # Define prefix used in script @prefix pref : . # Define a named RDF graph (formula) name :- graph # Define a named list name :- ( graph* ) # Read data, create new formula; use standard input if URI is omitted @read name [ ] # Write named formula; use standard output if URI is omitted @write name [ ] ; Comment # Merge named formulae into a new formula @merge ( name* ) => name # Compare named formulae; set pending exit status based on result @compare name name # Check graphs or lists of graphs are equal, or report error @asserteq name name ; Comment # Check 1st named graph is contained in named list, or report error @assertin name name ; Comment # Define a new graph closure rule (antcedents => consequents | modifiers) @rule name :- ( name* ) => name [ | ( (name ?var*)* ) ] # ??? consider using ScopedName for ruleset ??? # Define a new ruleset with named axioms (formulae) and rules @ruleset pref :- ( name* ) ; ( name* ) # Define a new ruleset based on built-in datatypes and class constraints @constraints pref :- ( name* ) | ( name* ) # Describe a proof to be checked # The first line names the proof and rulesets to be used @proof name ( name* ) @input ( name* ) @step name ( name* ) => name # rule-name, antecedents, consequent @result name # Forward chain ruleset rule from expressions; result is new formula # ruleset rule (antecedents) => result @fwdchain pref name ( name* ) => name # Backward chain ruleset rule from named goal # ruleset rule consequent <= (antecedent-alts) @bwdchain pref name name <= name -------------------------------------------------------------------------------- $Log: SwishScript.txt,v $ Revision 1.8 2003/12/19 15:51:41 graham Sync minor edits Revision 1.7 2003/12/10 03:48:58 graham SwishScript nearly complete: BwdChain and PrrofCheck to do. Revision 1.6 2003/12/08 23:55:36 graham Various enhancements to variable bindings and proof structure. New module BuiltInMap coded and tested. Script processor is yet to be completed. Revision 1.5 2003/12/05 02:31:32 graham Script parsing complete. Some Swish script functions run successfully. Command execution to be completed. Revision 1.4 2003/12/04 02:53:28 graham More changes to LookupMap functions. SwishScript logic part complete, type-checks OK. Revision 1.3 2003/12/01 18:51:38 graham Described syntax for Swish script. Created Swish scripting test data. Edited export/import lists in Swish main program modules. Revision 1.2 2003/11/28 19:59:33 graham Add read/write commands Revision 1.1 2003/11/28 19:34:06 graham SwishScript summary description created