Up Next
Go up to Top
Go forward to 2 Changes

1 Discussion

>From a methodological point of view a parameter specification of a generic specification is a typing constraint and it seems natural to assume that the semantics of instantiation of generic specifications is undefined for those argument specifications which violate the typing constraint.

Otherwise one is forced to think about the semantical consequences if the argument specification does not satisfy the parameter specification.

For example, in general, if the body of a generic specification is a conservative extension of the parameter specification and if the argument specification and the body only share symbols via the parameter signature then the result of the instantiation is a conservative extension of the argument specification.

But take the following specification:

GSpec (gen-extension [sort s, const a,b: s, a = b] [sort s'])
GSpec is a persistent generic specification because the body does not restrict the models of the parameter specification. However, GSpec([sort s, const a,b: s]) does not yield a conservative extension of [sort s, const a,b: s] because the semantics of instantiation imposes the restriction a = b on the models of the argument specification.

One serious problem is that a user might deliberate write specifications that take advantage of this semantics of instantiation. This problem can be addressed by tools that warn the user about such situations and generate appropriate proof obligations. However, the best way to show our intend for tools to recognize such situations is by reflecting them in the semantics.

As a consequence of our proposal, the definedness of the semantics of instantiation is undecidable. However, well-formedness of instantiation still remains decidable, as well-formedness only requires the fitting-morphisms to be signature morphisms from the parameter specifications to the argument specifications.


CoFI Note: L-5 --Draft 0.1-- 30 May 1997.
Comments to hubert@mpi-sb.mpg.de

Up Next