(unknown charset) [BLACKBOX] Export module's comments in BlackBox client interfaces (definitions)

From: (unknown charset) Oleg N. Cher <"Oleg>
Date: Thu, 24 Jan 2013 17:50:40 +0200

----boundary-LibPST-iamunique-1107735694_-_-
Content-type: text/plain

Dear Mr. Marc Frei, dear all,

Here is an useful idea for the BlackBox modules client interfaces that
is shown if mark a module name and press Ctrl+D - the export comments.

In ETH Oberon's "Watson" tool there is implemented the feature of
“exported comments”. Please look here.

=========================================================================
MODULE Math; (** portable *)

(** Commonly needed Math for REALs.*)

IMPORT S := SYSTEM;

CONST e* = 2.7182818284590452354E0;
     pi* = 3.14159265358979323846E0;
=========================================================================


Watson generates interface of the module:

=========================================================================
DEFINITION Math; (* portable *)

(*
     Commonly needed Math for REALs.
*)

     CONST
         e = 2.7182818284590452354E0;
         pi = 3.14159265358979323846E0;
...
END Math.
=========================================================================

I don’t know is this idea so good comes to be implemented in the current
implementation of ".osf" format. But this important feature of classic
ETH Oberon System need to be used. It’s VERY useful to export comments
to interface definitions, and I don’t know even why it is not
implemented in BlackBox.

How can it be implemented? I think, needs to extend symbol files format
by extra fields for put the exported comments there (they can be
multi-line). And DevBrowser.ShowInterface needs to know about this
fields and will be put the exported comments to the generated interface.

Now a piece of book "The Oberon Companion: A Guide to Using and
Programming Oberon System 3" (André L. Fischer, Hannes Marais) where
this feature is described.

=========================================================================
3.7 Inspecting Module Definitions with Watson

     During software development, you will often need to refer to the
definitions of modules delivered with the Oberon system. A definition
module describes a module interface and is a summary of the complete
module. It contains the declaration of the exported names which may be
used by other modules. It is also known as the public view of the module
and its advantage is its textual compactness. With this clearly defined
module interface, a module can be used without knowledge of how it is
implemented.

     In Oberon, it is not necessary to write down the definition of a
module: Watson takes care of extracting the best information available
about a specified module. For example, should the source text of a
module be available, Watson can scan it for so-called exported comments
which it presents to the user together with conventional module
interface. An exported comment is a program comment starling with a
double "*": (** .... *). The comment typically contains more information
about how to use specific module features. As the source code of a
module is sometimes not available to the user, Watson effectively goes
in search of a previously generated definition file (with a .Def
extension) first. Should both the definition file and the module source
be missing, Watson searches for the module symbol file. If the latter is
missing too, Watson tries to extract information about the module from
its object file. In each step of the Watson search strategy, the amount
of information Watson finds is diminished. Watson also has some further
tricks up its sleeve. To reduce the clutter of many definition files,
several definition files may be compressed and packed into a single
archive file (with a .Arc extension). Watson can automatically extract
and decompress definitions from such an archive file.
=========================================================================

I hope, you will like this idea. This is a valuable feature, and I'm
sure BlackBox users will accept the feature. Also I've already proposed
to include this feature to GPCP.


-- 
Oleg N. Cher
VEDAsoft Oberon Club
http://zx.oberon2.ru
----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1107735694_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGZiaWRpcyBcZGVmZjB7XGZvbnR0YmwN
CntcZjBcZnN3aXNzXGZjaGFyc2V0MCBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7
fQ0Ke1xmMlxmbmlsXGZjaGFyc2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBD
b3VyaWVyIE5ldzt9fQ0Ke1xjb2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBc
Ymx1ZTI1NTt9DQpcdWMxXHBhcmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIERlYXIgTXIuIE1h
cmMgRnJlaSwgZGVhciBhbGwsXHBhcg0KXHBhcg0KSGVyZSBpcyBhbiB1c2VmdWwgaWRlYSBmb3Ig
dGhlIEJsYWNrQm94IG1vZHVsZXMgY2xpZW50IGludGVyZmFjZXMgdGhhdCBccGFyDQppcyBzaG93
biBpZiBtYXJrIGEgbW9kdWxlIG5hbWUgYW5kIHByZXNzIEN0cmwrRCAtIHRoZSBleHBvcnQgY29t
bWVudHMuXHBhcg0KXHBhcg0KSW4gRVRIIE9iZXJvbidzICJXYXRzb24iIHRvb2wgdGhlcmUgaXMg
aW1wbGVtZW50ZWQgdGhlIGZlYXR1cmUgb2YgXHBhcg0KXCc5M2V4cG9ydGVkIGNvbW1lbnRzXCc5
NC4gUGxlYXNlIGxvb2sgaGVyZS5ccGFyDQpccGFyDQo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHBhcg0KTU9E
VUxFIE1hdGg7ICAgICgqKiBwb3J0YWJsZSAqKVxwYXINClxwYXINCigqKiAgICBDb21tb25seSBu
ZWVkZWQgTWF0aCBmb3IgUkVBTHMuKilccGFyDQpccGFyDQpJTVBPUlQgUyA6PSBTWVNURU07XHBh
cg0KXHBhcg0KQ09OU1QgICAgZSogPSAyLjcxODI4MTgyODQ1OTA0NTIzNTRFMDtccGFyDQogICAg
IHBpKiA9IDMuMTQxNTkyNjUzNTg5NzkzMjM4NDZFMDtccGFyDQo9PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XHBh
cg0KXHBhcg0KXHBhcg0KV2F0c29uIGdlbmVyYXRlcyBpbnRlcmZhY2Ugb2YgdGhlIG1vZHVsZTpc
cGFyDQpccGFyDQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09XHBhcg0KREVGSU5JVElPTiBNYXRoOyAgICAoKiBw
b3J0YWJsZSAqKVxwYXINClxwYXINCigqXHBhcg0KICAgICBDb21tb25seSBuZWVkZWQgTWF0aCBm
b3IgUkVBTHMuXHBhcg0KKilccGFyDQpccGFyDQogICAgIENPTlNUXHBhcg0KICAgICAgICAgZSA9
IDIuNzE4MjgxODI4NDU5MDQ1MjM1NEUwO1xwYXINCiAgICAgICAgIHBpID0gMy4xNDE1OTI2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BlLCB5b3Ugd2lsbCBs
aWtlIHRoaXMgaWRlYS4gVGhpcyBpcyBhIHZhbHVhYmxlIGZlYXR1cmUsIGFuZCBJJ20gXHBhcg0K
c3VyZSBCbGFja0JveCB1c2VycyB3aWxsIGFjY2VwdCB0aGUgZmVhdHVyZS4gQWxzbyBJJ3ZlIGFs
cmVhZHkgcHJvcG9zZWQgXHBhcg0KdG8gaW5jbHVkZSB0aGlzIGZlYXR1cmUgdG8gR1BDUC5ccGFy
DQpccGFyDQpccGFyDQotLSBccGFyDQpPbGVnIE4uIENoZXJccGFyDQpWRURBc29mdCBPYmVyb24g
Q2x1YlxwYXINCmh0dHA6Ly96eC5vYmVyb24yLnJ1XHBhcg0KXHBhcg0KXHBhcg0KLS0tLVxwYXIN
ClRvIHVuc3Vic2NyaWJlLCBzZW5kIGEgbWVzc2FnZSB3aXRoIGJvZHkgIlNJR05PRkYgQkxBQ0tC
T1giIHRvIExJU1RTRVJWQExJU1RTLk9CRVJPTi5DSFxwYXINCn0=
----boundary-LibPST-iamunique-1107735694_-_---
Received on Thu Jan 24 2013 - 16:50:40 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:29:54 UTC