Information Cloning Fundamentals

Ion IVAN
Paul POCATILU
Doru UNGUREANU
Marius POPA
Mihai SACALĂ

1 Informatic Components

Modern informatics supposes hardware and software components integration into an infrastructure with a high degree of complexity. Reusability issue has particularities determined by the endeavour generated from instances multiplication.
Informatic components are different by nature and by usability.

Documentations are products made for hardware components, programms and services presentation. Documentations come with the product or the service and they are structured in order to introduce:
•	product or service short description;
•	product licensee;
•	resources minimum necessary;
•	installation guide;
•	functions;
•	uninstallation guide;
•	service or product acquisition way - information about producer price - for shareware and freeware products;
•	information on the technical assistance from the producer.

Hardware components are addressed for performing storage functions on magnetical disk, optical disk, electronic memory, magnetical band, printer, hard-disk, acquisiton of information by the scanner, data transmission on the network and conduction to nodes through hubs.
Magnetical band - bytes of information are stored between magnetical fields variations.
Magnetical disk - bytes of information are also stored between magnetical fields on disk. The disk may be fixed (hard) or removable (floppy).
Optical disk - bytes are stored as pits. It is performed a laser read. This information may be read-only, write-once read many, or reprogrammable.
Electronic memory - bytes are stored with the help of the electronic circuits, through electronic pulses. This memory is used for the storing of data in the computer internal memory. 
Computers may be connected into a LAN (Local Area Network) or a WAN (Wide Area Network).
LAN is a group of computers connected in a limited area through common electronic connectiones (backbones). A LAN network offers:
•	resources sharing;
•	easier user management.
LANs are interconnected directly or through a WAN.
WAN connects the networks on a wide area between computers placed in different buildings, cities or countries.
Hub - common connection point for miscellaneous devices on a network. Is used to connect LAN network segments, and contains many ports. When the data arrive into a port, it is copied to the other ports such all the network segments may see the data.

Application software is addressed to solutioning optimization problems classes, solving linear systems, estimation of econometric models factors, statistical indicators calculus.

Databases are data sets or data collections organized on levels, in a coherent way, assuring integrity and security, structured as the built-in data models, with a minimum redundancy and controlled through design techniques, accessible to many users in short time [VELI00], [LUNG00]. Database components are:
•	built-in data collections;
•	data dictionary;
•	auxiliary files;
•	virtual data (views, memory zones).
Fundamental data models types for the databases:
•	tree;
•	network;
•	relational;
•	object oriented.

Files are data or programs collections structured on quality, processing and scope criteria.
For the program, a file is an extern data structure made-up of records. The files dimension is limited only by the physical dimension of the storage. On a removable or fixed disk can be stored more files.

Utilities are software products realized to optimize the system resources usage. 

Compilers are software instruments that produce as output the object modules. These are linked by the link-editor and the executable results. Compilers inputs are source files written in an advanced programming language.

Informatic systems are an ensemble of hardware devices and software products, interconnected, which function in order to satisfy the users requirements.

Generally speaking, services are actions that advantage and fulfill the exigencies of the applicants and who are also first beneficiaries. In this case, service represents an action made with the help from a software product at the requirement of an user, in a computer network. Action consists of information supplying, realization of operations for registering, query, search, delete, transfer, resources allocation and payments. 

2 Copy Function

Files administration system offers the following operations: listing of files from the disk, files structuring into folders and files deleting. Moreover, there are applied operations of formatting, copying and labeling the disks, files sorting and modifying.
Operating systems come with some files manipulation functions, such as:
•	file creation - allocation operation of a memory zone on the external memory support where there are introduced and stored the file data;
•	file alteration - consist of changing one or more fields in the file; it is realized at file or structure name level; file name level alteration is file rename;
•	files sort - consist in arranging the records in an apriori order depending on the file fields and their importance;
           MS-DOS operating system allows files copying through the copy instruction:
copy [/a | /b] source [/a | /b] [[/a | /b] + source [/a | /b] [+ ...]] [/v] [/n] [/y | /-y] [/z] [/a | /b] [destination [/a | /b]] 
where the parameters has the following meaning:
source - specifies the file or files to be copied;
destination - Specifies the directory and/or filename for the new file(s);
/a - indicates an ASCII text file;
/b - indicates a binary file;
/v  - verifies that new files are written corectly;
/n - Uses short filename, if available, when copying a file with a non-8dot3 name;
/-y - Causes prompting to confirm you want to overwrite an existing destination file;
/z - Copies networked files in restartable mode.

Windows operating system makes the files copying through the following methods: 
a)	drag-and-drop – the following operations are made:
•	select the file which will be copied;
•	hold down the mouse right button; 
•	place the file over the destination folder; 
•	release the mouse right button.

b)	copy and paste – the following operations are made:
•	select the file which will be copied;
•	copy the file into the Clipboard by selecting Copy option from the cotext menu, Edit menu or the toolbar;
•	select destination where the file will be copied;
•	copy the file by selecting Paste option from the context menu, Edit menu or toolbar.
c)	send to removable disk - if the files are copied to the removable disk, then from the context menu choose Send To  3½ ˝ Floppy (A); this send is generalyzed.
Files are copied either one by one, which case there are repeated the above operations, or all at the same time, files being selected with the mouse or the arrows on the keyboard, with CTRL or SHIFT.
For example, if the A file is copied, after realizing the above operations, the B file is obtained. Copy can be made:
- on the same support;
- on other support;
- in the same folder;
- in another folder.
Files copying represents one of the cases of perfect cloning.
•	files printing – supposes printing of the text files content with or without format;
•	files deleting - operation through which there are removed the files content and data description from the external magnetic support.
Documents administering issue in respect to files naming, versioning, length, creation date or modifying constitute a distinct field, tackled by the modern byrotics research.
There are instruments that allow floppy-disks, optical disks and harddisks cloning. Resulted clone has the same structure as the original

3 Informatic Elements

Every informatic component may be decomposed into parts that are manipulated depending of the foreseen objectives.
 
Thus, for files, a file part my be selected and copied into another file.
For example, let’s consider F1 file which has the parts A, B, C şi D. B part is selected and copied into F2 file which already contains X, Y and Z parts. The modified F2 file contains X, Y, Z, B.
When in Fi and Fj files there are parts that don’t differ, then these files have identical components, clones respectively.
Clones are obtained from copying or macro expanding.

Let a programme which calls P1 and P2 procedures. If these procedures aren’t in the library, but the code is inserted in the source file, than P1 and P2 procedures are clones.
When the programme uses the macrodefinition:

add4 macro a, b, c, d, suma
	push ax
	mov ax, a
	add ax, b
	add ax, c
	add ax, d
	mov suma, ax
	push ax
endm 

this macrodefinition being called:

...
add4 x, y, z, w, T1
...

and in another program we have:

...
add4 m, n, o, p, T2
...

through expanding clones have been obtained, respectively identical sequences as operators, but different as operands.
Functions and classes libraries, are at the foundation of software reusability. Cloning supposes including sequences from libraries by copying and adjusting as parts of the programme product, unlike components natural reference from the library, according to the programming languages facilities. If in a library there is the type function f ( p1, p2, ..., pn), than the reference x = f (a1, a2, ..., an) is not cloning. On the other hand, if the function contains the following instructions sequence: 
if (a = = b) x = 3;
                   else 
	       x = 4;
and in the main programme this sequence is taken as is in the function or replacing a, b, x, variables with another variables, but keeping the processings, than this proceeding is a cloning of the programme sequences.

In databases the cloning issue is different:
•	structure cloning and initializing with a different content;
•	content cloning.
A database structure cloning consist in the usage in another database of the same fileds having or not the same name, but the fileds description being identical. 
For example, let’s consider T1 table from a database, with the following structure:

Table 1
Field name	Type	Dimension	
marca	number		
nume	char	15	
prenume	char	25	
varsta	number		

If it is created a  T2  table with the following structure:

Table 2
Field name	Type	Dimension 	
marca_ang	number		
nume_ang	char	15	
prenume_ang	char	25	
varsta_ang	number		

then table T2 is a clone for table T1.

Cloning the content of a database supposes copying n-touples (values of  the defined fileds) into another database.
For example let’s consider the following records in T1 table:

Table 3
Marca	Nume	Prenume	Varsta	
10	Ionescu	Ion	35	
24	Popescu	Gheorghe	42	
13	Vasilescu	Ioan	40	

and in T2 table:

Table 4
Marca_ang	Nume_ang	Prenume_ang	Varsta_ang	
10	Ionescu	Ion	35	
31	Constantinescu	Gheorghe	37	

In table T2 there is a touple with the same values like in table T1, so it is a clone.

Files cloning is a particular case of the database cloning. Is important that in the original files has to be identified characteristical elements as: characteristic number of tokens recurrences, unexpected or expected errors, omissions in the fields completion etc. Cloning highlighting is established when another file contains exactly the same characteristic elements as the original file, also called referred file. 

Cloning issue consist in identifying common parts in more documentations, respective fragment being a clone. In fact, in this case cloning come into attention when the software product described in the documentation is obtained as a result of the cloning process. 

In the services issue, cloning consist in multiplying the actions of information supplying, recording and querying in the database, search and information transfer, made on one or more nodes from the network.

4 Informatic Clones Highlighting

No matter, the existence way of the product and services in informatics, highlighting and administering the cloning process means an important activity. This is because clones limitation creates prerequisities for developing performant software and for attracting financial resources to develop production and qualify the personnel. For this aim, it must be developped software instruments that analyze existent hardware architectures, software products and databases in a delimited usage area and to identify existent clones. When the clones and the  cloning process exceeds the limits defined through an existent defined framework then it proceeds to make all the possible corrections. 

Such software products are already realized for establishing the common parts from texts elaborated with Word processors, for identifying clones in C++ programmes and for identifying the proportionality elements that generate clones in the tables built by matrix type processings [IVAN02].

Clones absence is specific to orthogonal data [IVAN02]. Ient_soft product is addressed to the evaluation of text files orthogonality degree. The algorithm consist in the following steps:
•	cover Fi file and build the vocabulary and the appearance frequencies;
•	cover Fj file and build the vocabulary and the appearance frequencies;
•	establish the common vocabulary;
•	choose the minimum frequencies;
•	calculate I indicator as ratio between minimum frequencies sum and maximum frequencies sum.

Analytical expression of the  l indicator is:

where:
     n – number of words that build the files; 
fmin i – minimum appearance frequency of the i word, which appears in files;
fmax i – maximum appearance frequency of the i word, which appears in files. 

When there are organized competitins, the orthogonality issues are essential.  

5 Conclusions

Cloning is necessary to a certain extent, but is dangerous because it is not supporting new software development.
With unauthorized cloning remain uncovered the expenses made by the frims that have produced software. Unauthorized cloned software products comte to the market at very low prices.

 Bibliografy

[IVAN02] Ion IVAN, Marius POPA, Mihai SACALĂ «Ortogonalitatea datelor», Revista Română de Statistică, în curs de apariţie.

[IVAN02] Ion IVAN, Paul POCATILU, Marius POPA «Analiza cantitativă în managementul proiectelor», Studii şi Cercetări de Calcul Economic şi Cibernetică Economică,  în curs de apariţie.

[LUNG00] Ion LUNGU, Manole VELICANU, Mihaela MUNTEAN «Teste şi probleme de programare în Visual FoxPro şi Oracle», Editura Petrion, Bucureşti, 2000.

[MATT96] Martin MATTHEWS, Bruce DOBSON «MS-DOS şi Windows», Editura Teora, Bucureşti, 1996.

[SMEU98] Ion SMEUREANU, Ion IVAN, Marian DÂRDALĂ «Structuri şi obiecte în C++». Editura CISON, Bucureşti, 1998.

[STAE00] Emilia STANCIU «Reutilizarea componentelor program în sisteme complexe», referat doctorat, Bucureşti, 2000.

[STAN00] Emilia STANCIU «Căi de creştere a gradului de reutilizare a componentelor software», referat doctorat, Bucureşti, 2000.

[VELI00] Manole VELICANU, Ion LUNGU, Constanţa BODEA, Cristina IONIŢĂ, Georgeta BĂDESCU «Sisteme de gestiune a bazelor de date», Editura Petrion, Bucureşti, 2000.