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

feature request: possibility of outputting just a few trees #2

Open
odanoburu opened this issue Jun 26, 2018 · 3 comments
Open

feature request: possibility of outputting just a few trees #2

odanoburu opened this issue Jun 26, 2018 · 3 comments

Comments

@odanoburu
Copy link
Contributor

while writing a new lin, it is nice to able to get fast feedback on the results. gftest can be somewhat slow depending on the tested function (:/), so having a way of getting preliminary results fast would be nice -- specially if easy to implement! if these trees look fine, one can then proceed to doing the full test.

@inariksit
Copy link
Member

Is this for just the normal mode with -f SlowFunction? For -o, I actually have this hack in place https://github.com/GrammaticalFramework/gftest/blob/master/src/Main.hs#L396-L397 , for getting the tested categories to flash by. Checking /tmp/ also works to see that it is creating bunch of trees and testing them.

The function testFun returns a full string with all results; this is in order to easier decide whether to write to stdout or to a file. If you want, you could change testFun into an IO function; instead of this unlines, make it into mapM_ print.

Another thing, if you're not doing it already, definitely compile your PGF with the GF flag --optimize-pgf! Basque doesn't even run on my computer without that.

@odanoburu
Copy link
Contributor Author

Is this for just the normal mode with -f SlowFunction? For -o, I actually have this hack in place

yes, but I could use -o too! are you using strictness to make it run faster?

Another thing, if you're not doing it already, definitely compile your PGF with the GF flag --optimize-pgf!

I'm doing it! it should probably be done by default when --make is on, given how dramatic a difference it makes!

@inariksit
Copy link
Member

are you using strictness to make it run faster?

I have no clue how to use strictness stuff in Haskell :-P that thing about printing to a file was just a random poking around and "huh this seems to work, let's keep it".

it should probably be done by default when --make is on, given how dramatic a difference it makes!

Hmm, I was trying to find out if there are reasons why it is not default--here's something in Krasimir's PhD thesis pages 76-77: "The final conclusion is that the optimized and the unoptimized grammars are semantically different." I don't know if that's good enough reason to not have optimized version as default, but at least I learned something new today!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants