Giter Site home page Giter Site logo

Comments (9)

cpitclaudel avatar cpitclaudel commented on May 23, 2024

Hi Ralf,

I don't think there's anything we can do about this with the current architecture; Coq doesn't expose parsing primitives to us, so we can only guess where sentences start and end.

Feel free to reopen if you feel that there's something we could do in this particular case; in general a good way to work around these problems is to use a symbol without dots; possibly a Unicode symbol (you can input them with company-match, with company-coq, or with the TeX input method in Emacs)

from pg.

RalfJung avatar RalfJung commented on May 23, 2024

Closing the bug kind of makes it feel like you don't even accept that this is a deficiency. if you want to keep this bug separate from those that you think you can solve, GitHub has this handy "tag" feature :)

Considering the implementation... I'm not exactly sure what happens right now. Something is sent to Coq, and then everything freezes. Is it Coq that freezes? Or is it just giving an unexpected error back to PG, to which PG react badly? The latter could be improved.

Finally, of course, Coq does provide an interface better suited for IDEs than coqtop...

from pg.

cpitclaudel avatar cpitclaudel commented on May 23, 2024

Closing the bug kind of makes it feel like you don't even accept that this is a deficiency. if you want to keep this bug separate from those that you think you can solve, GitHub has this handy "tag" feature :)

Don't read too much in a single bit of information :) It's definitely an issue, and there are many ways to run into it; notations are one; unmatched delimiters are another. I've added a help-wanted tag and reopened.

Considering the implementation... I'm not exactly sure what happens right now. Something is sent to Coq, and then everything freezes. Is it Coq that freezes? Or is it just giving an unexpected error back to PG, to which PG react badly? The latter could be improved.

PG sends stuff to Coq, and waits for an answer. Since what PG sent is not a full sentence, Coq waits for more input.

Finally, of course, Coq does provide an interface better suited for IDEs than coqtop...

Indeed; and if you follow the coq-club and coqdev mailing lists, I'm sure you've heard about my recent efforts in that direction :) Unfortunately the new API is not backwards compatible, isn't officially documented, and is still in flux. Of course, any help transitioning to that API is welcome.

from pg.

RalfJung avatar RalfJung commented on May 23, 2024

Don't read too much in a single bit of information :) It's definitely an issue, and there are many ways to run into it; notations are one; unmatched delimiters are another. I've added a help-wanted tag and reopened.

Thanks!
This (maybe?) should also reduce the likelihood that this is reported as a duplicate, and/or gets lost.

So, the freeze is because Coq is waiting for PG to send more input, and PG is waiting for Coq to reply to the input it sent? Ouch.

Is there some "immediate" reaction that Coq always shows to input, even if that input happens to be a diverging tactic application?

from pg.

cpitclaudel avatar cpitclaudel commented on May 23, 2024

Is there some "immediate" reaction that Coq always shows to input, even if that input happens to be a diverging tactic application?

Unfortunately not :/

from pg.

Matafou avatar Matafou commented on May 23, 2024

Note that coqide does not like your notation either... It fails more
gracefully though.

Let us say that this is a limitation of the current protocol used by PG: PG
is supposed to send exactly one complete command at a time, this is a
strong constraint on which the whole PG architecture is based. If it sends
an incomplete command (or more than one) it loses synchronization with the
prover (or get stuck). The splitting of a buffer into a list of complete
commands is made by pg in a syntactic way: mainly by detecting dots
followed by a space. Coqide does something similar.

The right way to do this would be to ask Coq itself to perform the
splitting of the buffer. Maybe once we switch to the xml protocol...

P.

2016-02-23 18:57 GMT+01:00 Clément Pit--Claudel [email protected]:

Is there some "immediate" reaction that Coq always shows to input, even if
that input happens to be a diverging tactic application?

Unfortunately not :/


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

from pg.

ejgallego avatar ejgallego commented on May 23, 2024

Just to mention than the following is not fully accurate anymore:

I don't think there's anything we can do about this with the current architecture; Coq doesn't expose parsing primitives to us, so we can only guess where sentences start and end.

Quite reasonable mechanisms are exposed now, even tho our current internal prototypes are based on full-buffer parsing or LSP.

from pg.

cpitclaudel avatar cpitclaudel commented on May 23, 2024

Right, of course.
In the OP's case it's even simpler, too, because just sending a delimited query makes it possible for Coq to return the syntax error immediately.

from pg.

ejgallego avatar ejgallego commented on May 23, 2024

We can make the good old coqtop take delimited queries easily, something such as --expect-0eol could be added if you folks would use it.

from pg.

Related Issues (20)

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.