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

Add #lang herbie/input skeleton #120

Closed
wants to merge 2 commits into from

Conversation

jackfirth
Copy link
Contributor

Defines only surface syntax and error checking. A #lang herbie/input
program does nothing but check that herbie tests are well formed and
print out some messages. The following conditions are checked:

  • Duplicate variables
  • Unused variables
  • Undefined variables

Additionally, the general structure of test cases is checked. A test
case is an s-expression containing herbie-test, a string description,
a variable list, and an equation. Malformed test cases produce syntax
errors highlighting the cause.

Defines only surface syntax and error checking. A `#lang herbie/input`
program does nothing but check that herbie tests are well formed and
print out some messages. The following conditions are checked:

- Duplicate variables
- Unused variables
- Undefined variables

Additionally, the general structure of test cases is checked. A test
case is an s-expression containing `herbie-test`, a string description,
a variable list, and an equation. Malformed test cases produce syntax
errors highlighting the cause.
Accidentally left this in
@jackfirth
Copy link
Contributor Author

Looking over the Hamming examples, it seems the herbie input syntax has changed. Do not merge this yet, it should use the "official" syntax (and probably document it).

@pavpanchekha
Copy link
Contributor

Yep, the "correct" Herbie syntax is in a bit of a weird flux.

The Hamming examples are in this "lambda" syntax because we wanted to add
features for marking expected-failure tests. Most of the other tests are in
the old "herbie-test" format. In the future we will likely move wholesale
to the FPBench format that we are currently working on with some other
folks in the FP community.

We haven't really decided on what we want for the 1.0 release.

—Pavel Panchekha

On Wed, Apr 27, 2016 at 1:30 PM, Jack Firth notifications@github.com
wrote:

Looking over the Hamming examples, it seems the herbie input syntax has
changed. Do not merge this yet, it should use the "official" syntax (and
probably document it).


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#120 (comment)

@jackfirth
Copy link
Contributor Author

Where can I find information about the FPBench format?

@HazardousPeach
Copy link
Contributor

@jackfirth
Copy link
Contributor Author

Would it make sense for a separate package to provide syntax and data structures for working with the FPBench format?

@pavpanchekha
Copy link
Contributor

That'd be amazing. FPBench is still a work in progress (we're going to try
to publish it at NSV'16) but starting support for it would be amazing.

On Fri, Apr 29, 2016, 16:25 Jack Firth notifications@github.com wrote:

Would it make sense for a separate package to provide syntax and data
structures for working with the FPBench format?


You are receiving this because you commented.

Reply to this email directly or view it on GitHub
#120 (comment)

@jackfirth
Copy link
Contributor Author

Where should such a package go? A directory in the FPBench repo?

@pavpanchekha
Copy link
Contributor

Probably a new file in the tools/ directory of the FPBench repository.

—Pavel Panchekha

On Fri, Apr 29, 2016 at 6:52 PM, Jack Firth notifications@github.com
wrote:

Where should such a package go? A directory in the FPBench repo?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#120 (comment)

@pavpanchekha
Copy link
Contributor

@jackfirth, I've been doing some changes to Herbie in the mean while, and have merged a syntax checking framework into the develop branch, where most of the work is happening these days. The code you wrote in this PR was quite useful as a guide, though I ended up doing things a bit differently—I don't define a language, instead using the basic read-syntax functionality.

If you've got time, I'd love to chat about how defining a custom language could improve on what we've got now. For now, I'm marking the PR closed.

@jackfirth
Copy link
Contributor Author

jackfirth commented Feb 7, 2017

SGTM. I don't have the bandwidth to work on this at the moment, but I'm interested in discussing how to take Herbie's new syntax checking further. In particular, a #lang fpcore package could build on top of turnstile to add static type checking of equations.

@pavpanchekha
Copy link
Contributor

Thanks, @jackfirth. I sent you an email to set up a time to chat. Type checking is a good call,: it could help catch bugs when writing preconditions, plus one day we'd like to do more types than just scalar floating point values. Thanks for the reference to turnstile.

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

Successfully merging this pull request may close these issues.

None yet

3 participants