Comments (2)
For larger values of maxSize, I have to wait a looong time to see anything, in the output of speculate.
The quick workaround I tended to use was to actually call Speculate multiple times, each time increasing the maxSize. You could use:
./yourprogram-s4 && ./yourprogram -s5 && ./yourprogram -s6 && ./yourprogram -s7
In some cases the runtime magnitude increases by one with each two increments of size, so the earlier runs wouldn't matter to much in the overall runtime. (This a similar process to how the seminal SmallCheck ends up retesting values of ealier series.)
I was hoping that theorems are printed as they are discovered. But I think they are all held until the end - for computing the alignment. (
report
callsprettyEquations
callstable
which wants to see all words)
If I recall correctly, the output is not lazy just because of equation alignment, but actually it is so because Speculate may use later equations to discard redundant earlier ones. It's been a while, so I could be wrong (-:
Assuming I'm not, in theory, Speculate could have an option where we only discard later (bigger) equations based on earlier (smaller) ones, so output would appear while Speculate tests and thinks. For that to happen, the reasoning engine has to become lazy. This would be non-trivial to implement as my reasoning engine is a currently sort of a can of worms.
(some handwavy technical details below)
Now about "Speculate may use later equations to discard redundant earlier ones":
One of the reasons why earlier equations may be discarded is that by default, on the term-rewriting-based reasoning module, Speculate uses a variation of Dershowitz order which is more "lexicographicky" rather than using Knuth-Bendix order, which is more based on term size.
(A technical detail of a technical detail now.) Though Speculate is not strictly lexicographic. Leaf terms are actually compared quasi-lexicographically based on the position they appear in the constants list and their arity -- so the order in constants
may influence which equations are discarded or how they are displayed. This was chosen sort of in an ad-hoc manner, to replace weird equations in examples.
Warning: the two above paragraphs are handwavy - I'm not being strict on the terms I use.
from speculate.
Thanks for explanation. Well, then just keep this issue open, as documentation for current behaviour, and reminder for possible enhancement.
from speculate.
Related Issues (12)
- Test build failure on stackage nightly HOT 3
- Basic `Listable` instances for composite types HOT 1
- stackage nightly - speculate-0.4.14 - test build fails HOT 2
- Speculate on DejaFu: `speculate: could not find Listable Thread D1 D1`
- Incorrect equations when size limit is increased. HOT 1
- Does not find Functor Composition Law HOT 2
- Provide module for treating functions as test values. HOT 1
- Grading functions HOT 2
- Do newtypes need special handling? HOT 4
- document what instances must be given HOT 1
- TypeApplications for shorter/nicer code HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from speculate.