FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log inLog in 


Must unify problem

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: 210

PostPosted: 5 Feb 2017 16:35    Post subject: Must unify problem Reply with quote

Hello Thomas,

please check this code. The must unify produces an access violation (in VIP 7502):

    open
        pfc\syntax\,
        core,
        syntax

domains
    abstractSyntaxTree = abstractSyntaxTree(
        symbol RuleName,
        cursor Cursor,
        gsAbstractSyntaxTree* GsAstList).
    gsAbstractSyntaxTree =
        curAst_t(
            string TerminalString,
            cursor Cursor);
        curAst_nt(abstractSyntaxTree Ast).

class predicates
    getList : () -> gsAbstractSyntaxTree*.
clauses
    getList() = [curAst_t("", Cursor), curAst_nt(Ast), curAst_nt(Ast), curAst_nt(Ast), curAst_nt(Ast), curAst_nt(Ast)] :-
        SourceFile = inputSourceFile::new(""),
        PackedCursor = packCursor(0, 0),
        ShortCursor = shortCursor(SourceFile, PackedCursor, PackedCursor),
        Cursor = cursor(ShortCursor, [], []),
        Ast = abstractSyntaxTree("", Cursor, []).

clauses
    run() :-
        List = getList(),
        [curAst_t(_, _), curAst_nt(_), curAst_nt(_), curAst_nt(_), curAst_nt(_), curAst_nt(_)] == List.


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



Copenhagen, Denmark
Joined: 28 Feb 2000
Posts: 3077

PostPosted: 6 Feb 2017 20:46    Post subject: Reply with quote

Hi, Martin. We will look at it.
_________________
Regards Thomas Linder Puls
Prolog Development Center
Back to top
View user's profile Send private message
Joop




Joined: 15 Feb 2017
Posts: 1

PostPosted: 16 Feb 2017 6:26    Post subject: Reply with quote

Are you all good now Martin?
Back to top
View user's profile Send private message
Martin Meyer



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

PostPosted: 18 Feb 2017 20:01    Post subject: Reply with quote

Yes Joop, it is all fine. I reported an issue, Thomas and his colleagues will look at it, and probably in the next VIP version they have fixed it. That is the common way to handle such matters.
_________________
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