From the bibliography of chapter 1 of the 1962 A Programming Language, I found this intriguingly concise description of a forward-Polish (Lukasiewicz) Logic Machine. And I think I'm with it up to this part on the Logic Function F:
What does (2a) mean? How is this a function?
Here's my implementation (in PostScript) of everything up to that part (completed Postscript, C version):
%http://www.ams.org/journals/mcom/1954-08-046/
/L{length}def % length of string
/T{ % i D tail(i) of string
2 copy L le{ % i<=L(D)
dup length 2 index sub % i D L(D)-i
3 2 roll getinterval % D[L-i.*i]
}{ % i>L(D)
exch pop % D
}ifelse
}def
/H{ % i D head(i) of string
2 copy L le{ % i<=L(D)
0 % i D 0
3 2 roll getinterval % D[0.*i]
}{
exch pop % D
}ifelse
}def
/Wtab 1 dict def
1 0 1 255{Wtab exch 2 index put}for pop
0 (N) {Wtab exch 2 index put}forall pop
-1 (KA) {Wtab exch 2 index put}forall pop
/W{ % weight of string or char
dup type /integertype eq {
Wtab exch get
}{
0 exch { W add } forall
}ifelse
}def
%Wtab{exch =only( )=only =}forall
%(KAxyz)W =
/D{ % D(d) = 1 - W(d)
1 exch W sub
}def
/Wmax{ % Wmax(D) = Max(W[T_i(D)]) for i > 0
[ exch
0 1 2 index L { % [ ... D i
1 index T % [ ... D T(i,D)
W
exch % [ ... W(T(i,D)) D
} for
pop % [ ... W(T(i,D))
counttomark 0 eq { pop 0 }{
{
counttomark 1 eq { exch pop exit } if
2 copy lt { exch } if pop
}loop
}ifelse
}def
/Wmin{ % Wmin(D) = Min(W[T_i(D)]) for i > 0
[ exch
0 1 2 index L { % [ ... D i
1 index T % [ ... D T(i,D)
W
exch % [ ... W(T(i,D)) D
} for
pop % [ ... W(T(i,D))
counttomark 0 eq { pop 0 }{
{
counttomark 1 eq { exch pop exit } if
2 copy gt { exch } if pop
} loop
}ifelse
}def
%(KAxyz) Wmax =
%(KAxyz) Wmin =
/PF{ % D is positive formula
Wmin 0 gt
}def
/WFF{ % D is well-formed formula
dup PF exch W 1 eq and
}def
/P(01)def
P{
W 1 ne {ERROR:W_p!=1} if
}forall
/Ptab <<
P {
dup
} forall
>>def
/F{
dup D 0 gt {
}{
}ifelse
}def