Search found 280 matches

by Martin Meyer
11 Sep 2018 23:32
Forum: Visual Prolog
Topic: Class unionFind
Replies: 1
Views: 4970

Class unionFind

Hello Thomas, in unionFind.pro is a predicate which does the path compression: predicates find_node2 : (node{@Node} Node) -> node{@Node} Component. clauses find_node2(Node) = Component :- Parent = Node:parent, if Node = Parent then Component = Node else Component = find_node2(Parent), Node:parent :=...
by Martin Meyer
24 Apr 2018 0:19
Forum: Visual Prolog
Topic: Memory corruption in finalizer
Replies: 10
Views: 10867

Re: Memory corruption in finalizer

I see. Thanks again for answering!
by Martin Meyer
23 Apr 2018 15:52
Forum: Visual Prolog
Topic: Memory corruption in finalizer
Replies: 10
Views: 10867

Re: Memory corruption in finalizer

I have an add-on question. Probably you can answer it too:

Is it legal in a finalizer to store the object (i.e. This) in a class fact and thereby abandon the disposal of the object?
by Martin Meyer
23 Apr 2018 15:12
Forum: Visual Prolog
Topic: Memory corruption in finalizer
Replies: 10
Views: 10867

Re: Memory corruption in finalizer

Thanx for the info, Thomas!

By now I got the feeling you have said before that exceptions are not raised to the outside of finalizers. But maybe it's déjà vu. I will try hard to not forget it again.
by Martin Meyer
20 Apr 2018 21:41
Forum: Visual Prolog
Topic: Memory corruption in finalizer
Replies: 10
Views: 10867

Memory corruption in finalizer

Hello Thomas, please have a look at below example (in VIP 8 build 801). It creates a number of instances of an object type. The object has a nondeterm fact named keyValFact . In the object's constructor one exemplary key-value pair is asserted to the fact. In the finalizer it is checked whether the ...
by Martin Meyer
3 Apr 2018 23:18
Forum: Visual Prolog
Topic: Conflicting class & domain declarations: font
Replies: 2
Views: 4838

Re: Conflicting class & domain declarations: font

Hello Harrison, I have found two font interfaces in the pfc (of VIP 8 build 801). One is in the namespace gdi . If you mean this one, code it like class predicates drawDown : (pieCalc::pieSectorInfoDOM*, graphics, gdi\font, gdiplus::rectF). The other font interface is in no namespace. For that one y...
by Martin Meyer
24 Feb 2018 10:48
Forum: Visual Prolog
Topic: List unification problem
Replies: 2
Views: 6673

List unification problem

Hello Thomas, please check this code. It outputs "not unfiable" (in VIP 8 build 801). class predicates test : (unsigned, unsigned). clauses test(A, B) :- if [A, X] = [X, B] then stdIO::write("unifies") else stdIO::write("not unfiable") end if. clauses run() :- test(1, 1). Maybe same problem causes e...
by Martin Meyer
20 Feb 2018 20:36
Forum: Visual Prolog
Topic: Problem with generic domain
Replies: 2
Views: 6206

Problem with generic domain

Hello Thomas, please check this stripped down version of my code. It throws fatal error c098 : Place was not set (in VIP 8 build 801). interface someTypes{@Type} domains rec = rec(@Type). domains valueProvider = (rec*) -> @Type Value. end interface someTypes %====== interface objA end interface objA...
by Martin Meyer
21 Dec 2017 15:22
Forum: Visual Prolog
Topic: Varying presentation in the debugger
Replies: 6
Views: 4196

Re: Varying presentation in the debugger

Ah, thank you! I see the extra node.
by Martin Meyer
21 Dec 2017 14:37
Forum: Visual Prolog
Topic: Varying presentation in the debugger
Replies: 6
Views: 4196

Re: Varying presentation in the debugger

I see no extra node (maybe you say "I should see" in the sense that you already know that I don't have this node).

Presenters are greatly helpful. I have already equipped my own structures with them. Can you release the internal version as an official update?
by Martin Meyer
20 Dec 2017 17:03
Forum: Visual Prolog
Topic: Varying presentation in the debugger
Replies: 6
Views: 4196

Re: Varying presentation in the debugger

When the presentation looks like CollectionM: mapM{integer, string} = <UNKNOWN 043B3F78> , the entry "Native View" is not in the menu. screen1.jpg In tries in which the presentation is not native, the entry is there. screen2.jpg I see no change though when clicking it on or off. The presentation sta...
by Martin Meyer
20 Dec 2017 4:24
Forum: Visual Prolog
Topic: Varying presentation in the debugger
Replies: 6
Views: 4196

Varying presentation in the debugger

Hello Thomas, I run this code in (build 801) 64 bit mode by Alt+F5. It outputs [1 -> "Hugo"] . implement main clauses run() :- CollectionM = mapM_redBlack::new(), CollectionM:set(1, "Hugo"), stdIO::write(string::present(CollectionM)). end implement main But when I then set a break point on line stdI...
by Martin Meyer
19 Dec 2017 15:09
Forum: Visual Prolog
Topic: Interface synonyms
Replies: 5
Views: 3623

Re: Interface synonyms

Thank you for the detailed explanation. Now I see the concept behind scenes.

I suppose the issue is connected to Supports Qualification for Domains. Similarly a supports qualification extends the type of an interface but not its scope.
by Martin Meyer
18 Dec 2017 14:38
Forum: Visual Prolog
Topic: Interface synonyms
Replies: 5
Views: 3623

Re: Interface synonyms

True, that makes the example's code even shorter. In large use cases however things can be the other way around. I.e. when declarations made in an interface obj{ @TypeA , @TypeB , ... } are refered to many times in the code and in each place type parameters are substituted by same lengthy type expre...
by Martin Meyer
18 Dec 2017 0:23
Forum: Visual Prolog
Topic: Interface synonyms
Replies: 5
Views: 3623

Interface synonyms

Hello Thomas, just a small suggestion regarding interface synonyms, maybe this could be made working in some future version: interface obj{@Type} domains myType = myType_a(@Type); myType_b. end interface obj implement main domains obj_unsigned = obj{unsigned}. clauses run() :- Val = obj_unsigned::my...