Help / Release / J 6.01 / 13 : y Improved

From J Wiki
Jump to navigation Jump to search


>> << Pri JfC LJ Phr Dic Voc !: Rel NuVoc wd Help Release



13 : y Improved

initial writing: 2005-04-11
last updated: 2005-04-14


The 13 : y translator (translating from explicit to tacit) has been improved in several ways. The following table describes the area of improvement, and examples of an explicit sentence, the improved translated result, and the previous translated result.

The new N0 V1 V2 train is exploited.

3+4*y.
3 + 4 * ]
3: + 4: * ]

13+14*y.
13 + 14 * ]
13"_ + 14"_ * ]

('abc' i. y.){'ABC'
'ABC' {~ 'abc' i. ]
('abc'"_ i. ]) { 'ABC'"_

Commutative verbs and “commutative pairs” are exploited.

y.+x.
+
]+[

y.+7
7 + ]
] + 7:

(x.+y.)-(y.*x.)
+ - *
+ - ] * [

y.>17
17 < ]
] > 17"_

(-:x.+y.)*x.%y.
% * [: -: +
([: -: +) * %

Improved handling of the [ verb.

3+t [ t=. *:y.
3 + *:
3: + ([: *: ]) [ [: *: ]

Improved handling of local definitions.

3+t [ t=. *:y.
3 + *:
3: + ([: *: ]) [ [: *: ]

(t>0)#t=. expensive y.
[: ((0 < ]) # ]) expensive
(expensive > 0"_) # expensive

(s<.t)-s>.t [ s=. x.*y. [ t=. x.%y.
* (<. - >.) %
(([ * ] [ %) <. %) - ([ * ] [ %) >. % [ [ * ] [ %

('d'=4{"1 >4{"1 t)#t=. 1!:0 y.
[: (('d' = 4 {"1 [: > 4 {"1 ]) # ]) 1!:0
('d'"_ = 4: {"1 [: > 4: ({"1) 1!:0) # 1!:0



>> << Pri JfC LJ Phr Dic Voc !: Rel NuVoc wd Help Release