Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected .js files #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ module.exports = async function compile(Fr, fileName, ctx, config = {}) {
ctx.expressions.push(s.selT);
pu.selT = selTidx;
}
if (pu.f.length != pu.t.length ) error(s, `${s.type} with diferent number of elements`);
if (pu.f.length != pu.t.length ) error(s, `${s.type} with different number of elements`);
if (s.type == "PLOOKUPIDENTITY") {
ctx.plookupIdentities.push(pu);
} else {
Expand All @@ -293,7 +293,7 @@ module.exports = async function compile(Fr, fileName, ctx, config = {}) {
ctx.expressions.push(s.connections[j]);
ci.connections.push(etidx);
}
if (ci.pols.length != ci.connections.length ) error(s, `connection with diferent number of elements`);
if (ci.pols.length != ci.connections.length ) error(s, `connection with different number of elements`);
ctx.connectionIdentities.push(ci);
} else if (s.type == "PUBLICDECLARATION") {
if (ctx.publics[s.name]) error(s, `name already defined ${s.name}`);
Expand Down Expand Up @@ -422,7 +422,7 @@ module.exports = async function compile(Fr, fileName, ctx, config = {}) {
for (let i=0; i<ctx.expressions.length; i++) {
if (!ctx.expressions[i].simplified) {
if (ctx.config.disableUnusedError) {
console.log(`WARNING: Unused expresion ${ctx.expressions[i].poldef || i} on ${ctx.expressions[i].fileName}:${ctx.expressions[i].first_line}`);
console.log(`WARNING: Unused expression ${ctx.expressions[i].poldef || i} on ${ctx.expressions[i].fileName}:${ctx.expressions[i].first_line}`);
} else {
error(ctx.expressions[i], `Unused expression ${ctx.expressions[i].poldef || i} `);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main_pilverifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async function run() {
} else if (argv._.length == 1) {
commitFile = argv._[0];
} else {
console.log("Only one commit file at a time is permited");
console.log("Only one commit file at a time is permitted");
process.exit(1);
}

Expand Down
2 changes: 1 addition & 1 deletion src/pil.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const argv = require("yargs")
async function run() {
let inputFile;
if (argv._.length == 0) {
console.log("Only one circuit at a time is permited");
console.log("Only one circuit at a time is permitted");
process.exit(1);
} else if (argv._.length == 1) {
inputFile = argv._[0];
Expand Down
2 changes: 1 addition & 1 deletion src/pil_verifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = async function verifyPil(F, pil, cmPols, constPols, config = {}
for (let i=0; i<pil.expressions.length; i++) pols.exps[i] = {};
for (let i=0; i<pil.nConstants; i++) pols.const[i] = {};

// 1.- Prepare commited polynomials.
// 1.- Prepare committed polynomials.
for (let i=0; i<cmPols.$$nPols; i++) {
pols.cm[i].v_n = cmPols.$$array[i];
}
Expand Down
2 changes: 1 addition & 1 deletion src/polsarray.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class PolsArray {
} else if (type == "constant") {
this.$$nPols = pil.nConstants;
} else {
throw new Error("need to specify if you want commited or constant pols")
throw new Error("need to specify if you want committed or constant pols")
}

this.$$def = {};
Expand Down
4 changes: 2 additions & 2 deletions test/nonBinarySelectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ describe("Plookup and permutation selectors value Test", async function () {
assert.equal("(string):6: permutation not found w=1 values: 1:2", res);
});

it("Test (permutation - wo selector - value not enought)", async () => {
it("Test (permutation - wo selector - value not enough)", async () => {
const res = await commonTestCode(F, 'non-binary-permutation-wo-selectors-value-not-enought',
`pol commit a1, a2;
a1 is a2;
`,
{ a1: [4,3,4,4],
a2: [1,3,4,4] });
assert.equal("(string):6: permutation not enought found w=3 values: 1:4", res.join(''));
assert.equal("(string):6: permutation not enough found w=3 values: 1:4", res.join(''));
});
});