ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details
0006663Part 01: TTCN-3 Core LanguageClarificationpublic12-12-2013 12:0806-01-2015 18:49
Gyorgy Rethy 
Gyorgy Rethy 
highminoralways
closedfixed 
v4.6.1 (published 2014-06) 
v4.7.1 (published 2015-06)v4.7.1 (published 2015-06) 
C.4.1
L.M.Ericsson
0006663: regexp's behaviour if both string parameters are literals
The current behavior of regexp is unspecified in the case when both inpar and expression are literals. e.g.:
var charstring v_temp := regexp ( "CSP-1234", "CSP-(\d#(1,4))", 0 );

Possible behaviors:
- return an error as the type of the parameters are not defined
- implicitly assume the types of the parameters from their contents (i.e. cause error in case of inpar deducted to be a charstring and expression to be a universal charstring, and return a string otherwise)
- consider the type of the variable at the LHS in a strict way, i.e. the types of the parameters shall be the same, and cause error or return a string based on this information; if there is no appropriate type to consider(e.g. inside an expression), cause an error.
No tags attached.
docx CR6663_update_proposal.docx (25,317) 10-04-2014 13:27
http://oldforge.etsi.org/mantis/file_download.php?file_id=2998&type=bug
docx CR6663_update_proposal-V2.docx (20,655) 08-10-2014 10:39
http://oldforge.etsi.org/mantis/file_download.php?file_id=3107&type=bug
Issue History
12-12-2013 12:08Gyorgy RethyNew Issue
12-12-2013 12:08Gyorgy RethyClause Reference(s) => C.4.1
12-12-2013 12:08Gyorgy RethySource (company - Author) => L.M.Ericsson
12-12-2013 12:09Gyorgy RethyProjectTTCN-3 Change Requests => Part 01: TTCN-3 Core Language
12-12-2013 13:01Jacob Wieland - SpirentNote Added: 0011884
07-04-2014 14:27Gyorgy RethyNote Added: 0011941
07-04-2014 14:27Gyorgy RethyAssigned To => Axel Rennoch
07-04-2014 14:27Gyorgy RethyStatusnew => assigned
08-04-2014 16:52Gyorgy RethyProduct Version => v4.6.1 (published 2014-06)
08-04-2014 16:52Gyorgy RethyTarget Version => v4.7.1 (published 2015-06)
10-04-2014 13:27Axel RennochFile Added: CR6663_update_proposal.docx
10-04-2014 13:28Axel RennochAssigned ToAxel Rennoch => Gyorgy Rethy
10-04-2014 13:28Axel RennochNote Added: 0012004
10-04-2014 13:28Axel RennochStatusassigned => confirmed
06-10-2014 15:07Gyorgy RethyPrioritynormal => high
08-10-2014 07:56Gyorgy RethyAssigned ToGyorgy Rethy => Jens Grabowski
08-10-2014 10:39Jens GrabowskiNote Added: 0012273
08-10-2014 10:39Jens GrabowskiFile Added: CR6663_update_proposal-V2.docx
08-10-2014 10:39Jens GrabowskiAssigned ToJens Grabowski => Gyorgy Rethy
08-10-2014 10:39Jens GrabowskiStatusconfirmed => assigned
08-10-2014 10:40Jens GrabowskiStatusassigned => resolved
08-10-2014 10:40Jens GrabowskiResolutionopen => fixed
06-01-2015 18:49Gyorgy RethyNote Added: 0012655
06-01-2015 18:49Gyorgy RethyStatusresolved => closed
06-01-2015 18:49Gyorgy RethyFixed in Version => v4.7.1 (published 2015-06)

Notes
(0011884)
Jacob Wieland - Spirent   
12-12-2013 13:01   
I think the restriction should simply be dropped as it serves no purpose. The return type (as the return value can only be a substring of the input parameter) follows obviously from the type of the input parameter whose type can always be inferred from the content, if it is a string literal.

It can have no detrimental effect if I use a universal charstring pattern on a charstring value (at worst, it does not match) or if I use a charstring pattern on a universal charstring value (as every charstring is implicitly also a universal charstring).

Therefore, the restriction has no purpose and can be dropped. This will also not create backward compatibility issues as it just allows more usages of regexp without changing the semantics of the previously allowed usages.
(0011941)
Gyorgy Rethy   
07-04-2014 14:27   
stf478, 2014-04-07: Add a formal rule to decide the type implicitly according to content.
Add the same rules to substring and replace.
(0012004)
Axel Rennoch   
10-04-2014 13:28   
Problem: parameters of regexp may have no type information

Approach: types of literal arguments should be derived from the contents
(0012273)
Jens Grabowski   
08-10-2014 10:39   
Wording slightly changed.
(0012655)
Gyorgy Rethy   
06-01-2015 18:49   
Added to draft V4.6.3