scheme48.man 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. .TH LS48 1
  2. .\" File scheme48.man: Manual page template for Scheme 48.
  3. .\" Replace LS48 with the name of your default image and LLIB with the
  4. .\" directory containing scheme48vm and default image.
  5. .SH NAME
  6. LS48 \- a Scheme interpreter
  7. .SH SYNOPSIS
  8. .B LS48
  9. [-i image] [-h heapsize] [-a argument]
  10. .SH DESCRIPTION
  11. .B LS48
  12. is an implementation of the Scheme programming language as described in
  13. the
  14. .I "Revised^5 Report on the Algorithmic Language Scheme."
  15. A runnable system requires two parts, an executable program that implements
  16. the Scheme 48 virtual machine, and an image that is used to initialize
  17. the store of the virtual machine.
  18. .B LS48
  19. is a shell script that starts the virtual machine with an image that runs
  20. in a Scheme command loop.
  21. .PP
  22. The
  23. .B LS48
  24. command loop reads Scheme expressions,
  25. evaluates them, and prints their results.
  26. It also executes commands, which are identified by an initial comma character.
  27. Type the command
  28. .I ,help
  29. to receive a list of available commands.
  30. .PP
  31. The meaning of the
  32. .B \-h
  33. option depends on the type of garbage collector that was chosen at
  34. configuration time. If
  35. .IR heapsize
  36. is a positive number, it specifies
  37. the number of words that can be live at any given time.
  38. One word is four bytes. Cons cells are currently 3 words,
  39. so if you want to make sure you can allocate, say, a million cons
  40. cells, you should specify
  41. .B \-h
  42. 3000000 (actually a little more, to account for the initial heap
  43. image and breathing room).
  44. .PP
  45. If you specify a
  46. maximum smaller than the memory needed to load the image file, the
  47. maximum is increased accordingly and a message is written to the
  48. console.
  49. .PP
  50. For the BIBOP garbage collector,
  51. .IR heapsize
  52. may be 0. This means the heap will
  53. possibly keep growing until your system runs out of memory. Because of
  54. this risk, a warning message is written to the console if you specify
  55. .B -h
  56. 0.
  57. .PP
  58. The
  59. .I ,dump
  60. and
  61. .I ,build
  62. commands put heap images in files.
  63. The
  64. .B \-i
  65. option causes the initial heap image to be taken from file
  66. .IR image .
  67. The
  68. .B \-a
  69. option causes a list of strings to be passed as the argument
  70. to an image generated using the
  71. .I ,build
  72. command. The first argument to
  73. .I ,build
  74. is a procedure that is passed
  75. the arguments following
  76. .B \-a
  77. and which should return an integer (which is the
  78. return value of the Scheme 48 process).
  79. .PP
  80. .nf
  81. > ,build (lambda (a) (display a) (newline) 0) foo.image
  82. > ,exit
  83. $ LS48 -i foo.image -a mumble
  84. mumble
  85. $
  86. .PP
  87. .fi
  88. .SH FILES
  89. .TP 40
  90. .B LLIB/scheme48vm
  91. the virtual machine.
  92. .TP
  93. .B LLIB/LS48.image
  94. the default image.