Skip to content

Implement fill2 __Tuple 3 n 1011

Problem to solve

When building VIIA using CleanDB 13.1.0, I run into the following error:

Error: fill2 __Tuple 3 9 1011

fill2 __Tuple 3 9 1011 is an instruction which is now generated in the bytecode of CleanDB since CleanDB 13.1.0 was released. The instruction is not implemented within the abc-interpreter.

What confuses us is that the instruction is generated for a constructor with a bitvector of size 4 while the A-arity is 3, I understood that regular ADT constructors can only have A-arguments but I wouldn't be surprised if a tuple could have B-arguments as well. This means that it probably concerns a tuple with 3 A-arguments and 1 B-argument.

In that case (I suspect I am wrong about this) I would expect a fill3 to be generated as I would assume the 3 in fill3 means that the arity of the node has to be > 2?

To reproduce this, you could create an iTasks application (to make sure the abc-interpreter is used) which uses CleanDB 13.1.0. If you want me to do this, let me know.

The current behavior is that compilation crashes with the aforementioned error.

The expected behavior is that the abc-interpreter is either able to process this instruction or that the code-generator generates an invalid instruction and the behavior of the abc-interpreter is therefore valid.

Proposal

I propose to attempt to generate code for fill2 __Tuple 3 n bv where the number of 1 bits in bv is 3.

Documentation

Documentation for the fill2 instruction should be added.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information