Hello,
I tried to compile the IO_demo provided with SCALE-MAMBA, and it failed as shown below. No schedule (.sch) file was created. Am I doing something wrong? Or is this an issue with the IO_demo code itself? If so, how to fix it?
Note, the tutorial program, on the other hand, compiled and worked fine.
More generally, if I have 3 players, and I want them to compute a simple sum of their private inputs, and then reveal it to all 3 of them, how do you that in SCALE-MAMBA? I tried the second block of code below, but it did not compile. Any thoughts?
Thanks,
Mohamed.
================================
./compile.sh Programs/IO_demo
Running
./compile-mamba.py -A -n -r -u -s Programs/IO_demo
Compiling program in Programs/IO_demo
IO_demo
p = 340282366920938463463374607431768211507
Prime size: 128
Default bit length: 64
Default statistical security parameter: 40
Under Over Flow flag: True
Compiling file Programs/IO_demo/IO_demo.mpc
Compiling basic block IO_demo-0--0
Processing tape IO_demo-0 with 1 blocks
Warning: double write at register r21
line 170: input_int r21, r2
trace: <omitted>
=====================
Toy code to compute sum of private inputs
open_channel_with_return(10)
open_channel_with_return(11)
open_channel_with_return(12)
print_ln("Player zero enter a private gfp number")
a=sint.get_private_input_from(0,10)
print_ln("Player one enter a private gfp number")
b=sint.get_private_input_from(1,11)
print_ln("Player two enter a private gfp number")
c=sint.get_private_input_from(2,12)
d=a+b+c
print_ln("The sum is being opened to all players")
d.reveal_to(0,10)
d.reveal_to(1,11)
d.reveal_to(2,12)
print_ln(' d=%s',reveal(d))
close_channel(10)
close_channel(11)
close_channel(12)
==============
Compiler error trace
File "Programs/simple_sum/simple_sum.mpc", line 1, in <module>
open_channel_with_return(10)
Compiler.exceptions.CompilerError: Invalid argument "10" to instruction: open_channel r0, 10
Invalid register argument