Skip to content

Commit

Permalink
Fix repair_key and add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreSenellart committed Jan 22, 2024
1 parent bba98e1 commit 3e0381a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions sql/provsql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ BEGIN
select_key_att := key_att;
END IF;

EXECUTE format('ALTER TABLE %I ADD COLUMN provsql_temp UUID UNIQUE DEFAULT uuid_generate_v4()', _tbl);
EXECUTE format('ALTER TABLE %I ADD COLUMN provsql_temp UUID UNIQUE DEFAULT public.uuid_generate_v4()', _tbl);

FOR key IN
EXECUTE format('SELECT %s AS key FROM %I GROUP BY %s', select_key_att, _tbl, key_att)
Expand All @@ -158,7 +158,7 @@ BEGIN

EXECUTE format('SELECT COUNT(*) FROM %I %s', _tbl, where_condition) INTO nb_rows;

key_token := uuid_generate_v4();
key_token := public.uuid_generate_v4();
ind := 1;
FOR record IN
EXECUTE format('SELECT provsql_temp FROM %I %s', _tbl, where_condition)
Expand Down
7 changes: 4 additions & 3 deletions src/BooleanCircuit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -623,11 +623,12 @@ double BooleanCircuit::independentEvaluationInternal(
auto group = c;
if(getGateType(c) == BooleanGate::MULIN) {
group = *getWires(c).begin();
if(local_mulins.find(g)==local_mulins.end()) {
if(seen.find(g)!=seen.end())
if(local_mulins.find(group)==local_mulins.end()) {
if(seen.find(group)!=seen.end())
throw CircuitException("Not an independent circuit");
else
seen.insert(g);
seen.insert(group);
local_mulins.insert(group);
}
auto p = std::make_pair(group, getInfo(c));
if(mulin_seen.find(p)==mulin_seen.end()) {
Expand Down
2 changes: 1 addition & 1 deletion test/schedule
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ test: d4 dsharp weightmc c2d

# Probability computation using tree decompositions, independent
# probability computation, and default computation
test: treedec_simple treedec default_probability_evaluate independent
test: treedec_simple treedec default_probability_evaluate independent repair_key

# Expected Shapley and Banzhaf value computation
test: shapley
Expand Down

0 comments on commit 3e0381a

Please sign in to comment.