Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7008459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:44:15+00:00 2026-05-27T21:44:15+00:00

I am looking for extensional DCG test cases. Means test cases that check the

  • 0

I am looking for extensional DCG test cases. Means
test cases that check the right functioning of a DCG
processor in terms of the behaviour of the resulting
converted rules, and not in terms of its desugaring
capability.

I think I saw some such test cases once on the net.
But I lost track of them. Now I only find the following
test cases:

http://www.sju.edu/~jhodgson/wg17/Drafts/DCGs/test_cases
(Same here: http://www.sju.edu/~jhodgson/wg17/dcgs.pdf)

But they are only perpherically and intensional, i.e.
they test whether desugaring, the conversion, succeeds
or gives an error. They even don’t show what the conversion
result should be, which doesn’t bother me since I am
anyway looking for extensional DCG test cases.

Any pointers welcome.

Bye

P.S:
This one shows the conversion, but it is still intensional
and not extensional:
http://www.sju.edu/~jhodgson/wg17/GRIND.TXT
And it has for example:

expand(( a(4)-->[98] ),
   (a(4, S0, S1):- 'C'( S0,98, S1))).
expand(( a(28)--> \+b,c ),
   (a(28,_608,_609):-(b(_608,_619)->fail;_617=_608),c(_617,_609))).

But many Prolog systems use a different approach for terminals,
negation, etc.. in DCG. So an extensional test suite would
be more handy.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:44:16+00:00Added an answer on May 27, 2026 at 9:44 pm

    Just completed a couple of extensional DCG test cases. The test cases
    do cover the following:

    Predicate . / 4: Terminals
    Predicate (–>) / 2: Non-Terminals
    Predicate (,) / 4: Conjunction
    Predicate (;) / 4: Disjunction
    Predicate (->) / 4: Implication
    Predicate (+) / 3: Negatio as Failure
    Predicate ! / 2: Cut
    Predicate {} / 3: Auxiliary Conditions

    Some of the test cases check for steadfastness. The total number
    of test cases is: 56.

    The test cases do not cover push back and meta calls inside DCG.
    The test cases make use of @/3 here and then, so that when using listing/[0,1]
    the original DCG code is seen and not the expansion of it. The @/3
    is defined as follows:

    @(X) --> X.
    

    The test cases are inspired by:
    Moura, P. ed. (2010): Prolog, Part 3: Definite Clause Grammar Rules, Draft, ISO/IEC DTR 13211 3:2006, April 1, 2010

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking for a Linux application (or Firefox extension) that will allow me to scrape
I am looking for either a FireFox extension, or a similar program, that allows
I'm looking for a PHP extension that allows me to connect, bind/listen, send, and
I'm looking to see if I can design a HtmlHelper extension method that will
I was looking for extension methods and stumbled in to a function that claims
Looking for something like PyDoc that can generate a set of Wiki style pages
I'm looking for String extension methods for TrimStart() and TrimEnd() that accept a string
I currently looking to build a Google Chrome Extension that fetches bookmarks from the
I'm looking for the full list of supported linq extension methods that are compatible
I am looking for a way to remove incoming links that contain file extensions,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.