• Page:
  • 1

TOPIC:

referencing record of elements 03 Jul 2012 13:03 #6173


Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in to join the conversation.

Last edit: by Denis Filatov. Reason: ttcn-3 code

referencing record of elements 04 Jul 2012 07:48 #6174

Hi all,

Please find Elvior’s answer below.

We will also rise CR on this matter.

BR,
Andrus Lehtmets
Elvior

From: Tomas Urban
Sent: Wednesday, July 04, 2012 10:34 AM
To: Andrus Lehtmets (Elvior)
Subject: Re: Fw: referencing record of elements


First of all, all those assignments are invalid for a simple reason. The "vroi" variable is not a template variable, so it is not allowed to assign matching symbols to it.

If that the variable "vroi" were declared correctly as a template variable:

1. The first example would be correct. There's no rule forbidding overwriting of individual record of elements with a new value.
2. The 2nd and 3rd example should produce the same result. However, I am afraid that ES 201873-1 4.4.1 doesn't give a good guidelines for this situation. There is no rule in 15.6.3 (or anywhere else) saying that a mechanism similar to the one described in the paragraph 15.6.3.b shall be applied to record of values containing AnyElementsOrNone as the last element. However, you can find application of this non-existent rule in the example section. So there's definitely a problem with the specification. I will submit a CR regarding this issue.
Anyway, the result would be either:
Assuming that there's no rule regarding terminating AnyElementsOrNone, the element should be simply appended to the original template (using rules from the chapter 6.2.3): { ?, 2, *, 4 }
Using the same mechanisms as in the examples from the chapter 15.6.3.b: { ?, 2, ?, 4, *}

Our tool uses the latter approach.

--Tom

Please Log in to join the conversation.

Last edit: by Denis Filatov. Reason: Remove original message

referencing record of elements 04 Jul 2012 07:48 #6175


Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in to join the conversation.

Last edit: by Denis Filatov. Reason: Remove original message

referencing record of elements 04 Jul 2012 11:20 #6176

Hello,

we agree in general with the assessment of Elvior.
The standard maybe is not explicit enough, although implicitly, the rule
15.6.3. b) is clear as always the relation

? =^= {*} for record of/set of templates is true.

The example which assigns a matching mechanism to an element which is
covered by an * (AnyElementsOrNone) confirms this interpretation.

Therefore, we at Testing Tech do not think it really necessary to change
the standard, but as long as the interpretation given also by Elvior is
maintained, we will support a CR in that regard.

BR, Jacob Wieland

Please Log in to join the conversation.

Last edit: by Denis Filatov. Reason: Remove original message

referencing record of elements 04 Jul 2012 11:20 #6177


Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in to join the conversation.

Last edit: by Denis Filatov.

referencing record of elements 05 Jul 2012 08:41 #6178

Sorry for the inconvenience, but I had problems with the time keeping
of my machine. According to this I sent the message back in July 2004.
Now I re-send it with the proper timestamp.

BR.,
Uwe

Please Log in to join the conversation.

Last edit: by Denis Filatov. Reason: Remove original message

referencing record of elements 06 Jul 2012 09:05 #6179

Hello Uwe,

I would expect t_RoI[5] to be 2 in both cases.

BR, Jacob Wieland

Please Log in to join the conversation.

Last edit: by Denis Filatov. Reason: Remove original message

referencing record of elements 06 Jul 2012 09:28 #6180


Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in to join the conversation.

Last edit: by Denis Filatov.

referencing record of elements 06 Jul 2012 10:35 #6181

Hello Uwe,

No, * in a record of is not a single element but represents an arbitrary number (from zero to infinity) of elements.

{*} is semantically equivalent to ({}, {?}, {?,?}, ...) (and {x, y, z, *, a, b, c} is equivalent to { x, y, z } & {*} & { a, b, c})

Thefore, the indices of elements following a * are undetermined (which is why they can never be accessed). If the star is length-restricted with a fixed length however, this changes.Then it is equivalent with the same number of ? as in the length restriction and the following elements again have fixed indices.

A permutation construction is pretty much the same as a special *, so the same rules apply to elements after it.

So, no, I would not say that the matching capabilities of * should be ignored when accessing the element-templates.

BR, Jacob Wieland

Please Log in to join the conversation.

Last edit: by Denis Filatov. Reason: Remove original message

referencing record of elements 09 Jul 2012 13:23 #6182


Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in to join the conversation.

Last edit: by Denis Filatov.

referencing record of elements 09 Jul 2012 14:04 #6183

Hi,

We also agree. In case of example 1, Currently there is no rule how to calculate the position of elements following AnyElementOrNone at assignments. So, the task here is to define this rule.
The rules used for examples 2 and 3 should explicitly be defined as mandatory rules in the text.

BR, Gyorgy

Please Log in to join the conversation.

Last edit: by Denis Filatov.

referencing record of elements 10 Jul 2012 07:09 #6184


Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in to join the conversation.

Last edit: by Denis Filatov. Reason: Remove original message

referencing record of elements 10 Jul 2012 11:14 #6185


Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in to join the conversation.

Last edit: by Denis Filatov.
referencing record of elements - TTCN-3 Forum

referencing record of elements 10 Jul 2012 12:44 #6186


Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in to join the conversation.

Last edit: by Denis Filatov.

referencing record of elements 13 Jul 2012 06:49 #6187

I have to apologise that the discussion disappeared from the mailing
list. It was my fault as I replied only to Jacob Wieland.
Here it comes again.

BR.,
Uwe

Please Log in to join the conversation.

Last edit: by Denis Filatov.
Welcome, Guest
Username: Password:

referencing record of elements 16 Jul 2012 07:02 #6188


Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in to join the conversation.

Last edit: by Denis Filatov.

referencing record of elements 16 Jul 2012 08:48 #6189

Hello,

I don't think it should be allowed, or, if it is allowed, it should yield the semantic equivalent of { ?, 2, 3 }.

It should definitely not yield the semantics of { *, 2, 3 } as that would totally change the semantics of the from AnyElementOrNone to AnyElementsOrNone.

The ? has the same semantics as integer:* in a context where no omit can occur (as is the case in a record of).

BR, Jacob Wieland

Please Log in to join the conversation.

Last edit: by Denis Filatov.

referencing record of elements 16 Jul 2012 09:38 #6194

Do you think I should raise a CR for this?
Though the semantic equivalent should be rather {? ifpresent, 2, 3} as
each element of a recordof can be regarded as being optional

BR.,
Uwe

Please Log in to join the conversation.

Last edit: by Denis Filatov. Reason: Remove original message

referencing record of elements 16 Jul 2012 09:43 #7798

Once, I thought so, too. But this view is not standard conform. An element of a record of value is either undefined or defined, never omit (though the distinction between omit and undefined is largely academic ;-))

So, yes, implicitly, it would be '? ifpresent', but since the ifpresent part has no effect inside a recordof as no field can be omit, this is equivalent to simply '?'.

If that is not clear from the standard, then a CR for clarification is warranted.

BR, Jacob Wieland

Please Log in to join the conversation.

Last edit: by Denis Filatov.

referencing record of elements 16 Jul 2012 10:32 #7799


Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in to join the conversation.

Last edit: by Denis Filatov.
  • Page:
  • 1