fluencelabs / aquavm

AquaVM interprets AIR – a π-calculus-derived set of instructions that the Aqua language compiles to
GNU Affero General Public License v3.0
147 stars 14 forks source link

feat(air)!: change fold over canon map iterator contents [fixes VM-620] #843

Closed raftedproc closed 3 months ago

raftedproc commented 4 months ago

This is to align the spec with the implementation. The spec tells fold iterates over unique(conflicts are resolved with LastWriteWin policy) kv pairs. The implementation violates this delivering all kv pairs together with duplicates.

monoid commented 4 months ago

It worth adding a small tests that just demonstrates specific bit of functionality, e.g. fold_canon_stream_map_duplicate_keys.

raftedproc commented 4 months ago

It worth adding a small tests that just demonstrates specific bit of functionality, e.g. fold_canon_stream_map_duplicate_keys.

JFYI I altered the existing test to test duplicates iterating with fold over SCM. Here is the duplicate key.

linear[bot] commented 3 months ago

VM-620 CanonStreamMap spec/impl inconsistency - fold over returns all kvpairs