Modular Composition of Language Features through Extensions of Semantic Language Models

Today, programming or specification languages are often extended in order to customize them for a particular application domain or to refine the language definition. The extension of a semantic model is often at the centre of such an extension. We will present a framework for linking basic and extended models. The example which we are going to use is the RSL concurrency model. The RAISE specification language RSL is a formal wide-spectrum specification language which integrates different features, such as state-basedness, concurrency and modules. The concurrency features of RSL are based on a refinement of a classical denotational model for process algebras. A modification was necessary to integrate state-based features into the basic model in order to meet requirements in the design of RSL. We will investigate this integration, formalising the relationship between the basic model and the adapted version in a rigorous way. The result will be a modular composition of the basic process model and new language features, such as state-based features or input/output. 
 
We will show general mechanisms for integration of new features into a language by extending language models in a structured, modular way. In particular, we will concentrate on the preservation of properties of the basic model in these extensions.


Integration through Extension
The specification and development of complex software systems might require the use of different specification features, assembled into a customised language.The combination of specification features requires a thorough understanding of all particular features involved.In this paper, we will present a framework which supports the systematic, modular integration of denotationally defined formal models of features by stepwise, property-preserving extension of the language semantics.Modularity and compositionality in the design, integration, and customisation of languages are key issues which are not yet solved.This was pointed out in the group reports and position statements of the ACM Workshop on Strategic Directions in Computing Research, MIT, June 1996, in particular the groups Programming Languages and Software Engineering and Programming Languages, which were partially published in ACM Computing Surveys [ACM96].Semantics of languages is about descriptions of computational features.These computational features should be described separately and then assembled to more comprehensive languages.[Hoa96,HJ98] also refer to the extension of programming languages through inclusion of new language features, such as variables or procedures: 'an essential goal is to manage such newly introduced complexity by use of as much as possible of the existing theory and algebra.Ideally, each new feature can be defined and introduced separately, in a way that permits them to be combined without further complexities of interaction.' We will present principles and a case study using an extension calculus and notation geared towards modular, composable descriptions of languages based on extensions of their semantical models.This paper is based on [Pah98], which introduces the ideas used here in a more general way.A formal model defining a language feature possesses some properties: functions behave in a certain way, semantic domains might be constrained.We will show how these qualitatively different properties can be preserved.The practical advantage of preserving properties can be illustrated by considering the behaviour of programs implemented on the concurrency model.It can be guaranteed that a program preserves its behaviour if it is executed as a program of the extended language.The behaviour is not 3rd Irish Workshop on Formal Methods, 1999

Modular Composition of Language Features through Extensions of Semantic Language Models
necessarily identical since underlying semantical notions might have changed, but there exists an observation under which the behaviour is identical.
The formal specification framework RAISE [Geo91,Gro92] is an example of a combination of different specification techniques.RSL is the RAISE specification language.RSL is based on principles of VDM [Jon90], but also includes features for the specification of concurrency and a modularity concept.Bolignano and Debabi's paper [BD92] is the basis for this investigation.They describe the extension of a simple denotational model for CSP-like process algebras based on the acceptances model [Hen85] to meet the requirements in the development of RAISE.We will follow [BD92] and investigate their development of a refined model in a more rigorous and formal way considering aspects of modularity in design and extension of language models or languages.This will result in a modular, comprehensible description of the integration of formal models.To illustrate our approach, we will add state-based, model-theoretic features -such as input/output via channels or states and values -to the basic model of processes.Processes might depend on some external events such as the communication via channels.In a simple model, the events can be left unspecified, input/output might not be dealt with.In a modular, stepwise development, the notion of events can then be refined.New commands can be added, existing ones have to be redefined in order to work on new structural requirements.We will provide a framework in which these extensions are formalised by using operators in an algebraic framework.We will provide a selection of common templates of extension which support conservative, property-preserving extensions.By providing such templates, we will facilitate the process of adapting domain and function definitions of a basic model to meet new requirements.
We will start with introducing the basic language in Section 2. The following section 3 introduces principles of our approach of extension.Behaviour and domain constraints are important properties which are addressed.We use these results in Section 4 for a first extension by partitioning events.A second extension in Section 5 adds states and values.We conclude with related work.

Basic Model and Language
The basic model of processes, which we are going to introduce, is based on Hennessy's acceptances model [Hen85], but in the representation of Bolignano and Debabi [BD92].The acceptances model was introduced as a denotational model for CSP-like process algebras 1 .

LANGUAGE DESCRIPTION Syntax
Figure 1: The basic language definition 1 A similar extension of the acceptances model can be found in [HI93b,HI93a] where a simple process language is extended by values and assignments.
3rd Irish Workshop on Formal Methods, 1999 A process domain will be the kernel structure containing acceptance sets as one of its parts.A simple process language based on an acceptances model is presented in figure 1 A sample process description is This process can choose externally (choice is determined by the environment) between two events a and b.If a is chosen it stops.If b is chosen, the process can engage in another event c before it stops.Later on, we introduce a constraint that guarantees that a process can only engage in a certain set of events (the acceptance set) in each process state.
The basic domain, which is the main semantic domain of the language, is a space of processes P 0 where Σ is a set of events.The first component of those pairs is a mapping from events to processes in P 0 .The second component is an acceptance set -some constraints on the domain PPΣ will be introduced later.An acceptance set contains all events that a process can engage in.We could say that such a set stands for the possible internal states that can be reached.Each of these states is a set of actions that can be taken in that particular state.⊥ is the semantic correspondence to the chaos process.The domain is defined recursively, but a solution exists, see [BD92] section 5.
[BD92] introduces two nondeterministic choice operators.Only the external choice operator [] shall be considered here, the internal choice will be neglected in order to simplify the presentation.Other language elements denote a deadlock process, stop, a divergent process, chaos, and a process which depends on an external event, e → p.
Bolignano and Debabi impose semantical constraints on the process domain which guarantee consistency of the definition and also specify properties of acceptance sets: 1. Events in process descriptions have to be acceptable, i.e. for (m, S) ∈ P 0 : 2. Acceptance sets have to be saturated.Saturation subsumes closure conditions on sets.A has to be a saturated finite subset of PΣ, expressed by Sat(A), for A ∈ PPΣ.
This is an adaption of criterion Sat in Figure 3 in [BD92].The reason for using {z|z ∈ A} instead of A can be seen in subsequent reformulations of this definition.For subsets A i of a power set, A i ∈ A is the union closure, and The consistency of the language definition with the constraints has to be proven, e.g. it has to be shown for the external choice []: The consistency of the basic language is not an issue of the extension approach, but has rather to be resolved by the language designer for a particular language description.

Principles of Extension
In the previous section, we have presented a small process description language with a denotational concurrency model at its core.This model shall be extended: the abstract communication events shall be made more concrete as input/output events, values (to be passed through input channels) and internal states (to store these values) shall be introduced.The necessary formal framework for model extensions will be introduced in this section.
The principles of behaviour preserving and domain constraint preserving extensions will be motivated.The basic construct, a semantics extension, will be introduced.It plays the role of an extension operator which is equipped with extension laws characterising the properties to be preserved.We will show that domain constraints can technically be dealt with as a special form of behaviour.

Motivation
Principles of extension shall be motivated using the syntactical phrase e → p as a primitive process description whose properties have to be preserved in an extension of the process model.The process domain shall be extended in this example by adding a value domain.This example is not part of the actual RSL-model extension, it is only used to illustrate extensions using a simple and common new feature.An injection shall be used to refine the process domain P 0 = (Σ → P 0 ) × PPΣ into a product of values, processes and acceptance sets.Let us start with the semantic function defining the language phrase e → p: e → p is a phrase of the syntactic domain P rocess.The semantic function P 0 maps elements from P rocess to P 0 .The event e is associated with the meaning of the process description p.The event e has to be an acceptable event.
Let us now consider an extension of the language which contains again the phrase e → p. Processes shall be extended by allowing them to have a value in each process state.Thus, the semantic function has to be adapted by introducing a value domain V .This is expressed using a type constructor T which maps the basic process domain P 0 into a product of values and processes T P 0 : We will now briefly introduce constructs needed to describe an extension.They will be explained in detail in the subsequent subsections.A mapping φ : P 0 → T P 0 maps elements of the process domain into the extension.The mapping * is a function lifting which extends the semantic function P 0 to the new structural requirements given by the extended domain T P 0 , i.e. * : P 0 → P * 0 .The previous paragraphs have illustrated the extension of the description of process behaviour.The given domain constraint, expressing e.g. that processes can only engage in acceptable events, dom(m) = S for (m, S) ∈ P 0 are expressed on the basic domain P 0 .Extending P 0 to T P 0 , we also have to extend the constraints.In particular, we have to preserve the intended restriction of behaviour.We will show a standard way of rewriting a constraint such that the constraint is preserved.
3rd Irish Workshop on Formal Methods, 1999

Behaviour Preservation
The semantic function P * 0 preserves certainly the behaviour of P 0 , if the following diagram commutes: or textually expressed by This is mathematically the homomorphism criterion on algebras.We have used a morphism φ Syn on the syntactical domain P rocess which shall denote an embedding of P rocess into the extended syntactical domain T P rocess.It is not straightforward here to talk about the behaviour of processes which has to be preserved.The semantics for processes is here not given in an operational semantics style, e.g. in terms of a transition system.The semantics of a process is given here as a semantic entity which, by its recursive structure, describes the possible future process states, depending on events.Our aim is to preserve these semantics in an extension.The notion of behaviour preservation indicates that behavioural aspects of the basic model should reappear in the extension.The homomorphism criterion might be too restrictive.We introduce a more flexible observability criterion applicable to the extension, which explains what has to be preserved.We can use an equivalence ∼ as the observation criterion instead of equality: φ describes data refinement.φ ∼ is derived from φ by mapping elements into equivalence classes of an equivalence ∼ on the extended domain T P 0 .The equivalence explains which elements in the extended domain represent the same element from the basic domain.The extension P * 0 has to be defined in accordance with φ ∼ , if behaviour has to be preserved.
Processes p = (ep, s) from P 0 are refined to (v, ep, s) in T P 0 for some value v.Some extended elements are observably equivalent, expressed by an equivalence class [(v, ep, s)] ∼ .The relation between basic and extended domain is expressed by a mapping r : We have used an equivalence ∼ on T P 0 to define relevant observable behaviour.Extended functions are expected to behave correctly with respect to the equivalence classes.A mapping c : (v, ep, s) → [(v, ep, s)] ∼ does always exist, q : (ep, s) → (v, ep, s) can be constructed.The set-based mappings such as r, p or c can be extended to corresponding morphisms ρ, φ, χ on algebras based on congruences and quotient algebras such that χ • φ = ρ with φ : P 0 → P * 0 , χ : P * 0 → P * 0 /∼ and ρ : φ is a morphism which preserves behaviour and χ is a canonical morphism onto the quotient algebra.If ∼ is a congruence, then χ is a canonical morphism, i.e. always exists; see [Coh65,Grä68] for details.
3rd Irish Workshop on Formal Methods, 1999

Semantics Extensions
The previous introduction of concepts shall now be summarised in the definition of a semantics extension, the basic building block of our extension approach.This construct is an extension operator which will be equipped with extension laws describing the properties to be preserved.Applied to an algebra which models a basic language, we can obtain another, extended algebra which interprets the extended language.Semantics extensions describe a language feature in separation.
Definition 3.1 Let A and B be algebras, let A and B be sets in A and B. A semantics extension from A to B is a 5-tuple (T, φ ∼ , ∼, * , δ) where • * is a function lifting, which lifts f :

collection of typed choice operators, yielding default values for each equivalence class in T A/∼.
The equality on quotients is the equivalence on the basic sets.φ ∼ can be extended to a homomorphisms on algebras.
For the following discussion, we often assume a domain (a set) of interest S.Then, for all domains D not equal to S, ∼ D is assumed to be the equality and φ D is assumed to be the identity mapping.
Constraints on semantics extensions are called extension laws.They describe the property to be preserved.
We can express the law diagrammatically as: • The extension is called faithful, if for any two functions f, g : A → B of the same type holds: If functions are behaviourally distinguishable on the basic layer, they should not be observably different on the extension layer.This is formalised by the notion of faithfulness.The equivalence ∼ defines observationally equivalent behaviour.For each class of extended functions, there should be the corresponding original function.Full extensions reflect this issue.For the remainder we expect extensions to be full and faithful.
3rd Irish Workshop on Formal Methods, 1999

Modular Composition of Language Features through Extensions of Semantic Language Models
In terms of category theory, φ is a natural transformation with respect to the endofunctors 1 and T , if where T (f ) := f * .A natural transformation preserves structure and behaviour.As explained above, this is a too restrictive constraint.We have introduced equivalence classes to relax that above condition.
We shall now summarise these results in a single diagram which illustrates how to construct an extension from a semantics extension: The behaviour preservation law is encoded in the leftward-slanted rectangle at the bottom.The extension itself is described by the square.We can always derive φ such that χ exists.Only now, we need the defaults δ to construct the morphism φ.Defaults allow us to pick a particular elements from equivalence classes to construct φ from φ ∼ .The resulting mapping φ is not necessarily a homomorphism.Note, that in the diagram, not all combinations of arrows are commuting based on equality, sometimes it is only equivalence.A semantics extension is a construct similar to Kleisli triples (T, η, * ) from category theory [Mog91], where T is a type constructor, η an embedding into the domain constructed by T , and * is a function lifting (slightly different from ours).To point out the similarity, we have used a similar notation.However, our extension is more general due to the introduction of equivalences.We will come back to Kleisli triples later on.

Extension Templates
We now investigate how a semantics extension can be constructed easily such that the extension laws are satisfied.
Definition 3.4 An extension template is a semantics extension which satisfies the extension laws.
We will look at the idea of templates in the context of behaviour preservation.Let S → T S be the domain extension.
An equivalence ∼ or a mapping φ ∼ for T S cannot be derived automatically from S in general, but it is possible for some cases based on particular domain extensions.There is a standard way of obtaining a behaviour preserving function lifting.
3rd Irish Workshop on Formal Methods, 1999

Modular Composition of Language Features through Extensions of Semantic Language Models
Proof: The definition of f * is partial, but total on the relevant subset of T A. This definition guarantees f * (φ A (a)) = φ B (f (a)), i.e. equality as a particular equivalence.
Definition 3. 5 We will define extension templates, based on a particular domain extension.We will give ∼, φ ∼ , * , δ ∼ for each T on a domain S.
All templates are behaviour preserving semantics extensions based on predefined constructions for type extension, e.g. for injection S → S × T (see figure 2 for a formulation in our extension notation) or indexing S → (I → S) (figure 4).The templates have to satisfy a number of constraints: the equivalence ∼ is a congruence, there is a default value for each equivalence class, the function lifting satisfies the behaviour preservation law.

Proposition 3.2 The templates are behaviour preserving semantics extensions, i.e. they satisfy the behaviour preservation extension law.
Proof: The well-formedness of the template components for the four templates is easy to see, classical injections or embeddings are used.Straightforward with proposition 3.1.

Proposition 3.3 The extension templates define full and faithful extensions.
Proof: As it can be seen from the construction of ∼ and φ ∼ , we have isomorphy between a set A and the quotient set T A/∼.From that it follows immediately that the templates define full and faithful semantics extensions.

EXTENSION TEMPLATE
The idea behind templates is to reduce the amount of information that a language designer has to give for the application of an extension operator.The domain type extension T is essential and has to be chosen by the language designer explicitly, but then we can use canonical ways of defining an extension operator.Templates can form a library of extension operators for the language designer.

Domain Constraint Preserving Extensions
We have addressed the preservation of behavioural properties in the previous subsection.Let us now consider the preservation of structural domain constraints.An example of such a domain constraint is the constraint which defines that a process can only engage in acceptable events.Constraints on domains can be interpreted in two ways: as a construction of a subdomain or as a property that has to be preserved.We will pursue the second alternative.It is a more general approach and does not interfere with behaviour preservation.Thus, domain constraints are properties similar to behaviour, also characterised by an extension law.They have to be preserved by appropriate extension templates.

Domain Constraint Preservation
Definition 3.6 A domain constraint is a predicate P : A → Bool on a domain A. Domain constraints are expressed as predicates.Two examples were presented in section 2 for the process domain P 0 .The extension of domains is expressed by the type construction T : S → T S. Elements of domains are mapped by φ : S → T S into the extension.We will start our investigation assuming a semantics extension (T, φ ∼ , ∼, * , δ) with a type constructor T , an extension mapping φ ∼ , and an overloaded lifting operator * , called domain constraint lifting when applied to a domain constraint.

Definition 3.7 The domain constraint preservation law is satisfied, if
for a domain constraint predicate C on a domain A and a domain constraint lifting * .This means that C * has to hold iff C holds.The introduction of id will become clear when we analyse domain and behaviour preservation together.The law can be expressed diagrammatically: An example is dom(m) = S, which is a predicate C on P 0 = ((Σ → P 0 )×PPΣ) ⊥ , i.e.C(P 0 ) := dom(m) = S for all (m, S) ∈ P 0 .The predicate could as well be a binary relation or might involve other domains.Predicates are implicitly universally quantified.Domain constraints are essentially specific forms of behavioural specification.Thus, the domain constraint preservation law is a specific behaviour preservation law.For domain constraints, φ Bool is the identity and ∼ is just equality.

Extension Templates
A template for extending a domain constraint, such that the domain constraint preservation law is satisfied, shall now be introduced.

Definition 3.8 Let (T, φ ∼ , ∼, * , δ) be a semantics extension. A domain constraint C on a domain S is extended to C * on T S, called a constraint extension template, as follows. Substitute syntactically each application of variable s i (i = 1, .., n) in the constraint C by fresh variables s i and each occurrence of domain S by T S in quantifications.
Then, the inverse φ −1 for φ : S → T S is applied to the elements s i , i.e. substitute syntactically s i by φ −1 (s i ).Thus, we get: Constraints which are extended by the above constraint extension template are automatically satisfied in the extension.

Proposition 3.4 The constraint extension template satisfies the constraint extension law.
Proof: Obvious due to construction via inverses.

Proposition 3.5 The constraint extension template defines a full and faithful extension.
3rd Irish Workshop on Formal Methods, 1999 Proof: The inverses allow us to construct an isomorphism.Thus, we have a full and faithful semantics extension.
Let us illustrate the template using an example.We consider a domain S which is extended by injection to S × T .Let there be the constraint ∀m ∈ S .dom(m) = S.The constraint is extended adding fresh variables and extending the domain.Since dom is a function on S, we will adapt using the inverse.The inverse operation to injection is projection3 .We get S = {π 1 (m ) | m ∈ S × T }, and finally ∀m ∈ S × T .dom(π 1 (m )) = S.
The domain extension S → T S gives rise to the canonical construction of behaviour templates as well as domain templates.The constraint extension is a general-purpose template applicable to all kinds of domain extension.It lifts the original constraint such that its validity is preserved.

Partitioning Events
Principles of our extension approach have now been presented in an example and we can start extending the basic model from section 2. In the first step, we partition the set of events into input, output and termination events.Input and output denote the directions of communication via channels.Before we address the concrete problem, we introduce the general technique of partitioning in form of an extension template.The extension of the process domain with behaviour preservation as well as the extension of domain constraints preserving the original constraints will be considered.

Partitioning Template
A domain S might be partitioned into subdomains S k1 , . . ., S kn , if a function kind : S → K with K = {k 1 , . . ., k n } exists, which assigns a unique kind to each s ∈ S. The partitioning shall be expressed explicitly through an extension template based on a product domain T : S → S k1 × . . .× S kn such that s ∈ S ki whenever kind(s) = k i4 .The partitioning shall constitute the extension, i.e. we have to define the equivalence ∼ and the mapping φ ∼ .A template shall guarantee the extension laws.Additionally, it should preserve a partitioning on the basic domain S expressed by a function kind.The equivalence ∼ on S k1 × . . .× S kn shall be defined by The definition of kind induces an equivalence ∼ P on the source domain S: all elements of the same kind are equivalent, i.e. for s, t ∈ S: s ∼ P t iff kind(s) = kind(t).φ ∼ shall be defined by with s ki = s and s kj = ω s for i = j.ω s is an undefined value.The behaviour preservation law is satisfied if the canonical function lifting is used.The template is presented in figure 3.This template of partitioning has the existence of kind as a precondition.It also requires the satisfaction of the substitution property, i.e. the equivalence ∼ has to be a congruence.The assumed function kind is used to derive an equivalence on S which is used instead of the predefined equality as the behaviour preservation criterion.

Behavioural Extension
The set of events Σ shall be partitioned.We assume that we can distinguish input events, output events and a termination event √ in Σ.The template PARTITION, or rather a variant of it, shall now be applied.Let Σ 1 = PΣ in × PΣ out × PΣ √ be the partitioning of events Σ 1 .The extended process P 1 space shall be defined as: Precondition: existence of kind, substitution property holds The following assumptions shall be made.Σ can be expressed by a disjoint sum Σ = Σ in + Σ out + Σ √ , i.e. the function kind exists.Functions in the specification, which are supposed to be lifted, preserve the partitioning, i.e. the equivalence ∼ on Σ 1 as a congruence.This can be guaranteed by the canonical construction.Thus, the precondition of the template is satisfied.Σ √ consist of only one element √ which denotes immediate termination.We will use a variant of the template which partitions Σ into an indexed set in the function space Σ → P .The variant PART IND is obtained by applying PARTITION to each first component of maplets of type Σ → P 1 : This variant is also behaviour preserving.We get the following definitions for φ and ∼ for the template PART IND, where the empty map [ ] is used as the default element: The following definitions for the lifted semantic function P 1 are derived by application of the template: The formulation of P 1 [[p 1 []p 2 ]] as given above does not correspond syntactically directly to the application of the template, but is semantically equivalent and easier to read.

Extending the Domain Constraint
Now, we address the extension and preservation of domain constraints.The constraints, as presented above in section 2 for the basic model, are: 3rd Irish Workshop on Formal Methods, 1999 1. dom(m) = S for (m, S) ∈ P , 2. Sat(A) for A ∈ PPΣ with These constraints cannot be applied to the new domain structure.A reformulation is necessary.This reformulation can be done using the domain constraint extension template.
1.For all acceptance sets S 1 and i ∈ Σ in , o ∈ Σ out , √ ∈ Σ √ : with S 1 = φ(S) and Σ = Σ in + Σ out + Σ √ .The projection π is the inverse of injection -remember that a product was used to represent the partitioning.
2. Sat 1 (A) for A ∈ PPΣ 1 where Since the constraint extension template is used, the constraint is preserved.The first part of the constraint is partitioned into three parts and then projections are used to reduce to the original constraint.Using the product for extension and then projecting is also used to obtain the second criterion.

Values and States
Values and states shall be added to the previous extension in a single step.Values are read via input channels and are bound to variables of the process state.An extension in two steps is therefore not adequate.We will start, as in the previous section, introducing the mechanisms in their general form, before we apply them to the concrete extension construction considering behaviour and domain constraint preservation.

Injection and Indexing Templates
We will need two templates for this extension.The template INJECT was already presented in figure 2. The INDEX template is presented in figure 4. Elements of a basic set S shall be indexed by elements from an index set I, i.e. we construct a function space with the basic set as the range.Two extended elements are equivalent, if they map to the same element in the range.

Behavioural Extension
States and values will form a new component of the process space.Values can also be read (in) from or written (out) onto channels.The resulting domain P 2 of the last extension presented here is: 3rd Irish Workshop on Formal Methods, 1999

Related Work
Category theory and in particular monads (or Kleisli triples or just triples) are a recent, popular approach to modular description and integration of language features [Mog91, Wad92, LH96].A (Kleisli) triple is a collection of extension operators on objects and morphisms of a category.A triple can describe a language feature, called notion of computation by Moggi, abstractly.Triples can be represented in categories.This corresponds to our semantics extensions and their representation in algebras.A recent attempt to use monads in the description and extension of specification languages is [CS97], where a customisable algebraic specification language is presented.
We have assumed a framework of sets and functions.This framework can be defined in terms of category theory by the category Set of sets and total functions.Category theory is a common mathematical framework to describe language semantics.We have formulated this paper in terms of universal algebra since RSL is defined using a classical denotational approach.A reformulation in terms of category theory is, though, possible.
The advantage of both approaches is that an abstract construct (our semantics extensions or monads) is provided which is a concise description of a feature and which can be represented in a number of concrete structures.The foundation of our semantics extensions is universal algebra, but a semantics extensions is a more specialised construct than a (Kleisli) triple.The equivalence is included which is used to model an observability criterion to express property preservation.
Refinement of software specifications and refinement of language descriptions share some properties.Both approaches to refinement are based on a notion of data refinement.In the area of language semantics, Riddle and Wallis [RW97] have presented ideas similar to ours.There, a refinement relation between denotationally specified languages is provided.The paper follows Schmidt's textbook on denotational semantics [Sch86].Riddle and Wallis see definitions of semantic functions as semantic equations and define a correctness preserving refinement relation based on these equations.
Another algebraic approach can be found in [HJ98].Algebraic theories are used to define a programming language by describing properties of language operators through predicates in the theory.Theories are linked e.g. in the process of refinement, expressed by functions.The subset relation is a straightforward relation.More general links include links between disjoint domains, e.g. based on Galois connections.

Conclusions
We have presented an extension framework for the modular extension of languages and their models.This framework allows a language designer to integrate denotationally specified language features.Our approach can be seen as part of a framework for formal language engineering, which aims at flexible combination and integration of specification languages.Languages can be customized for particular applications.The algebraic specification framework CoFI (Common Framework Initiative) [Gro99] is an example.Our framework shows that a number of common integration problems can be solved using an extension approach, i.e. starting with a basic language and adding or integrating new features step by step.
One of the important characteristics of our approach is the formulation of the extension in an abstract, modular way by using an operator called semantics extensions.Extension templates were introduced which allow us to discharge proof obligations regarding the preservation of properties automatically.A notation based on extension templates was provided to facilitate the use of the mathematical extension framework.The language designer is prevented from rewriting definitions in extensions.
RSL was used as a realistic, non-trivial case study to show the applicability of our approach.RSL is a typical example of a wide-spectrum specification language which made the integration of concurrency, state-based and modularisation features necessary.A full formal definition of a language is normally not feasible, but certain central aspects, such as the concurrency model for RSL and its connection to state-based features, can be investigated formally.Our framework can be applied in the design phase of an integrated specification language to get insight and understanding about the principles and mechanisms of the integration under investigation.
Extensions of the basic process model have already been presented in [Hen85], [HI93b], or [HI93a].Using our framework, we could prove that properties such as behaviour and domain constraints are preserved if Hennessy's 3rd Irish Workshop on Formal Methods, 1999 acceptances model is extended by model-theoretic, state-based features to meet the requirement of the RAISE specification language 5 .We have dealt with this extension in a stepwise, modular way based on a selection of common extension templates.An approach of integrating concurrency and state-based features alternative to the one pursued by Bolignano and Debabi could have been taken.We could have started with an imperative model including states and values, on which processes are added and then events are distinguished.
We could extend our framework by introducing a metalanguage to express properties of programs and also properties of the extension.This creates a notation between the languages to be specified and the extension framework as presented so far.In [Pah98], we have presented a simple equational metalanguage.Extensions of this metalanguage could include a predefined equivalence symbol to interpret the behaviour preservation criterion.
Considering the results, and in particular [Pah97], it appears that the extensions here can be carried out in parallel, since they do not depend on each other.Extending in parallel means that a number of extensions are carried out on the same basic model resulting in a set of extended models.Under certain conditions, these extensions can be merged into one resulting model.