Skip to Content.
Sympa Menu

maude-help - Re: [[maude-help] ] module definition sequence and literate programming/specification

maude-help AT lists.cs.illinois.edu

Subject: Maude-help mailing list

List archive

Re: [[maude-help] ] module definition sequence and literate programming/specification


Chronological Thread 
  • From: Marko Schuetz-Schmuck <MarkoSchuetz AT web.de>
  • To: Steven Eker <steveneker AT gmail.com>
  • Cc: maude-help AT lists.cs.illinois.edu
  • Subject: Re: [[maude-help] ] module definition sequence and literate programming/specification
  • Date: Thu, 08 Jul 2021 11:38:32 -0400
  • Authentication-results: ppops.net; spf=pass smtp.mailfrom=MarkoSchuetz AT web.de; dkim=pass header.d=web.de header.s=dbaedf251592

Dear Steven,

thank you very much for the clarification.

I have since played with org-mode's literate programming support and
while it's not ideal, it at least allows moving the Maude source around
in the text file. For those interested in doing something similar: one
has to explicitly introduce names for the source code blocks and link
them together to establish the sequence
https://orgmode.org/manual/Noweb-Reference-Syntax.html.

Best regards,

Marko

Steven Eker
<steveneker AT gmail.com>
writes:

> For a language with user definable syntax, it doesn't seem
> practical to parse a module FOO that imports module BAR before
> module BAR has been seen since the syntax of say equations
> in FOO may depend on unseen operator declarations in BAR.
>
> Of course one might define a higher level entity; say a package,
> that consists of modules/theories/views and when the end of
> the package is seen, the import declarations of the contained entities
> could be examined to see if there is a consistent order to parse them.
> But even a module expression can't be fully parsed without seeing
> the user defined syntax.
>
> Steven
>
>
> On Thu, Jul 1, 2021 at 7:32 AM Marko Schuetz-Schmuck
> <MarkoSchuetz AT web.de>
> wrote:
>
>> Dear All,
>>
>> I am using org-mode and its literate programming capabilities to write
>> and document Maude specifications. From org-mode I can "tangle" the
>> Maude source code blocks into a .maude file. I noticed that the sequence
>> of module definitions in the resulting .maude file _is_ relevant. For
>> some reason I had assumed that the modules could be given in any order
>> and that the Maude system could handle this. For such a literate way of
>> specification it would seem much more natural to be able to move text
>> (including source) around in the document without having to be concerned
>> with the sequence in which modules are introduced. From my cursory
>> understanding of the meta-level features, I suspect that some form of
>> module dependency analysis and reordering could be implemented as a
>> pre-processing stage. Has someone looked into this before? Would this
>> seem practical?
>>
>> Best regards,
>>
>> Marko
>>

--
Prof. Dr. Marko Schütz-Schmuck
Department of Computer Science and Engineering
University of Puerto Rico at Mayagüez
Mayagüez, PR 00681

Attachment: signature.asc
Description: PGP signature




Archive powered by MHonArc 2.6.19.

Top of Page