maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
- From: Juan Ignacio Perna <jiperna AT cs.york.ac.uk>
- To: maude-help AT maude.cs.uiuc.edu
- Subject: [Maude-help] "No common ancestor" message
- Date: Tue, 11 Aug 2009 22:21:38 +0100
- List-archive: <http://maude.cs.uiuc.edu/pipermail/maude-help>
- List-id: Maude help list <maude-help.maude.cs.uiuc.edu>
Hello,
I am trying to implement a language of expressions (this is part of a bigger language) and I am interested in having list of both variable names and expressions.
My idea was to make a generic list module and then generate two instantiations of it. When trying to do that, I stumbled upon loads of error messages of the form:
Advisory: "filename.maude" line .... (fmod: ....): operator ..... has been imported from both "filename.maude", line ..... (fmod ....) and "filename.maude", line .... (fmod: ....) with no common ancestor.
I think the problem is, somehow, that I have the Var as a subsort of Exp (the error does not arise if I instantiate one of the lists with the view Int instead of Exp, for example), but I don't fully understand why and how to solve it.
I am attaching a simplified version of the file for you to be able to reproduce the error. I am using core maude for windows (2.4)
Many thanks,
Juan
fmod SET{X :: TRIV} is
sort Set{X} .
subsort X$Elt < Set{X} .
ops empty : -> Set{X} .
endfm
fmod EXP is
sorts Var Exp .
subsorts Var < Exp .
endfm
view Var from TRIV to EXP is
sort Elt to Var .
endv
view Exp from TRIV to EXP is
sort Elt to Exp .
endv
fmod VAR-SET is
protecting SET{Var} * (sort Set to SetVar) .
endfm
fmod EXP-SET is
protecting SET{Exp} * (sort Set to SetExp) .
endfm
fmod EXPS is
protecting EXP-SET .
protecting VAR-SET .
endfm
- [Maude-help] "No common ancestor" message, Juan Ignacio Perna, 08/11/2009
- Re: [Maude-help] "No common ancestor" message, Juan Ignacio Perna, 08/11/2009
Archive powered by MHonArc 2.6.16.