<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Equational Logic and Set-Theoretic Models for Multi-Languages?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Samuele Buro</string-name>
          <email>samuele.buro@univr.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Roy L. Crole</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Isabella Mastroeni</string-name>
          <email>isabella.mastroeni@univr.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science, University of Leicester</institution>
          ,
          <addr-line>University Road, Leicester LE1 7RH</addr-line>
          ,
          <country country="UK">United Kingdom</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Computer Science, University of Verona Strada le Grazie 15</institution>
          ,
          <addr-line>37134 Verona</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Interoperability is the capability of two languages to interact within a single system: HTML, CSS, and JavaScript can work together to render webpages. Some object oriented languages have interoperability via a virtual machine host (.NET CLI compliant languages in the Common Language Runtime). A high-level language can be interoperable with a low-level one (Apple's Swift and Objective-C). While there has been some research in the foundations of interoperability there is little supporting theory. This paper is based upon our existing work on combining languages to produce so-called multi-languages. Here, we define an equational logic for deducing valid equations, from axioms that postulate properties of the multi-language. We define set-theoretic multi-language algebras as models, and provide algebraic constructions such as congruences and quotient algebras. Such models, and the constructions, provide the ingredients for the main deliverable, soundness and completeness for the equational logic. We illustrate the basic ideas with a running example.</p>
      </abstract>
      <kwd-group>
        <kwd>Multi-languages Equational Logic Set-Algebras</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Multi-languages arise by combining existing languages [
        <xref ref-type="bibr" rid="ref1 ref10 ref15 ref19 ref21 ref22 ref23 ref28">23, 1, 28, 10, 15, 22, 21, 19</xref>
        ].
For instance, the multi-language in [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] allows programmers to interchange
ML expressions and Scheme expressions. Benefits are code reuse and software
interoperability. Unfortunately, they come at the price of a lack of clarity of
(formal) properties of the new multi-language, mainly semantic specifications.
Developing such properties is a key focus of this paper.
      </p>
      <p>
        But what exactly are multi-languages? What is a good abstract definition of
a multi-language? How should we be thinking conceptually? The problem was
originally addressed in [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ]. The authors introduced boundary functions, new
? Copyright c 2020 for this paper by its authors. Use permitted under Creative
      </p>
      <p>
        Commons License Attribution 4.0 International (CC BY 4.0).
constructs able to regulate the flow of values between the underlying languages.
Buro, Crole, and Mastroeni [
        <xref ref-type="bibr" rid="ref6 ref8">8, 6</xref>
        ] extended their approach to the broader class of
order-sorted signatures: rather than combining two fixed languages, they combine
two such signatures Sg1 and Sg2. The result is a notion of multi-language term.
Such a term contains symbols from both signatures and also boundary function
symbols to formally specify the interchange of multi-language terms.
      </p>
      <p>
        Here we focus on equational algebras [
        <xref ref-type="bibr" rid="ref11 ref12 ref17 ref29 ref5">29, 5, 11, 17, 12</xref>
        ] and we provide
and study suitable algebras for modelling multi-language terms, which we call
multi-language algebras. Inspired by the classic results of [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], we develop in detail
a number of analogues of standard concepts such as algebra congruences and
quotients. These are put to use in a completeness proof for a system of equational
reasoning in the multi-language setting, which we now describe.
      </p>
      <p>
        Research on equational reasoning and logic has been prolific (see [
        <xref ref-type="bibr" rid="ref18 ref30">30, 18</xref>
        ]).
There are many sound and complete derivation systems if Sg is a many or
order -sorted signature: see [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], and [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. So another challenge lies in devising
deduction systems that allow for sound reasoning between multi-language terms.
We address this challenge by defining a multi-language equational logic. In more
detail we give a deduction system for equations between multi-language terms.
The main result is that our new system is sound and complete for deductions
starting from a set of axiom equations, relative to the multi-language algebras.
      </p>
    </sec>
    <sec id="sec-2">
      <title>Contributions and Paper Structure: In Section 2 we review the theory of</title>
      <p>
        order-sorted equational logic [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] and the multi-language framework of [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. We
adopt the Birkhoff approach to proving soundness and completeness, that is, we
formulate multi-language algebras which are free, or quotients of other algebras.
In Section 3 we describe the free multi-language algebra construction that yields
the notion of multi-language terms with variables. Then we extend constructions
of universal algebra to the multi-language context. In particular, we define the
notion of multi-language quotient algebra. In Section 4, we give definitions of
multilanguage equation and equation satisfaction, and we sketch a proof of soundness
and completeness. We need to assume familiarity with ordered structures for
reasons of space (we redirect the reader to [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] for an introduction).
      </p>
      <p>Running Example: Throughout the paper we develop a small illustrative
application example that lays the foundations for combining a core imperative
language with a functional one (the simply-typed lambda-calculus). In particular,
we show how we can provide a formal semantics to multi-language terms
accompanied by an equational theory. For instance, we formally define the semantics
of the multi-language term x = ( y:int . z * y) 5 obtained by blending a
lambda-term into an imperative program.
2
2.1</p>
      <sec id="sec-2-1">
        <title>Background</title>
        <sec id="sec-2-1-1">
          <title>Order-Sorted Algebras</title>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>The basic notions of order-sorted algebras [12] are signature and algebra. We</title>
      <p>assume readers are familiar with these ideas, but include definitions to set up
notation.</p>
      <sec id="sec-3-1">
        <title>Definition 1 (Order-Sorted Signature). An order-sorted signature is a</title>
        <p>triple Sg , (S; ; ), where (S; ) is a poset of sorts and is an (S
S)sorted set , f w;s j (w; s) 2 S S g of operators. If 2 w;s we call
an operator (symbol) and (w; s) the rank of . If w = ", we call the operator a
constant, and otherwise a function symbol. Given , we write f : w ! s, for
function symbols, and k : s for constants, as shorthands for the set memberships.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>These data satisfy:</title>
      <p>(1os) each constant has a unique rank ("; s): we abbreviate the rank to s and say
sort as a synonym; and
(2os) function symbols satisfy the following monotonicity condition: if we have
f : w1 ! s1 and f : w2 ! s2 with w1 w2, then s1 s2.</p>
      <sec id="sec-4-1">
        <title>Definition 2 (Order-Sorted Algebra). An order-sorted Sg-algebra A for</title>
        <p>an order-sorted signature Sg , (S; ; ) is specified by an S-sorted set A ,
( JsKA , As j s 2 S ) of carrier sets, together with interpretation functions
J : w ! sKA : JwKA ! JsKA for each operator : w ! s, where w , s1 : : : sn
and JwKA , Js1KA JsnKA. In the case that w = ", so that is a constant k,
we define J"KA , f g; then, instead of Jk : sKA : f g ! JsKA, we write Jk : sKA 2
JsKA. These data satisfy:
w2, then Jf : w1 ! s1KA(a) =
(1oa) s s0 implies JsKA Js0KA; and
(2oa) if f : w1 ! s1 and f : w2 ! s2 with w1</p>
        <p>Jf : w2 ! s2KA(a) for all a 2 Jw1KA.</p>
        <p>From now on, we drop the algebra subscript and the ranks of operator symbols
within the semantic brackets whenever they are clear from the context.</p>
      </sec>
      <sec id="sec-4-2">
        <title>Definition 3 (Order-Sorted Homomorphism). Let Sg , (S; ; ) be a sig</title>
        <p>nature and let A and B be Sg-algebras. An order-sorted Sg-homomorphism
h : A ! B is an S-sorted function h : A ! B such that
(1oh) hs(JkKA) = JkKB for each k : s;
(2oh) hs Jf : w ! sKA = Jf : w ! sKB hw for each f : w ! s; and
(3oh) s s0 implies hs(a) = hs0 (a) for each a 2 JsKA.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>The class of all the order-sorted Sg-algebras and the class of all the order-sorted</title>
      <p>Sg-homomorphisms form a category denoted by OSAlgSg .</p>
      <p>
        Among the algebras in OSAlgSg , the term Sg-algebra TSg is freely generated
from Sg in the usual way. The carrier set JsKTSg consists of the (ground) terms
t of sort s. Function symbols f are modelled as interpretation functions which
build new terms from old ones by “applying f ”; for instance, Jf KTSg (t) , f (t).
Note that any term t can appear in several carrier sets of the term algebra:
terms are polymorphic. A key property of signatures, related to polymorphism, is
regularity (see [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] for the formal definition). Regularity ensures each term t
has a unique least sort st.
      </p>
      <p>Proposition 1. If Sg is a regular signature, the term Sg-algebra TSg is an
initial object in OSAlgSg , that is, there is a unique homomorphism h : TSg ! A
for any Sg-algebra A. The components (TSg )s are defined by (mutual,
structural) induction, hence hs can be defined by structural recursion. Since we are
seeking a homomorphism, we must have hs(f (t1; : : : ; tn)) = Jf KA(hw(t1; : : : ; tn))
and hs(k) = JsKA. But this is exactly a structural recursion, and the unique
one yielding a homomorphism. As such, it makes sense to define the (unique)
interpretation of a term t, by way of its least sort, as</p>
      <p>JtKA , hst (t)</p>
      <p>Since our paper focuses in entirety on how the syntax of languages is combined,
term algebras such as this one, and others, will play a major role.
2.2</p>
      <sec id="sec-5-1">
        <title>Multi-Language Signatures and Algebras</title>
        <p>
          A key role of a multi-language specification is to specify which terms of one
language can be deployed in the other. As such, showing exactly how this is
done is a key milestone in the paper. Such a choice amounts, formally, to a
mapping between terms of one language and terms of the other, and it is usually
defined between syntactic categories (i.e., collection of terms) rather than single
terms [
          <xref ref-type="bibr" rid="ref19 ref21 ref22">22, 19, 21</xref>
          ]. Therefore, in the algebraic context, it is tantamount to a
relation specifying pairs of sorts with one sort in each language. We call such
specifications interoperability relations. A multi-language signature is specified
by two order sorted signatures together with an interoperability relation. The
signature is used to determine the terms of the multi-language. Note that a
multi-language signature explicitly provides users with the original two language
specifications; but it is also used to define a “multi-language”, that is, a new
language of terms which is a combination of the two originals. Please note our
notation: If S1 and S2 are two sets of sorts we denote by S1 + S2 their coproduct.
If s 2 Si with i , 1; 2, we write si for (s; i) 2 S1 f1g [ S2 f2g.
        </p>
      </sec>
      <sec id="sec-5-2">
        <title>Definition 4 (Multi-Language Signature). A multi-language signature</title>
        <p>SG , (Sg1; Sg2; n) is defined by a pair of signatures Sg1 , (S1; 1; 1) and
Sg2 , (S2; 2; 2) and a binary interoperability relation n over S1 + S2 such
that si n s0j with i; j 2 f1; 2g and i 6= j (thus, due to our notation, in relationships
si n s0j we have s 2 Si and s0 2 Sj).</p>
        <p>
          The idea is that if si n s0j and t is a term of sort s in Sgi, then t can be used
“as a term with with sort s0 in the language generated by Sgj”. A multi-language
algebra provides meaning to the underlying languages Sg1 and Sg2 and it specifies
exactly how terms of sort s may be converted to terms of sort s0 whenever si n s0j.
These specifications are called boundary functions [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ].
        </p>
        <p>Definition 5 (Multi-Language Algebra). Let SG , (Sg1; Sg2; n) be a
multilanguage signature. An SG-algebra A is given by
– a pair of order-sorted algebras A1 and A2 over Sg1 and Sg2; and
– a boundary function Jsi n s0jKA : JsKAi ! Js0KAj for each constraint si n s0j.
Example 1. Let Sg(Imp) and Sg( ) be the signatures of a small imperative
language and the simply-typed lambda-calculus. We may want to define the
interoperability relation between these two languages in order to use -terms as
expressions in Imp and vice versa. As a result, we can achieve multi-language
programs such as x = ( y:int . z * y) 5 (the multi-language terms are formally
introduced in Definition 8). Note that, despite the simplicity, the evaluation of
such a term requires a careful translation of meanings between the underlying
languages: In order to obtain the value to assign to x, we first need to compute
the application, which in turn needs the interpretation of 5 as a -term.
Such conversions are specified by the boundary functions.</p>
        <p>Homomorphisms between multi-language algebras are ordinary algebraic
homomorphisms that also commute with the boundary functions.</p>
      </sec>
      <sec id="sec-5-3">
        <title>Definition 6 (Multi-Language Homomorphism). Let A and B be two</title>
        <p>multi-language SG , (Sg1; Sg2; n)-algebras. A SG-homomorphism h : A ! B
is given by a pair of order-sorted homomorphisms h1 : A1 ! B1 and h2 : A2 !
B2 such that they commute with boundary functions, namely, if si n s0j, then
(hj)s0 (hi)s.</p>
        <p>Jsi n s0jKA = Jsi n s0jKB</p>
        <p>We can define an S-sorted set A by setting Asi , JsKAi ; and given any such
SG-homomorphism h, there is an S-sorted homomorphism h : A ! B given by
hsi , (hi)s : Asi ! Bsi (which commutes with boundary functions).
Lemma 1. The mapping h 7! h is well-defined, a bijection, and functorial in
that h h0 = h h0. This is immediate from the definitions. Note that we will
usually write h for h, thus identifying the two concepts, and regard h : A ! B
and h : A ! B as inter-changeable throughout the paper.</p>
        <p>A multi-language signature gives rise to an order-sorted one by adding
conversion operators ,!si;s0j for each interoperability relation si n s0j: each conversion
operator maps a term of type si (informally, a term built from Sgi) into a term
of type s0j (informally, a term built from Sgj).</p>
        <p>Definition 7 (Associated Signature). Let SG , (Sg1; Sg2; n) be a
multilanguage signature. The associated signature SG , (S; ; SG ) of SG is the
order-sorted signature defined as follows:
– the poset (S; ) of sorts is given by S , S1 + S2 and by defining si rj if
and only if i = j and s i r; and
– the order-sorted set of operators SG is defined by the clauses
if f : w ! s is a function symbol in i for some i , 1; 2, then fi : wi ! si
is a function symbol in SG ;
if k : s is a constant in i for some i , 1; 2, then ki : si is in SG ; and
a conversion operator ,!si;s0j : si ! s0j in SG for each si n s0j.</p>
        <p>A multi-language signature is defined regular if and only if the underlying
signatures are regular. An immediate consequence is that if SG is regular, then
so too is SG. In the multi-language context, the term SG-algebra TSG defines
the terms resulting from the combination of the underlying languages:
Definition 8 (Term SG-Algebra TSG ). Let SG , (Sg1; Sg2; n) be a
multilanguage signature. The term SG-algebra TSG is defined as follows:
– the order-sorted Sgi-algebra (TSG )i is specified by:</p>
        <p>JsK(TSG)i , JsiKTSG for each s 2 Si;
JkK(TSG)i , JkiKTSG for each k : s in i; and</p>
        <p>Jf : w ! sK(TSG)i , Jfi : wi ! siKTSG for each f : w ! s in i;
– boundary functions are defined by Jsi n s0jKTSG , J,!si;s0j KTSG for each si n s0j.
A multi-language ground term t is any element of (TSG )si , JsK(TSG)i ,
JsiKTSG for some si; TSG is of course the “standard” term order-sorted algebra
over order-sorted SG, and we will say that t has sort si.</p>
        <p>It follows that each multi-language ground term t has a unique least sort st when
the signature is regular, being the least sort of t over the associated signature
(and of course t may inhabit many other carrier sets).</p>
        <p>
          The category whose objects are multi-language SG-algebras and morphisms
are multi-language SG-homomorphisms is denoted by MLAlgSG . Moreover, as
in the order-sorted case, the multi-language term algebra TSG over a regular
multi-language signature SG is initial in MLAlgSG [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. Therefore, given a
multilanguage SG-algebra A, there is a unique (semantic) function h : TSG ! A
defined by recursion over the syntax of terms. Analogous to the order-sorted case,
the multi-language semantics of a ground term t is defined by JtKA , hst (t).
Example 2. Multi-language ground terms of our running example are exactly
those that can be obtained by performing cross-language substitutions of an
Imp-expression for a -term and vice versa. The initiality of the term algebra
ensures a unique meaning for each of these multi-language terms. For instance,
if we compute the semantics of x = ( y:int . z * y) 5, we obtain exactly the
expected function 7! [x [ (z) 5], where is the environment.
3
3.1
        </p>
        <p>Universal Constructions in a Multi-Language Context</p>
      </sec>
      <sec id="sec-5-4">
        <title>Multi-Language Free Algebra</title>
        <p>To formally define the terms of our multi-languages we shall make use of the
concept of free algebras. First we review the abstract concept, and then we show
that “terms built using variables” are a concrete instance of a free algebra. The
universal property of a free algebra provides a convenient tool for defining and
working with term substitutions.</p>
        <p>
          A free algebra is the loosest algebra generated from an S-sorted X (whose
elements are understood as variables). As usual [
          <xref ref-type="bibr" rid="ref25 ref27">27, 25</xref>
          ], the free algebra yields
terms with variables (as opposed to ground terms in the term algebra). First
recall the notation h in Definition 6 and Lemma 1; after the next definition we
always write h for any h.
        </p>
        <p>Definition 9 (Free SG -Algebra F(X) over X). Let X be an S-sorted set of
variables. A free SG -algebra F(X) over X is an SG -algebra F(X) together with
an S-sorted function X : X ! F (X) such that the following universal property
is satisfied:
– For each SG -algebra A, if a : X ! A is an S-sorted function, then there
exists a unique multi-language SG -homomorphism a : F(X) ! A making
the following diagram commute:</p>
        <p>X</p>
        <p>X
a</p>
        <p>F (X)</p>
        <p>a
A</p>
        <p>F(X)</p>
        <p>a
A
(1)</p>
        <p>The previous definition does not guarantee the existence of such a free SG
algebra over X. However, if it does exist it is unique up to a unique isomorphism.
We now provide a two-step syntactic construction, establishing existence. See,
for instance, [9, Definition 1.3.2], [13, p. 72], and [12, p. 14] for a free algebra
construction in the one-sorted, many-sorted, and order-sorted worlds. We now
define a specific instance of F(X), denoted by T(X), and constructed out of
syntax.</p>
        <p>Definition 10 (Syntactic Free SG -Algebra T(X) over X).
1. Let SG be a multi-language signature and X an S-sorted family of variables
( Xsi j si 2 S ), each component also disjoint from the symbols in SG . By
setting Xi , ( (Xi)s , Xsi j s 2 Si ) we obtain an Si-sorted set of variables for
i = 1; 2. The multi-language signature SG (X) , (Sg 1(X1); Sg 2(X2); n)
over X has the same interoperability relation n as SG , along with order
sorted signatures Sg i(Xi) , (Si; i; i(Xi)). These are defined with the same
poset (Si; i) of sorts of Sg i, along with (Si Si)-sorted sets i(Xi) of
operator symbols specified by
– if operator : w ! s is in i, then : w ! s is also in i(Xi); and
– if x 2 (Xi)s, then x : s is in i(Xi).</p>
        <p>Informally, i(Xi) consists of all i operators and, for all s 2 Si, all variables
of sort si.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>2. The free SG -algebra T(X) over X is defined by making direct use of the term</title>
      <p>SG (X)-algebra TSG(X) (use an instance of Definition 8). The order-sorted
Sg i-algebras T(X)i, for i , 1; 2, are defined by
– JsKT(X)i , JsK(TSG(X))i for each s 2 Si;
– JkKT(X)i , JkK(TSG(X))i for each k : s in
– Jf KT(X)i , Jf K(TSG(X))i for each f : w ! s in</p>
      <p>And Jsi n s0jKT(X) : JsKT(X)i ! Js0KT(X)j is defined by</p>
      <p>Jsi n s0jKTSG(X) : JsK(TSG(X))i ! Js0K(TSG(X))j
Given X and SG, a multi-language term t is any element of the set T (X)si ,
JsKT(X)i , JsiKTSG(X) for some si; TSG(X) is of course the “standard” term
order-sorted algebra over order-sorted SG(X), and we will say that t has sort
si.</p>
      <p>Example 3. Terms in the multi-language free algebra can be thought as ordinary
multi-language terms with “holes”, where a hole is given by an algebraic variable.
For instance, x = ( y:int . z * y) v is not ground since any Imp-expression
can be plugged into v. Terms with free algebraic variables are the basis for
axiomatizing signatures by equations, leading to fully-fledged algebraic theories.</p>
    </sec>
    <sec id="sec-7">
      <title>Theorem 1. Let SG be a regular multi-language signature. Then, the SG-algebra</title>
      <p>T(X) is free over X in MLAlgSG .
3.2</p>
      <sec id="sec-7-1">
        <title>Multi-Language Quotient Algebra</title>
        <p>
          The aim of this section is to introduce and extend well-known constructions of
universal algebra to multi-languages. Apart from this being interesting in its own
right, quotient algebras are central to our completeness proof. Indeed, we follow
the Birkhoff’s approach [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] and we establish the mathematical machinery needed
to prove the completeness theorem in the classical way. We define the notions
of congruence and quotient algebra. A multi-language signature SG is locally
filtered (resp., coherent) if its associated signature SG is locally filtered (resp.,
coherent). We shall sometimes need these properties for results to hold: and we
will require coherence for a well-defined notion of equation later in the paper.
The reader may want to consult [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ] for details.
        </p>
        <p>A congruence (relation) is an equivalence relation on the carrier sets of a
given algebra which is compatible with its structure.</p>
      </sec>
    </sec>
    <sec id="sec-8">
      <title>Definition 11 (Congruence). Let A be a multi-language SG-algebra. A multi</title>
      <p>
        language SG-congruence , ( si JsiKA JsiKA j si 2 S ) is an S-sorted
family of equivalence relations such that
(1co) jSi , ( s , si j s 2 Si ) is an Sgi-congruence [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] on Ai for i , 1; 2;
and
(2co) sins0j and a si a0 implies Jsins0jKA(a) s0j Jsins0jKA(a0) for each a;a0 2 JsiKA.
      </p>
      <p>The next definition lifts the notion of quotient algebra to multi-languages.
Intuitively, a quotient algebra is the outcome of the partitioning of an algebra
through a congruence relation.</p>
    </sec>
    <sec id="sec-9">
      <title>Definition 12 (Quotient Algebra). Let A be a multi-language algebra over a locally filtered multi-language signature SG. Given an SG-congruence , the quotient of A induced by is the SG-algebra A= defined as follows:</title>
      <p>
        (1q) (A= )i is the order-sorted quotient Sg i-algebra [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] Ai=( jSi ); and
(2q) s n s0 implies Jsi n s0j KA= ([a]) = [Jsi n s0j KA(a)].
      </p>
      <p>For each quotient algebra A= of the multi-language algebra A, the
homomorphic quotient map q : A ! A= is defined by q(a) = [a]. Moreover, the
kernel of q is exactly . Following Definition 6 and Lemma 1 we shall also write
q for the order-sorted homomorphism q : A ! A= .
4</p>
      <sec id="sec-9-1">
        <title>Equational Logic</title>
        <p>We now give an equational logic for multi-language terms. We define equations
between multi-language terms and show that our system is sound and complete
for SG -algebras; we also show the existence of an initial algebra. Through
conversion operators ,!, multi-language equations can usefully axiomatize boundary
functions.</p>
        <p>Definition 13 (Multi-Language Equations). Let SG , (Sg 1; Sg 2; n) be a
coherent multi-language signature, X be an S-sorted set of variables, and T(X)
the free SG -algebra over X.
1. An SG -equation over X is a judgement of the form t =X t0, such that
t 2 T (X)si and t0 2 T (X)s0i for some s; s0 2 Si, where s and s0 are connected
via i (equivalently, least sorts st and st0 are connected in Si). Note that
t =X t is an SG -equation. The connectedness of st and st0 , and coherence
which ensures both terms have a super-sort, is necessary to ensure that
forthcoming definitions of equation satisfaction are well-defined.
2. A conditional SG-equation over X is a judgement of the form E ) t =X t0,
such that t =X t0 is an SG -equation and E is a set of SG -equations over X.</p>
        <p>An unconditional equation t =X t0 is ? ) t =X t0.</p>
      </sec>
    </sec>
    <sec id="sec-10">
      <title>We write AX for any set of conditional and/or unconditional equations.</title>
      <p>Example 4. In order to axiomatize the behaviour of boundary functions that
allow the use of Imp-expressions in place of -terms and vice versa, we provide
equations which define the conversion of values. Intuitively, we want to move the
meaning of terms between the languages only when no more computational steps
are possible. Let e be the sort of -terms and exp the sort of Imp-expressions:
,!e;exp (i) = i = ,!exp;e (i)
,!e;exp (x) = x = ,!exp;e (x)
8i 2 f: : : ; -1; 0; 1; : : :g
8x 2 Var
,!exp;e (true) = 1
,!exp;e (false) = 0
The first equation allows the flow of integers between the imperative language and
the simply-typed lambda-calculus. This is possible because both languages have
the notion of integer values, but in more realistic cases, such a conversion should
take into consideration different machine-integer implementations, overflow, etc. A
variation on theme can be obtained by assuming a lambda-calculus that does not
provide a primitive notion of integer numbers. In that case, the boundary functions
can move Imp-integers to a suitable numeral encoding in the lambda-calculus,
e.g., the Church encoding. The second equation establishes a correspondence
between variable names of the two languages. Such a correspondence enables
an implicit flow of values between Imp- and -environments. For instance, in
Example 2, the free -variable z “becomes” an Imp-variable when we compute
the semantics of the lambda term. Finally, the last two equations define the
conversion of booleans to integers.</p>
      <p>The next step is to show how new equations can be inductively generated
(derived) from a set of axioms. The rules require the concept of substitution,
namely a syntactic transformation that replaces variables with terms. Let X
and Y be two sets of variables. A variable substitution is an S-sorted function
: X ! T (Y ): for each variable x 2 Xsi we supply a term si (x), of sort si,
involving variables from Y . Then by the freeness of T (X) (that is, freeness of
T(X)), there is a unique substitution homomorphism : T (X) ! T (Y ) induced
by such that X = : the idea is that for any t 2 T (X)si , recurses over
t and then finally substitutes si (x) for each x occuring in t.</p>
      <p>We shall adopt some further notation, used in the rules. If a : X ! A
where X is a set of variables, then any x 2 Xsi has the unique sort si and we
write a(x) , asi (x). Further, for any S-sorted homomorphism h : T (X) ! A,
if t 2 T (X)si then of course hsi (t) 2 Asi . But, since there is a least sort
st, also t 2 T (X)(st)i T (X)si , and since h is a homomorphism we have
h(st)i (t) = hsi (t) 2 A(st)i Asi . From now on we write h(t) , h(st)i (t) (that is,
h(t) = hsi (t) 2 Asi ) to reduce subscript notation.</p>
      <sec id="sec-10-1">
        <title>Definition 14 (Equations Derived from Axioms). Given a set AX of ax</title>
        <p>
          ioms, the inductive rules of equational logic allow the derivation of new
unconditional equations. Our rules in Figure 1 are a modification of those in [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ], and
they make use of the following notation: t, t0, and t00 are multi-language terms in
T (X), and ; 0 : X ! T (Y ) are two variable substitutions from X to T (Y ) over
a set Y of variables. Thus one also has ; 0 : T (X) ! T (Y ) by freeness.
        </p>
        <p>If t =X t0 is generated from AX then we write AX ` t =X t0. The rule
(cong) intuitively says that replacing equals for equals yields new equalities,
that is, term formation is a congruence. Thus we may build new equations using
the “usual/informal” rules of equational reasoning. One easily proves admissible
rule (sub), namely that if t =X t0 then (t) =Y (t0); but note that the proof
requires the following fact. The composition of two substitution homomorphisms
1 : T (X) ! T (Y ) and 2 : T (Y ) ! T (Z) is still a substitution homomorphism,
since it is induced by 2 1. To see that 2 1 = ( 2 1) note that
8x 2 Ssi2S Xsi : (x) =Y 0(x)
(t) =Y 0 (t)
(cong)
8u =X u0 2 E : (u) =Y</p>
        <p>(u0)
(t) =Y
(t0)
[E ) t =X t0 2 AX ]
(axsub)</p>
        <p>Fig. 1. Inference Rules for Inductively Defining Equational Logic.</p>
      </sec>
      <sec id="sec-10-2">
        <title>Soundness, Completeness, and Freeness Results</title>
      </sec>
    </sec>
    <sec id="sec-11">
      <title>Definition 15 (Satisfaction). Let A be a multi-language algebra over a regular</title>
      <p>multi-language signature SG . We refer to SG -equations as equations. A satisfies
E ) t =X t0, denoted A E ) t =X t0, if for each assignment function
a : X ! A such that a : T (X) ! A equalizes each equation in E , a also equalizes
t and t0, i.e., a (t) = a (t0). Also, A t =X t0 just in case each a : X ! A
equalizes t and t0. Let AX be a set of conditional and/or unconditional equations.</p>
    </sec>
    <sec id="sec-12">
      <title>If an SG -algebra A satisfies each equation in AX we write A AX . Think of</title>
    </sec>
    <sec id="sec-13">
      <title>AX as a set of axioms satisfied (modelled) by the SG -algebra A.</title>
      <p>One may generalize the above fact about substitution homomorphisms to
arbitrary assignment functions and SG -homomorphisms. We do so in the next
lemma, which is used in the proof of soundeness and completeness.</p>
    </sec>
    <sec id="sec-14">
      <title>Lemma 2. Let A and B be two SG -algebras over a regular multi-language</title>
      <p>signature SG , (Sg 1; Sg 2; n). If a : X ! A is an assignment function and
h : A ! B is an SG -homomorphism, then (h a) = h a : F(X) ! B (or
equivalently (h a) = h a : F (X) ! B).</p>
      <sec id="sec-14-1">
        <title>Theorem 2 (Soundness and Completeness). Let SG be a coherent signature</title>
        <p>and AX a set of axioms and t =X t0 any equation. Then AX ` t =X t0, just in
case, for every SG -algebra A we have A AX implies A t =X t0.</p>
        <p>
          Soundness is straightforward to prove. In order to prove completeness, we
build a quotient algebra (see [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]) TAX (X) on T(X) such that given terms
t and t0 in the same equivalence class, the equation t =X t0 can be derived
from AX . The S-sorted binary relation AX (X) is defined on the carrier sets
of T(X) as t AX (X);s t0 if AX ` t =X t0 where t; t0 2 T (X)s. Trivially AX (X)
is an equivalence relation and a congruence on T(X). Hence we can build
the quotient algebra TAX (X) , T(X)= AX (X). The elements of TAX (X) are
exactly equivalence classes of terms, provably equal from AX . Indeed, it is easy to
prove that [t] = [t0] if and only if AX ` t =X t0. Moreover we have the following
proposition
        </p>
        <p>Proposition 2. TAX (X) t =X t0 implies AX ` t =X t0.</p>
        <p>The proof of completeness is then immediate if we can show that TAX (X) AX ,
for then TAX (X) t =X t0 follows by the assumption in the Theorem.</p>
        <p>The class of the multi-language SG-algebras satisfying a set AX of axioms
is denoted by MLMod AX , namely the class of models satisfying AX . If we take
all the SG-homomorphisms between them, we have that MLMod AX is a full
subcategory of MLAlgSG . In fact TAX (X) is free in MLMod AX , where the freeness
is defined along the lines of Definition 9.</p>
      </sec>
    </sec>
    <sec id="sec-15">
      <title>Theorem 3. Let SG be a coherent signature and AX a set of axioms. Then,</title>
      <p>the quotient algebra TAX (X) is the free algebra over X in MLMod AX .</p>
      <p>Since initiality is a special case of the freeness property and T(?) = T, then
TAX = TAX (?) is an initial object in MLAlgAX .
5</p>
      <sec id="sec-15-1">
        <title>Concluding Remarks</title>
        <p>
          Others have investigated issues that arise when combining languages: [
          <xref ref-type="bibr" rid="ref15 ref22 ref26 ref31 ref4">26, 4, 15,
31, 22</xref>
          ] explore the combination of typed and untyped languages (Lua and ML [
          <xref ref-type="bibr" rid="ref26">26</xref>
          ],
Java and PLT Scheme [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ], or Assembly and a typed functional language [
          <xref ref-type="bibr" rid="ref22">22</xref>
          ]),
focusing on typing issues and values exchanging techniques. Several works have
focused on multi-language implementations: [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] provides a type system for a
fragment of Microsoft Intermediate Language (IL) used by the .NET framework,
that allows programmers to write components in several languages (C#, Visual
Basic, VBScript, . . . ) which are then translated to IL. [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ] proposes a virtual
machine that can execute the composition of dynamically typed programming
languages (Ruby and JavaScript) and a statically typed one (C). [
          <xref ref-type="bibr" rid="ref2 ref3">3, 2</xref>
          ] describes
a multi-language runtime mechanism achieved by combining single-language
interpreters of (different versions of) Python and Prolog. Finally, [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] investigates
the mathematical link between signatures and grammars.
        </p>
        <p>
          There is considerable work to explore in future. One might study language
combinations where the sort (type) and term structure is much richer. Here we
have looked only at equational logic, so the whole area of operational semantics
for multi-languages should be explored. And of course as well as the syntactic
languages we need also to explore suitable semantics (given as algebras in this
paper). Since equational theories give rise to free algebra monads [
          <xref ref-type="bibr" rid="ref24">24</xref>
          ], further
studies should investigate the possibility of extending/generalizing the results in
this paper to a more abstract approach based on the notion of monad [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ]. Finally,
in recent work we have produced a sound and complete categorical semantics for
multi-languages [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ].
        </p>
        <p>As a final remark, we have further results about the categories of set-theoretic
models mentioned within our paper, which are not presented here due to space
limitations. However they would hopefully appear in a journal version.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Ahmed</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Blume</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>An equivalence-preserving cps translation via multi-language semantics</article-title>
          .
          <source>SIGPLAN Not</source>
          .
          <volume>46</volume>
          (
          <issue>9</issue>
          ),
          <fpage>431</fpage>
          -
          <lpage>444</lpage>
          (
          <year>Sep 2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Barrett</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bolz</surname>
            ,
            <given-names>C.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tratt</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Unipycation: A case study in cross-language tracing</article-title>
          .
          <source>In: Proceedings of the 7th ACM workshop on Virtual machines and intermediate languages</source>
          . pp.
          <fpage>31</fpage>
          -
          <lpage>40</lpage>
          . ACM, New York, NY, USA (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Barrett</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bolz</surname>
            ,
            <given-names>C.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tratt</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Approaches to interpreter composition</article-title>
          .
          <source>Computer Languages, Systems &amp; Structures</source>
          <volume>44</volume>
          ,
          <fpage>199</fpage>
          -
          <lpage>217</lpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Benton</surname>
          </string-name>
          , N.:
          <article-title>Embedded interpreters</article-title>
          .
          <source>Journal of functional programming 15(4)</source>
          ,
          <fpage>503</fpage>
          -
          <lpage>542</lpage>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Birkhoff</surname>
          </string-name>
          , G.:
          <article-title>On the structure of abstract algebras</article-title>
          .
          <source>In: Mathematical Proceedings of the Cambridge Philosophical Society</source>
          . vol.
          <volume>31</volume>
          , pp.
          <fpage>433</fpage>
          -
          <lpage>454</lpage>
          . Cambridge University Press, Cambrdige, UK (Oct
          <year>1935</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Buro</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mastroeni</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>On the multi-language construction</article-title>
          . In: Caires,
          <string-name>
            <surname>L</surname>
          </string-name>
          . (ed.)
          <source>Programming Languages and Systems</source>
          . pp.
          <fpage>293</fpage>
          -
          <lpage>321</lpage>
          . Springer, Berlin/Heidelberg, DE (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Buro</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mastroeni</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>On the semantic equivalence of language syntax formalisms</article-title>
          .
          <source>In: Proceedings of the 20th Italian Conference on Theoretical Computer Science</source>
          . pp.
          <fpage>34</fpage>
          -
          <lpage>51</lpage>
          . CEUR-WS.org (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Buro</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mastroeni</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Crole</surname>
            ,
            <given-names>R.L.</given-names>
          </string-name>
          :
          <article-title>Equational logic and categorical semantics for multi-languages. In: In-press (accepted for publication at 36th</article-title>
          <source>International Conference on Mathematical Foundations of Programming Semantics - MFPS</source>
          <year>2020</year>
          )
          <article-title>(</article-title>
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Denecke</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wismath</surname>
            ,
            <given-names>S.L.</given-names>
          </string-name>
          :
          <article-title>Universal Algebra and Coalgebra</article-title>
          . World Scientific Publishing,
          <string-name>
            <surname>Singapore</surname>
          </string-name>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Furr</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Foster</surname>
            ,
            <given-names>J.S.:</given-names>
          </string-name>
          <article-title>Checking type safety of foreign function calls</article-title>
          .
          <source>SIGPLAN Not</source>
          .
          <volume>40</volume>
          (
          <issue>6</issue>
          ),
          <fpage>62</fpage>
          -
          <lpage>72</lpage>
          (
          <year>Jun 2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Goguen</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Meseguer</surname>
          </string-name>
          , J.:
          <article-title>Completeness of many-sorted equational logic</article-title>
          .
          <source>Houston Journal of Mathematics</source>
          <volume>11</volume>
          (
          <issue>3</issue>
          ),
          <fpage>307</fpage>
          -
          <lpage>334</lpage>
          (
          <year>1985</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Goguen</surname>
            ,
            <given-names>J.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Meseguer</surname>
          </string-name>
          , J.:
          <article-title>Order-sorted algebra i: equational deduction for multiple inheritance, overloading, exceptions and partial operations</article-title>
          .
          <source>Theoretical Computer Science</source>
          <volume>105</volume>
          (
          <issue>2</issue>
          ),
          <fpage>217</fpage>
          -
          <lpage>273</lpage>
          (
          <year>1992</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Goguen</surname>
            ,
            <given-names>J.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thatcher</surname>
            ,
            <given-names>J.W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wagner</surname>
            ,
            <given-names>E.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wright</surname>
            ,
            <given-names>J.B.</given-names>
          </string-name>
          :
          <article-title>Initial algebra semantics and continuous algebras</article-title>
          .
          <source>Journal of the ACM</source>
          <volume>24</volume>
          (
          <issue>1</issue>
          ),
          <fpage>68</fpage>
          -
          <lpage>95</lpage>
          (
          <year>1977</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Gordon</surname>
            ,
            <given-names>A.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Syme</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Typing a multi-language intermediate code</article-title>
          .
          <source>In: Conference Record of POPL 2001: The 28th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, London, UK, January 17-19</source>
          ,
          <year>2001</year>
          . pp.
          <fpage>248</fpage>
          -
          <lpage>260</lpage>
          . ACM, New York, NY, USA (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Gray</surname>
            ,
            <given-names>K.E.</given-names>
          </string-name>
          :
          <article-title>Safe cross-language inheritance</article-title>
          . In: Vitek,
          <string-name>
            <surname>J</surname>
          </string-name>
          . (ed.)
          <article-title>ECOOP 2008 - Object-Oriented Programming</article-title>
          . pp.
          <fpage>52</fpage>
          -
          <lpage>75</lpage>
          . Springer Berlin Heidelberg, Berlin, Heidelberg (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Grimmer</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schatz</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Seaton</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Würthinger</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Luján</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Cross-language interoperability in a multi-language runtime</article-title>
          .
          <source>ACM Trans. Program. Lang. Syst</source>
          .
          <volume>40</volume>
          (
          <issue>2</issue>
          ), 8:
          <fpage>1</fpage>
          -
          <lpage>8</lpage>
          :
          <fpage>43</fpage>
          (May
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Higgins</surname>
          </string-name>
          , P.J.:
          <article-title>Algebras with a scheme of operators</article-title>
          .
          <source>Mathematische Nachrichten</source>
          <volume>27</volume>
          (
          <issue>1-2</issue>
          ),
          <fpage>115</fpage>
          -
          <lpage>132</lpage>
          (
          <year>1963</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Kirchner</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kirchner</surname>
          </string-name>
          , H.:
          <article-title>Equational logic and rewriting</article-title>
          .
          <source>In: Computational Logic</source>
          . pp.
          <fpage>255</fpage>
          -
          <lpage>282</lpage>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Matthews</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Findler</surname>
          </string-name>
          , R.B.:
          <article-title>Operational semantics for multi-language programs</article-title>
          .
          <source>ACM Transactions on Programming Languages and Systems</source>
          <volume>31</volume>
          (
          <issue>3</issue>
          ),
          <volume>12</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>12</lpage>
          :
          <fpage>44</fpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Moggi</surname>
          </string-name>
          , E.:
          <article-title>Notions of computation and monads</article-title>
          .
          <source>Information and computation</source>
          <volume>93</volume>
          (
          <issue>1</issue>
          ),
          <fpage>55</fpage>
          -
          <lpage>92</lpage>
          (
          <year>1991</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Osera</surname>
            ,
            <given-names>P.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sjöberg</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zdancewic</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Dependent interoperability</article-title>
          . In: Claessen,
          <string-name>
            <given-names>K.</given-names>
            ,
            <surname>Swamy</surname>
          </string-name>
          , N. (eds.)
          <source>Proceedings of the Sixth Workshop on Programming Languages Meets Program Verification</source>
          . pp.
          <fpage>3</fpage>
          -
          <lpage>14</lpage>
          . ACM, New York, NY, USA (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Patterson</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perconti</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dimoulas</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ahmed</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Funtal: Reasonably mixing a functional language with assembly</article-title>
          .
          <source>In: Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation</source>
          . pp.
          <fpage>495</fpage>
          -
          <lpage>509</lpage>
          . ACM, New York, NY, USA (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>Perconti</surname>
            ,
            <given-names>J.T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ahmed</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Verifying an open compiler using multi-language semantics</article-title>
          .
          <source>In: Proceedings of the 23rd European Symposium on Programming Languages and Systems</source>
          . pp.
          <fpage>128</fpage>
          -
          <lpage>148</lpage>
          . Springer, Berlin, DE (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <surname>Plotkin</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          :
          <article-title>Some varieties of equational logic</article-title>
          .
          <source>In: Algebra, Meaning, and Computation</source>
          , pp.
          <fpage>150</fpage>
          -
          <lpage>156</lpage>
          . Springer (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25.
          <string-name>
            <surname>Powell</surname>
          </string-name>
          , W.B.:
          <article-title>Ordered Algebraic Structures</article-title>
          . CRC Press, Boca Raton, FL, USA (
          <year>1985</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26.
          <string-name>
            <surname>Ramsey</surname>
          </string-name>
          , N.:
          <article-title>Embedding an interpreted language using higher-order functions and types</article-title>
          .
          <source>In: Proceedings of the 2003 Workshop on Interpreters, Virtual Machines and Emulators</source>
          . pp.
          <fpage>6</fpage>
          -
          <lpage>14</lpage>
          . IVME '03,
          <string-name>
            <surname>ACM</surname>
          </string-name>
          , New York, NY, USA (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27.
          <string-name>
            <surname>Reiterman</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Trnkovà</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Free structures</article-title>
          . In: Herrlich,
          <string-name>
            <given-names>H.</given-names>
            ,
            <surname>Porst</surname>
          </string-name>
          , H.E. (eds.)
          <source>Category Theory at Work</source>
          . pp.
          <fpage>277</fpage>
          -
          <lpage>288</lpage>
          . Heldermann Verlag, Berlin, DE (
          <year>1991</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          28.
          <string-name>
            <surname>Tan</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Morrisett</surname>
          </string-name>
          , G.:
          <article-title>Ilea: Inter-language analysis across Java and C</article-title>
          .
          <source>SIGPLAN Not</source>
          .
          <volume>42</volume>
          (
          <issue>10</issue>
          ),
          <fpage>39</fpage>
          -
          <lpage>56</lpage>
          (
          <year>Oct 2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          29.
          <string-name>
            <surname>Tarski</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Equational logic and equational theories of algebras</article-title>
          .
          <source>In: Studies in Logic and the Foundations of Mathematics</source>
          , vol.
          <volume>50</volume>
          , pp.
          <fpage>275</fpage>
          -
          <lpage>288</lpage>
          . Elsevier, Amsterdam, NL (
          <year>1968</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          30.
          <string-name>
            <surname>Taylor</surname>
          </string-name>
          , W.:
          <article-title>Equational logic</article-title>
          .
          <source>Houston Journal of Mathematics</source>
          <volume>47</volume>
          (
          <issue>2</issue>
          ) (
          <year>1979</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          31.
          <string-name>
            <surname>Wrigstad</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zappa Narderlli</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lebresne</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Östlund</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vitek</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          :
          <article-title>Integrating typed and untyped code in a scripting language</article-title>
          .
          <source>In: Proceedings of the 37th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL</source>
          <year>2010</year>
          , Madrid, Spain, January
          <volume>17</volume>
          -
          <issue>23</issue>
          ,
          <year>2010</year>
          . pp.
          <fpage>377</fpage>
          -
          <lpage>388</lpage>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>