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:-
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.
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.
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.
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:-
/*
A guardian is a relation associated with a key*/interface guardian supports relation
properties
key:key.
end interfaceclass guardian:guardianconstructors
new:(relation).
end classimplement guardian
facts
relation:relation:=erroneous.
key:key:=erroneous.
/*
Implement the relation interface by delegation*/delegateinterface 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 interfaceimplement main
clauses
run():-
succeed(). % place your own code hereend implement main
goal
main::run().
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:
interface expression{@Type}properties
type : @Type.
end interfaceinterface key supports expression{key}end interfaceinterface secondary{@Child}properties
children :expression{@Child}*.
end interfaceinterface 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:
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.
/*
A guardian is a relation associated with a key*/interface guardian supports relation
properties
key:key.
end interfaceclass guardian:guardianconstructors
new:(relation).
end classimplement guardian
facts
relation:relation:=erroneous.
key:key:=erroneous.
/*
Implement the relation interface by delegation*/delegateinterface 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 interfaceinterface 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 interfaceimplement main
clauses
run():-
succeed(). % place your own code hereend implement main
goal
main::run().
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 .