A Minimal OO Calculus for Modelling Biological Systems∗

A Minimal OO Calculus for Modelling Biological Systems∗

A Minimal OO Calculus for Modelling Biological Systems∗ Livio Bioglio Dipartimento di Informatica Universit`adi Torino Torino, Italy [email protected] In this paper we present a minimal object oriented core calculus for modelling the biological notion of type that arises from biological ontologies in formalisms based on term rewriting. This calculus implements encapsulation, method invocation, subtyping and a simple form of overridinginheritance, and it is applicable to models designed in the most popular term-rewriting formalisms. The classes implemented in a formalism can be used in several models, like programming libraries. 1 Introduction In biology, homogeneous biological entities are usually grouped according to their behaviour. Enzymes are proteins that catalyse (i.e. increase the rates of) chemical reactions, receptors are proteins embed- ded in a membrane to which one or more specific kinds of signalling molecules may attach producing a biological response, hydrolases are enzymes that catalyse the hydrolysis of a chemical bond, and so on. Such classification is greatly behaviour-driven: the lactase is a hydrolase, then its peculiarity with respect to the other biological entities is that it catalyses the hydrolysis of a particular molecule. It sug- gests Computer Science types: every biological entity can be classified with a type, containing the sound operations for it. These operations describe only the general behaviours, that may be modelled by means of different formalisms. Like Computer Science types, these Biological types are used to check the cor- rectness of the chemical reactions. In fact, lactase is not just a hydrolase, but a glycoside hydrolase, i.e. it catalyses the hydrolysis of the glycosidic linkage of a sugar to release smaller sugars. If in the system the substrate or the products are not sugars, somewhere there is an error. Moreover, in Biological types we can recognize a subtype relation. Lactase hydrolyse the lactose, that is a disaccharide. Since the disaccharide is identified as a subtype of sugar, the hydrolysis operation associated to the glycoside hydrolase type is correct. Many formalisms originally developed by computer scientists to model systems of interacting compo- nents have been applied to Biology: among these, there are Petri Nets [16], Hybrid Systems [2], and the π-calculus [7, 21]. Moreover, new formalisms have been defined for describing biomolecular and membrane interactions, for example [3, 5, 6, 9, 19, 20, 17]. Even if types are used by biologists and stud- ied by computer scientists, curiously they are usually not implemented in Computer Science biological models. Despite the number of formalisms developed by computer scientists and applied to model bio- logical systems, just in the last few years there has been a growing interest on the use of type disciplines to enforce biological properties. In [12] three type systems are defined for the Biochemical Abstract Machine, BIOCHAM (see [1]). In [10] a type system for the Calculus of Looping Sequences (see [3]) has been defined to guarantee the soundness of reduction rules with respect to the requirement of certain elements, and the repellency of other ones. Finally, in [4], group types are used to regulate compartment crossing in the BioAmbients framework [20]. However, none of them exploits the similarities between ∗This work was partly funded by the project BioBIT of the Regione Piemonte. Ion Petre and Erik De Vink (Eds.): Third International Workshop on Computational Models for Cell Processes (CompMod 2011) EPTCS 67, 2011, pp. 50–64, doi:10.4204/EPTCS.67.6 L. Bioglio 51 E ::= element composition v | x | E + E R ::= rule declaration E → E Figure 1: Biological Rules the types in Biology and in Computer Science. In this paper we present a minimal object oriented core calculus for term-rewriting formalisms, i.e. for- malisms based on term rewriting, that models the notion of types used in biology as above described. We implement only the object oriented paradigm skills that, in our view, are basic in modelling biological systems, that is encapsulation, method invocation, subtyping and a simple inheritance. The purpose of this calculus is to facilitate the organizations of rules, and to improve their re-use in the model, or even in other models. By means of subtyping, for example, modellers create a class hierarchy, that can be used in different models like programming libraries: classes and methods are created by expert researchers, but they can also be used by raw users. The remainder of this paper is organized as follows. In Section 2 we formally present the core calculus. In Section 3 we propose classes explaining some enzyme behaviours. In Section 4 we apply our frame- work to two term-rewriting formalisms, the Calculus of Looping Sequences [3] and the P systems [17]. Finally, in Section 5 we draw conclusions and we discuss some future developments. 2 Core Calculus Term-rewriting formalisms [3, 6, 9, 17] have been applied to modelling biological systems. They are characterized by the syntax of terms and the operational semantics. A term represents the structure of the modelled system, and the reduction rules represent the possible evolutions of the system. Some term- rewriting formalisms embed the rules in the terms, other prefer to divide them. In our core calculus, a class contains methods (encapsulation) and extends another class (subtyping); a class inherits all the methods of the class it extends (inheritance). Methods are formed by a sequence of variables (the arguments) and a sequence of reduction rules, expressed in the syntax of the term- rewriting formalism, containing these variables. The methods are called on values of the model, i.e. the biological entities, with a sequence of values as arguments (method invocation). The method invocations are replaced by the reduction rules which are method bodies, where the variables are replaced by the values used as arguments. These reduction rules are then used for the evolution of the model. For the sake of generality, in running examples we use the biological rule notation to represent reduction rules: the syntax is depicted in Figure 1. We use the notation E1 ⇋ E2 instead of the pair of reduction rules E1 → E2 and E2 → E1. For example, the hypothetical class of glycoside hydrolase contains a method to hydrolyse a sugar into two sugars, all of them passed as arguments. This method contains the sequence of reduction rules that models hydrolysis. We assign to lactase the glycoside hydrolase type, and then call on it the hydrolysis method, passing as arguments the lactose and the sugar products. By invocation, we obtain the reduction rules specific for lactase, that will be used for the evolution of the model. In this section we present the formal definition of the calculus. The syntax, definitions and rules of the calculus are inspired by the ones proposed by Igarashi, Pierce and Wadler for Featherweight Java [14], 52 A Minimal OO Calculus for Modelling Biological Systems a minimal core calculus for modelling the Java Type System. 2.1 Syntax Syntax CT ::= class table declaration CL CL ::= class declaration class C extends D{M} (C 6= Object) M ::= method declaration m(C x) R R ::= reduction rule declaration according to the formalism syntax contains variables, values and this I ::= method invocation v.m(v) x variable v value this this Figure 2: Syntax The syntax is given in Figure 2. The metavariables C and D range over class names; m ranges over method names; CL ranges over class declarations; M ranges over method declarations; R ranges over reduction rules, according to the syntax of the formalism; I ranges over method invocations; x ranges over parameter names; v ranges over values, i.e. the symbols of the model. We assume that the set of variables includes the special variable this. Notice that this is never used as argument of a method. We write M as shorthand for M1 ...Mn and write C for C1,...,Cn (similarly x, v, etc.). We abbreviate operations on pairs of sequences similarly, writing C x for C1 x1,...,Cn xn, where n is the length of C and x. Sequences of parameter names and method declarations are assumed to contain no duplicate names. The declaration class C extends D{M} introduces a class named C with superclass D. The new class has the suite of methods M. The methods declared in C are added to the ones declared by D and its superclasses, and may override methods with the same names that are already present in D, or add new functionalities. The class Object has no methods and does not have superclasses. The method declaration m(C x) R introduces a method named m with parameters x of types C. The body of the method is a sequence of reduction rules R, expressed in the syntax of the formalism. The variables x and the special variable this are bound in R. A class table CT is a mapping from class names C to class declarations CL. We assume a fixed class table CT satisfying some sanity conditions: (1) CT(C)= class C ... for every C ∈ dom(CT ); (2) Object ∈/ dom(CT ); (3) for every class name C (except Object) appearing in CT, we have C ∈ dom(CT ); (4) there are no cycles in the subtype relation induced by CT, i.e. a class cannot extends one of its subclasses. The fixed type environment Γ contains the association between values v and their types C, written v : C. We assume that Γ satisfies some sanity conditions: (1) if v : C ∈ Γ for some v, then C ∈ dom(CT); (2) every value in the set of values (according to the formalism specifications) is associated to exactly one type in Γ. L. Bioglio 53 For example, we define the class of molecules as follows: class Molecule extends Object{} The Molecule class has the Object class as superclass, and it does not have methods, i.e.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    15 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us