bug-prolog
[Top][All Lists]
Advanced

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

gprolog extended via C interface ignores command-line interface argument


From: Simon Curry
Subject: gprolog extended via C interface ignores command-line interface arguments
Date: Sat, 2 Dec 2017 01:14:38 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

Hi,

I am using:

GNU Prolog 1.4.4 (64 bits)
Compiled DecĀ  1 2017, 19:56:55 with gcc
By Daniel Diaz
Copyright (C) 1999-2013 Daniel Diaz

running on a ubuntu machine:

Linux simon-Leopard-Extreme 4.4.0-98-generic #121-Ubuntu SMP Tue Oct 10 14:24:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

I am extending gprolog with a significant library of crypto functions in C and in general this works very well. The only exception is that the new instance of gprolog, extended with these functions ignores the '--init-goal', '--query-goal' command line arguments. These are useful for running the prolog application from a cron job, for example.

"Fortunately", your own example in /usr/local/gprolog-1.4.4/examples/ExamplesC manifests the same problem, so I need not burden you with all of my code.

For example, when I build your example and compare the operation of the new executable with that of the base gprolog, I get:


address@hidden:ExamplesC$ gprolog --query-goal "format('Hi Mom', [])"
GNU Prolog 1.4.4 (64 bits)
Compiled May 15 2017, 21:17:39 with gcc
By Daniel Diaz
Copyright (C) 1999-2013 Daniel Diaz
| ?- format('Hi Mom', []).
Hi Mom

yes
| ?-

address@hidden:ExamplesC$ ./examp --query-goal "format('Hi Mom', [])"
GNU Prolog 1.4.4 (64 bits)
Compiled May 15 2017, 21:17:39 with gcc
By Daniel Diaz
Copyright (C) 1999-2013 Daniel Diaz
| ?-

Everything else works perfectly. Have I misunderstood what is supposed to happen or is this a bug?

Regards

Simon Curry


reply via email to

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