tuura / scenco-core

Collection of encoding algorithms for conditional graphs
Other
0 stars 1 forks source link

Encoding interface between Haskell <=> C++ #6

Closed allegroCoder closed 8 years ago

allegroCoder commented 8 years ago

How to import an array of strings from a c++ function. The array contains all the opcodes associated to the graphs in the form "01", "-" (representing a don't use bit)

@snowleopard let me know if you have a quick suggestion. I will explore how to do it myself though.

snowleopard commented 8 years ago

First of all, I would suggest to avoid using strings for the representation. Instead of a string, we should use an array of integer values from an enumeration type: ZERO, ONE, DONT_USE, or something similar. Let's try to import one such encoding first and then see how to go further!

snowleopard commented 8 years ago

We should try to match the representation we have in Haskell, with the one we have in C++. That should simplify the interface. This means that we probably need another constant UNKNOWN.

allegroCoder commented 8 years ago

I tried to keep the old SCENCO structure so far. It won't be difficult to modify the internal c++ structure to allow two different types for the encoding: the one in input accepting (ONE - ZERO - UNKNOWN - DONT_USE), and the one for the outuput accepting (ONE - ZERO - DONT_USE).

In order not to allow any inconsistencies for the final opcodes.

allegroCoder commented 8 years ago

So far I would close the issue. We might re-open it in the case the interface will need any modifications.