Also got an idea for the shortest Albuferia instruction
code. We don't need separate op-codes for functor
, atomic and variable.
- Short form functor(A,F):
Instead of an op-code for functor/2, just put
the arity into the instruction stream.
- Short form atomic(F):
Instead of an op-code for atomic/1, we put
the arity 0, this makes it different from functor.
- Short form var(N):
Instead of an op-code for var/1, we put the
arity -1, this makes it different from functor and
atomic.
We could also use -2 and -3 for first_var/1 and
singleton/0. Problem is we have further instructions
arity/1 and zero/0. But we might set F=undefined
for this instructions and blow them up a little.
This would be practially an op-code less encoding
of Albuferia instruction code.
It breaks down if we encode more instructions.
But so far we haven tried to encode an argument,
here the arity, in an op-code itself.