Skip to Content.
Sympa Menu

maude-help - Re: [Maude-help] Using MachineInt in Full-Maude

maude-help AT lists.cs.illinois.edu

Subject: Maude-help mailing list

List archive

Re: [Maude-help] Using MachineInt in Full-Maude


Chronological Thread 
  • From: Richard Graham <rickhg12hs AT gmail.com>
  • To: Hojjat Hossein <hossein.hojjat AT epfl.ch>
  • Cc: Jobstmann Barbara <barbara.jobstmann AT epfl.ch>, "maude-help AT maude.cs.uiuc.edu" <maude-help AT maude.cs.uiuc.edu>
  • Subject: Re: [Maude-help] Using MachineInt in Full-Maude
  • Date: Sat, 17 Jan 2009 21:33:17 -0500
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=hcJgmsJLgXEdtMLWPNLlQgppUytM2n05IlzTrWIgt/rWtumdY1LtvBM+td595LNkEv q6l3qFjtSRJW5znulvyU4wn7a040sSL9hJ5QH+AIbqDS62/DeAy0OUiPPaaRXx4dR5EM dGYKjtHmxuHbgwTnceNAPXs2kCPCQVBi6TDcw=
  • List-archive: <http://maude.cs.uiuc.edu/pipermail/maude-help>
  • List-id: Maude help list <maude-help.maude.cs.uiuc.edu>

Hi,

I'm a complete Maude noob, but I found your question interesting.  I don't know a convenient answer but I can get your fmod to work in full-maude if I cut-paste each part of machine-int.maude into full-maude.  I.e.,

$ maude full-maude
...
Maude> (fmod RENAMED-INT is
  protecting INT * (
    sort Zero to MachineZero,
    sort NzNat to NzMachineNat,
    sort Nat to MachineNat,
    sort NzInt to NzMachineInt,
    sort Int to MachineInt,
...
endfm
)

Maude> (fth BIT-WIDTH is
  protecting RENAMED-INT .
  op $nrBits : -> NzMachineNat .

  var N : NzMachineNat .
  eq $divides(2, $nrBits) = true [nonexec] .
  ceq $divides(2, N) = true if $divides(N, $nrBits) /\ N > 1 [nonexec] .
endfth
)
...
and then

Maude> (fmod machineint-FullMaude is
       protecting MACHINE-INT{32-BIT} .
       vars A, B : MachineInt .

       op plus : MachineInt MachineInt -> MachineInt .

       eq plus(A , B) = A + B .

endfm)

Maude> ( red in machineint-FullMaude : plus(5,10) . )
rewrites: 1594 in 18ms cpu (20ms real) (83907 rewrites/second)
reduce in machineint-FullMaude :
  plus(5,10)
result NzMachineNat :
  15

Maude>

I'm hoping somebody will reply with a more sane way of using MACHINE-INT in full-maude.
[Why doesn't ( load machine-int . ) work?  It produces no errors/warnings but seems to do nothing.]

I hope this helps or inspires further replies.

Cheers!
Richard Graham

On Fri, Jan 16, 2009 at 12:32 PM, Hojjat Hossein <hossein.hojjat AT epfl.ch> wrote:
Hello,

I have problems using machineint with full-maude.
I am using Maude 2.4.
I can easily load the following module into core Maude and use it:

fmod machineint-CoreMaude is
       protecting MACHINE-INT{32-BIT} .
       vars A, B : MachineInt .

       op plus : MachineInt MachineInt -> MachineInt .

       eq plus(A , B) = A + B .

endfm

But as soon as I switch to full-maude there are errors when loading the module:

(fmod machineint-FullMaude is
       protecting MACHINE-INT{32-BIT} .
       vars A, B : MachineInt .

       op plus : MachineInt MachineInt -> MachineInt .

       eq plus(A , B) = A + B .

endfm)

Maude> load Examples/machineint-FullMaude
Advisory: could not find sort NzMachineInt in meta-module machineint-FullMaude.
Advisory: bad operator declaration op '$mask : nil -> 'NzMachineInt [memo strat(0)] . in meta-module machineint-FullMaude.
...

I'd be glad if someone can point out what I am missing in this program.

The best,
Hossein Hojjat
PhD Student
EPFL
_______________________________________________
Maude-help mailing list
Maude-help AT maude.cs.uiuc.edu
http://maude.cs.uiuc.edu/cgi-bin/mailman/listinfo/maude-help




Archive powered by MHonArc 2.6.16.

Top of Page