Page 1 of 1

fatal error f098: getTypeVariableTerm name(02A85660,"type","Type",true)

Posted: 12 Jun 2015 9:54
by Peter Muraya
Hi,
I get this fatal error f098 when I compile my source code and I have no idea what is causing it. The compiler presents 2 clues which I don't know how to interpret.

1) Following the error there is an extra message that says Internal error, dump file was stored to 'c:\temp\guardian.dump'. I have opened this file and found many Prolog facts which I don't understand; I have attached it with a new txt extension (as .dump is not allowed).

2) Clicking on the fatal error sends me to a section of my code that is structured as follows:-

Code: Select all

interface expression_{@Type} supports context, node     properties     type_parameter:@Type.       ...        predicates    ... end interface
Any help?

Posted: 12 Jun 2015 10:55
by Thomas Linder Puls
If you double click the error, you can send the dump directly to us.

It is obviously caused by a bug in the compiler, but it is difficult to see what is wrong without having access to your code. Anyway, the problem is when you compile the guardian package, and it is (obviously) triggered by something related to the parameter of the expression_ interface; possibly in a supports/inherits chain.

Posted: 12 Jun 2015 16:40
by Peter Muraya
Thanks Thomas.
I clicked on the error and got a a dialog box asking me to describe what I was doing when I got the error. When I click on the Show Details button I get a somewhat more meaningful message. Is this a repackage of the same information in the guardian.dump? I have forwarded it to you. I will also study it and see if I can pin down the real cause.

Posted: 12 Jun 2015 20:47
by Thomas Linder Puls
Yes, we have received the dump. But unfortunately it is not possible to say anything without having your code.

Posted: 13 Jun 2015 7:27
by Peter Muraya
Hi Thomas,
The problem with this error is that it seems to stop all further compilations, so that other errors in the program (which might or might not be related to this one) are difficult to see and fix. What I have done is to pull this module out of the program, so that I can address the other errors; then I will plug it back and see if the fatal error recurs. I will let you know the outcome, if it reappears or doesn't. Thanks.

Posted: 13 Jun 2015 19:09
by Thomas Linder Puls
Unfortunately, it will :?.

Posted: 15 Jun 2015 8:21
by Peter Muraya
Thomas,
I fixed the other errors, plugged back the guardian and, you are right. The problem re-appeared. Im now able to reproduce the problem using the attached code.
The problem is with this declaration:-

Code: Select all

/* A relation is both a secondary expression and a key*/ interface relation supports secondary{key, key}, key end interface
My original intention was to declare:-

Code: Select all

/* interface relation supports secondary{relation, key}, key end interface
But the compiler wont let me, throwing the conflict error
Conflicting support instances 'expression{@Type}{relation}' and 'expression{@Type}{::key}

I tried to fix this by replacing the relation with key; that's when the error occurred.

Code: Select all

/* A guardian is a relation associated with a key*/ interface guardian supports relation      properties           key:key. end interface   class guardian:guardian      constructors           new:(relation). end class   implement guardian      facts           relation:relation:=erroneous.           key:key:=erroneous.      /*      Implement the relation interface by delegation*/      delegate interface relation to relation        clauses           new(Relation):- relation:=Relation. end implement   /* A relation is both a secondary expression and a key*/ interface relation supports secondary{key, key}, key end interface   /* A key is a child of a relation; it is also an expression*/ interface key supports expression{key} end interface   /* A secondary is an expression with children*/ interface secondary{@Parent, @Child} supports expression{@Parent}      properties           children:expression{@Child}*. end interface   /* An expression can be broken down into test contestants*/ interface expression{@Type}      properties           type:@Type. end interface   implement main clauses     run() :-         succeed(). % place your own code here end implement main   goal     main::run().

Posted: 15 Jun 2015 9:51
by Thomas Linder Puls
Thank you.

It seems that the problem arise from the double support of expression interface.

Your original code should clearly give a conflict, because that code would have support two different instances of the expression interface (i.e. expression{relation} and expression{key}).

But I believe your modified code should be legal and work (i.e. there is a bug in the compiler).

I do however think the hierarchy is a little too complex. I think I would remove the expression support from the secondary interface:

Code: Select all

interface expression{@Type} properties     type : @Type. end interface   interface key supports expression{key} end interface   interface secondary{@Child} properties     children : expression{@Child}*. end interface   interface relation supports secondary{key}, key end interface
This does not have anything to do with the compiler problem, but there also seem to be something strange about the guardian interface:

Code: Select all

interface guardian supports relation properties     key : key. end interface
It is a key through it relation support, but it also have key property. I.e. is it a key or does it have a key?

Posted: 15 Jun 2015 17:04
by Peter Muraya
Hi Thomas,
You came to the same conclusion as I did, that the double support was indeed the cause of the problem. I also can live with secondary not supporting expression and that is consistent with your suggestion of simplifying it -- thus avoiding the double support.

Yes, you are right; the whole project is quite complex, that is why I'm using Prolog.

About guardian ... I may have oversimplified the code in order to focus on the problem. The code below now compiles successfully and the support hierarchy is more complete than before. Hopefully it clarifies that guardian is a relation associated with a key. It is not a key.

Code: Select all

/* A guardian is a relation associated with a key*/ interface guardian supports relation      properties           key:key. end interface   class guardian:guardian      constructors           new:(relation). end class   implement guardian      facts           relation:relation:=erroneous.           key:key:=erroneous.      /*      Implement the relation interface by delegation*/      delegate interface relation to relation        clauses           new(Relation):- relation:=Relation. end implement   /* A relation is both a secondary object and can be assigned to a key*/ interface relation supports secondary{relation, key}, keyvalue end interface   /* A key is a child of a relation*/ interface key supports expression{keyvalue}      properties            assignment:keyvalue. end interface   interface keyvalue supports expression{keyvalue} end interface   /* A secondary is an object with children*/ interface secondary{@Parent, @Child}      properties           children:expression{@Child}*.      predicates           copy:(@Child)->@Parent. end interface   /* An expression can be broken down into test contestants*/ interface expression{@Type}      properties           type:@Type. end interface   implement main clauses     run() :-         succeed(). % place your own code here end implement main   goal     main::run().

Posted: 15 Jun 2015 20:44
by Thomas Linder Puls
It is of course problematic to say things based on (over-)simplified versions of the code. So if my comments does not apply to the real code then you can just disregard them. Remember that I don't know what your code is about :wink:.