FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log inLog in 


Problem with scopeLinker

Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog
View previous topic :: View next topic  
Author Message
Martin Meyer



Frankfurt a.M., Germany
Joined: 14 Nov 2002
Posts: 223

PostPosted: 31 Aug 2017 18:24    Post subject: Problem with scopeLinker Reply with quote

Hello Thomas,

moving my code to new great VIP version 8 I came across a problem. It reproduces when I start a new 'Console application' project and create a new interface in a new package with contents:

interface myDomains{@Type}

domains
    dom = @Type.

end interface myDomains

In main.pro I replace the open core line so that the code becomes

implement main
    open myDomains{unsigned}

clauses
    run() :-
        succeed.
        % place your own code here

end implement main

Compiling it I get
error c998 : Not implemented: scopeLinker::scopeExpr2Namespace: Scope expressions with arguments
error c218 : Unknown class/interface/namespace 'myDomains{::unsigned}' in pack 'main.pack'

_________________
Regards Martin
Back to top
View user's profile Send private message
Thomas Linder Puls



Copenhagen, Denmark
Joined: 28 Feb 2000
Posts: 3124

PostPosted: 1 Sep 2017 7:58    Post subject: Reply with quote

Thank you, I can reproduce the problem

We will look at it.

_________________
Regards Thomas Linder Puls
Prolog Development Center
Back to top
View user's profile Send private message
Thomas Linder Puls



Copenhagen, Denmark
Joined: 28 Feb 2000
Posts: 3124

PostPosted: 1 Sep 2017 8:15    Post subject: Reply with quote

The (in some sense) real problem is that the myDomains-file has not been included in the main-file.

The reason that it is not included automatically is because the error messages are wrong, it should have been:

e218 Unknown class/interface/namespace 'myDomains' in pack 'main.pack'

When the IDE receives such a message from the compiler it will try to solve the problem by inserting an include statements in the pack file.

As a workaround to get the correct include statement inserted you can remove the arguments for one compilation:

implement main
    open myDomains
...
end implement main

This will give the correct errormessage and cause the IDE to insert the include statement, and then you canchange the code back to the correct version again:

implement main
    open myDomains{unsigned}
...
end implement main

We will of course look at the problem anyway.

_________________
Regards Thomas Linder Puls
Prolog Development Center
Back to top
View user's profile Send private message
Martin Meyer



Frankfurt a.M., Germany
Joined: 14 Nov 2002
Posts: 223

PostPosted: 1 Sep 2017 15:36    Post subject: Reply with quote

I have checked the ph- and pack-files in my 'real' code. However the case seems to be more complicated there.

I have attached a stripped down version of the 'real' code. The compiler throws error c205 : Unknown domain/interface 'mfc\syntax\syntax_t{@Terminal}::abstractSyntaxTree' in pack 'main.pack' on it. Please have a look at it. File rule.ph already contains #include @"mfc\altSyntax\altSyntax.ph". So, what is missing? Maybe am overlooking something. Can you advice how to cure it?



buildAll.zip
 Description:

Download
 Filename:  buildAll.zip
 Filesize:  13.14 KB
 Downloaded:  9 Time(s)


_________________
Regards Martin
Back to top
View user's profile Send private message
Thomas Linder Puls



Copenhagen, Denmark
Joined: 28 Feb 2000
Posts: 3124

PostPosted: 4 Sep 2017 9:57    Post subject: Reply with quote

In this case a work around is to move the abstractSyntaxTree domain from the syntax_t interface to the syntax_t class.

We will of course look for a non-workaround solution as well.

_________________
Regards Thomas Linder Puls
Prolog Development Center
Back to top
View user's profile Send private message
Martin Meyer



Frankfurt a.M., Germany
Joined: 14 Nov 2002
Posts: 223

PostPosted: 4 Sep 2017 17:36    Post subject: Reply with quote

Thank you! It works now. Actually I moved domain abstractSyntaxTree to an interface named altSyntax which has no scope type variables. Since domain abstractSyntaxTree makes no use of scope type variables it anyway was misplaced in syntax_t{@Terminal}.
_________________
Regards Martin
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum