Dr.PeiWang@gmail.com | My favorites | Profile | Sign out
Project Home Downloads Wiki Issues Source
Search
for
InputOutputFormat  
The input/output format of the system
Phase-Design
Updated Feb 4, 2010 by NARS.W...@gmail.com

I/O Format

Each line in the system's input and output is either a task (as defined in the following grammar, in BNF notation), or an integer, indicating the number of inference steps between tasks.

In a task, all the space characters are optional, and will be ignored by the system in processing.

Narsese Grammer

                        GRAMMAR RULE                          BRIEF EXPLANATION
               <task> ::= [<budget>] <sentence>              // task to be processed
           <sentence> ::= <statement>"." [<tense>][<truth>]  // judgment to be remembered
                        | <statement>"?" [<tense>]           // question to be answered
                        | <statement>"!" [<truth>]           // goal to be realized
          <statement> ::= "<"<term> <relation> <term>">"     // two terms related to each other
                        | <term>                             // a term can name a statement
           <relation> ::= "-->"                              // inheritance
                        | "<->"                              // similarity
                        | "{--"                              // instance
                        | "--]"                              // property
                        | "{-]"                              // instance-property
                        | "==>"                              // implication
                        | "=/>"                              // predictive implication
                        | "=|>"                              // concurrent implication
                        | "=\>"                              // retrospective implication
                        | "<=>"                              // equivalence
                        | "</>"                              // predictive equivalence
                        | "<|>"                              // concurrent equivalence
               <term> ::= <word>                             // an atomic constant term
                        | <variable>                         // an atomic variable term
                        | <compound-term>                    // a term with internal structure
                        | <statement>                        // a statement can serve as a term
      <compound-term> ::= "{" <term> {","<term>} "}"         // extensional set
                        | "[" <term> {","<term>} "]"         // intensional set
                        | "(&," <term> {","<term>} ")"       // extensional intersection
                        | "(|," <term> {","<term>} ")"       // intensional intersection
                        | "(-," <term> "," <term> ")"        // extensional difference
                        | "(~," <term> "," <term> ")"        // intensional difference
                        | "(*," <term> {","<term>} ")"       // product
                        | "(/," <term> {","<term>} ")"       // extensional image
                        | "(\," <term> {","<term>} ")"       // intensional image
                        | "(--," <term> ")"                  // negation
                        | "(||," <term> {","<term>} ")"      // disjunction
                        | "(&&," <term> {","<term>} ")"      // conjunction
                        | "(&/," <term> {","<term>} ")"      // sequential events
                        | "(&|," <term> {","<term>} ")"      // parallel events
           <variable> ::= "#"<word>                          // independent variable
                        | "#"<word> "(" {"#"<word>} ")"      // dependent variable
                        | "#"                                // anonymous term as place holder
                        | "?"<word>                          // query variable for term to be find
              <tense> ::= ":/:"                              // future event
                        | ":|:"                              // present event
                        | ":\:"                              // past event
              <truth> ::= "%"<frequency>[";"<confidence>]"%" // two numbers in [0,1]x(0,1)
             <budget> ::= "$"<priority>[";"<durability>]"$"  // two numbers in [0,1]x(0,1)
               <word> : string in an alphabet
Hint: You can use Wiki Syntax.
Enter a comment:


Powered by Google Project Hosting