Skip to content

Commit

Permalink
alpha140
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenmeker committed Feb 15, 2023
1 parent b1edb4f commit 26af9f2
Show file tree
Hide file tree
Showing 85 changed files with 5,558 additions and 537 deletions.
22 changes: 22 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
2023-02-14 Steven Eker <eker@pup>

* README.md: added Maude 3.2.2 changes

* tests/ObjectOriented/parameterization.maude: added

* tests/Misc/parameterizedConstant.maude: added

2023-02-08 Steven Eker <eker@pup>

* tests/Misc/pconst4.maude: added

2023-02-07 Steven Eker <eker@pup>

* tests/Misc/pconst3.maude: added

* tests/Misc/pconst2.maude: added

* tests/Misc/pconst.maude: added

===================================Maude140===========================================

2023-02-02 Steven Eker <eker@pup>

* tests/ResolvedBugs/theoryViewWrongWarningFebruary2023.maude: created
Expand Down
15 changes: 14 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
Overview of Changes in alpha139
Overview of Changes in alpha140 (2023-02-14)
============================================
* fixed bug where no warning was given for duplicate iter attribute
* pconst attribute for constants
* parameterized constants
* generated-by importation mode
* show processed view command
* classes can be parameterized
* object-oriented theories
* object-oriented mappings in views
* fixed bug where []s around bound parameter were shown in imported
module name with show desugared

Overview of Changes in alpha139 (2023-02-02)
============================================
* syntactic sugar for empty attribute set in object constructor
* changed reporting of syntax errors in sort and subset declarations
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ Rewriting logic is a logic of concurrent change that can naturally deal with sta

Maude supports in a systematic and efficient way logical reflection. This makes Maude remarkably extensible and powerful, supports an extensible algebra of module composition operations, and allows many advanced metaprogramming and metalanguage applications. Indeed, some of the most interesting applications of Maude are metalanguage applications, in which Maude is used to create executable environments for different logics, theorem provers, languages, and models of computation.

## Maude 3.2.2

* fixed bug where multiple instantiations (say via a theory-view) was generating bad internal names for sorts
* fixed bug where the first sort in a kind printed by show mod was including backquotes
* show desugared is now a documented feature
* desugar omod to mod, oth to th
* fixed bug where filtered variant unify crashed in the degenerate case where there were no variables
* fixed issue where SIGSTKSZ is no longer guaranteed to be a compile-time constant in glibc
* fixed issue with fileTest failing in environments when first user file handle is something other than 3

## Maude 3.2.1

The current version of Maude is 3.2.1. You can download it directly
Expand Down
20 changes: 10 additions & 10 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for Maude alpha139.
# Generated by GNU Autoconf 2.69 for Maude alpha140.
#
# Report bugs to <maude-bugs@lists.cs.illinois.edu>.
#
Expand Down Expand Up @@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='Maude'
PACKAGE_TARNAME='maude'
PACKAGE_VERSION='alpha139'
PACKAGE_STRING='Maude alpha139'
PACKAGE_VERSION='alpha140'
PACKAGE_STRING='Maude alpha140'
PACKAGE_BUGREPORT='maude-bugs@lists.cs.illinois.edu'
PACKAGE_URL=''

Expand Down Expand Up @@ -1312,7 +1312,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures Maude alpha139 to adapt to many kinds of systems.
\`configure' configures Maude alpha140 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1383,7 +1383,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of Maude alpha139:";;
short | recursive ) echo "Configuration of Maude alpha140:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1490,7 +1490,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
Maude configure alpha139
Maude configure alpha140
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2013,7 +2013,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Maude $as_me alpha139, which was
It was created by Maude $as_me alpha140, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -2962,7 +2962,7 @@ fi

# Define the identity of the package.
PACKAGE='maude'
VERSION='alpha139'
VERSION='alpha140'


cat >>confdefs.h <<_ACEOF
Expand Down Expand Up @@ -6497,7 +6497,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by Maude $as_me alpha139, which was
This file was extended by Maude $as_me alpha140, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -6563,7 +6563,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
Maude config.status alpha139
Maude config.status alpha140
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Initialize autoconf stuff.
#
AC_INIT(Maude, alpha139, [maude-bugs@lists.cs.illinois.edu])
AC_INIT(Maude, alpha140, [maude-bugs@lists.cs.illinois.edu])
#
# Allow directory names that look like macros.
#
Expand Down
6 changes: 3 additions & 3 deletions doc/alpha139.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ A class C is desugared into a class sort C and a class constant
op C : -> C [ctor] .

An attribute foo : T is desugared into an attribute op
op foo`:_ : T -> Attribute [ctor] .
op foo`:_ : T -> Attribute [ctor gather (&)] .

Ad hoc overloading of attributes is allowed - internally they are considered
to be completely different attributes that just happen to share a name.
Expand Down Expand Up @@ -260,7 +260,7 @@ The design of the transformation is guided by several principles:
* Transforming a statement in a way that surprises the user is worse
than not providing a transformation.
* Transformations should be all or nothing at the statement level -
transforming some occurences of an object but not others will likely
transforming some occurrences of an object but not others will likely
lead to confusion.
* Transformations should work for non-executable statements -
it is reasonable to have a nonexec rule transformed and later use it
Expand Down Expand Up @@ -352,7 +352,7 @@ added to its attribute argument.

Note that the transformation on candidate statements is idempotent - a
fully completed statement meets all the requirements but the transformation
is the identity/
is the identity.

If a statement is a candidate, and meets all the requirements, no advisories
are printed and any transformation is done silently. Sometimes you might
Expand Down
211 changes: 211 additions & 0 deletions doc/alpha140.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
Alpha 140 release notes
========================

Bug fixes
==========

(1) A bug where giving the iter attribute twice does not give a warning:

fmod FOO is
sort Foo .
op f : Foo -> Foo [iter iter] .
endfm

(2) A bug where show desugared printed imports with []s around bound
parameters. This is because the the []s are part of the internal name
used for caching the module to distinguish bound parameters from views.
For example

show desugared LIST-AND-SET .

prints

fmod LIST-AND-SET{X :: TRIV} is
protecting LIST{[X]} .
protecting SET{[X]} .
:


New features
=============

(1) Constants may now be given an attribute pconst ("parameter constant")
op c : -> Foo [pconst] .
This attribute is mostly inert, but when a constant c with this attribute
is declared in a theory T (rather than in a module imported by T), and a
module M has a parameter X :: T, M receives a constant X$c rather than c.

The pconst attribute cannot be combined with the poly attribute. Polymorphic
constants don't seem to be much used in practice and there doesn't seem
to be much use for polymorphic constants with the pconst attribute, though
I believe they could be given a consistent, if complicated, operational
semantics.

Constants with the pconst attribute cannot be used on either side
of an op to term mapping in a view. This is not currently checked for
and will lead to crashes.

Because constant names may not contain underscores, a theory declaring
one or more constants with the pconst attribute may not be used with
a parameter name containing an underscore since the resulting constant
names would be illegal.

pconst is reflected by
op pconst : -> Attr [ctor] .
at the metalevel.


(2) Constants in a parameterized module M may now be parameterized just
like sorts, and their behavior under instantiation exactly mimics
that of sorts.

fmod FOO{X :: TRIV, Y :: TRIV} is
sort Foo{X,Y} .
op c{X,Y} : -> Foo{X,Y} .
endfm

fmod BAR is
inc FOO{Nat,String} .
endfm

red c{Nat,String} .

Polymorphic constants can be parameterized.

Note that this breaks backwards compatibility because previously
constants like c{X,Y} were perfectly legal mixfix constants that
did not have any parameterization semantics, and indeed this is still
the case in a module where X and Y are not parameters.
Use of mixfix constants that look like parameterized constants seems
rare in existing Maude code.

Because constant names may not contain underscores, a parameterized
constants cannot be declared to take parameters whose names contain
underscores and cannot be instantiated by views or parameter names
(recursively in the case of parameterized views) that contain underscores.

(3) There is a new importation mode generated-by

fmod INT-MOD5 is
generated-by NAT .
...
endfm

In the same way that protecting promises "no junk, no confusion" and
extending promises "no confusion", generated-by promises "no junk".
Of course Maude neither checks or takes advantage of any of these
promises. The purpose of importation modes other than including is
to document a promise by the user about how an imported module will
be used. This promise may be checked or exploited by tools that
work on Maude modules. generated-by may be abbreviated to gb at
the object level and is reflected by
op generated-by_. : ModuleExpression -> Import [ctor] .
at the metalevel.

(4) The the show view command which printed a mixture of unprocessed
and processed view parts has been split into two separate commands.
Now show view prints unparsed bubbles for op->term and strat->expr
mappings and there is a new command
show processed view .
show processed view <view-name> .
that is analogous to show desugared but for views. The following
table summarizes the differences:

show view show processed view
----------------------------------------------------------------------------
parameter theories: module expressions canonical theory names
from theory module expression canonical theory name
to module/theory module expression canonical module/theory name
variable alias declarations as declared from internal alias map
op->term/msg->term mappings bubbles fully parsed terms, msg becomes op
strategy mappings bubbles fully parsed strategies
class mappings yes class sort/class op mappings
attr mappings yes attribute op mappings
msg mappings yes equivalent op mappings

(5) There is now support for parameterization in the object-oriented
syntactic sugar.

(A) Classes can be parameterized

For example

omod CONTAINER{X :: TRIV} is
pr LIST{X} .
class Container{X} | guts : List{X} .
...
endom

Here Container{X} is desugared to
sort Container{X} .
op Container{X} : -> Container{X} [ctor] .
where the class constant is a parameterized constant.

(B) Object-oriented theories

An object-oriented theory (oth) is enclosed in the oth ... endoth pair.
An oth may contain the same object-oriented syntax as an omod and
desugaring is the same except:
(i) Like other theories, oths do no automatically include BOOL, thought
they do automatically include CONFIGURATION.
(ii) An oth desugars to a system theory.
(iii) The class constants generated for class declarations in an oth
get the pconst attribute to ensure their name follows that of their
class sort when the generated system theory is used as a parameter theory.

A system module or omod may be parameterized by system theories
generated from oths.

oth CONTAINER is
class Container .
endoth

omod TRANSFER{G :: CONTAINER, R :: CONTAINER} is
...
endom

(C) Object-oriented views

Views may now contain object-oriented mappings.
(i) class mappings
A class mapping looks like
class C to D .
For a class C in module being mapped
a sort mapping
sort C to D .
and an operator mapping
op C : -> [C] to D .
Maude checks that C looks like a class in the from theory and
that D looks like a class in the to module/theory.

(ii) attr mappings
A generic attribute mapping looks like
attr A to B .
For each attribute operator A`:_ in the from theory
with domain kind [K], this generates a specific op mapping
op A`:_ : [K] -> Attribute to B`:_ .
A specific attribute mapping looks like
attr A : T to B .
If an attribute operator A`:_ with domain kind [K] such that T is [K]
or a sort in [K], exists in the from theory, an specific op mapping
op A`:_ : [K] -> Attribute to B`:_ .
is generated.

(iii) msg mappings
These have the syntax:
msg ⟨identifier⟩ to ⟨identifier⟩ .
msg ⟨identifier⟩ : ⟨type-list⟩ -> <type> to ⟨identifier⟩ .
msg <term-of-depth-1> to term <term> .
They are converted into op mappings during desugaring.
In each case Maude checks that both the operator being mapped
from and the operator being mapped to (or the top operator
in the case of a term) have the msg attribute.


Minor changes
==============

(1) When printing bubble of tokens in commands such as show mod, a space
is no longer printed before (. The idea is that a term such as f(X)
if it exists as an unparsed bubble of tokens will no longer print as
f (X)
Loading

0 comments on commit 26af9f2

Please sign in to comment.