 Hi, everyone. My name is Simone Boudre, and I'm an Italian PhD student at the University of Aurora. The subject of this presentation are multi-languages that, roughly speaking, are languages arising from the combination of other already existing languages. The overall aim of this talk is to provide the basic ideas behind the formalization, and in particular to define a categorical equation, a logic that allows us to reason about multi-language terms, or multi-language programs when the combined languages are actually programming languages. The resulting paper has been a joint work with Reichroll from the University of Leicester and Isabella Mastroen from the University of Aurora. Okay, so before going into the details, I would like to provide a very brief overview about the interoperability program. In general, there are several programming languages and frameworks that programmers may choose to use for developing their own software. And the tenacity of them comes with plenty of libraries and already existing tools. The natural consequence of this scenario has been the development through the years of different interoperability mechanisms that allows languages to interact, mainly for code reuse and to use the right programming languages to solve a particular task. One of the most common way to let languages interpret is to embed the interpreter of the so-called LTS language into an host language. For instance, the following code shows the interaction between Java and JavaScript via National, which is a JavaScript interpreter written in Java that can be found in the standard library. So, in this code, the National interpreter is simply a Java object, and programmers can call the val method for running JavaScript code. Another widely used pattern for language interpretation is the foreign function interface mechanism. Conceptually, it is just a function interface, but for external functions written in another language. The code on this slide shows an Delaware procedure that is native in Java program, but its implementation is given by using the C language. Of course, the compiler must then implement their interpretation by means of some very passing mechanism, but the overall idea is to decouple in the declaration from the implementation, which is carried out in a different programming language. Finally, interpretability can be provided by adopt mechanisms, such as the complication between an intermediate language or even by inter-process communication systems. In the formal case, different programming languages are compiled to the same intermediate language, and in the later case, processes can exchange languages at runtime. Okay, so the previous examples concern language interpretability from a software engineering perspective. However, if we want to define and study the problem from a theoretical point of view, we need to isolate its key aspects. So, if we look back at the previous examples, we can observe a common pattern in each of them. Firstly, the code of one language is embedded in some way into another language. For instance, we have seen JavaScript code embedded in Java and Java functions implemented by some code written in C. And this defines the syntax of the resulting combined language. And secondly, every interpretability mechanism let the values of one language to flow into the other. And this conversion defines the semantics of their interpretation. In literature, there are quite few papers that focus on cross-language interpretability from a theoretical point of view. To the best of our knowledge, the first paper that addresses the problem of reasoning in a multi-language context has been the work of Matthews and Fiedler in 2009. In that paper, the authors provide the operational semantics of a multi-language obtained by mixing ML with Scheme, and they discuss the theoretical issues. Then, Guru and Mastroveni generalise the construction to a broader class of languages, namely those modelled by other sorted algebras. So instead of defining the interpretability of two fixed languages like ML and Scheme, they give a multi-language formalisation that does not depend on any two particular languages. In this paper, we extend their approach by providing a sound and complete categorical equation and logic for multi-language, which allows us to reason on multi-language programmes. Okay, so as a first step, I'm going to present the categorical equation and logic of other sorted theories that will constitute the formal model of the underlying languages. So in this context, the syntax is given by other sorted signatures, which are simply algebraic signatures with an explicit notion of some sort that allows the definition of polymorphic operators. For instance, in the example below on the left side, the diagram defines the source of a simple imperative language where the vertical lines defines the subset relations between them. And on the right side, a report is some example of operators, and in particular we can see that the plus operator is used both as the sub operator when it is applied between expressions and as the non-deterministic choice when it is applied between comments of the language. Then terms and equations are defined in the usual way, but with some additional rules for entering the subset constraints specified by the signature. These extra rules are provided on the slide, and the rule on the left states that if t is a term of sort s in the context gamma, which is simply a finite list of variable type pairs, then t has also type r whenever r is a super sort of the sort s. And the rule on the right states the same concept for equations in place of terms. Moreover, we also allow axioms to be conditional equations, which are just ordinary equations which are implied by a finite list of other unconditional equations. So for instance the conditional equations below axiomatize the operational behavior of any statement. Algebras then provide meaning of signatures in any category C with finite products and an inclusion structure. The formal details of the inclusion structure are given in the paper, but it can be understood as a collection of monomorphisms between the objects of C. So the algebras are almost standard, and the monomorphisms specified by the inclusion structure are used for providing meaning of subsurface strength. For instance, in the example below we can see that integers are simply interpreted as integers by the algebra, and since int is a subset of exp, every integer is mapped to a constant function that takes an environmental role to the value of the integer i. Of course, the words avantics of the imperative language can be given in the category of the CPU. Okay, so main results related to the categorical equation logic of all the sorted theories are the existence of uniquely sort for each term generated by the signature and disenable a standard definition of the categorical semantics of terms. Then for each theory TH, which is given by a signature and a set of axiom, there is a classifying category built out of the signature of the theory TH with a generic model. Moreover, the deduction system of the equation and logic is both sound and complete. These results were firstly stated in a paper of Martialier and Messagier, and we extend these results with conditional equations, and we also simplify the construction of the classifier by using matching context and permutation variables. Okay, so now multi-languages are defined by combining all the sort of specifications together. The first concept that I'll introduce is the multi-language signature, which defines the syntax of the multi-language, and it is obtained by taking sure the sort of signatures as to one and as to two, and by combining them through an interoperability relation. Intuitively, an interoperability relation is one of the two languages that can be used in place of terms in the other language. Examples of interoperability relations could be the use of ML expressions in place of skin expressions and vice versa, and such a multi-language has been defined by Mattis and Finder, and in the following slide, I will show an example of using a simplified lambda calculus expressions in place of expressions in an imperative language. Okay, so let me show you an example of a multi-language term obtained by replacing an expression by a lambda expression. So, this multi-language term is an impassignment, but on the right side, we don't find an expression but a lambda term. In turn, such a lambda application is not a pure lambda term, but has been obtained by substituting the right side with any number. So this example shows that even with very few specifications, we can obtain quite complex multi-language terms. However, the interoperability relation only specifies which syntax categories can be combined, but we still miss a formal definition of multi-language terms. In order to get multi-language terms, we define a function from the category of multi-language signatures to the category of other sort of signatures. So this function takes a multi-language signature to the so-called associated signature. The associated signature is just an other sort of signature which is obtained by taking the underline signature of ST. So we take the co-product of ST1 and ST2 where the co-product basically means the disjoint union of the source and the disjoint union of the operators of these two signatures. Then for each interoperability constraint SI smaller than SJ we add a conversion operator whose role is to move terms of sort SI to terms of sort SJ in the other language. Once that we define such an associated signature, we define multi-language terms to be the terms built from the associated signature of ST. Okay, so now that we specified what a multi-language signature is, we need to specify the concept of multi-language algebra. So a multi-language algebra specifies the meaning of the multi-language and it is obtained by providing a pair of further sort of algebra for the underline signatures of the multi-language. Moreover, it is also specified by providing boundary morphism for each subset constraint specified by the multi-language signature. So intuitively the pair of further sorted algebras provide the meaning of the underline languages and the boundary morphisms specify how values flow from one language to the other. So in a sense they provide the semantics of the interoperability of the underline languages. For instance, if you want to specify how lambda terms can be interpreted in the same way, we need to provide a function from imp environments to values for each possible semantics e of lambda expression. So the idea is that starting from an imp environment we convert it to a lambda environment and we run e on the conversion and we finally transform the result in lambda value to a value of the imperative language. Now that we define multi-language signatures and algebras we can provide correspondence between the multi-language and the other sorted word. So in particular starting from a multi-language signature and building the corresponding associated signature in the other sorted word we can prove an equivalence between the boundaries of algebras built over the multi-language signature and those built over the associated signature. So this means that we can move between these two words without losing any semantic information of the multi-language. So the final standard of the sorted equations over the associated signature and therefore we can use them in order to axiomatize the interoperability of the underlying languages since in the associated signature we have the conversion operators. For instance in the example below we provided the conversion of natural numbers written in piano notation to natural numbers in a lambda calculus encoded by using the church notation. So as a consequence of the previous theorem we have a straightforward notion of satisfaction both for conditional and unconditional equations. The main result proven in the paper is that the deductive system for equational logic is both sound and complete in the context of multi-language theories. Moreover we have also proved that the same theorem holds the variance and refinements of the multi-language construction. However these details are quite technical so they can be found in the paper. Future research in the multi-language context can be pursued on several directions. Firstly, revered logic is widely used for describing operational semantics of programming languages and so we can investigate the writing module, a set of equations since we already have an equational logic theory for multi-languages and this work would be beneficial because it could provide formal definition for the operational semantics of multi-languages. A second direction which we are currently working on is to extend the logic so that we can derive not only unconditional equations but also conditional equations. Actually in the developed work conditional equations can only appear as axioms and the last two directions are still unexplored extensions of the current theory for introducing the notion of parametric polymorphism in our theories and for generalising the results by using the notion of models. Thanks for your attention.