home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Multimed / Multimed.zip / fest-141.zip / festival / lib / siod.scm < prev    next >
Lisp/Scheme  |  1999-12-23  |  18KB  |  633 lines

  1.  
  2.  
  3.  
  4.  
  5.  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  6.  ;;; DO NOT EDIT THIS FILE ON PAIN OF MORE PAIN.
  7.  ;;; 
  8.  ;;; The master copy of this file is in ../../speech_tools/lib/siod/siod.scm
  9.  ;;; and is copied here at build time.
  10.  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23. ;; SIOD: Scheme In One Defun                                  -*-mode: view-*-
  24. ;;
  25. ;; *                        COPYRIGHT (c) 1989-1992 BY                       *
  26. ;; *        PARADIGM ASSOCIATES INCORPORATED, CAMBRIDGE, MASSACHUSETTS.      *
  27. ;; *        See the source file SLIB.C for more information.                 *
  28. ;;
  29. ;; A fair amount of modifications and tidy up was done by AWB, particularly
  30. ;;   * adding documentation strings to all functions/variable
  31. ;;   * removing some example functions not relevant to Festival (or siod)
  32. ;;   * addition of new functions (require provide etc)
  33.  
  34. ;(puts  ";; Optional Runtime Library for Release 2.8
  35. ;")
  36.  
  37. (define list 
  38.   (lambda n 
  39. "(list A0 A1 ...)
  40. Return list containing A0 A1 ..."
  41.   n))
  42.  
  43. (define (caar x) 
  44. "(caar X)
  45. Return the (car (car X))."
  46.   (car (car x)))
  47. (define (cadr x) 
  48. "(cadr X)
  49. Return the (car (cdr X))."
  50.   (car (cdr x)))
  51. (define (cdar x)
  52. "(cdar X)
  53. Return the (cdr (car X))."
  54.  (cdr (car x)))
  55. (define (cddr x) 
  56. "(cddr X)
  57. Return the (cdr (cdr X))."
  58.  (cdr (cdr x)))
  59.  
  60. (define (caddr x) 
  61. "(caddr X)
  62. Return the (car (cdr (cdr X)))."
  63.   (car (cdr (cdr x))))
  64. (define (cdddr x) 
  65. "(cdddr X)
  66. Return the (cdr (cdr (cdr X)))."
  67.   (cdr (cdr (cdr x))))
  68.  
  69. (define consp pair?)
  70.  
  71. (define (replace before after)
  72. "(replace BEFORE AFTER)
  73. Destructively replace contents of cons cell BEFORE with those of
  74. AFTER."
  75.   (set-car! before (car after))
  76.   (set-cdr! before (cdr after))
  77.   after)
  78.  
  79. (define (prognify forms)
  80.   (if (null? (cdr forms))
  81.       (car forms)
  82.     (cons 'begin forms)))
  83.  
  84. (define (defmac-macro form)
  85. "(defmac-macro MACRONAME FORM)
  86. Define a macro.  Macro expand FORM in-line."
  87.   (let ((sname (car (cadr form)))
  88.     (argl (cdr (cadr form)))
  89.     (fname nil)
  90.     (body (prognify (cddr form))))
  91.     (set! fname (symbolconc sname '-macro))
  92.     (list 'begin
  93.       (list 'define (cons fname argl)
  94.         (list 'replace (car argl) body))
  95.       (list 'define sname (list 'quote fname)))))
  96.  
  97. (define defmac 'defmac-macro)
  98.  
  99. (defmac (push form)
  100.   (list 'set! (caddr form)
  101.     (list 'cons (cadr form) (caddr form))))
  102.  
  103. (defmac (pop form)
  104.   (list 'let (list (list 'tmp (cadr form)))
  105.     (list 'set! (cadr form) '(cdr tmp))
  106.     '(car tmp)))
  107.  
  108. ;;;  Have to set var-docstrings to nil first as defvar requires it to be set
  109. (set! var-docstrings nil)
  110. (define (add-doc-var varname docstring)
  111. "(add-doc-var VARNAME DOCSTRING)
  112.   Add document string DOCSTRING to VARNAME.  If DOCSTRING is nil
  113.   this has no effect.  If VARNAME already has a document string replace
  114.   it with DOCSTRING."
  115.  (if (null? docstring)
  116.      t
  117.      (let ((lpair (assq varname var-docstrings)))
  118.        (if lpair
  119.        (set-cdr! lpair docstring)
  120.        (set! var-docstrings (cons (cons varname docstring) 
  121.                       var-docstrings))))))
  122.  
  123. (set! boundp symbol-bound?)
  124.  
  125. (defmac (defvar form)
  126.   (begin  ;; always add the documentation string
  127.     (add-doc-var (cadr form) (car (cdddr form)))
  128.     (list 'or
  129.     (list 'symbol-bound? (list 'quote (cadr form)))
  130.     (list 'define (cadr form) (caddr form)))))
  131.  
  132. (defvar var-docstrings nil
  133.   "var-docstrings
  134.   An assoc-list of variable names and their documentation strings.")
  135.  
  136. (defmac (defun form)
  137.   (cons 'define
  138.     (cons (cons (cadr form) (caddr form))
  139.           (cdddr form))))
  140.  
  141. (defmac (setq form)
  142.   (let ((l (cdr form))
  143.     (result nil))
  144.     (define (loop)
  145.       (if l
  146.       (begin (push (list 'set! (car l) (cadr l)) result)
  147.          (set! l (cddr l))
  148.          (loop))))
  149.     (loop)
  150.     (prognify (reverse result))))
  151.   
  152. (define progn begin)
  153.  
  154. (defun atom (x)
  155. "(atom X)
  156. True if X is not a cons cells, nil otherwise."
  157.   (not (consp x)))
  158.  
  159. (define eq eq?)
  160.  
  161. (defmac (cond form)
  162.   (cond-convert (cdr form)))
  163.  
  164. (define null null?)
  165.  
  166. (defun cond-convert (l)
  167.   (if (null l)
  168.       ()
  169.     (if (null (cdar l))
  170.     (if (null (cdr l))
  171.         (caar l)
  172.       (let ((rest (cond-convert (cdr l))))
  173.         (if (and (consp rest) (eq (car rest) 'or))
  174.         (cons 'or (cons (caar l) (cdr rest)))
  175.           (list 'or (caar l) rest))))
  176.       (if (or (eq (caar l) 't)
  177.           (and (consp (caar l)) (eq (car (caar l)) 'quote)))
  178.       (prognify (cdar l))
  179.     (list 'if
  180.           (caar l)
  181.           (prognify (cdar l))
  182.           (cond-convert (cdr l)))))))
  183.  
  184. (defmac (+internal-comma form)
  185.   (error 'comma-not-inside-backquote))
  186.  
  187. (define +internal-comma-atsign +internal-comma)
  188. (define +internal-comma-dot +internal-comma)
  189.  
  190. (defmac (+internal-backquote form)
  191.   (backquotify (cdr form)))
  192.  
  193. (defun backquotify (x)
  194. "(backquote FORM)
  195. Backquote function for expanding forms in macros."
  196.   (let (a d aa ad dqp)
  197.     (cond ((atom x) (list 'quote x))
  198.       ((eq (car x) '+internal-comma) (cdr x))
  199.       ((or (atom (car x))
  200.            (not (or (eq (caar x) '+internal-comma-atsign)
  201.             (eq (caar x) '+internal-comma-dot))))
  202.        (setq a (backquotify (car x)) d (backquotify (cdr x))
  203.          ad (atom d) aa (atom a)
  204.          dqp (and (not ad) (eq (car d) 'quote)))
  205.        (cond ((and dqp (not (atom a)) (eq (car a) 'quote))
  206.           (list 'quote (cons (cadr a) (cadr d))))
  207.          ((and dqp (null (cadr d)))
  208.           (list 'list a))
  209.          ((and (not ad) (eq (car d) 'list))
  210.           (cons 'list (cons a (cdr d))))
  211.          (t (list 'cons a d))))
  212.       ((eq (caar x) '+internal-comma-atsign)
  213.        (list 'append (cdar x) (backquotify (cdr x))))
  214.       ((eq (caar x) '+internal-comma-dot)
  215.        (list 'nconc (cdar x)(backquotify (cdr x)))))))
  216.  
  217.  
  218. (defun append n
  219. "(append L0 L1 ...)
  220. Append each list to the first list in turn."
  221.   (appendl n))
  222.  
  223. (defun appendl (l)
  224.   (cond ((null l) nil)
  225.     ((null (cdr l)) (car l))
  226.     ((null (cddr l))
  227.      (append2 (car l) (cadr l)))
  228.     ('else
  229.      (append2 (car l) (appendl (cdr l))))))
  230.  
  231. (defun append2 (a b)
  232.   (if (null a)
  233.       b
  234.     (cons (car a) (append2 (cdr a) b))))
  235.  
  236. (defun rplacd (a b)
  237. "(replacd A B)
  238. Destructively replace the cdr of A with B."
  239.   (set-cdr! a b)
  240.   a)
  241.  
  242. (defun nconc (a b)
  243. "(nconc A B)
  244. Destructively append B to A, if A is nil return B."
  245.   (if (null a)
  246.       b
  247.     (rplacd (last a) b)))
  248.  
  249. (defun last (a)
  250. "(last A)
  251. Last (cdr) element in list A."
  252.   (cond ((null a) (error'null-arg-to-last))
  253.     ((null (cdr a)) a)
  254.     ((last (cdr a)))))
  255.  
  256. (define (remove i l)
  257. "(remove ITEM LIST)
  258. (Non-destructively) remove ITEM from LIST."
  259.   (cond    
  260.    ((null l) nil)
  261.    ((eq? i (car l))
  262.     (cdr l))
  263.    (t
  264.     (cons (car l) (remove i (cdr l))))))
  265.  
  266. (define (remove-duplicates l)
  267. "(remove-duplicates LIST)
  268. Remove duplicate items in LIST."
  269.  (cond
  270.   ((null l) l)
  271.   ((member_string (car l) (cdr l))
  272.    (remove-duplicates (cdr l)))
  273.   (t
  274.    (cons (car l) (remove-duplicates (cdr l))))))
  275.  
  276. (define (nth n l)
  277.   "(nth N LIST)
  278. Returns nth car of LIST, 0 is car."
  279.   (if (< n 1)
  280.       (car l)
  281.       (nth (- n 1) (cdr l))))
  282.  
  283. (define (position thing l)
  284.   "(position thing l)
  285. What position is thing in l, -1 if it doesn't exist."
  286.   (let ((p 0) (m l))
  287.     (while (and m (not (equal? thing (car m))))
  288.       (set! p (+ 1 p))
  289.       (set! m (cdr m)))
  290.     (if m p nil)))
  291.  
  292. (define (nth_cdr n l)
  293.   "(nth_cdr N LIST)
  294. Returns nth cdr of LIST, 0 is LIST."
  295.   (if (< n 1)
  296.       l
  297.       (nth_cdr (- n 1) (cdr l))))
  298.  
  299. (define (<= a b)
  300. "(<= NUM1 NUM2)
  301.   Returns t if NUM1 is less than or equal to NUM2, nil otherwise.  An error is
  302.   given is either argument is not a number."
  303.   (or (< a b)
  304.       (equal? a b)))
  305.  
  306. (define (>= a b)
  307. "(>= NUM1 NUM2)
  308.   Returns t if NUM1 is greater than or equal to NUM2, nil otherwise.  
  309.   An error is given is either argument is not a number."
  310.   (or (> a b)
  311.       (equal? a b)))
  312.  
  313. (define (approx-equal? a b diff)
  314.   "(approx-equal? a b diff)
  315. True is the difference between a b is less than diff.  This allows equality
  316. between floats which may have been written out and read in and hence have
  317. slightly different precision."
  318.   (< (if (> a b) (- a b) (- b a)) diff))
  319.  
  320. (define (assoc_string key alist)
  321.   "(assoc_string key alist)
  322. Look up key in alist using string-equal.  This allow indexing by
  323. string rather than just symbols."
  324.   (cond
  325.    ((null alist) nil)
  326.    ((string-equal key (car (car alist))) (car alist))
  327.    (t (assoc_string key (cdr alist))))
  328. )
  329.  
  330. (defvar *fasdump-hash* t)
  331.  
  332. (defun fasl-open (filename mode)
  333. "(fasl-open FILENAME MODE)
  334. Open fasl FILENAME as MODE. Returns a fasl-table."
  335.   (list (fopen filename mode)
  336.     (if (or (equal? mode "rb") *fasdump-hash*)
  337.         (cons-array 100))
  338.     ;; If this is set NIL, then already hashed symbols will be
  339.     ;; optimized, and additional ones will not.
  340.     0))
  341.  
  342. (defun fasl-close (table)
  343. "(fasl-close TABLE)
  344. Close fasl table."
  345.   (fclose (car table)))
  346.  
  347. (defun fasload args
  348. "(fasload FILENAME ARGS)
  349. Fast load FILENAME."
  350.   (let ((filename (car args))
  351.     (head (and (cadr args) (cons nil nil))))
  352.     (let ((table (fasl-open filename "rb"))
  353.       (exp)
  354.       (tail head))
  355.       (while (not (eq table (setq exp (fast-read table))))
  356.     (cond (head
  357.            (setq exp (cons exp nil))
  358.            (set-cdr! tail exp)
  359.            (setq tail exp))
  360.           ('else
  361.            (eval exp))))
  362.       (fasl-close table)
  363.       (and head (cdr head)))))
  364.  
  365. (defun fasdump (filename forms)
  366. "(fasdump FILENAME FORMS)
  367. Fast dump FORMS into FILENAME."
  368.   (let ((table (fasl-open filename "wb"))
  369.     (l forms))
  370.     (while l
  371.       (fast-print (car l) table)
  372.       (set! l (cdr l)))
  373.     (fasl-close table)))
  374.  
  375. (defun compile-file (filename)
  376. "(compile-file FILENAME)
  377. Compile lisp forms in FILENAME.scm to FILENAME.bin."
  378.   (let ((forms (load (string-append filename ".scm") t)))
  379.     (puts "Saving forms
  380. ")
  381.     (fasdump (string-append filename ".bin")
  382.          forms)))
  383.  
  384. (defvar *properties* (cons-array 100)
  385.   "*properties*
  386. Array for holding symbol property lists.")
  387.  
  388. (defun get (sym key)
  389. "(get SYM KEY)
  390. Get property named KEY for SYM."
  391.   (cdr (assq key (href *properties* sym))))
  392.  
  393. (defun putprop (sym val key)
  394. "(putprop SYM VAL KEY)
  395. Put property VAL named KEY for SYM."
  396.   (let ((alist (href *properties* sym)))
  397.     (let ((cell (assq key alist)))
  398.       (cond (cell
  399.          (set-cdr! cell val))
  400.         ('else
  401.          (hset *properties* sym (cons (cons key val) alist))
  402.          val)))))
  403.  
  404. ;;(define (mapcar1 f l1)
  405. ;;  (and l1 (cons (f (car l1)) (mapcar1 f (cdr l1)))))
  406.  
  407. ;; An iterative version of the above
  408. (define (mapcar1 f l1)
  409.   (let ((l2 l1) (r nil))
  410.     (while l2
  411.       (set! r (cons (f (car l2)) r))
  412.       (set! l2 (cdr l2)))
  413.     (reverse r)))
  414.  
  415. ;;(define (mapcar2 f l1 l2)
  416. ;;  (and l1 l2 (cons (f (car l1) (car l2)) (mapcar2 f (cdr l1) (cdr l2)))))
  417.  
  418. ;; An iterative version
  419. (define (mapcar2 f l1 l2)
  420.   (let ((a1 l1) (a2 l2) (r nil))
  421.     (while a1
  422.       (set! r (cons (f (car a1) (car a2)) r))
  423.       (set! a1 (cdr a1))
  424.       (set! a2 (cdr a2)))
  425.     (reverse r)))
  426.  
  427. (define (mapcar . args)
  428. "(mapcar FUNCTION ARGS [ARGS2])
  429. Apply FUNCTION to each member of ARGS (and [ARGS2]), returning list of
  430. return values."
  431.   (cond ((null args)
  432.      (error "too few arguments"))
  433.     ((null (cdr args))
  434.      (error "too few arguments"))
  435.     ((null (cdr (cdr args)))
  436.      (mapcar1 (car args) (car (cdr args))))
  437.     ((null (cdr (cdr (cdr args))))
  438.      (mapcar2 (car args) (car (cdr args)) (car (cdr (cdr args)))))
  439.     ('else
  440.      (error "two many arguments"))))
  441.  
  442. ;; will be set automatically on start-up
  443. (defvar libdir '<automatically_set>
  444.   "libdir
  445.   The pathname of the run-time libary directory.  Note reseting is 
  446.   almost definitely not what you want to do.   This value is automatically
  447.   set at start up from the value specifed at compile-time or the value
  448.   specifed with --libdir on the command line.  A number of other variables
  449.   depend on this value.")
  450.  
  451. (defvar load-path (list libdir)
  452.   "load-path
  453.   A list of directories containing .scm files.  Used for various functions
  454.   such as load_library and require.  Follows the same use as EMACS.  By
  455.   default it is set up to the compile-time library directory but may be 
  456.   changed by the user at run time, by adding a user's own library directory
  457.   or even replacing all of the standard library. [see Site initialization]")
  458.  
  459. ;; will be set automatically on start-up
  460. (defvar *ostype* 'unknown
  461.   "*ostype*
  462.   Contains the name of the operating system type that Festival is running
  463.   on, e.g. SunOS5, FreeBSD, linux etc.  The value is taken from the Makefile
  464.   variable OSTYPE at compile time.")
  465.  
  466. (defvar etc-path (path-append libdir "etc/" *ostype*)
  467.   "etc-path
  468.   A list of directories where binaries specific to Festival may be located.
  469.   This variable is automatically set to LIBDIR/etc/OSTYPE/
  470.   and that path is added to the end of the UNIX PATH environment variable.")
  471.  
  472. (define (library_expand_filename fname)
  473. "(library_expand_filename FILENAME)
  474.   Search for filename by appending FILENAME to each member of load-path.
  475.   Full expanded pathname is returned.  If not found in load-path FILENAME
  476.   is returned."
  477.   (let ((p load-path)
  478.     (found nil))
  479.     (while (and p (null? found))
  480.       (let ((pot-file (path-append (car p) fname)))
  481.     (if (probe_file pot-file)
  482.         (setq found pot-file))
  483.     (setq p (cdr p))))
  484.     (if (null? found)
  485.     fname
  486.       found)))
  487.  
  488. (define (load_library fname)
  489. "(load_library FILENAME)
  490.   Load file from library, appends FILENAME to each path in load-path
  491.   until a valid file is found. If none found loads name itself"
  492.   (load (library_expand_filename fname)))
  493.  
  494. (define (fasload_library fname)
  495. "(fasload_library FILENAME)
  496.   Load binary file from library"
  497.   (fasload (library_expand_filename fname)))
  498.  
  499. (define (member item list)
  500. "(member ITEM LIST)
  501.   Returns subset of LIST whose car is ITEM if it exists, nil otherwise."
  502.   (if (consp list)
  503.       (if (equal? item (car list))
  504.       t
  505.     (member item (cdr list)))
  506.     nil))
  507.  
  508. (define (member_string item list)
  509. "(member_string STRING LIST)
  510.   Returns subset of LIST whose car is STRING if it exists, nil otherwise."
  511.   (if (consp list)
  512.       (if (string-equal item (car list))
  513.       t
  514.     (member_string item (cdr list)))
  515.     nil))
  516.  
  517. (defvar provided nil
  518.   "provided
  519.   List of file names (omitting .scm) that have been provided.  This list
  520.   is checked by the require function to find out if a file needs to be 
  521.   loaded.  If that file is already in this list it is not loaded.  Typically
  522.   a file will have (provide 'MYNAME) at its end so that a call to 
  523.   (require 'MYNAME) will only load MYNAME.scm once.")
  524.  
  525. (define (require fname)
  526. "(require FILENAME)
  527.   Checks if FNAME is already provided (member of variable provided) if not 
  528.   loads it, appending \".scm\" to FILENAME.  Uses load_library to find 
  529.   the file."
  530.  (let ((bname (intern (basename fname))))
  531.   (if (null? (member bname provided))
  532.       (progn 
  533.         ;;; Compiled files aren't faster, so we don't do this
  534.     ; (fasload_library (string-append fname ".bin"))
  535.        (load_library (string-append fname ".scm"))
  536.     't)
  537.     nil)))
  538.  
  539. (define (request fname)
  540. "(request FILENAME)
  541.   Checks if FNAME is already provided (member of variable provided) if not 
  542.   tries to loads it, appending \".scm\" to FILENAME.  Uses load_library 
  543.   to find the file. Unlike require, fname isn't found no error occurs"
  544.  (unwind-protect (require fname)))
  545.  
  546. (define (provide fname)
  547. "(provide FILENAME)
  548.   Adds FNAME to the variable provided (if not already there).  This means
  549.   that future calls to (require FILENAME) will not cause FILENAME to
  550.   be re-loaded."
  551.   (if (null? (member fname provided))
  552.       (set! provided (cons fname provided))))
  553.  
  554. (define (apply_hooks hooks obj)
  555. "(apply_hooks HOOK OBJ)
  556.   Apply HOOK(s) to OBJ.  HOOK is a function or list of functions that
  557.   take one argument."
  558. (cond
  559.  ((null? hooks) obj)
  560.  ((consp hooks) 
  561.   (apply_hooks (cdr hooks) ((car hooks) obj)))
  562.  (t (hooks obj))))
  563.  
  564. (define (apply func args)
  565. "(apply FUNC ARGS)
  566. Call FUNC with ARGS as arguments."
  567.   (eval
  568.    (cons func
  569.      (mapcar (lambda (a) (list 'quote a)) args))))
  570.  
  571. (defmac (autoload form)
  572. "(autoload FUNCTION FILENAME DOCSTRING)
  573. Define FUNCTION that when called automatically loads FILENAME
  574. and calls FUNCTION (assumed to be defined in FILENAME)."
  575.   (list 'define
  576.     (cadr form)
  577.     (list 
  578.      'lambda
  579.      'n
  580.      (list 'let (list (list 'me  (cadr form)))
  581.            (list 'require (car (cdr (cdr form))))
  582.            (list 'if (list 'eq 'me (cadr form))
  583.              (list 'error
  584.                (list 'string-append 
  585.                  "autoload: \""
  586.                  (car (cdr (cdr form)))
  587.                  ".scm\" does not define "
  588.                  (list 'quote (cadr form)))))
  589.           
  590.            (list 'apply (cadr form) 'n)))))
  591.  
  592. (define (:backtrace frame)
  593. "(:backtrace [FRAME])
  594. This function called *immediately* after an error will display a backtrace
  595. of the functions evaluated before the error.  With no arguments it
  596. lists all stack frames, with the (possibly shortened) forms that were
  597. evaluated at that level.  With a numeric argument it displays
  598. the form at that level in full.  This function only works at
  599. top level in the read-eval-print loop (command interpreter).  Note
  600. that any valid command will leave the backtrace stack empty. Also
  601. note that backtrace itself does not reset the backtrace, unless you
  602. make an error in calling it."
  603.  
  604. "The function is interpreted specially by the read-eval-interpreter
  605. and hence has no body, its actual body is defined in 
  606. src/arch/siod-3.0/slib.cc."
  607. )
  608.  
  609. (defvar hush_startup nil
  610.   "hush_startup
  611.   If set to non-nil, the copyright banner is not displayed at start up.")
  612.  
  613. (defvar editline_histsize 256
  614.   "editline_histsize
  615.   The number of lines to be saved in the users history file when a 
  616.   Festival session ends.  The histfile is \".festival_history\" in the
  617.   users home directory.  Note this value is only checked when the 
  618.   command interpreter is started, hence this should be set in a user's
  619.   \".festivalrc\" or system init file.  Reseting it at the command
  620.   interpreter will have no effect.")
  621.  
  622. (defvar editline_no_echo (getenv "EMACS")
  623.   "editline_no_echo
  624.   When running under Emacs as an inferior process, we don't want to 
  625.   echo the content of the line, only the prompt.")
  626.  
  627. (defvar ! nil
  628.   "!
  629.   In interactive mode, this variable's value is the return value of the
  630.   previously evaluated expression.")
  631.  
  632. (provide 'siod)
  633.