Search found 253 matches

by Martin Meyer
12 Apr 2019 18:04
Forum: Visual Prolog
Topic: Memory corruption in finalizer
Replies: 8
Views: 5861

Re: Memory corruption in finalizer

Hello Thomas,

please check again the initial example code in build 901. It looks like the fix has not been taken to version 9.
by Martin Meyer
31 Mar 2019 21:50
Forum: Visual Prolog
Topic: Raising an exception in a class initializer
Replies: 4
Views: 150

Re: Raising an exception in a class initializer

Thank you! I have applied the fix and it works fine.
by Martin Meyer
25 Mar 2019 20:12
Forum: Visual Prolog
Topic: Raising an exception in a class initializer
Replies: 4
Views: 150

Re: Raising an exception in a class initializer

It is the goal from the console application template.

Code: Select all

goal     console::runUtf8(main::run).
by Martin Meyer
24 Mar 2019 21:02
Forum: Visual Prolog
Topic: Raising an exception in a class initializer
Replies: 4
Views: 150

Raising an exception in a class initializer

Hello Thomas, please have a look at this code. It raises exception couldNotCreate in a class initializer, it outputs however error r000 (in VIP 900): class someClass end class someClass %--- implement someClass class facts flag : boolean := true. class predicates initialize : () [classInitializer]. ...
by Martin Meyer
16 Mar 2019 21:26
Forum: Visual Prolog
Topic: Scope parameter in anonymous predicate
Replies: 1
Views: 231

Scope parameter in anonymous predicate

Hello once again Thomas, this code, which uses a scope parameter in an anonymous predicate, is accepted in VIP 802 but rejected in 900. Is the change intended? interface myObj{@Param} predicates p : (object SomeObject, @Param UseParam). end interface myObj class myObj{@Param} : myObj{@Param} end cla...
by Martin Meyer
15 Mar 2019 0:24
Forum: Visual Prolog
Topic: memory::allocHeap/3->
Replies: 5
Views: 1242

Re: memory::allocHeap/3->

'My' use of memory::allocHeap is in a customized version of arrayM . In arrayM.pro you have changed the call in VIP 9 to data := memory::allocHeap(ByteSize, ma:isAtomic, memory::contextType_pfc) And so did I in my customized version :D The customized copy of the arrayM class is of course not really ...
by Martin Meyer
14 Mar 2019 1:18
Forum: Visual Prolog
Topic: memory::allocHeap/3->
Replies: 5
Views: 1242

Re: memory::allocHeap/3->

Yes, I see.

It came to my attention because my calls in VIP 8 to

Code: Select all

predicates     allocHeap : (byteCount Size, boolean Atomic) -> pointer Block.
needed to be modified for VIP 9.
by Martin Meyer
13 Mar 2019 22:39
Forum: Visual Prolog
Topic: memory::allocHeap/3->
Replies: 5
Views: 1242

memory::allocHeap/3->

Hello Thomas,

just a little thing I found in upgrading my code to VIP 9:

In the declaration of predicate memory::allocHeap/3-> the (I suppose intended) default for ContextType is missing.
by Martin Meyer
13 Mar 2019 1:19
Forum: Visual Prolog
Topic: in_test and in_iterate attributes
Replies: 1
Views: 1416

in_test and in_iterate attributes

Hello Thomas,

I am upgrading my projects to VIP 9. The new ways to pass arguments are greatly simplifying my code!

You could relax the predicate types used in in_test and in_iterate attributes to allow also for predicates having additional optional arguments.
by Martin Meyer
29 Jan 2019 10:28
Forum: Visual Prolog
Topic: Using a class level domain in the interface
Replies: 4
Views: 3196

Re: Using a class level domain in the interface

I have tested the unadwisable project structure. In below the class domain someObj::classDomain is not visible when the code of interface and class is placed in different packages: %%%%%% % This code is in package someInterface interface someObj domains objDomain = unsigned. end interface someObj % ...
by Martin Meyer
24 Jan 2019 18:07
Forum: Visual Prolog
Topic: Using a class level domain in the interface
Replies: 4
Views: 3196

Re: Using a class level domain in the interface

Thank you for the info!

I have tried to find an example of a project structure in which the strange behavior would show up. But I have no idea what it could be. Can you give a clue?
by Martin Meyer
24 Jan 2019 0:15
Forum: Visual Prolog
Topic: Using a class level domain in the interface
Replies: 4
Views: 3196

Using a class level domain in the interface

Hello Thomas, I am not sure whether it is already known or maybe intended. In an interface the compiler (build 802) does not see domains which are declared in the class having the same name as the interface: interface someObj predicates somePredicate : (someObj::classDomain). %throws Unknown domain/...
by Martin Meyer
3 Dec 2018 10:48
Forum: Visual Prolog
Topic: Object Disposal
Replies: 9
Views: 3653

Re: Object Disposal

OK, fine, and thanks again for explaining everything so well!
by Martin Meyer
3 Dec 2018 1:29
Forum: Visual Prolog
Topic: Object Disposal
Replies: 9
Views: 3653

Re: Object Disposal

Yes, thank you, I understand. My preceding post was insufficient. The solution, which I have in mind, in full, with both object reference and id facts, is like: interface someObj open core properties optRef : optional{someObj}. id : positive (o). end interface someObj %--- class someObj : someObj en...
by Martin Meyer
1 Dec 2018 11:50
Forum: Visual Prolog
Topic: Object Disposal
Replies: 9
Views: 3653

Re: Object Disposal

Would it be cheaper in terms of runtime to create a physical copy of the ID instead of creating an additional object? The semi dead memory will not be reanimated by making a copy. Does memory::getInteger/1-> create a physical copy and is the below code a legal solution? interface myObj open core pro...