Expected communication cost in compiler.

This commit is contained in:
Marcel Keller
2025-12-24 13:46:43 +11:00
parent f10864f85e
commit bf7f8f4b65
194 changed files with 2768 additions and 884 deletions

View File

@@ -24,7 +24,7 @@ run_player $PROTOCOL-prep-party.x $* &
export PLAYERS=2
export LOG_SUFFIX=
export PORT=
export PORT=$[PORT+3]
. $HERE/run-common.sh

View File

@@ -10,9 +10,15 @@ from Compiler.program import *
if len(sys.argv) <= 1:
print('Usage: %s <program>' % sys.argv[0])
for tapename in Program.read_tapes(sys.argv[1]):
def run(tapename):
filename = 'Programs/Bytecode/%s.asm' % tapename
print('Creating', filename)
with open(filename, 'w') as out:
for i, inst in enumerate(Tape.read_instructions(tapename)):
print(inst, '#', i, file=out)
if sys.argv[1].endswith('.bc'):
run(os.path.basename(sys.argv[1][:-3]))
else:
for tapename in Program.read_tapes(sys.argv[1]):
run(tapename)

View File

@@ -11,9 +11,10 @@ gdb_screen()
prog=$1
shift
IFS=
name=${*/-/}
name=$screen_prefix${*/-/}
IFS=' '
screen -S :$screen_prefix$name -d -m bash -l -c "echo $*; echo $LIBRARY_PATH; gdb $prog -ex \"run $*\""
name=${name:0:70}
screen -S :$name -d -m bash -l -c "echo $*; echo $LIBRARY_PATH; gdb $prog -ex \"run $*\""
}
valgrind_screen()
@@ -58,7 +59,10 @@ run_player() {
if test "$prog"; then
log_prefix=$LOG_PREFIX$prog-
fi
if test "$BENCH"; then
if test "$LOGPROT"; then
log_prefix=${log_prefix}single-
fi
if test "$BENCH" -o "$LOGPROT"; then
log_prefix=$log_prefix$bin-$(echo "$*" | sed 's/ /-/g')-N$players-
fi
set -o pipefail

View File

@@ -59,6 +59,15 @@ for dabit in ${dabit:-0 1 2}; do
done
fi
test_vm rep4-ring $run_opts --semi-honest
if test "$run_opts" != -F -a `uname` != Darwin; then
./compile.py $compile_opts -E astra tutorial
for i in astra trio; do
test_vm $i $run_opts
done
fi
./compile.py $compile_opts tutorial
for i in rep-field shamir sy-rep-field \
@@ -84,6 +93,7 @@ if test $dabit != 0; then
./compile.py -R 64 -Z 4 tutorial
test_vm rep4-ring $run_opts
test_vm rep4-ring $run_opts --semi-honest
./compile.py -R 64 -Z ${PLAYERS:-2} tutorial
test_vm semi2k $run_opts