Basic Relfun commands ~~~~~~~~~~~~~~~~~~~~~ The basic Relfun commands you may need are as follows: Remember: The arrow keys can be used (e.g., to go up to an earlier input line). Copy = Highlight + Enter Paste = Right Mouse Button Example: rfi-p> az lensha([],0). rfi-p> az lensha([X|Z],N) :- lensha(Z,M), presuc(M,N). rfi-p> az presuc(0,1). rfi-p> az presuc(1,2). rfi-p> az presuc(2,3). Defines lensha, clause by clause, asserting each clause to the end ("az") of the current database. rfi-p> rx presuc(2,3). Removes one clause, exactly as specified after the "rx". rfi-p> tell lensha Writes contents of the current database to file "lensha.rfp", in the directory/folder from which Relfun is started. E.g.: lensha([],0). lensha([X|Z],N) :- lensha(Z,M), presuc(M,N). presuc(0,1). presuc(1,2). It is better to prepare/edit ".rfp" files outside the interpreter, e.g. in the directory/folder from which Relfun is started, and always read in clauses from there (or give a corresponding pathname). E.g.: lensha([],0). lensha([X|Z],N) :- lensha(Z,M), presuc(M,N). presuc(N,suc[N]). rfi-p> consult lensha Reads file "lensha.rfp", adding its clauses to the end of the database. (Beware of duplicate clauses!) rfi-p> replace lensha Reads file "lensha.rfp", replacing all existing clauses of the database. (So rfi-p> replace lensha is equivalent to rfi-p> destroy rfi-p> consult lensha ) rfi-p> l or rfi-p> listing Shows the current database. rfi-p> m or rfi-p> more Computes more (non-deterministic) solutions. rfi-p> trace lensha Changes the database such that lensha will be traced. rfi-p> untrace lensha Changes the database such that lensha will not be traced. rfi-p> untrace Changes the database such that no operation will be traced. rfi-p> spy Switches to spy mode to show left-to-right processing of conjunctions. rfi-p> nospy Switches to normal mode.