Building the access pointers to a computation environment

A common object technique equipped with the categorical and computational styles is briefly outlined. An object is evaluated by embedding in a host computational environment which is the domain-ranged structure. An embedded object is accessed by the pointers generated within the host system. To assist with an easy extract the result of the evaluation a pre-embedded object is generated. It is observed as the decomposition into substitutional part and access function part which are generated during the object evaluation.


Introduction
Recent issues in a data modeling area tend to attract some general algebraic ideas.The most influent to the target data model are the properties of the database domains and their interconnections.Some useful observations concerning the mappings between the relational database domains [IP94] result in the solutions to integrate a database scheme.But the difficulties were observed when the type considerations occurs: the first-order data model becomes overloaded with the complicated and intuitively unreasonable mappings, especially when attempts to use a category theory are done.
The attempts to apply the same ideas for a conceptual modeling [LH96] are not yet advanced to cover the known effects and models.A gap between the pure reasoning with the objects in a category-style manner (the maps and domains have the similar status) and the realistic data models is indicated every time (see, e.g., [HLF96]) when the researcher put the database concepts together.Nevertheless, the feeling of a category theory usefulness is growing with the rate of accumulating the practical experience in a field [Jac91].
The semantics of database is heavy based on the evaluation of the expressions [BSW94].The success of the approach is also estimated by the simplicity and intuitive transparency whenever the maps between domains are involved.Information system engineering [JD93] extremely needs to apply the theoretically balanced data models with the higher-order structures.
The observations show the concepts and notions shared by the distinct approaches and the theories.The importance of extracting all the useful feature from the notions of function and type are well understood.Here we will try to rearrange and put together some important ideas concerning the evaluation of expressions.The most of the attention is paid to environment of the evaluation to suit it with the common database models.An environment is assumed to consist of the products of the domains.Thus, the obvious way to get an access to its partitions is to evaluate the projections, each of them being type according to the positions of the counterparts.This intuitively means, the pointers to an environment are to be generated.Some unexpected features arise wherever the encapsulation of objects is used relatively the environment prescribed.
To cover the notion in use the most of attention is paid to interrelations and correspondences between types, functions and environment of evaluation.The language is left out of this paper scope, and model theoretic aspects are attracted.The style of reasoning in a category is used along with the equational solutions.
Section 2 covers the minimal amount of a type theory to put the necessary accents.The projections are used almost in a traditional sense.The operationˆgives a kind of suit to shift around the variables.In addition, the correspondence between the projections and the identity maps brings in a theory the intuitive ground.
An access to values coupled in environment is discussed in section 3. The main topics are generation of the access pointers and the encapsulation of the objects.The commutative diagram techniques is applied to establish the most important equation.The reasons and solutions are based on the possibilities of the citation.An atomic case is covered by Lemma 3.1.Its generalization leads to the Theorem 3.1 whenever the function constant is applied to an argument.To pass an actual parameter the closure is generated.

A theory of types
A variety of possible theories of types has been developed with different purposes and with distinct mathematical or logical ideas in use.A category theory gives one of the theories.
To establish a universe of discourse for types we need some kind of primitive frame.Usually we start with a set of generic types and generate the derived types applying some building principles.In a pure category theory we are not given neither building principles nor clear understanding of making new types from old.Entering a category theory we observe the relations between types which hold whenever corresponding mapping statement obtains (here: Env and Dy are domains).
The way of reading the mapping statement depends on intuitive reasons.Whenever we apply to category theory, a mapping statement is supposed being taken as a statement with one-place functions and operation '•' of composition with one-place functions.Thus, practical reasons concern the multi-place functions to increase their arity.
The solutions to bring composition with multi-place functions (see, e.g., [Sza78]) are known but give no real suit.
The easier way is to assume that the category has cartesian products and to select the particular representatives of the product domains.In particular, the cartesian power D n for every n ≥ 0 gives n-ary functions as maps f : D n → Dy. (2) 2.1 A description of products 2.1.1Empty product.
To make a description of products we bring in the product and start with the assumption that a category has a special domain O as the empty product: and for every domain D a special map: From an intuitive reason the domain O has one element, and map 0D is unique, i.e. whenever f : D → O then f = 0D.

A theory of tuples and multi-ary maps.
This kind of a theory is based on the products.Concerning binary products we have for arbitrary two domains Dx and Dy a special choice of a domain Dx × Dy, and, more generally, A product is equipped with the special maps which are the projections.As usually, mere existence of maps F st and Snd does not characterize Dy × Dx as a product.In addition we assume that there is a chosen pairing operation < f, g > on maps such that types are assigned by the rule: The additional property of F st, Snd and < •, • > under composition is assumed: where f, g are typed as above, and One-to-one correspondence.It means that there is a one-one correspondence between the pairs of maps f, g and the map h into the product.

A theory of functions.
A category usually gives a 'local' universe of selected functions.In case of arbitrary functions we need the functional spaces as explicit domains in the category.
Given Dx and Dy we want to form (Dx → Dy) as a domain in its own right.After adopting the above, the functional space does contain the various maps.
Whenever we have an element f from (Dx → Dy) and the element x from Dx we need to establish the map that will apply element f to element x giving rise to the value of function f : This evaluation map ε is typed as In addition there has to be a map for shifting around variables.Suppose g : Env × Dx → D ′ y is a map with two arguments.In an evaluation we can think of holding i constant and regarding g([i, x]) as a function of x.We need a name for this function and for correspondence with possible values of x: so that the function we are thinking of -given x -was Map k is one-to-one corresponded to g.All this function value notation is not categorical notation.Nevertheless we are to say that there is a one-one correspondence via • between maps g : Env × Dx → Dy and maps k : Env → (Dx → Dy).
This correspondence comes down to the following two equations: where (• × •) means a functor product, or, in the neutral to domains form, The notation is now wholly categorical and not so suitable.The more sense is added by the language of functors.

A system of types within cartesian closed category
Now we give a brief sketch of viewing the cartesian closed category (c.c.c.) as a system of types.
Theory of functions.Each c.c.c represents a theory of functions.
Maps.The maps in the category are certain special functions that are used to express the relations between the types (the domains of the category).
Products.In order to be able to deal with multi-ary functions, we assume we can form and analyze products.
Function spaces.In order to be able to work with transformations of arbitrary functions (arbitrary within the theory) we assume we can form function spaces.Note, that the higher types enter the theory, e.g., as the sequence of domains:

Environment and an access to values
To build the typed language we need to think of the values of the variables.The values of the variables are available via access functions from an environment Env.The representation of an environment is given by the domains Dy, Dx, . . .which are ranges of possible values of y, x, . ... The domains Dy, Dx give the explicit part of an environment Env, and its implicit rest E, not be detailed for current consideration, is separated from Dy, Dx:

Updating an environment
Whenever we want to update Env the restriction is imposed to its counterparts: with 'E' for implicit part and 'Dx' for explicit part.
In fact, within Env we have an 'old' value of x which ranges D x,Old , and E which does not depend on x.The description of updating an environment Env has to include both its explicit part Dx and implicit rest E.An outline of updating process is given below.
Step 1: Building the old environment.To combine Env Old we construe the product Step 2: Bringing in a range of values.The product of Env Old and Dx is generated as Step 3: Establishing an U pdate-function.The An U pdatex function is established to enable the transformation from Env Old to EnvNew : At this stage we are to compare the properties of the domains Dx, D x,Old , Dx,New: (1) Dx is an unrestricted range for free variable x; (2) D x,Old is some existing (i.e., before evaluation) restriction of Dx; (3) Dx,New differs from D x,Old exclusively in a point x.
All of this could be implemented in a particular kind of U pdatex, which would be referred as substitution, or Substx: The description of its behavior by the elements gives the following: where d ∈ Dx, i ∈ Env Old , and i (d/x) ∈ EnvNew.[Here: the new instance i (d/x) of environment is the same as its old instance i excepting the point x, which is replaced by d.]One could imagine that there is a pointer from 'x' to its possible values 'd'.

Viewing Substx as a pointer
Now we discuss the possibility to construe a pointer to the partitions of an environment.At first, we would try the equation where F st × idD x is a functor product, < F st • F st, Snd > its linear notation, and The functor product when being applied to ordered pair generates an access separately to the first and to the second its members.This feature makes it possible to bring in the following maps as the pointers to the partitions of the environment.
Pointer to the part independent on 'x'.This is a composition of F st's which ranges the product E × Dy, i.e. and implicitand independent, -part of the environment: Pointer to the part of new values for 'x'.This is a second projection Snd which ranges over the desired domain Dx: Coupling the new environment.Now we generate an access to the new environment.Taking into account the pointers for both the partitions, we need to construe their couple to obtain the pointer to the new environment: Encapsulation of a constant a (Notations and explanation: i is an instance of environment Env, thus i ∈ Env; i (a/a) means the instance of environment which captured the constant a, also means the substitution of domain for a by a; a closure 1 {a} (identity map as a canonical evaluation) for the evaluated constant is generated; whenever a closure is not the identity map then the constant is not canonically evaluated.As may be shown, the map g is equal to 1 {a} • Snd.) Step 1: Access to Dy.We take the first partition (F st) of EnvNew and after that construe the pointer to its second (Snd) partition: Step 2: Access to Dx.New.An effect of applying Snd to EnvNew gives the pointer Step 3: Coupling an access to D ′ y for Dy = (D ′ y ) Dx by ε.We take the subpartitions of EnvNew as above and restore the pointer:

Encapsulation of an object
In particular, an evaluation process may result in capturing the object being evaluated by an environment.Proof.For any given instance i ∈ Env, e.g., i = [[e, y], x] whenever x, d ∈ Dx, y, f ∈ Dy then: ( Thus, this proof is straightforward and elementary.Canonical evaluation of a constant is according the commutative diagram in Figure 1.The reasons are as follows.Let i be an instance of environment Env, thus, i ∈ Env.Each occurrence of 'a' canonically is replaced by the same 'a', i.e. i (a/a) means the instance of environment which captured the constant a, also means the substitution of domain for a by a.We need a closure to trigger the evaluation process, and 1 {a} (identity map as a canonical evaluation) for the evaluated constant is generated.Roughly speaking, this identity map evaluates a constant and whenever a closure is not the identity map then the constant is not canonically evaluated.Now we describe the evolution of an environment when encapsulation of the constant occurs.The environment in Figure 2 is treated as the cartesian product of the range domains.The notations Environment of encapsulation (Notations and explanation: Da is a range of a-compatible objects, i.e. those with the same type; for simplicity assume Da = {a}; singleton {a} is the encapsulated constant.The map Encapsulatea builds a renewed environment by setting up the product of implicit partition of the environment with the singleton {a}.) naturally reflects the ranges, and Da is a range of a-compatible objects, i.e. those with the same type.For simplicity we assume Da = {a}, and this singleton {a} is the encapsulated constant.
The map Encapsulatea builds a renewed environment by setting up the product of implicit partition of the environment with the singleton {a}.

Evaluation of a variable
For single free variable the element-wise reasons for the evaluation are described by the commutative diagram in Figure 3.To read this diagram we use the additional notations: d ∈ Dx for an element being substituted; 1D x : Dx → Dx for an identity map.
We try to 'solve' this diagram relatively g and Substx.
Solution for g.For every i ∈ Env the maps are valid, hence the following is a 'solution': The value of a free variable is represented by an identity map.
Note that this diagram corresponds to some idea of closure: free variable is supposed to be closed under the environment of its evaluation.hence,

Solution for
Therefore, the 'solution' of diagram in Figure 3 for g and Substx in case we evaluate a single free variable is given by diagrams in Figure 4 and in Figure 5.

Evaluation of a constant function
Evaluation of a constant function gives the most typical sample to encapsulate the object of general nature.To observe the effects we describe an applying of the constant function to the argument.All the counterparts -both function and argument, -from the category theory view are the objects.
The environment is changed whenever the application of the function f to the argument x occurs, i.e. the triggering event is In evaluation of a variable the most important is its substitutional property.The closure for a variable is generated resulting in its image 1 Dx .)

Snd
Figure 4: Pointers for a variable (Notations and explanation: an environment i (d/x) is the same as environment i excepted point x which is replaced by d.In case of evaluating a single free variable, map 'g' from the diagram in Figure 3 is to be replaced by the pointer Snd.)  (f x), or similarly, f (x).In the environment an evaluation is triggered whenever the value of argument 'd' is passed to 'x'.
The following Theorem 3.1 reflects the computational ideas in use.(2) The equation in (1) has the solution thus, the pointers to an environment are generated. Proof.
(1) The equation above is commented as follows: Left part: Right part: eval of 'x' within env 'i' when actual parameter 'd' is passed to argument 'x' eval of 'f x' within env 'i' when actual parameter 'd' is passed to argument 'x' The premise of the sentence is described by the commutative diagrams (a), (b), and (c) in Figure 6.The equation is valid due to the existence of commutative diagram (abc), thus the conclusion is valid.
(2) The existence of the pointers is due to Lemma 3.1.Hence, the commutative diagram in Figure 7 gives the needed pointers.

Conclusions
A common object technique equipped with the categorical and computational styles is outlined.As was shown, an object can be represented by embedding in a host computational environment.An embedded object is accessed by the laws of the host system.A pre-embedded object is observed as the decomposition into substitutional part and access function part which are generated during the object evaluation.They assist to easy extract of the result.
Getting started with a new environment EnvNew = (E × Dy) × Dx,New, we can evaluate the arbitrary functions.The process of extracting the pointers to Dy, Dx,New and generating the values from D ′ y whenever Dy = (D ′ y ) Dx (= D ′ y → Dx), i.e. for the function space Dy, comes down to the following steps. 1 Now we are able to take a function f from (D ′ y ) Dx and the argument d from Dx,New and apply f to d using ε.Thus, the equation ε[f, d] = f (d) is valid giving rise to the values f (d) from D ′ y Lemma 3.1 (Citation) For any given environment Env = (E × Dy)×Dx and the domain Dy = (D ′ y ) Dx the constant c ∈ Dx and the function constant f ∈ Dy are described by the mapsˆ(1 {c} • Snd) andˆ(f • Snd) respectively.

Figure 3 :
Figure 3: Substitution of a variable (Notations and explanation: d ∈ Dx an element being substituted; 1 Dx : Dx → Dx is an identity map.In evaluation of a variable the most important is its substitutional property.The closure for a variable is generated resulting in its image 1 Dx .)

Figure 5 :
Figure 5: Partitioning an environment Env (Explanation: this diagram is expansion of the element-wise commutative diagram in Figure 4 to the corresponding domains.)

Figure 6 :
Figure 6: Evaluation of a constant function (Explanation: this commutative diagram reflects a natural idea of the function constant, i.e. the evaluated map does not depend on an environment.A diagram to evaluate its argument variable is similar to diagram in Figure 3.The diagram (a) is a commutative-style description of evaluating the argument of the function f .The diagram (b) escribes the intuitive reasons to observe f as a function constant which results in f (d), the value of f in a point d.The diagram (c) determines f as the valid map.An assembling diagrams (a), (b), and (c)gives the commutative diagram (abc).All the diagrams contain the parameters g f , g d which are to satisfy the commutative law.Thus, the 'solution' of diagram (abc), if exists, relatively g f , g d generates the pointers to access an environment.) Theorem 3.1 (Citation of the function) (1) The equationf • (ε• <ˆg d × idD x > = ε• <ˆg f × idD x >describes the object f as a functional constant parameterized by g d and g f .

Figure 7 :
Figure 7: Pointers to access the environment with a constant function (Explanation: this commutative diagram gives one of the possible solutions of the diagrams in Figure 6 relatively the parameters g f and g d .Thus, the parameter g d is replaced by 1 Dx • Snd,ˆg d byˆ(1 Dx • Snd), g f by f • Snd, andˆg f byˆ(f • Snd).) . . ..Operations ε and •.To be able really to view these domains as function spaces, certain operations, ε and •, with characteristic equations have to be laid down.Cartesian closed category.C.c.c is a theory of functions, and the higher type functions are included.Hence, the theory of c.c.c's is the theory of types.It is only one such theory.