@@ -143,9 +143,9 @@ UnaryExpression::
143143
144144!_1 |-->(_1)[0]
145145
146- _1->log() |-->Domain.MambaHelper .Log(_1)
147- _1->log10() |-->Domain.MambaHelper .Log10(_1)
148- _1->exp() |-->Math.Pow(2.718281828, _1)
146+ _1->log() |-->Domain.AgileUML.Ocl .Log(_1)
147+ _1->log10() |-->Domain.AgileUML.Ocl .Log10(_1)
148+ _1->exp() |-->CommonLib. Math.Pow(2.718281828, _1)
149149
150150/* _1 in OCL is radians, convert radians to degrees: */
151151_1->sin() |-->CommonLib.Math.Sin(_1 * (180.0 / CommonLib.Math.Pi()))
@@ -167,13 +167,10 @@ _1->abs() |-->CommonLib.Math.Abs(_1)
167167
168168_1->size() |-->_1.Length
169169
170- _1->toInteger() |-->int.Parse(_1)<when> _1 String
171- _1->toInteger() |-->int.Parse(_1.ToString())
172- _1->toLong() |-->long.Parse(_1)<when> _1 String
173- _1->toLong() |-->long.Parse(_1.ToString())
174- _1->toReal() |-->float.Parse(_1)<when> _1 String
175- _1->toReal() |-->float.Parse(_1.ToString())
176- _1->toBoolean() |-->bool.Parse(_1.ToString())
170+ _1->toInteger() |-->int.Parse(_1 + "")
171+ _1->toLong() |-->long.Parse(_1 + "")
172+ _1->toReal() |-->float.Parse(_1 + "")
173+ _1->toBoolean() |-->bool.Parse(_1 + "")
177174
178175_1->char2byte() |-->Domain.MambaHelper.Char2byte(_1)
179176_1->byte2char() |-->Domain.MambaHelper.Byte2char(_1)
@@ -302,12 +299,11 @@ _1 div _2 |-->(int.Parse((_1 / _2).ToString()))
302299
303300/* _1 |-> _2 |-->(new OclMaplet(_1,_2)) */
304301
305- /* $$$ _1->compareTo(_2) |-->((Comparable) _1).compareTo(_2)<when> _1 object */
306302_1->compareTo(_2) |-->string.Compare(_1, _2)<when> _1 String
307303_1->compareTo(_2) |-->((_1 < _2) ? -1 : ((_1 > _2) ? 1 : 0 ))
308304
309305_1->pow(_2) |-->CommonLib.Math.Pow(_1, _2)
310- _1->gcd(_2) |-->Domain.MambaHelper .Gcd(_1,_2)
306+ _1->gcd(_2) |-->Domain.AgileUML.Ocl .Gcd(_1,_2)
311307
312308_1->truncateTo(_2) |-->((_1) as int)<when> _2 0
313309
@@ -319,7 +315,7 @@ _1^_2 |-->_1.Concat(_2)
319315_1->concatenate(_2) |-->_1.Concat(_2)
320316
321317_1->union(_2) |-->Domain.MambaHelper.UnionMap(_1,_2)<when> _1 Map
322- _1->union(_2) |-->_1.AddRange (_2).Distinct()<when> _1 Set
318+ _1->union(_2) |-->_1.Concat (_2).Distinct()<when> _1 Set
323319_1->union(_2) |-->_1.Concat(_2)
324320
325321_1->unionAll(_2|_3) |-->Domain.MambaHelper.UnionAll(_1,(_2)->{return _3;})
@@ -388,7 +384,8 @@ _1->exists(_2 | _3) |-->_1.Any(_2 => _3)
388384_1->exists1(_2 | _3) |-->Domain.AgileUML.Ocl.Exists1(_1.GetAll(), _2 => _3)<when> _1 classId
389385_1->exists1(_2 | _3) |-->Domain.AgileUML.Ocl.Exists1(_1, _2 => _3)
390386
391- _1->isUnique(_2 | _3) |-->
387+ _1->isUnique(_2 | _3) |-->(_1.GetAll().Select(_2 => _3).Distinct().Length == _1.GetAll().Length)<when> _1 classId
388+ _1->isUnique(_2 | _3) |-->(_1.Select(_2 => _3).Distinct().Length == _1.Length)
392389
393390_1 : _2 |-->_2.Contains(_1)
394391_1 <: _2 |-->_1.All(x => _2.Contains(x))
@@ -399,13 +396,14 @@ _1->includesAll(_2) |-->_2.All(x => _1.Contains(x))
399396_1->excludes(_2) |-->!(_1.Contains(_2))
400397_1->excludesAll(_2) |-->_1.All(x => !(_1.Contains(x)))
401398
402- _1->including(_2) |-->Domain.MambaHelper.IncludingSet(_1,_2)<when> _1 Set
403- _1->including(_2) |-->Domain.MambaHelper.IncludingSequence(_1,_2)<when> _1 Sequence
404- _1->prepend(_2) |-->Domain.MambaHelper.Prepend(_1,_2)
405- _1->append(_2) |-->Domain.MambaHelper.Append(_1,_2)
406- _1->excluding(_2) |-->Domain.MambaHelper.ExcludingSet(_1,_2)<when> _1 Set
407- _1->excluding(_2) |-->Domain.MambaHelper.ExcludingSequence(_1,_2)<when> _1 Sequence
408- _1->excludingAt(_2) |-->Domain.MambaHelper.RemoveAt(_1,_2)
399+ _1->including(_2) |-->_1.Concat({_2}).Distinct()<when> _1 Set
400+ _1->including(_2) |-->_1.Concat({_2})
401+
402+ _1->prepend(_2) |-->({_1}).Concat(_2)
403+ _1->append(_2) |-->_1.Concat({_2})
404+
405+ _1->excluding(_2) |-->_1.Except({_2})
406+ _1->excludingAt(_2) |-->_1.Take(_2-1).Concat(_1.Skip(_2))
409407_1->excludingFirst(_2) |-->Domain.MambaHelper.RemoveFirst(_1,_2)
410408
411409_1->hasPrefix(_2) |-->_1.StartsWith(_2)
0 commit comments