User Tools

Site Tools


Jump to


AmbientTalk/2 ChangeLog

build140508 (v 2.9)

  • The 'TFarRef' trait has been renamed to 'TEventualRef'. All custom object references actually denote custom 'eventual references' (in E terminology). “Far references” only denote AmbientTalk's native remote object references. The dependent language modules (ambient refs, futures, leased refs, multirefs, …) have been changed accordingly.
  • The meta_receive operation is now invoked in the same execution turn as when the message is sent. The return value of receive is no longer 'ignored', but rather becomes the return value of the message send (o←m()) itself. This makes it possible for custom eventual references to immediately intervene in the message sending process (without having to install a custom actor mirror that overrides send). For 'local'/'near' references, receive simply schedules the message in the actor's own message queue.
  • When an actor processes the next msg from its inbox, it again dispatches to the meta_receive operation of the receiver. Hence, receive can be used by proxies to intervene in the async message sending process, and by all other objects to intervene in the async message delivery process.
  • the send operation is still defined on the actor mirror and can still completely override the behaviour of message sending (which is still used by the futures language module).
  • When type tag objects are used to annotate messages (i.e. ←m()@Annotation), they can intervene in the message sending process by implementing a method named 'annotate', which takes the constructed message object as argument and should return a possibly extended message object (which may then e.g. override base_sendTo such that it incorporates novel message sending semantics)
  • We changed the implementation of AmbientTalk's support for regular expressions. Whereas we previously relied on a java.util.regexp port for pre-1.4 JVMs, we now rely on the Apache Regexp library. This may affect regular expressions written in AmbientTalk, since they must now follow the language provided by Apache Regexp. For most patterns, the syntax should remain the same.
  • Bugfix: [Symbiosis] AT nil value sometimes erroneously converted into Java null value (tvcutsem)
  • Bugfix: [Symbiosis] constructor of XSymbiosisFailure does not deal with a null symbiont (in case of a static method) (tvcutsem)
  • Bugfix: [Evaluation Protocol] Quoting a universal message send with something other than a message creations raises a type mismatch (tvcutsem)
  • Bugfix: [Evaluation Protocol] Quoting a message creation with a single annotation raises a type mismatch (tvcutsem)
  • Bugfix: [IAT Shell] IAT can't handle empty lines (tvcutsem)

build130208 (v 2.8)

  • AT objectpath is now separated according to system-specific path separator, not according to ':' on all platforms.
  • Added a lot of functionality to the standard lib. See at.ambient and at.lang
  • bugfix 56: [Actors/Concurrency] whenever:discovered: uses the service object of the first match for all subsequent matches (stimberm)
  • bugfix 54: [Distribution (AmbientTalk layer)] multiple discovery listeners for the same type are triggered too much (tvcutsem)
  • bugfix 51: [Evaluation Protocol] Fields and methods with same name can co-exist in one object (tvcutsem)
  • bugfix 50: [Distribution (AmbientTalk layer)] Objects are exported under a new object id every time they are parameter-passed (tvcutsem)
  • bugfix 47: [Distribution (Network layer)] failed to online network (tvcutsem)
  • bugfix 49: [Distribution (Network layer)] Cannot access system or lobby in code deserialized in the discovery actor (tvcutsem)

build170907 (v 2.7)

  • added a library to do 'structural typing' (see at/lang/
  • added a library to do more robust trait composition (see at/lang/
  • added a library to access the M2MI Distributed programming library (see at/m2mi)
  • Asynchronous messages no longer carry a 'receiver' field. Instead, they only contain selector, arguments and types. The receiver is now specified in the send meta-level method, which now takes both receiver and asynchronous message explicitly. The important implication is that asynchronous message objects may now be safely sent multiple times. This used to fail because the receiver field could be erroneously re-assigned while a message would be in the inbox already.
  • Asynchronous message objects now carry a 'from(sender)' method which can be used to turn a message into a closure. The closure is a unary closure which asks the sender to send the encapsulated message to the receiver argument. Example:

[1, 2, 3].map: .+(1).from(self) ⇒ [2,3,4]

  • booleans now have support methods and:and: and or:or: to avoid having to write too many braces :)
  • the nil object now understands '!=', i.e. nil != obj
  • the try:catch:using: family of language constructs is extended with an finally: clause which allows specifying a block of code which is to be executed whenever the scope of the construct is left, whether by succesful termination, handler execution or exception propagation.
  • round, floor and ceiling are now also defined on numbers (and they all return self; they were previously only defined on fractions)
  • the iat shell now supports multiline input. When a line ends with a \ character, the next line is implictly read. This change also affects the behaviour of system.readln()
  • Added a safety check when using “import” that first checks whether the imported object defines slots for all referenced aliased and excluded symbols.
  • it is now legal to write empty closures and method bodies, as in “object: { }” or “def m() { }”.
  • Bugfix: [Serialisation/Parameter Passing] Isolates that use import cannot be safely parameter-passed (tvcutsem)
  • Bugfix: [Parser] Parser fails to parse files ending in single line comments (tvcutsem)
  • Bugfix: [Actors/Concurrency] Asynchronous messages behave ill-defined when used multiple times (tvcutsem)
  • Bugfix: [Symbiosis] Classloader used by Coercer not always correct (tvcutsem)
  • Bugfix: [Parser] Selection of keyworded methods (tvcutsem)
  • Bugfix: [Reflection] Equality of introspective mirrors is ill-defined (tvcutsem)

build270707 (v 2.6)

  • changed part of the semantics of method invocation. AmbientTalk now supports the so-called uniform access principe that allows client objects to abstract from the fact that a 'property' is implemented as a field or as a zero-argument method. Hence, from now on:

a) o.m == o.m() if m is bound to a method (if it is bound to a field, the field's value is still returned) b) m == m() if m is bound to a lexically visible method c) first-class methods are still supported, but require explicit syntax: o.&m will grab the method as a first-class closure. If m is bound to a field instead, o.&m will return an “accessor” closure which is a nullary closure yielding the field's value upon application. Method selection also works lexically: &m yields an accessor or closure for a lexically visible field or method. d) assignment is now treated as message passing, with x := 5 being equal to lexically invoking a method named “x:=” and o.x := 5 being equal to sending o the message “x:=”.

The UAP change is unfortunately not entirely backward-compatible with existing AmbientTalk code. When you upgrade to this release, you'll have to check the following: a) where you used to write 'o.m' to select a method as a first-class closure value, you should now write 'o.&m' because 'o.m' is now treated as invoking the method (i.e. o.m()) b) where you used to write 'm' to select a lexically visible method to grab a method as a first-class closure value, you should now write '&m' because 'm' is interpreted as applying the method (i.e. m())

  • added file to the system library. This file defines a number of utility functions. More information can be found in the file itself.
  • added the construct isolatelambda: to, which allows the creation of 'pass-by-copy' closures.
  • Various bugfixes w.r.t. serialization of objects (isolates).

build190607 (v 2.5)

  • Consistently renamed 'stripes' to 'type tags'. While we originally based our “stripes” on the StripeTalk papers, we now seem to use them more for intensionally classifying objects according to types than for extensional classification. Hence, from now on:
    • defstripe keyword becomes deftype
    • the stripesOf: meta-method becomes tagsOf:
    • the object:stripedWith: method becomes object:taggedAs:
    • the is:stripedWith: method becomes is:taggedAs:

While this change is not backwards-compatible with current AT code (you really need to find/replace all occurences of these language constructs), we feel it is best to make this name change as soon as possible, rather than carrying an ill-chosen name for the rest of AT/2's life.


  • added support for leased object references (see at/lang/
  • the symbiosis layer now treats symbiotic calls to AmbientTalk objects representing a java.util.EventListener as pure asynchronous calls
  • added support for test suites which group the execution of multiple independent unit tests
  • added support for asynchronous unit tests: these are test methods prefixed with 'testAsync' which should return a future. The test only fails or succeeds if the future is resolved.
  • added support to unquote objects in a quasiquoted expression. Furthermore, the unquote of an expression is also allowed when the parser expects a symbol, provided that the unquoted expression evaluates to a symbol
  • added restrict:object to: interface construct which implements a simple variant of encapsulation policies using first-class delegation.


  • [Parser] Cannot unquote-splice into parameterlist and body (smostinc)
  • [Parser] Escape characters do not work in text (smostinc)
  • [Parser] Unquoting in symbol position not possible (smostinc)
  • [Reflection] Unquoting objects in a parse tree yields incorrect conversions to Expressions (smostinc)
  • [Evaluation Protocol] Quoting a “selection” evaluates its subexpressions instead of quoting them (stimberm)
  • [Distribution (AmbientTalk layer)] After retracting unsent messages, far references won't transmit any messages anymore (tvcutsem)
  • [Symbiosis] Creation of java.lang.Long aftected by Bugfix 0000014 (tvcutsem)
  • [Natives] Support for native types conversions (tvcutsem)
  • [Distribution (AmbientTalk layer)] when:disconnected: may be invoked when far ref already disconnected (tvcutsem)
  • [Symbiosis] Symbiotic instances of NAT classes are wrapped (tvcutsem)
  • [Evaluation Protocol] Unquoting operator unquotes too much (tvcutsem)
  • [Parser] Cannot invoke methods on literal numbers (tvcutsem)
  • [Evaluation Protocol] Cannot negate fractions directly (tvcutsem)


System library additions:

  • added a unit testing framework, see at/unit/
  • added a proper vector abstraction, see at/collections/
  • added support for ambient references, see at/lang/
  • added initial support for exceptions, see at/
  • added a small timer library for scheduling code, see at/support/
  • added a minimal object inspector using symbiosis with java, see at/support/

Implementation changes:

  • The AT/2 interpreter no longer uses any of the JGroups or Log4J Dependencies. Rather, distributed network communication is performed in a dedicated manner. This improved performance, made AT/2 less dependent on external libraries, has a tremendous effect on the memory footprint and - most importantly - has enabled AT/2 to be used on the J2ME CDC platform. To the AT/2 programmer, the interface remains the same.


  • 0000009: [] Bug in Detection of offline VMs (in new distribution layer) (tvcutsem)
  • 0000010: [] Race condition in distribution layer when going offline (tvcutsem)


  • added a new option '–network' or '-n' to IAT which allows you to configure the name of the JGroups overlay network that the AmbientTalk VM should join. Very useful for debugging or demo purposes (allows you to set up a 'private' network of AT/2 VMs)
  • Symbiosis: when Java code performs obj.equals(obj2), and obj is an AmbientTalk object, the implementation now correctly invokes the obj.==(obj2) AmbientTalk method (provided that obj2 is also an AmbientTalk object)
  • Meta-level interface: createMessage's interface has changed: the method now takes as arguments the selector, a table of arguments and a table of stripes. The sender is no longer taken into account and the table of stripes is used to stripe the created message with.
  • Added new syntax to support the 'annotation' of message sends with stripes. For example, you can write o←m()@Foo, which is equivalent to writing actor.createMessage(`m, [], [Foo]).sendTo(o). Any expression can be put after the '@'. It is the intent that the result of evaluating that expression is either one stripe or a table of stripes (e.g. o←m()@[Foo,Bar]). Synchronous message sends can also be annotated.
  • Reworked the futures language module to support 'annotated' message sends. When loading the futures using FuturesModule.enableFutures(), you can pass an optional boolean argument (by default false) which says whether the futures language module should apply to unannotated messages or not.

The futures language module now also exports two stripes, 'FutureMessage' and 'OneWayMessage'. When the 'FutureMessage' is attached to a message send, the message will always return a future (if the futures language module is activated). If 'OneWayMessage' is attached to a message send, the message will use the default behaviour (i.e. normally return 'nil') even if the futures are enabled. Hence, you have two options to work with futures from now on: you can evaluate 'enableFutures(true)' to make ← return futures by default, and use o←m()@OneWayMessage to create pure asynchronous messages without futures, or you can evaluate 'enableFutures(false) to make ← behave normally (i.e. return nil) and then use o←m()@FutureMessage to explicitly require the creation of futures.

  • distributed memory management extensions by Elisa: it is now possible to take an exported object offline (using the takeOffline native). Far references that point to objects that are taken offline perceive this event as though it was a disconnection, and hence this will trigger any when:disconnected: listeners on that object. Additionally, when:expired: observers can be registered on a far reference to be notified explicitly when an object has been taken offline rather than disconnected (otherwise there is no means to distinguish between takeOffline/disconnection)
  • added the 'mobiTunes' demo program to the system library (under at/demo/


  • Contains important bugfixes w.r.t the 050307 release.
  • Based on comments by all of you during our meeting, we changed the semantics of actor.install: { code }

actor.install: now takes an arbitrary 'protocol' object and installs that object as the mirror of the actor. Also, its return value is no longer an object you can use to 'unmix' the protocol. Rather, it now returns the old installed protocol. If you still want to mimick the old behaviour, you can do so with code like:

def mixin(protocolCode) {
  def oldActor := actor.install: (extend: actor with: protocolCode);
  object: {
    def uninstall() {
      // restore the previously active protocol
      actor.install: oldActor
  • The import: native now works, but to make it work, we had to implement it as syntax, not as a native method. If you would like to find out why, come by and ask me :-) Here's an example of how to use import:
def trait := object: {
  def foo() { + 3 };
  def bar() { 5 };
  def baz := 3;

def obj := object: {
  import trait alias bar := tralala exclude baz;
  def bar() { 1 };
} => 1 => 4
obj.baz => error
obj.tralala() => 5
  • The futures language mixin now works! Please check out the source code in the native library provided with the distribution under at/lang/


import /.at.lang.futures;
enableFutures(); // changes the MOP of the current actor
def id(x) { x }
when: self<-id(42) becomes: { |val| system.println(val == 42) }

It might be that we later decide to invoke 'enableFutures()' automatically when you load the futures module.

  • The mirror architecture has been updated, but I'm not going to detail all bugfixes/changes here :-)
  • Project/build changes:
    • Don't forget to change the value of the AT_HOME environment variable in TextMate to point to the latest build!
    • Based on the proposal by StijnT, I changed the structure of the AmbientTalk 'object path' argument from

path1:path2:path3:… to name1=path1:name2=path2:name3=path3:… The names given in the path will be the names of slots defined in the lobby at startup time. For example, if you specify:

iat -o foo=/Users/me/test:bar=/usr/local/lib

Then in AmbientTalk: is bound to the namespace “/Users/me/test” and is bound to the namespace “/usr/local/lib”

  • By default, if you do not give an object path to iat in the command line (using -o), IAT will use the following path:

$AT_OBJECTPATH:at=$AT_HOME/at In other words: it uses the value of $AT_OBJECTPATH if that variable exists (cfr. Java's $CLASSPATH) and always includes the 'native' library which will be known under the name at. You will see that in the new build, the native library is shipped in the at subdirectory. It is now allowed to shadow names in the object path (a warning is printed on the console to make you aware of the shadowing). For example, if your $AT_OBJECTPATH equals foo=/usr/lib/ambienttalk and you start iat using:

iat -o foo=/test:$AT_OBJECTPATH

then will be bound to /test

  • If you do not give the location of an init file to iat (using -i), iat will try to load $AT_HOME/at/init/ or fail if it cannot find this file.
  • In order to run IAT properly from within Eclipse with this new semantics, you have to set the value of the AT_HOME environment variable in your 'run configuration'. Go to the 'run' menu, select the IAT run, in the 'arguments' tab, enter the following under VM Arguments:
-DAT_HOME="${project_loc:AT2 Library}/edu/vub"

This passes to the JVM the value of the AT_HOME property. It is set to the location of the edu/vub subdirectory of the AT2 Library project, which contains the native AT library. Note that if you named that project differently, you need to adapt the string “AT2 Library” to match your project name.

at/changelog.txt · Last modified: 2010/02/11 17:54 by tvcutsem