Porting to Java using Garden Point Compiler.

From: Campbell, Robert D (UK Edinburgh) <"Campbell,>
Date: Tue, 02 Nov 2004 08:58:37 +0000

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


We have tried a few simple experiments, and
had some problems.

Obviously (?) the first thing we did was
to delete references to IMPORTed stuff. This
still left something worth reusing in a
particular Java programme we were working on.

The next problem was that the compiler refused
to compile 'uninitialised' pointers (the Language
Report, section 10, says they are initialised to NIL).
Easy, if rather tedious, to fix.

The secret to accessing top level 'static' procedures
in Java seems to be to regard then as methods of a
class corresponding to the CP MODULE.

The secret to accessing type-bound procedures
in Java seems to be to regard then as methods of a
class corresponding to the CP RECORD TYPE.

But, and this is where some help would be appreciated,
we don't know how to declare variables in Java that
correpond to CP types such as

TYPE
  Vector* = POINTER TO ARRAY OF INTEGER;

We also had problems with the type

  MonadicFn* = PROCEDURE (x : INTEGER) : INTEGER;


Have other people been successful in using GPC to link
non-trivial CP modules into Java?

Cheers

Robert

********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.


----boundary-LibPST-iamunique-1709072182_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XG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0aGUgbGlzdCBvd25l
ciBhdFxwYXINCiAgIG93bmVyLWJsYWNrYm94QG9iZXJvbi5jaFxwYXINClxwYXINCkN1cnJlbnQg
cG9zdGluZyBwb2xpY3k6XHBhcg0KXHBhcg0KYSkgVG8gcG9zdCB5b3Ugc2hvdWxkIHVzZSB0aGUg
c2FtZSBhZGRyZXNzIGJ5IHdoaWNoIHlvdSBhcmUgc3Vic2NyaWJlZCB0byB0aGUgbWFpbGluZyBs
aXN0LiBUaGF0IHdheSwgdGhlIGxpc3Qgc2VydmVyIHdpbGwgcmVjb2duaXplIHlvdSBhcyBzdWJz
Y3JpYmVyIGFuZCBmb3J3YXJkIHlvdXIgcG9zdGluZyBpbW1lZGlhdGVseSwgd2l0aG91dCBjcmVh
dGluZyBhbnkgb3ZlcmhlYWQuXHBhcg0KXHBhcg0KYikgSWYsIGZvciBzb21lIHJlYXNvbiwgeW91
IGNhbm5vdCBwb3N0IGZyb20gdGhlIGFkZHJlc3MsIGJ5IHdoaWNoIHlvdSBhcmUgc3Vic2NyaWJl
ZCwgeW91ciBtZXNzYWdlIHdpbGwgYmUgbW9kZXJhdGVkIHRvIGF2b2lkIHNwYW0uIFBsZWFzZSB1
bmRlcnN0YW5kIHRoYXQgbW9kZXJhdGlvbiB3aWxsIG9mdGVuIGNhdXNlIHNvbWUgZGVsYXksIGlu
IHBhcnRpY3VsYXIgb3ZlciB3ZWVrZW5kcyBvciBob2x5ZGF5c319ADI0MEI1


----boundary-LibPST-iamunique-1709072182_-_---
Received on Tue Nov 02 2004 - 09:58:37 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:32 UTC