users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DCG question


From: Fabio Valbuena
Subject: Re: DCG question
Date: Wed, 11 May 2011 15:44:59 -0400




I am trying to use DCG as generative grammar so that we can generate valid source code for testing.

I have made some progress, but have few questions:

1) is there anything in gnu prolog similar to  SWI 'call_with_depth_limit'?

2) what is the best way to iterate over a 'list' that is:
 2.1) predefined max size
 2.2) random generated
 2.3) is consumed a limited number of times.

example: imagine a 'pool' of identifiers/literals. we want to pick them in random fashion, and yet have an upper bound of 'draws'.

Any input is appreciated.

Thx


reply via email to

[Prev in Thread] Current Thread [Next in Thread]