Scryer-prolog: More conformity errors

Created on 9 Sep 2018  路  16Comments  路  Source: mthom/scryer-prolog

#18, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#25">#25, #222, #223, #27, #30, #34, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#42">#42, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#50">#50, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#51">#51, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#51">#180, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#136">#136, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#79">#79, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#211">#211, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#132">#132, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#138">#138, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#138">#181, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#94">#94, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#96">#96, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#97">#97, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#114">#114, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#288">#288, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#292">#292, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#293">#293, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#270">#270, href="http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_testing#274">#274.

Please also have a look at the corrected 7.10.5.

Most helpful comment

I am also extremely interested in constraint solvers! At the same time, for me personally, strong syntactic guarantees are also a huge motivation to port constraint solvers to Scryer Prolog.

The reason is that without these guarantees, I cannot easily tell what is standard syntax and what is not, and having strong built-in guarantees for this helps me to make the system more portable.

Therefore, I would like to help to produce a list of conformity tests where Scryer currently fails. The "invalid regexp" issue seems to be a problem in a regular expression within the Elisp program, and not due to the Scryer prompt change.

All 16 comments

Clarification for #25:

prolog> ?- read(X).
writeq(.
X = writeq.
prolog> 

That is incorrect. Instead, a syntax error should be issued.

@UWN : I tried to perform these automated tests, using Emacs, and it seems to me that no matter where I press F12, I get:

Invalid regexp: "Unmatched ) or \\)"

Could you please clarify these instructions, or provide a simple definition that lists all cases where there are still problems? Thank you a lot!

The toplevel seems to have changed in the meantime. It seems mthom is not interested in this anyway.

I am, though I will admit it doesn't have the same amount of appeal as getting constraint solvers working.

I am also extremely interested in constraint solvers! At the same time, for me personally, strong syntactic guarantees are also a huge motivation to port constraint solvers to Scryer Prolog.

The reason is that without these guarantees, I cannot easily tell what is standard syntax and what is not, and having strong built-in guarantees for this helps me to make the system more portable.

Therefore, I would like to help to produce a list of conformity tests where Scryer currently fails. The "invalid regexp" issue seems to be a problem in a regular expression within the Elisp program, and not due to the Scryer prompt change.

@trika: This is my updated version for testing:

(defun scryer-copyline ()
  (interactive)
  (re-search-forward "<td\\\(><a name=[0-9]*>\\\([0-9]*\\\)</a><td>\\\|  +>\\\)[\t ]*\\\(&nbsp;/[*][*]/\\)?")
  (let
      ((nr (match-string 2))
       (b (buffer-substring (point) (line-end-position))))
    (setq b (replace-regexp-in-string "<br>" "\n" b))
    (setq b (replace-regexp-in-string "\&nbsp;" " " b))
    (setq b (replace-regexp-in-string "\&gt;" ">" b))
    (next-line)
    (other-window 1)
    ;; (kill-new b)))
    (insert (format "/*%d*/" (string-to-number nr)) " catch((read(Goal_0),Goal_0),error(Error,_),true),nl.\n")
    (insert b)
    (comint-send-input)
    (other-window 1)
    (recenter-top-bottom 1)))

I am, though I will admit it doesn't have the same amount of appeal as getting constraint solvers working.

Should the emphasis be on "working", you would be very interested that you are as conforming as you can. For, testing of constraints requires conformity. In particular w.r.t. errors.

Just to give you an idea: There is another system that does silent failure in place of instantiation errors most of the time. A relatively new library for constraints now produces a failure. Why? Well, this means a lot of work debugging whether it's the intended failure or not. That's constrained programming, not constraint logic programming.

@mthom: Are you alerted of the update above?

Yes.

Here is a short video that shows how these Emacs definitions can be used to quickly go through the tests:

https://www.metalevel.at/prolog/videos/conformity_testing

@mthom: I hope you find this useful to correct the remaining syntax issues. Please let me know any time if you have any questions about these definitions!

Wow, thank you.

@UWN http://www.complang.tuwien.ac.at/ulrich/rusty-prolog/#2 - maybe you want to update the URLs to the repository/name of it?

@XVilka: Please refer to .../scryer-prolog.

@UWN thanks, it still mentions /opt/gupu/rusty-wam/ or https://github.com/mthom/rusty-wam

Please have a look at #103

Was this page helpful?
0 / 5 - 0 ratings

Related issues

triska picture triska  路  3Comments

triska picture triska  路  3Comments

notoria picture notoria  路  3Comments

UWN picture UWN  路  3Comments

dcnorris picture dcnorris  路  3Comments