15 Pages·2007·0.2 MB·English

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Objects in Forum Giorgio Delzanno and Maurizio Martelli D.I.S.I. - Universita(cid:18) di Genova, Via Dodecaneso, 35, I-16146 Genova, Italy e-mail: fgiorgio,[email protected] Abstract A logical characterization of the typical features ofobject-oriented languages could yield a clear semantical counterpart of their operational meaning and, at the same time, it could allow to de(cid:12)ne a logic programming language in which it is possible to reason over highly-complex data structures. Many approaches to this problem have been proposed in the last years. Classical logic turned out to be unsuitable to model complex mechanisms, suchasthedynamicmodi(cid:12)cationsofthestateoftheobjects,inasatisfactory way. Girard's Linear Logic [5] provides the means to handle many opera- tionalaspectsofprogramminglanguagesfromaprooftheoreticalperspective as shown by Andreoli and Pareschi in [2]. In the paper Forum [11], a presentation of higher-order linear logic, is specialized todealwithstate-basedsystemsaccordingtotheproof ascompu- tationperspective. In thissettingitispossible torepresentaconcretenotion ofobjectassigning alogical meaning tofeatureslike class,encapsulationand data abstraction. This should be considered as the (cid:12)rst step to reconstruct a complete object-oriented language inside a linear logic-based framework. 1 Introduction Logic and object-oriented (OO) languages are vehicles to achieve di(cid:11)erent forms of high-level programming. Logic programming allows to write exe- cutable speci(cid:12)cations having both a declarative and a procedural reading, while OOprogrammingallowstoincrementally build upcomplex structures, hidingboththeirinternalrepresentationandtheimplementationoftheircor- responding operations. Hence, complex objects can be handled using very simple protocols, i.e., the public interfaces of the objects. The challenge is to (cid:12)nd a way of enjoying these two di(cid:11)erent forms of high-level reasoning inside the same language. Furthermore, a faithful rep- resentation of features typical of OO within a logic language can provide them with a clear semantics, induced by their logical reading. It is necessary to clarify which OO features will be considered in the pa- per. Themostimportantgoalistocaptureanotionofobjectclosetoexisting implementations, i.e., a structure encapsulating both data and operations. Another fundamental feature is data abstraction, i.e., the data of the ob- jects mustbe accessible only using the methodsand, asa consequence, parts oftheobjectstructuremustbehidden. Message passingmustbe thebasic mechanism underlying communication between objects. Finally, it is neces- sary to consider primitives tocreate objects,hence todeclare the class they belong to, and to destroy them. For the sake of this presentation messages will be considered as completely concurrent activities. According to Peter Wegner's classi(cid:12)cation of OO languages [14], class- based languages enjoy such set of features. In many logic models of OO features, methods are represented by logic clausesandused torewrite thestateofanobjectintoanewone, see [2,4,9]. From this perspective, in order to model encapsulation it is necessary to re- sort to a higher-order logic, where clauses can be handled at the object level. At the same time, standard logic approaches to the problem of state modi(cid:12)cations seem unsuitable here, while Linear Logic (LL) [5] provides a notionofresourceconsumptionwhichhasbeen fruitfullyapplied byAndreoli and Pareschi [2] in such context. For this reason the language Forum [11] which combines both higher-order and linear logic, seems a perfect starting point to study the problem. The form of Forum rules allows to de(cid:12)ne only uniform proofs [12], i.e., goal-driven proofs, anotion suitable forautomating the search for proofs while presenting aspects useful for programming appli- cations. A restricted version of Forum, called Forum and Objects (F&O), will be presented in Section 2. F&O is powerful enough to capture the above mentioned OO features. This is the (cid:12)rst step in order to reconstruct a complete OO language inside a logical framework, i.e., considering also inheritance, delegation, etc. The formulation of the F&O proof system em- phasizes the proof as computation perspective. It can be considered as an attemptto(cid:12)tageneral notion ofstate intoaLL sequent. Stateinformation are represented using a (cid:12)xed set of data constructors. Section 3 presents a simple application of F&O to the sequential assign- ment of values to variables. Section4isdedicatedtothediscussion oftherelationships betweenF&O and Forum, hence full LL. Section 5, the main part of the paper, contains the description of the abovementioned OOfeaturesin F&O. Themainidea istorepresentobjects as particular atoms that can be handled by methods using an approach similar to the one shown by Conery in [4] and re-considered by Andreoli and Pareschi in [2] inside the LL setting. However, there are many di(cid:11)erences between the latter and the work presented in this paper. Andreoli and Pareschi considered objects as collections of slots spread in the right-hand side of a sequent, i.e., in parallel. Objects were created, i.e., cloned, using additiveconjunction, &,whichspreadsthemondi(cid:11)erentbranchesofaproof. In the approach, presented in the following, objects (cid:13)ow in parallel in the right-hand side of sequents together with messages. This choice allows to keepasnapshotoftheglobalstateofthesystemineachsequent,andtoeasily create and destroy objects. F&O proofs, with only one main thread, can be usedtorepresenttheevolutionofthestate. Theconnective&shouldbeused either totest conditions overthe global stateor toexecute operations whose computation departs from the main thread without yielding new states,i.e., their proofs end with a > axiom. Such use of & will be studied in future works. In this setting communication amongobjects can be achieved simply adding messages to the global context. Section 6 is dedicated to the discussion of a (cid:21)-Prolog prototype for a particular OO language, and to the future extensions of the work. 2 The language F&O As mentioned in the introduction, our main goal here is to represent a class- based language using a LL sequent calculus. In order to achieve this target wewillexploitasubsetofForum[11]inaformulationinwhichtheright-hand side of a sequent is a multi-set of formulas. In particular, the intuitionistic implication is not necessary here, indeed we consider formulas which resem- ble the usual logic programming clauses augmented with linear implication and universal quanti(cid:12)cation in the body. The resulting proof system F&O could be used to reason about state based systems as shown in the example in Section 3. Following Miller's approach, it is possible to consider a language based on simply typed lambda terms. In this setting formulas are nothing but a subset of (cid:21)-terms having a given type o. The notion ofstate is represented using atomswhose top level predicate, a state constructor, belongs to the signature (cid:6)S, which must be (cid:12)xed a priori; (cid:5)(cid:6)S will denote the set of such atoms. It is assumed that every other signature (cid:6), occurring in a sequent, contains (cid:6)S. Accordingtothe(cid:21)-calculusnotationthelogicalconnectivesareconstants having o as target type; the LL connectives considered in the language are ..............................................................................................., &, 8(cid:28), (cid:14)(cid:0), > and ?, thus, for instance, ...............................................................................................has type o ! o ! o and 8(cid:28) has type ((cid:28) ! o) ! o, i.e., it expects an abstraction as unique argument, which represents the scope of the quanti(cid:12)ed variable. 2.1 F&O Formulas TheconsideredformulasareasubsetofForumformulas,namelythesmallest one generated by the following grammar: D ::= 8(H(cid:14)(cid:0)G)jD1&D2 G ::= G1&G2 jG1 ...............................................................................................G2 j8(cid:28)X:Gj> j ? jH(cid:14)(cid:0)D jA H ::=H1 ...............................................................................................H2 j A whereAis anatomicformula. AD-formulacanbe aconjunction offormulas orasimple multi-headed clause where all theformulasappearing inthe head areatomic. Allthefreevariablesin aclauseareuniversally quanti(cid:12)ed; thisis themeaningofthenotation8(H(cid:14)(cid:0)G). Thiskindofclausescanbeconsidered asanextensionoftheLOclauses[2],sinceuniversalquanti(cid:12)cationandlinear implication can appear in the body. Under the same perspective G-formulas canbeconsideredasextensionsofusualgoals,withimplication anduniversal quanti(cid:12)cation (hence the notation 8G). It is also important to observe that D-formulas cannot contain ? and > in their heads. 2.2 Sequents and rules In order to highlight the role of state, usual Forum sequents are modi(cid:12)ed in the following way (cid:6) :P;R!S M, where (cid:6) is a signature containing all the typed constants of the sequent, P is a multi-set of D-formulas in clausal form, i.e., 8(H (cid:14)(cid:0)G), R is a multi-set of D-formulas, M is a multi-set of G-formulas and S is a multi-set of atoms in (cid:5)(cid:6)S. The intuition is that P corresponds to a set of global de(cid:12)nitions (always usable, i.e, !c for every c in P where ! is the LL connective which allows to duplicate occurrences of formulas), R is a set of bounded-use de(cid:12)nitions, i.e., which are consumed when used in a proof, S can be considered as the current stateof the system to be simulated and, (cid:12)nally, M is the multi-set of pending activities in the system, e.g., messages. In LL, the previous sequent can be read as: (cid:10)c2P!c (cid:10)(cid:10)c2Rc! (...............................................................................................m2M[S m),where (cid:10) is the multiplicative conjunction. The set of Forum rules [11] can be instantiated to cope with the above described sequents. The resulting system is depicted in Figure 1. The two backchaining rules have the proviso that fAi[t(cid:22)=x(cid:22)]gi:1::n (cid:17) S ] N, where ] denotes the multi-set union and fAigi:1::n corresponds to the multi-set fA1;:::;Ang. Furthermore, the right-hand side N;Q is required to contain only atomic formulas which are not in (cid:5)(cid:6)S. The lwith rules have the same proviso on N. In this way, before applying a left rule, it is necessary to eliminate all the compound formulas in the right-hand side adding all the state atoms in M to the global S, i.e., uniformity of proofs is enriched by a new condition. It is possible to give alternative formulations of the system, e.g., embedding add into a special version of par. The rule forall requires y not to appear in the lower sequent. This is an important point and it can be exploited to achieve data hiding, as shown in [6, 10]. It is easy to check that each one of the previous rules preserves well-formed F&O sequents. The most interesting thing of the system is the axiom (cid:12)nal. It is in- troduced to emphasize the idea of proof as computation; this aspect will be discussed in Section 4. Essentially, the form of the (cid:12)nal axiom express in- formation about the answer to an initial query (i.e., the state Sf), obtained when all the messages have been successfully processed. Thebackchaining rulesprovidethebasicmechanismtoprocessmessages. Their behavior is similar to the behavior of a resolution step in a standard LP language. Notice also the non-deterministic splitting of the contexts. The use of par allows to treat the state components and the messages as (cid:12)nal all (cid:6) :P;!Sf (cid:6):P;R!S >;M A 2 (cid:5)(cid:6)S (cid:6):P;R!A;S M (cid:6): P;R!S M add anti (cid:6) :P;R!S A;M (cid:6) :P;R!S ?;M (cid:6):P;R!S A;B;M (cid:6) :P;R!S A ...............................................................................................B;M par (cid:6): P;R!S A;M (cid:6) :P;R!S B;M rwith (cid:6) :P;R!S A&B;M (cid:6):P;B;R!S A;M y :(cid:28);(cid:6):P;R!S B[y=X];M impl forall (cid:6):P;R!S A(cid:14)(cid:0)B;M (cid:6) :P;R!S 8(cid:28)X:B;M (cid:6): P;A;R!S N (cid:6) :P;B;R!S N lwith lwith (cid:6):P;A&B;R!S N (cid:6):P;A&B;R!S N t(cid:22)(cid:6)-terms (cid:6):8x(cid:22):(...............................................................................................i:1::n Ai(cid:14)(cid:0)B);P;R!T B[t(cid:22)=x(cid:22)];Q backchaining-1 (cid:6): 8x(cid:22):(...............................................................................................i:1::n Ai(cid:14)(cid:0)B);P;R!S;T N;Q t(cid:22)(cid:6)-term (cid:6) :P;R!T B[t(cid:22)=x(cid:22)];Q backchaining-2 (cid:6): P;8x(cid:22):(...............................................................................................i:1::n Ai(cid:14)(cid:0)B);R!S;T N;Q Figure 1: F&O Proof system concurrent processes. Indeed, the par rule simply reduces the components of a par into a multi-set of formulas. Using & on the right allows to create independent sets of processes, each of them yielding a di(cid:11)erent (cid:12)nal state, e.g., the above mentioned language LO. Furthermore, it can be used to de- rive auxiliary branches in a proof ended by the all axiom. They correspond to executions of auxiliary operations which do not yield (cid:12)nal states. Occur- rences of & in the left-hand side of sequents provide non-determinism in the choice of one of its conjuncts. It is possible to model internal evolution of the state, i.e., without in- tervention of external agents, for instance using clauses with only one state atom in the head. In our main application, i.e., an OO system, only modi- (cid:12)cations due to external agents will be considered. 3 On the dynamics As mentioned in the introduction, the main goal of the paper is to model, using the above described F&O language, systems which can dynamically modify their state. The rules of the proof system are designed in order to provide a form of multi-set rewriting as in [2, 7, 9, 11]. In particular, the application of a backchaining rule entails picking up atoms in the current (cid:6) :Passign;!(x 2);(y 1);(z 1) (cid:6) :Passign;!(x 2);(y 1);(z 1) ? (cid:6) :Passign;!(x 2);(y 2);(z 1) (assign y z ?) ::: (cid:6) :Passign;!(z 1) (assign y z ?)...............................................................................................(x 2)...............................................................................................(y 2) (cid:6) :Passign;!(x 1);(y 2);(z 1) (assign x y (assign y z ?)) ::: (cid:6) :Passign;!(y 2) (assign x y (assign y z ?))...............................................................................................(z 1)...............................................................................................(x 1) (cid:6): Passign;!(x 1);(y 2);(z 0) (assign z x (assign x y (assign y z ?))) Figure 2: Swapping with nested assignments state and in the multi-set of messages, rewriting them in a new state and new messages. The assignment of values to variables is a good example to show how F&O can be used to simulate the behavior of imperative paradigms. As previously mentioned it is necessary to (cid:12)x a signature (cid:6) containing (cid:6)S: the state constructors are x;y;z having type i! o, the other constants are 0;1;2 having type i and the predicate assign having type (i ! o) ! (i ! o) ! o ! o. The program executing the assignment is the following D-formula: Passign (cid:17) 8i!oX;Y:8iV;W:8oG (assign X Y G)...............................................................................................(X V)...............................................................................................(Y W) (cid:14)(cid:0) G ...............................................................................................(X W)...............................................................................................(Y W) Figure 2 shows the computation to swap the values of the variables x and y usingz asauxiliaryone. Noticethattherecanbeonlyoneproofforthequery of the example, i.e., Passign forcesthe computation tobe deterministic. This behavior is due to the imposed sequentiality between assignments, which is achievedusingcontinuations,i.e.,passingtheoperations,stilltobeexecuted, as last parameter to assign. Without goal passing, e.g., if all the queries were at the same level with two par, the computation would become non- deterministic, i.e., there could be di(cid:11)erent proof trees with di(cid:11)erent (cid:12)nal states. Second order quanti(cid:12)cation, used in Passign, allows to de(cid:12)ne in a nat- ural way a program which is able to handle the assignment to any pair of variables. A simpler de(cid:12)nition for the swap predicate can be the following: Pswap1 (cid:17) 8i!oX;Y:8iV;W:8oG (swap X Y G)...............................................................................................(X V)...............................................................................................(Y W) (cid:14)(cid:0) G ...............................................................................................(X W)...............................................................................................(Y V). This is a very simple but clear example of the type of reasoning allowed by F&O and more generally by Forum. 4 Relationships with Forum F&O proofs can represent the operational behavior of a programming sys- tem. This interpretation is based on the description of the transitions be- tween states. In order to understand the logical meaning of such mechanism it is necessary to study the relationships with Forum proofs, since in such setting it is possible to interpret proofs as computations [11]. A proof (cid:25) for an F&O sequent s is a (cid:12)nite tree where the leaves are instantiations of the (cid:12)nal and all axioms and the inner nodes correspond to applications of the remaining rules. In the following (cid:25) `fo (cid:6) : P;R !S M and (cid:25) `fm (cid:6) : P;R ! M will denote a proof (cid:25) for an F&O and a Forum sequent, respectively. Furthermore, if S is the multi-set of formulas fF1;:::;Fng, then ...............................................................................................S will denote ...............................................................................................i:1::n Fi. Let P be a multi-set of F&O D-clauses, R a multi-set of D-formulas, S a multi-set of state atoms and M a multi-set of goals. Theorem 4.1 F&O and Forum proofs There exists (cid:25) s.t. (cid:25) `fo (cid:6) : P;R !S M with (cid:12)nal axioms (cid:6)i : P;!Si, i: 1::n, i(cid:11)there exists(cid:26)s.t. (cid:26)`fm (cid:6) :P;R;F ! S;Mand F istheformula &i:1::n8c(cid:22)i: ...............................................................................................Si where c(cid:22)i is a list of constants with the proper type containing at least the set (cid:6)in(cid:6). The previous theorem re(cid:13)ects the above mentioned interpretation of proofs as computations. Namely, given an initial state Si and a (cid:12)nal state state Sf, the aim is proving `fo Si (cid:14)(cid:0) Sf, hence Sf `fo Si, i.e., proving that there are a sequence of transitions from the initial to the (cid:12)nal state, which are expressed by linear implications. Since it is necessary to take into account the occurrences of & and 8 in the right-hand side of the sequents the formula representing Sf, the residue, assumes a more complicated form, namely &i:1::n8x(cid:22)i: ...............................................................................................Si[x(cid:22)i=c(cid:22)i] as in the assert above. The outermost & in- dicates the presence of one or more (cid:12)nal states while the quanti(cid:12)cation is necessary to hide the new constants which have been introduced during the proof (i.e., right-hand side occurrences of the universal quanti(cid:12)cation). F&O proofscan be translatedinto Forumproofsproviding (cid:12)rsta proper 0 mapping of the backchaining rules. For instance, let P (cid:17) 8x(cid:22):(A(cid:14)(cid:0)B);P thenbackchaining-1hasthefollowingcorrespondingForuminferential(cid:12)gure: (cid:14) (cid:6) :P0;A[t(cid:22)=x(cid:22)]! N;S (cid:6): P0;R! B[t(cid:22)=x(cid:22)];Q;T ::: (cid:6):P0;(A[t(cid:22)=x(cid:22)](cid:14)(cid:0)B[t(cid:22)=x(cid:22)]);R! N;Q;S;T 0 (cid:6): P ;8x(cid:22):(A(cid:14)(cid:0)B);R! N;Q;S;T 0 (cid:6) :P ;R! N;Q;S;T where, A (cid:17)...............................................................................................i:1::n Ai and S ] N (cid:17) fAi[t(cid:22)=x(cid:22)]gi:1::n. Notice that the lowest rule application is the Forum rule decide and that (cid:14) is simply an iterated application of the Forum rule ...............................................................................................L of [11]. Using such kind of schemes it is possible to mimic an F&O proof, just observing that, in the corresponding Forum proof, the use of the residue can be delayed until a (cid:12)nal axiom is reached. Viceversa, in order to map a Forum proof into F&O, for the considered set of F&O sequents, it is necessary to apply a set of permutation schemes thatallow to collapse stepsof aForum proofinto inferential (cid:12)gures of F&O. Again, it is possible to permute the rules so that, in the resulting proof, the residual formula is consumed in its last steps, i.e., it is possible to substi- tute, with a (cid:12)nal axiom, the subtrees close to the leaves and involving only residues. 5 Objects in F&O As already mentioned in the introduction, F&O is powerful enough tofaith- fully reconstruct the operational behavior of a class-based language. In order to prove this claim a representation for objects, methods and classes will be introduced in this Section. Objects will be represented by atomic formulas. This representation al- lows to easily create and destroy objects, and also to de(cid:12)ne patterns match- ingwiththem. Classeswillberepresentedbyuniversallyquanti(cid:12)edformulas, expressing the structure of objects. Auxiliary operations will be expressed by atomic formulas, too, e.g., the new, send and kill operations. According to these ideas, an F&O sequent assumes the following form: (cid:6) :P;R!o1;:::;on M;(cid:10) where P consists of the set of the de(cid:12)nitions of classes and auxiliary opera- tions; o1;:::;on is a multi-set of atoms representing all the living objects in the system, i.e., the global state; R contains the currently (cid:12)red methods, i.e., picked up from inside an object; M is the set of pending messages; (cid:10) is the set of remaining invocations, i.e., auxiliary operations. 5.1 Objects as atoms Let i be a generic type and id a symbol with type (cid:28) = i ! o ! o, objects are represented by atoms having the form: (id Attrs (M1 &::: & Mn)) In such representation id acts both as object constructor and identi(cid:12)er of the object itself. Such identi(cid:12)ers could be expressed by the application of another constant, e.g.,name having type int ! (cid:28), to a new integer n (w.r.t. the other objects in the systems), e.g., id (cid:17) (name n). Attrs could be any term in which information about the current state can be stored (it could be reasonable to consider here either lists or pairs of attributes). The last (id (s null) (M1 & M2) ) where M1 (cid:17) 8iX:8oMs: (id (s X) Ms) ...............................................................................................(id:(get X)) (cid:14)(cid:0) (id (s X) Ms): M2 (cid:17) 8iX:8iY:8oMs: (id (s X) Ms) ...............................................................................................(id:(put Y)) (cid:14)(cid:0) (id (s Y) Ms): Figure 3: A simple object parameter represents the collection of methods of the object. Actually it is a conjunction of D-formulas Mi, i : 1::n, where each Mi is a rewriting rule for the object itself. Indeed, methods have the following form: 8x(cid:22):(id Attrs Ms) ...............................................................................................(id:Head) (cid:14)(cid:0) (id Attrs0 Ms0)...............................................................................................Msg1 ...............................................................................................:::...............................................................................................Msgn where id is the identi(cid:12)er of the object, (cid:12)xed at the moment of the creation, x(cid:22) denotes all the free variables of the clause and Head is a term expressing the name of the method and the parameters. It is necessary to consider id, the name of the object, together with Head in order to avoid that messages with the same name are delivered to the wrong objects, hence the constant : has type (cid:28) ! i ! o (using an in(cid:12)x notation for it). Each message Msgi, i : 1::n can be one of the following: a method invocation represented by (send (Id : Msg)) where send is a constant with type o ! o and Id a variable in x(cid:22) or a constant name; a creation message (new class name Id) where new has type i ! (cid:28) ! o; a killing message (kill Id), where kill has type(cid:28) ! o; theinvocation ofauxiliary operations(e.g.,appendbetweenlists if its de(cid:12)nition occurs in P). Figure 3 shows a simple object having a single attribute de(cid:12)ned through aconstructors havingtype i! iandtwomethods, getandput, respectively de(cid:12)ned to retrieve the value kept by s and to change it. The constants get and put have type i ! i ! i, null is a constant of type i. Each method is nothing but a rewriting rule for the corresponding object. Quanti(cid:12)cation over Ms in the de(cid:12)nition allows to get rid of the structure of the methods (their de(cid:12)nitions are inside the object itself). Such representation allows to achieve data and methods encapsulation. It is interesting how to use universal quanti(cid:12)ers to achieve data abstraction. To explain this aspect it is necessary to introduce a simple notion of class. 5.1.1 Formulas representing classes A simple waytopresent classes is to consider them astemplates forcreating new objects. As already mentioned objects should be placed in the current state S of sequents. Furthermore, the creation process should be activated when a new message occurs in the context of the operations. According to (cid:6): P;R!(id as ms);S M;(cid:10) add (cid:6) :P;R!S (id as ms);M;(cid:10) backchaining-1 (cid:6):P;R!S M;(new class name id);(cid:10) Figure 4: Creation of a new object these requirements classes can be represented by the following formulas in the unbounded-use context (P in our notation): 8(cid:28)Id: (new class name Id)(cid:14)(cid:0)(Id as ms) where class name is a term acting as the class name and as, ms are given patterns for the attributes and the methods. It can be observed here that higher-order quanti(cid:12)cation (over Id) is used in order to deal with newly created identi(cid:12)ers to be supplied by an external agent. Figure 4 shows how the system reacts to a new invocation according to the previous de(cid:12)nition. 5.1.2 Hiding using universal quanti(cid:12)cation The internal data of an object must be accessible only through the interface that the object provides to the external users. This means that there must be a way of hiding parts of the object, data as well as methods. Universal quanti(cid:12)cation, in the body of the clauses representing classes, can be used for such aim. Thus, the previous class de(cid:12)nition can be reformulated as follows: 8(cid:28)Id: (new class name Id) (cid:14)(cid:0) 8x(cid:22): (Id as ms) where x(cid:22) is a vector of variables, which range over the attribute constructors and the names of the private methods. Figure 5 shows a class point with private data de(cid:12)ned by a Pair con- structor, a private method, Set, which rewrites simultaneously a pair into a new one, and a public one, put, which resorts to Set to rewrite only the (cid:12)rst component keeping the other one (cid:12)xed. When the de(cid:12)nition of such a class is placed in the right-hand side of a sequent, the universal quanti(cid:12)ers are eliminated introducing new constants for Set and Pair, see rule forall in Section 2.2. The side condition of that rule requires that the constants do not appear in formulas at the same level of the new invocation, i.e., they are visible only inside the method de(cid:12)nition of the considered object. In the example in Figure 5, it turns out that the scope of the quanti(cid:12)cation over Pair extends over the de(cid:12)nitions of the methods M1 and M2. In this way both methods can access the data, as expected. Figure 6 shows the sequence of inferences in presence of universal quanti(cid:12)ers. On the basis of the previous assumption, it is possible to describe the mechanism to handle messages.

Many approaches to this problem have been proposed in the last years. will be considered as completely concurrent activities. Andreoli and .. The latter must be solved, i.e., a new constant must be introduced, once approaches are also obtainable by simply implementing di erent strategies.

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.