It seems like the binding rule

SomeCons(a, b, c):
  defines Var a of prop1 b
  defines Param a of prop2 c

translates to

SomeCons(a, b, c):
  defines Var a
  defines Param a of prop1 b of prop2 c

In other words, the last definition gets all the properties.
Therefore, retrieving a prop1 given the name/URI of a Var is impossible.

Submitted by Oskar van Rest on 30 March 2014 at 00:47

On 30 March 2014 at 08:16 Guido Wachsmuth commented:

Can you please check if this also happens with the core-syntax branch of NaBL?

On 30 March 2014 at 20:31 Oskar van Rest commented:

Yes also with the core-syntax.

Also, this is probably related:

Module(a, b, c):
  defines Module a scopes Class
  defines Module2 b

translates to

Module(a, b, c):
  defines Module a
  defines Module2 b scopes Class

Here again, the last definition gets all ‘scopes’. A workaround if only one of the definition sites provides scoping is to put the corresponding defines at the end:

Module(a, b):
  defines Module2 b
  defines Module a scopes Class

On 2 April 2014 at 14:51 Guido Wachsmuth commented:

Multiple defines where never correctly supported together with scopes. This was one of the reasons why we introduced implicitly defines.

The original issue is different from this. There the same a defines two names in different namespaces. But the property storage simply fetches a URI from a, not taking care of any namespace. If we want to support these kinds of multiple namespace definitions, we need to have namespace-aware versions of nabl-uri.

On 2 April 2014 at 14:57 Gabriël Konat commented:

You can retrieve all URIs of an annotated name using nabl-uris, and then filter by namespace.

On 2 April 2014 at 18:03 Oskar van Rest commented:

ok I can probably use that as a workaround, but it would require me to do things in Stratego that I actually want to do in TS: the property is a type

On 2 April 2014 at 18:41 Gabriël Konat commented:

Sorry, I wasn’t suggesting you to use that. It was the conclusion of a small discussion with Guido.

On 2 April 2014 at 18:46 Guido Wachsmuth commented:

This needs to be fixed in the runtime libraries and in the NaBL generator. In the libraries, the callback strategy for property sites needs to take an additional namespace parameter and take this into account when retrieving the URI for the property. In the generator, the namespace needs to be passed to the new callback strategy.

On 8 May 2014 at 12:03 Guido Wachsmuth tagged @guwac

Log in to post comments