Skip to Content.
Sympa Menu

maude-help - Re: [Maude-help] Lists of lists

maude-help AT lists.cs.illinois.edu

Subject: Maude-help mailing list

List archive

Re: [Maude-help] Lists of lists


Chronological Thread 
  • From: Steven Eker <eker AT csl.sri.com>
  • To: maude-help AT peepal.cs.uiuc.edu, emanuel.kitzelmann AT wiai.uni-bamberg.de
  • Cc: maude-help AT peepal.cs.uiuc.edu
  • Subject: Re: [Maude-help] Lists of lists
  • Date: Fri, 2 Feb 2007 10:24:40 -0800
  • List-archive: <http://maude.cs.uiuc.edu/pipermail/maude-help>
  • List-id: Maude help list <maude-help.maude.cs.uiuc.edu>

Hi there,

Sorry for the late reply - it looks like the mailing list hasn't been
forwarding messages for several months.

You are correct - the problem is with connected components - LIST makes
elements a subsort of the list:

subsort X$Elt < NeList{X} < List{X} .

and thus LIST of LIST would throw everything in the same component - elements
become a subsort of list which are then a subsort of list of list.

Worse, when the _,_ constructing lists is fused with the _,_ constructing
lists of lists, the boundaries between lists disappear. You could use LIST*
which puts an explicit wrapper [_] around the elements of a list or do
something similar yourself to have wrapped lists (in their own connected
component), and then have lists of wrapped lists.

Steven


On Monday 04 December 2006 16:22,
emanuel.kitzelmann AT wiai.uni-bamberg.de

wrote:
> Hi all,
>
> I tried to make a list of lists, e.g., a list of lists of integers:
>
> fmod INTLIST is
> including LIST{Int} * (sort NeList{Int} to NeIntList,
> sort List{Int} to IntList) .
> endfm
>
> view IntList from TRIV to INTLIST is
> sort Elt to IntList .
> endv
>
> fmod INTLISTLIST is
> including LIST{IntList} .
> endfm
>
>
> When loading this file into the Maude interpreter I get:
>
> Advisory: <automatic>: operator nil has been imported from both
> "prelude.maude", line 939 (fmod LIST) and "prelude.maude", line 939
> (fmod LIST) with no common ancestor.
> Advisory: <automatic>: operator __ has been imported from both
> "prelude.maude", line 940 (fmod LIST) and "prelude.maude", line 940 (fmod
> LIST) with no common ancestor.
> Advisory: <automatic>: operator append has been imported from both
> "prelude.maude", line 948 (fmod LIST) and "prelude.maude", line 948
> (fmod LIST) with no common ancestor.
> Advisory: <automatic>: operator head has been imported from both
> "prelude.maude", line 953 (fmod LIST) and "prelude.maude", line 953
> (fmod LIST) with no common ancestor.
>
> ... and so on (for all operators defined in the LIST container module).
>
>
> When I rename the operations within the LIST{Int} importation, e.g.,
>
> including LIST{Int} * (sort NeList{Int} to NeIntList,
> sort List{Int} to IntList,
> op nil to ilnil) .
>
> then the advisories disappear, thus I guessed that it has something to do
> with the overloading of the operators which appears when I import two list
> instances. But this seems strange to me because when I do this:
>
> fmod LISTS is
> including LIST{Int} .
> including LIST{Qid} .
> endfm
>
> Then I expected the same overloading problems, yet there are no advisories
> in this case. So I guess that it has something to do with the two list
> instances in the same connected component in the case of lists of lists.
> But I don't see the problem. Can someone help?
>
> Best regards,
> Emanuel
>
> --
> Dipl. Inf. Emanuel Kitzelmann
> Dept. of Information Systems and Applied CS
> Bamberg University
> http://www.cogsys.wiai.uni-bamberg.de
>
>
>
>
>
> _______________________________________________
> Maude-help mailing list
> Maude-help AT maude.cs.uiuc.edu
> http://maude.cs.uiuc.edu/cgi-bin/mailman/listinfo/maude-help



  • Re: [Maude-help] Lists of lists, Steven Eker, 02/02/2007

Archive powered by MHonArc 2.6.16.

Top of Page