Commit Graph

13462 Commits

Author SHA1 Message Date
David Greenspan
1a2953cf4d Tests that cover more code
For example, these tests would have caught the `var p = pv.p` typo,
and also the place `costWeights` was incorrectly set to `1` in
Solver#minimize.

We also test that conflicting top-level constraints are not a
problem if the package they refer to does not need to be selected.
2015-03-10 00:50:12 -07:00
David Greenspan
f0c817f4e4 Treat top-level constraints properly as weak
Don't throw an error just because notice that top-level constraints
aren't satisfiable for some package.  We might not need that package.
2015-03-10 00:23:10 -07:00
David Greenspan
b68f91db99 Fix glasser's "actual bug"
That's what we've been calling it.

To see this break and then work, add the following line above
the comment that begins `// lock down versions...`:

```
self.solution = logic.solveAssuming('bar');
```

And then run the test "previous solution no longer needed"
in input-tests.js.

The old code would lock down "bar", including the fact that it
is in the current solution.  The new code only locks down the version
number in the case where "bar" is used, so it is able to be optimized
away.
2015-03-10 00:09:09 -07:00
David Greenspan
76cf2f28ad Call "nudge" from constraint solver 2015-03-09 23:50:48 -07:00
David Greenspan
979554ab55 Ban versions not matching top-level constraints
in solver.  This should speed things up a lot!
2015-03-09 23:44:47 -07:00
David Greenspan
de5e67356a Some clean-up and allow minimization strategies 2015-03-09 23:15:25 -07:00
David Greenspan
5810fd6c81 Prevent stack overflow in logic-solver
Turn recursive addClauses->useFormulaTerm->addClauses into iterative.
Also do a couple tweaks that seem to improve performance.

The "stack overflow bug" case is now hovering around 10-20 seconds.
(It's a failure case, but it sure takes a while to fail.)
2015-03-09 22:20:34 -07:00
David Greenspan
eb9698ae7b Reproduce weird stack overflow bug in a unit test 2015-03-06 18:42:50 -08:00
David Greenspan
20e308163b Fix a test 2015-03-06 18:35:31 -08:00
David Greenspan
f3d3df8624 Space out constraint solver errors 2015-03-06 17:02:44 -08:00
David Greenspan
d9725e2361 Unit test for last commit 2015-03-06 16:55:36 -08:00
David Greenspan
ade555d903 Have CS.Input convert to real PackageConstraints
It caused an exception in an app when a "fake" PackageConstraint made
it into conflict explanation.
2015-03-06 16:29:56 -08:00
David Greenspan
e27840aa24 Improve comments on Steps and reachability 2015-03-06 16:04:38 -08:00
David Greenspan
eda46a2824 Get rid of the "zeroGoal" flag
From running benchmarks while changing the code:
* It doesn't seem to slow things down to *always* try to "hit 0"
  when minimizing
* It does seem to slow things down if the "<= 0" constraint is
  expressed using <= instead of "forbid the terms with non-zero
  weights"

This change also fixes a bug where we required terms with zero
weights to be 0.
2015-03-06 15:53:31 -08:00
David Greenspan
da14f8d9a2 Fix typo 2015-03-06 12:49:14 -08:00
David Greenspan
a78393b1e7 Implement "allAnswers" flag in constraint solver
I thought it would help me write a test for a bug that turned
up in code review, but it doesn't.  Still, I'm sure it will be
useful.

Also, Logic.Solution#getFormula is something I've been wanting
to write for a while.
2015-03-06 12:47:34 -08:00
David Greenspan
930a55f855 Code review feedback: solver.js 2015-03-06 12:11:49 -08:00
David Greenspan
cc91f8e896 Improve VersionPricer understandability
Changes suggested by code review, better organization, comments
2015-03-05 18:59:51 -08:00
David Greenspan
d34fc87d9b Recompile minisat 2015-03-05 17:55:42 -08:00
David Greenspan
a5c08b57de Remove all required: false in tool commands
As glasser mentioned in code review, it's totally unnecessary
2015-03-05 11:53:46 -08:00
David Greenspan
f34e06e69c Change name of --breaking
Put in our improved name and usage docs
2015-03-05 11:43:31 -08:00
David Greenspan
a84f89c007 Code review fixes 2015-03-05 11:43:06 -08:00
David Greenspan
9869245b8e Improve comments in optimize.js 2015-03-05 08:48:09 -08:00
David Greenspan
90c6b3e1bb No longer shift vars by 1 in MiniSat C wrapper
See 26e00d4d75
2015-03-05 08:23:24 -08:00
David Greenspan
023d471831 Code review changes to minisat_wrapper
All except fixing the 0-based/1-based thing
2015-03-04 17:46:14 -08:00
David Greenspan
8789a91d58 More code review changes (minisat_wrapper) 2015-03-04 16:45:42 -08:00
David Greenspan
b4da76a7e8 Improve comments 2015-03-04 14:22:45 -08:00
David Greenspan
db1e2ec823 Rebuild MiniSat with emscripten 1.28, new comment 2015-03-04 10:55:23 -08:00
David Greenspan
7ca88892e4 Add note to a logic_test 2015-03-04 10:10:42 -08:00
David Greenspan
1a648cf4c4 Clean up and comment Termifier interface 2015-03-04 10:06:37 -08:00
David Greenspan
8f84a60523 Make the "pushToNth" minor change from review
Just for clarity.

Add a needed test of weightedSum that catches "holes" in the array.
2015-03-04 09:11:57 -08:00
David Greenspan
f97f8f516a Fixes from initial review of logic.js except for…
…the pushToNth fix and documenting the "termifier" interface
2015-03-03 13:06:55 -08:00
David Greenspan
faa07c3e29 More code review changes; explain polarity
FormulaInfo is a constructed class
2015-03-03 12:47:47 -08:00
David Greenspan
8c095667e8 toNameTerm and toNumTerm no longer take arrays
this feature wasn't used anyway
2015-03-03 11:56:17 -08:00
David Greenspan
73306afa06 NameTerms can't be numbers or just - chars 2015-03-03 11:45:44 -08:00
David Greenspan
55c788a62f Fix bad order of declarations 2015-03-03 11:42:24 -08:00
David Greenspan
050fae168f Merge remote-tracking branch 'origin/devel' into use-logic-solver 2015-03-02 19:17:40 -08:00
Slava Kim
cbff527131 Add a spinner option to the admin progressbar-test command 2015-03-02 16:01:31 -08:00
Slava Kim
4af325b222 Add a dummy progress-bar test command for testing 2015-03-02 15:12:21 -08:00
Avital Oliver
4265cf8c44 Simplify Windows Meteor install path detection 2015-02-27 16:29:24 -08:00
Avital Oliver
1d828b5a16 Windows installer: Change a color
The version number on the bottom left corner is now black instead of
white.
2015-02-27 14:33:15 -08:00
Slava Kim
312b6afbc6 Merge branch 'windows-custom-location' into devel 2015-02-27 12:23:38 -08:00
David Glasser
0c0cbe12be Update to Mongo driver 1.4.32
This contains a PR we just submitted to help with error handling
for #2534.
2015-02-27 12:00:25 -08:00
Slava Kim
385a16ab16 Fix spacebars output tests to accommodate recent compiler output changes 2015-02-27 11:44:04 -08:00
Matt DeBergalis
13e98f5a4a switch to forums 2015-02-26 20:13:46 -08:00
Slava Kim
f6dfcc4032 Remove an extra colon 2015-02-26 19:01:30 -08:00
Slava Kim
de052f11f8 Merge branch 'tracker-profiler' into devel
Actually contains annotations to Blaze useful for tracker-profiler but not the
package itself. These changes are also useful to the future tools.
2015-02-26 18:58:49 -08:00
Slava Kim
996369e6a5 Expose the active computations held within Tracker 2015-02-26 18:45:13 -08:00
Slava Kim
be93ffc1d7 Annotate Blaze autoruns for debugging and better errors 2015-02-26 18:44:52 -08:00
Avital Oliver
b587efdab5 Add README for building Windows installer 2015-02-26 14:10:39 -08:00