[TYPES] Types as theories

PATRICK BROWNE patrick.browne at dit.ie
Tue May 13 12:34:08 EDT 2014


Grigore,
Thanks for your clarification.
Yes, MONOID2 is convoluted. It was the simplest example that I could think
of that illustrated the sub-model idea and was similar to Goguen's example
(he actually used monoids and groups).
Thanks,
Pat


On 13 May 2014 15:17, Rosu, Grigore <grosu at illinois.edu> wrote:

> Hi Pat,
>
> Your two claims are correct, but note that in the second case,  model M
> containing another model M' can mean many different things, depending upon
> the importing mode.  For example, in your second example, you are stating
> that you protect TRIV, which actually makes your MONOID2 spec inconsistent:
> indeed, there is no model of MONOID2 whose reduct to the signature of TRIV
> is the initial model of TRIV, because the former will always contain at
> least one element (the unit) while the latter is the empty model.  So yes,
> you should use extending instead of protecting mode.
>
> However, both your algebraic specifications are unusual for the
> OBJ/CafeOBJ/Maude language families.  The most natural definition of a
> monoid is to just have a sort Monoid, the unit, the binary operation, and
> the three axioms, without getting the TRIV theory or the Elt sort involved
> at all.
>
> Grigore
>
>
>
> ________________________________________
> From: Types-list [types-list-bounces at lists.seas.upenn.edu] on behalf of
> PATRICK BROWNE [patrick.browne at dit.ie]
> Sent: Tuesday, May 13, 2014 7:09 AM
> To: types-list at lists.seas.upenn.edu
> Subject: [TYPES] Types as theories
>
> [ The Types Forum, http://lists.seas.upenn.edu/mailman/listinfo/types-list]
>
> Dear list
> I am studying Goguen's paper Types as theories [1].
> Below are two examples coded in CafeOBJ (any other algebraic specification
> language would do).
> Based on Goguen's paper, are the following true?
>
> 1) Subsort inheritance provides a classification of values, every value of
> the sub-sort is a value of the super-sort.(MONOID1)
>
> 2) Module import inheritance provides classification of models, each model
> of the class of models of the importing module contains a model of the
> imported module.(MONOID2)
>
>
> My intention is that MONOID1 illustrates 1) and 2) MONOID2 illustrates 2).
> Assumptions
>
>     the CafeOBJ module is the software realization of a theory
>
>     loose semantics, so any model of TRIV will do
>
>     the term type is synonym for sort
>
>     the < symbol indicates subsort
>
>     a monoid is associative and has a  neutral element.
>
> mod* MONOID1 {
> [  Monoid < Elt ]
> -- Signature in terms of super type
> op e : -> Elt
> op _._ : Elt Elt -> Elt
> -- equations in terms of subtype
> vars A B C : Group
> eq A . e = A .
> eq e . A = A .
> eq A . (B . C) = ((A . B) . C) .
>  }
>
>
> mod* MONOID2 {
> --
> -- The TRIV theory represented by the CafeOBJ
> -- built in loose theory TRIV which has Elt as its principal sort and no
> operations.
> -- I used protecting mode for import, perhaps it should be extending?
> pr(TRIV)
> op e : -> Elt
> op _._ : Elt Elt -> Elt
> vars A B C : Elt
> eq A . e = A .
> eq e . A = A .
> eq A . (B . C) = ((A . B) . C) . -- Associativity could be specified as a
> property
> }
>
> Regards, Pat
>
> [1]Goguen, J. (1991). Types as Theories. Topology and Category in Computer
> Science. G. M. Reed, A. W. Roscoe and R. F. Wachter, Oxford University
> Press: 357-390.
> http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.16.2241
>
> --
>
>
> This email originated from DIT. If you received this email in error, please
> delete it from your system. Please note that if you are not the named
> addressee, disclosing, copying, distributing or taking any action based on
> the contents of this email or attachments is prohibited. www.dit.ie
>
> Is ó ITBÁC a tháinig an ríomhphost seo. Má fuair tú an ríomhphost seo trí
> earráid, scrios de do chóras é le do thoil. Tabhair ar aird, mura tú an
> seolaí ainmnithe, go bhfuil dianchosc ar aon nochtadh, aon chóipeáil, aon
> dáileadh nó ar aon ghníomh a dhéanfar bunaithe ar an ábhar atá sa
> ríomhphost nó sna hiatáin seo. www.dit.ie
>
> Tá ITBÁC ag aistriú go Gráinseach Ghormáin – DIT is on the move to
> Grangegorman <http://www.dit.ie/grangegorman>
>

-- 


This email originated from DIT. If you received this email in error, please 
delete it from your system. Please note that if you are not the named 
addressee, disclosing, copying, distributing or taking any action based on 
the contents of this email or attachments is prohibited. www.dit.ie

Is ó ITBÁC a tháinig an ríomhphost seo. Má fuair tú an ríomhphost seo trí 
earráid, scrios de do chóras é le do thoil. Tabhair ar aird, mura tú an 
seolaí ainmnithe, go bhfuil dianchosc ar aon nochtadh, aon chóipeáil, aon 
dáileadh nó ar aon ghníomh a dhéanfar bunaithe ar an ábhar atá sa 
ríomhphost nó sna hiatáin seo. www.dit.ie

Tá ITBÁC ag aistriú go Gráinseach Ghormáin – DIT is on the move to 
Grangegorman <http://www.dit.ie/grangegorman>


More information about the Types-list mailing list