Search found 472 matches

by Paulo Moura
Mon Feb 23, 2015 8:42 pm
Forum: SWI-Prolog
Topic: Persistent Objects
Replies: 3
Views: 8914

Re: Persistent Objects

The SWI-Prolog "persistency" library assumes and requires that the calls to the persistent predicates be made from within modules. Thus, it cannot be used as-is with Logtalk objects. The library code can be ported, however, if necessary. A simpler solution is possible, however, if it would be enough...
by Paulo Moura
Wed Jan 21, 2015 7:45 pm
Forum: Help
Topic: Raising an exception on a message hook doesn't fail the Java
Replies: 6
Views: 7660

Re: Raising an exception on a message hook doesn't fail the

You're wrong. Re-read the JPL documentation on exceptions. The first sentence explains the output you're seeing: Uncaught exceptions thrown by the JVM in the course of handling a JPL 3.x Prolog API call are mapped onto Standard Prolog exceptions (...). You get the the following output: ERROR: Java e...
by Paulo Moura
Wed Jan 21, 2015 4:14 pm
Forum: Help
Topic: Raising an exception on a message hook doesn't fail the Java
Replies: 6
Views: 7660

Re: Raising an exception on a message hook doesn't fail the

From the JPL documentation on exceptions, it seems clear that the problem is in your Java code, which is not handling/catching the exception:

http://www.swi-prolog.org/packages/jpl/ ... exceptions
by Paulo Moura
Wed Jan 21, 2015 12:01 pm
Forum: Help
Topic: Problem when loading jpl_new/3
Replies: 4
Views: 2167

Re: Problem when loading jpl_new/3

Forums are not a replacement for consulting the documentation. Could you please start checking it before posting? Thanks.

Terms are defined in glossaries. The Logtalk glossary is very easy to locate:

http://logtalk.org/manuals/
by Paulo Moura
Tue Jan 20, 2015 11:47 pm
Forum: Help
Topic: Problem when loading jpl_new/3
Replies: 4
Views: 2167

Re: Problem when loading jpl_new/3

As explained in the documentation: http://logtalk.org/manuals/refman/directives/use_module_2.html you use the Logtalk use_module/2 directive: :- use_module(jpl, [jpl_new/3]). inside the entity where you're going to call the module predicate(s). As stated in the documentation, " (...) this directive ...
by Paulo Moura
Tue Jan 20, 2015 7:15 pm
Forum: Help
Topic: How to run the Unit tests of the examples on the fly
Replies: 5
Views: 2422

Re: How to run the Unit tests of the examples on the fly

The test failure messages can be intercepted by defining the logtalk::message_hook/4 predicate. You can find the exact message term looking into the "tools/lgtunit/lgtunit_messages.lgt" file. For example: :- category(my_test_settings). :- multifile(logtalk::message_hook/4). :- dynamic(logtalk::messa...
by Paulo Moura
Tue Jan 20, 2015 3:39 pm
Forum: Help
Topic: How to run the Unit tests of the examples on the fly
Replies: 5
Views: 2422

Re: How to run the Unit tests of the examples on the fly

You're loading multiple examples that define unit test objects with the same name. Hence the redefinition warning messages.
by Paulo Moura
Tue Jan 20, 2015 12:37 pm
Forum: SICStus Prolog
Topic: MOLOG through SICStus Prolog compatibility (NCL support)
Replies: 1
Views: 8429

Re: MOLOG through SICStus Prolog compatibility (NCL support)

From the first URL you give, you find a PDF stating "This system is written in Prolog as a module for Prolog." If you download the 2.0 version, the README file states "The MProlog module can be loaded by ...". But, if you look into the code, there's no module definition! The code seems to be dumped ...
by Paulo Moura
Sun Jan 18, 2015 8:02 pm
Forum: Help
Topic: Supressing Informational Messages
Replies: 11
Views: 4226

Re: Supressing Informational Messages

That's output from the SWI-Prolog time/1 library predicate, which takes a goal as argument.
by Paulo Moura
Sun Jan 18, 2015 5:04 pm
Forum: Help
Topic: Supressing Informational Messages
Replies: 11
Views: 4226

Re: Supressing Informational Messages

Similar to what you have already done in the settings file. For example, if you add (in the "my_logtalk_startup_settings" category) the clause: logtalk::message_hook(_, comment(_), core, _). you will suppress all the informational messages from the Logtalk compiler. The last two messages, however, c...
by Paulo Moura
Sun Jan 18, 2015 4:29 pm
Forum: Help
Topic: Supressing Informational Messages
Replies: 11
Views: 4226

Re: Supressing Informational Messages

pedrofmj wrote:The messagses reduced considerably. Now I would like only to suppress the messages from consult. I still have these messages
Which messages? The ones printed by the Prolog compiler itself?
by Paulo Moura
Sun Jan 18, 2015 4:28 pm
Forum: Help
Topic: Supressing Informational Messages
Replies: 11
Views: 4226

Re: Supressing Informational Messages

You can also put a custom "settings.lgt" file in the Logtalk user folder (that folder pointed by the LOGTALKUSER environment variable). See also the Logtalk wiki at GitHub on embedding Logtalk: https://github.com/LogtalkDotOrg/logtalk3/wiki/Embedding-Logtalk Of course, you can also customize the ada...
by Paulo Moura
Sun Jan 18, 2015 3:12 pm
Forum: Help
Topic: Supressing Informational Messages
Replies: 11
Views: 4226

Re: Supressing Informational Messages

For the Logtalk generated messages, see comments near the end at the "settings-sample.lgt" file at the root of the Logtalk distribution. See also the report/1 compiler flag at: http://logtalk.org/manuals/userman/programming.html#programming_flags For SWI-Prolog generated messages, see this system do...
by Paulo Moura
Wed Jan 07, 2015 2:04 am
Forum: Announcements
Topic: Logtalk 3.00.0 Stable
Replies: 0
Views: 9171

Logtalk 3.00.0 Stable

Hi, The stable release of the third generation of Logtalk (3.x) is now available at: http://logtalk.org/ Highlights compared with the previous generation of Logtalk (2.x) include: - faster compiler and runtime - refined language semantics - stricter language syntax - improved compiler lint checker -...
by Paulo Moura
Fri Dec 19, 2014 3:18 pm
Forum: Announcements
Topic: Logtalk 3.00.0 Release Candidate 9
Replies: 0
Views: 9502

Logtalk 3.00.0 Release Candidate 9

Hi, Logtalk 3.00.0 Release Candidate 9 is now available for downloading at: http://logtalk.org/ This is a near final release of the third generation of Logtalk. Interested parties are invited to test their applications, specially if migrating from Logtalk 2.x, and report any issue as soon as possibl...