[ Home Page ] [ Eiffel Archive ] [ Eiffel Classes and Clusters ]
![]() |
SEDL: SmallEiffel Dynamic Linking |
Written by Patrick Doyle.
dynamic.tar.gz (11,938 bytes) -
source code
sedl.h (941 bytes) - header file
http://www-ug.eecg.toronto.edu/~doylep/
(SEDL home page)
http://www.ecf.toronto.edu/~doylep/
(Patrick Doyle's home page)
This was meant to be a prototype for a dynamic linking scheme that would be worked into the SmallEiffel compiler. Unfortunately, the participants seem to have lost interest, and I don't have the raw hacking skills necessary to graft it into SmallEiffel myself, so it remains only a prototype.
Nevertheless, it is an example of how subclasses of a real, useful interface class (namely OUTPUT_STREAM; not some cooked-up demo interface) can be loaded at runtime, despite SmallEiffel's heavy reliance on system-wide knowledge at compile time.
This is the SEDL project.
SmallEiffel Dynamic Linking.
The "dynamic" directory contains all source and a Makefile which will build and test the system. The "dynamic.tar.gz" file contains the same.
The "sedl.h" file is necessary to compile the test program. It must be placed in a directory such that "#include <eiffel/sedl.h>" will be able to find it.
Once the test program starts, just hit ENTER to get a list of legal commands. The test program is not 100% rock-solid, so you can crash it with bad input. However, it's reasonably robust for a simple test program.
The following is an example run. The prompt is "Command:". Everything on the same line as the prompt is what I typed. Everything else is output by the program (osp_test).
---- [doylep@pixie dynamic]$ osp_test Command: load ./module1.so Command was successful. Command: list 1: DOUBLE_OUTPUT_STREAM inherit OUTPUT_STREAM 2: LINE_REVERSING_OUTPUT_STREAM inherit OUTPUT_STREAM Command was successful. Command: test 1 TThhiiss iiss aa tteesstt ooff aa ddyynnaammiiccaallllyy--llooaaddeedd oouuttppuutt ssttrreeaamm Command was successful. Command: test 2 maerts tuptuo dedaol-yllacimanyd a fo tset a si sihT Command was successful.
[ Home Page ] [ Eiffel Archive ] [ Eiffel Classes and Clusters ]