Refal-5 news.


Subject: Refal-5 news.
From: Andrei P. Nemytykh (nemytykh@math.botik.ru)
Date: Sat Oct 30 2004 - 12:25:30 MSD


Ladies and Gentlemen, may I take your attention, please ?

I would like to present a work of my Chinese student Gao Xi.

-------------------------------1--------------------------------------
He was a student of Wuhan University (Hubei, China),
he spent three months in Program Systems Institute RAS (Russia,
Pereslavl-Zalessky). Thanks to Program Systems Institute RAS
and Wuhan University for supporting his visit. Now Mr. Gao Xi is an
 assistant professor of Computer Science Department of Guilin
 University of Electronics Technology (China) and one of his subjects to
teach is Refal-5.

I am asking for including of Mr. Gao Xi in the Refal e-mail list.
His address is gaoxi@gliet.edu.cn .

Andrei P. Nemytykh
-------------------------------2 -----------------------------------------
A result of his work is a new Refal-5 compiler referred below as CREFAL.
CREFAL is written in Refal-5 and a binary module and documentation
of the compiler can be free downloaded.
The first detailed announcement of CREFAL is the following:

CREFAL: a Refal-5 compiler.
Copyright (C): RefalScope Project. 2004

  -- The start version of a new Refal-5 compiler named as crefal is free for
using.
     The compiler translates a Refal-5 module into a binary rsl-module
     that can be interpreted by the Refal-5 VERSION-PZ interpreter
     (see http://www.botik.ru/pub/local/scp/refal5/ ).

     THE VERSION OF THE Refal-5 VERSION-PZ interpreter
     MUST BE DATED FROM OCTOBER 28 2004.
     (see http://www.botik.ru/pub/local/scp/refal5/ for the version
      of the Refal-5 VERSION-PZ interpreter.)

     You are welcome to use the new Refal-5 compiler crefal.
     The binary module and documentation
     of the Refal-5 compiler crefal can be free downloaded
     from http://www.botik.ru/pub/local/scp/refal5/ .

  -- Some properties of the compiler crefal:

     --- Theorem:
         For any Refal-5 module program.ref let us consider the results of
         translation of the module by two Refal-compilers.
         Let program_refc.rsl be the result of translation of program.ref
         by the Refal-5 VERSION-PZ compiler
         named as refc (see http://www.botik.ru/pub/local/scp/refal5/ ).
         Let program_cref.rsl be the result of translation of program.ref
         by crefal. Consider the times of interpretation of the rsl-modules
         by the Refal-5 VERSION-PZ interpreter on the same Refal-data.
         Let us denote the corresponding times as
         time_refc(program_refc.rsl, data) and
         time_cref(program_cref.rsl, data).
         Then for any Refal-data the following inequality holds:

time_refc(program_refc.rsl, data) >= time_cref(program_cref.rsl, data).

    --- Note:
         In the sart version of the compiler the difference of the times is
         not meaningful for the most cases.

    --- Statement:
        There exist programs written in Refal-5 such that

        time_refc(program_refc.rsl, data) = O(n), while
        time_cref(program_cref.rsl, data) = O(1), where

        n is the size of the data.

    --- Caution:
        There exist programs written in Refal-5 such that arguments of
        function calls may be destroyed when the situation
        "Recognition impossible" holds for the calls.
        So the tracing may look strange in such a case.

  -- Installation:
        See INSTALL.TXT in the disributive.

  -- Using:

   Oper. System> crefal [options] input-file [rsl-output-file]

where
options ::= option*
option ::=
   /h, /help print an help message
   /l, /list, /listing
             create a listing of the compiler messages in file
'input-file.lis'
   /v, /version print version of the Refal-5 compiler

   A rsl-output-file.rsl will be a result of the running.
   For additional information see DOC/USE.TXT

   -- Asking for help:
      You are welcome to support further development of the compiler CREFAL.
      Contact information:
                          nemytykh@math.botik.ru,
                          gaoxi@gliet.edu.cn

-------------------------------2 -----------------------------------------
The version of the Refal-5 interpreter VERSION-PZ can be found on
 http://www.botik.ru/pub/local/scp/refal5/ .

*******************************************************
 REFAL-5 VERSION-PZ news:
*******************************************************
  -- A number of errors were corrected.
      Thanks to the peaple who informed us about the errors and gave tests
      on the errors.
      I am greateful to Anton A. Vladimirov for very useful suggestions
      on improving the Refal-5 interpreter.

  -- New switches to run the Refal-5 interpreter ( refgo ) is present:
            --- '-e' : upon internal error stop do not use interactive
                          mode.
                        The interactive mode asks the user
                        "Do you want to print view-field? [Yn]".
                        The switch turn the answer to the question
                        into [n] as default. The switch allows remove
                        interactive mode when "Recognition Impossible" takes
                        place.
            --- '-h' : print a help on start switches of the Refal-5
                          interpreter.

  -- New built-in functions were created:
     Random, RandomDigit, GetPID, GetPPID (this function just for
Linux/Unix),
     Write, ListOfBuiltin, SizeOf.

     <Random e.macro-digit> :: e.integer
      e.macro-digit ::= s.macro-digit | '+' s.macro-digit
      e.integer ::= s.macro-digit ...
      The function takes a macrodigit as an argument and
      returns a nonnegative random integer number. The number of macrodigits
      of the random number is lesser or equal than e.macro-digit.

     <RandomDigit e.macro-digit> :: s.macro-digit
      e.macro-digit ::= s.macro-digit | '+' s.macro-digit
      The function takes a macrodigit as an argument and returns a random
macrodigit.
      The the random macrodigit is lesser or equal than e.macro-digit.

     <GetPID> :: s.macro-digit ( by A.A. Vladimirov )
      The function returns the identity number corresponding to the process
      of the current Refal-5 interpreter running under an operating system.

     <GetPPID> :: s.macro-digit ( by A.A. Vladimirov )
      The function returns the identity number corresponding to the parent
      process of the current Refal-5 interpreter running under
      the operating system Linux (Unix). This function is undefined under
      the operating system Widows.
     (In fact, <GetPPID> == <GetPID> under Windows.)

     <Write s.file-descriptor e.expression> :: e.empty
      The function is similar to the Putout built-in function.
      There is just one difference between the functions:
      the Write function does not add a new line character after
      output of the expression, while the Putout function does that.

     <ListOfBuiltin> :: e.built-in-functions-info
      e.built-in-functions-info ::=
                           (s.fnumber s.built-in-function-name s.ftype) ...
      s.ftype ::= regular | special
      s.fnumber ::= s.macro-digit ,
      where s.fnumber is the system number of the built-in function.

     <SizeOf s.char> :: s.macro-digit
      Just a system built-in function.

  -- Input format of built-in function Open was extended:
     <Open s.Mode s.Descriptor e.File-name>
     Now the mode can be a character or a compound symbol as well.
     So a file may be open for any mode supported in C.
     For example, "wb" may be used for binary writing.

  -- A number of Refal-5 interpreter system limits were raised:
        RI_MEMORY_LIMIT (4 with 16),
        DEFAULT_STACK_SIZE (256 with 512),
        DEFAULT_TABLE_SIZE (512 with 1024),
        FILE_LIMIT (20 with 40).

  -- A new file "copyright.txt" was created.

*******************************************************
 A note on the old version of the supercompiler SCP4 given
 on the Refal-5 internet page:
*******************************************************
Two modules scp4.ref and inref4.ref have redefinition external functions.
The Refal-5 compiler REFC ignores such an error and redefines the functions
with their last definitions. The Refal-5 compiler CREFAL informs about
such errors and does not produce a rsl-module.
So to comile SCP4 by CREFAL you have replace
in scp4.ref:
line
$EXTRN Drive, Scp4, Mu-Comp1;
with line

$EXTRN Drive, Mu-Comp1;

in inref4.ref:
line
$EXTRN Xxin, OutDir, InpDir;
with line

$EXTRN OutDir, InpDir;
and
line
$EXTRN InrForm, NewFun, SaveExec;
with line

$EXTRN InrForm, SaveExec;
**************************** The End*********************

Andrei P. Nemytykh



This archive was generated by hypermail 2b25 : Fri Oct 29 2004 - 23:28:30 MSD