Skip to content

Test case with 2 contradictory clauses runs forever #36

@insideoutclub

Description

@insideoutclub

Here's the test case:

require("babel-polyfill");
const sat = require("@aureooms/js-sat");

const instance = sat.from.parities([[80], [81]]);
console.log(JSON.stringify(instance));
console.log(sat.decide(instance));

On my x64 Windows box, when I save this as sat.js and run "node sat.js", I get the following:

node sat.js
{"clauses":[[80],[81]],"n":41}

It just spins forever using up one my CPUs. If I change the clauses to [[0], [1]], it runs quickly and correctly decides that these clauses are not satisfiable. Starting around [[50], [51]], things get really slow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions