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

  • SEARCH
  • Home
  • 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

I'm looking to see if I can design a HtmlHelper extension method that will
I'm looking for a tool (macro, extension) for Visual Studio 2008 that would reformat
I was looking for extension methods and stumbled in to a function that claims
I'm looking for browser extension (for Firefox or Google Chrome) that allow me to
I'm looking for a library or extension that enables ruby to work with IRIs
I am looking for a Swing component that is an extension of a scrollpane/viewport
I'm looking for a good stock and inventory management extension for Magento 1.5.1 that
I am looking for a Firefox addon or Chrome extension that would allow me
I'm looking for String extension methods for TrimStart() and TrimEnd() that accept a string
I'm looking for a PHP extension that allows me to connect, bind/listen, send, and

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.