Giter VIP home page Giter VIP logo

pseudo-boolean's Issues

Empty sum problem

It is possible to generate OPB files that contain empty <sum>.

> putStr $ toOPBString $ Formula{ pbObjectiveFunction = Just [], pbConstraints = [], pbNumVars = 0, pbNumConstraints = 0 }
* #variable= 0 #constraint= 0
min: ;
> putStr $ toOPBString $ Formula{ pbObjectiveFunction = Nothing, pbConstraints = [([], Ge, 0)], pbNumVars = 0, pbNumConstraints = 1 }
* #variable= 0 #constraint= 1
>= 0;

But empty <sum> is not allowed in the grammar:

<sum>::= <weightedterm> | <weightedterm> <sum>

and our parser based on this grammar rejects it.

This causes parsing errors.
e.g. msakai/toysolver#60 (comment)

pseudo-boolean-0.1.0.0 fails its test suite

Citing from http://hydra.cryp.to/build/887541/log/raw:

Running 1 test suites...
Test suite TestPBFile: RUNNING...
Main
  readUnsignedInteger:                OK
    +++ OK, passed 100 tests.
  exampleLIN:                         OK
  exampleNLC1:                        OK
  exampleNLC2:                        OK
  exampleWBO1:                        OK
  exampleWBO2:                        OK
  exampleWBO3:                        OK
  exampleLIN file:                    OK
  exampleNLC1 file:                   OK
  exampleNLC2 file:                   OK
  exampleWBO1 file:                   OK
  exampleWBO2 file:                   OK
  exampleWBO3 file:                   OK
  exampleLIN PBS file:                OK
  exampleLIN nohint file:             OK
  exampleWBO1 nohint file:            OK
  exampleWBO1 notop file:             OK
  normalized 1096 cudf paranoid:      FAIL
    Exception: test/samples/normalized-1096.cudf.paranoid.opb: openBinaryFile: does not exist (No such file or directory)
  normalized mds 50 10 4:             OK
  normalized opt market split 4 30 2: OK
  pigeonhole 5 4:                     OK
  readUnsignedInteger maxBound bug:   OK

1 out of 22 tests failed (0.02s)
Test suite TestPBFile: FAIL

It appears that file is missing from the release archive.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.