66 informatica' YU ISSN 0350-5596 informatica JOURNAL OF COMPUTING AND INFORMATICS Published by Informatika, Slovene Society for Informatics, Parmova 41, 61000 Ljubljana, Yugoslavia Editorial Board Suad Alagić, Sarajevo; Damjan Bojadžiev, Ljubljana; Jozo Dujmović, Beograd; Janez Grad, Ljubljana, Bogomir Horvat, Maribor; Ljubo Pipan, Kranj; Tomo Pisanski, Ljubljana; Oliver Popov, Skopje; Sašo PreSern, Ljubljana; Viljem Eupnik, Ljubljana; Branko Souček, Zagreb Editor-in-Chief : Prof. Dr. Anton P. Zeleznikar Executive Editor : Dr. Rudolf Hum Publishing Council: T. Banovec, Zavod SR Slovenije za statistiko, Vožarski pot 12, 61000 Ljubljana; A. Jerman-Blažič, Iskra Telematika, Kardeljeva ploSead 24, 61000 Ljubljana; B. Klemenöiä, Iskra Telematika, 64000 Kranj; S. Saksida, Institut za sociologijo Univerze Edvarda Kardelja, 61000 Ljubljana; J. Virant, Fakulteta za elektrotehniko. Tržaška 25, 61000 Ljubljana. Headquarters : Informatica, Journal for Computing and Informatics, Iskra Delta Computers, Stegne 15C, 61000 Ljubljana, Yugoslavia Phone: (+38 61) 57 45 54. Telex: 31366 yu delta Fax: (+38 61) 32 88 87 and (+38 61) 55 32 61. Annual Subscription Rate: US$ 30 for companies, and US$ 15 for individuals. Opinions expressed in the contributions are not necessarily shared by the Editorial Board Printed by: Tiskarna Kresija, Ljubljana YU ISSN 0350-5596 VOLUME 12,1988-No. 3 C 0 N T E N T S M. Kapus-Kolar 3 Compound Modules as Goals T. Welzer 12 The Normalization of Relatio- I. Rozman nal Database J. Gyorkös A . Zorman 16 A Simulation Approach before M. Gerkeä Using the Industrial Micro- V. Zumer computer Controller K. Rizraan A. P.Zeleznikar 26 Informational Logic I K. Ri zman 39 An Analysis of Information I. Rozman Systems Design Methodologies A. Zorroan M. Sifrar 47 Data Resource Sharing in Yugoslavia H. Nežić 49 Toward a Symbolic Structured Assembly Language M. Debevc 63 IBM-Enhanced Graphics Adapter M. Zorič (EGA Board) R. Svečko D. Đonlagić M. Debevc 68 Graphic Communication between R. Svečko VAX and Iskra Delta Partner M. Martinec D. Mrdakovič 71 Basics of Loosely Coupled P. Krajnik Distributed System for Indus- try Process Control D. Kodrič 75 KV8 Communication Interface 78 Forum Informationis informatica Casopia izdaja Slovensko društvo Informatika, 61000 Ljubljana, Parmova 41, Jugoslavija ČASOPIS ZA TEHNOLOGIJO RAČUNALNIŠTVA IN PROBLEME INFORMATIKE ČASOPIS ZA RAČUNARSKU TEHNOLOGIJU I PROBLEME INFORMATIKE SPISANIE ZA TEHNOLOGIJA NA SMETANJETO I PROBLEMI OD OBLASTA NA INFORMATIKATA Uredniški odbor: Suad Alagič, Sarajevo; Damjan Bojadtiev, Ljubljana; Jožo Dujmoviù, Beograd; Janez Grad, Ljubljana, Bogomir Horvat, Maribor; Ljubo Pipan, Kranj; Tomo Pisanaki, Ljubljana; Oliver Popov, Skopje; Sašo PreSern, Ljubljana; Viljem Rupnik, Ljubljana; Branko Souček, Zagreb Glavni in odgovorni urednik: prof. dr. Anton P. Zeleznikar Tehnićni urednik: dr. Rudolf Murn Založniški svet: T. Banovec, Zavod SR Slovenije za statistiko, VoZarski pot 12, 61000 Ljubljana; A. Jerman-Blažič, Iskra Telenatika, Kardeljeva ploSfiad 24, 61000 Ljubljana; B. Klemenčia, Iskra Telematika, 64000 Kranj; 5. Saksida, Institut za sociologijo Univerze Edvarda Kardelja, 61000 Ljubljana; J. Virant, Fakulteta za elektrotehniko. Tržaška 25, 61000 Ljubljana. Uredništvo in uprava: Časopis Informatika, Iskra Delta, Stegne 15C, 61000 Ljubljana, telefon (061) 574 554; teleks 31366 YU Delta; fax (061) 328 887 in (061) 553 261. Letna naroCnina za delovne organizacije znaša 24000 din, za zasebne naroönike 6000 din, za študente 2000 din; posamezna številka 8000 din. Številka žiro računa: 50101-6 78-51841 Pri financiranju časopisa sodeluje Raziskovalna skupnost Slovenije Na podlagi mnenja Republiškega komiteja za informiranje št. 23-85, z dne 29. 1. 1986, je časopis oproščen temeljnega davka od prometa proizvodov. Tisk: Tiskarna Kresija, Ljubljana YU ISSN 0350-5596 LETNIK 12,1988-ŠT. 3 VSEBINA M. Kapus-Kolar 3 Sestavljeni moduli kot cilji T. Welzer 12 Normalizacija relacijske baze I. Rozman podatkov J. Györkos A. Zorman 16 Simulacijski pristop pred u- M. Gerkeš porabo industrijskega mikro- V. Zumer računalniškega krmilnika K. Rizman A.P.Zeleznikar 26 Informacijska logika I K. Rizman 39 Analiza načrtovalnih metodo- I. Rozman logij informacijskih sistemov A. Zorman M. Sifrar 47 Porazdelitev podatkovnih virov v Jugoslaviji H. Nežič 49 Systral - Simbolički struktu- rirani zbirni jezik M. Debevc 63 IBM - Enhanced Graphics Adap- M. Zorič ter (EGA) kartica R. Svečko D. Doniugió M. Debevc 68 Grafična komunikacija VAX - R. Svečko Iskra Delta Partner M. Martinec D. Mrdaković 71 Zasnova rahlo sklopljenega P. Krajnik porazdeljenega sistema za vo- denje industrijskih procesov D. Kodrič 75 Komunikacijski vmesnik KV8 78 Forum Informationis COMPOUND MODULES AS GOALS INFORMATICA 3/1988 UDK 681.3.06 PR0L0G:519.682 Monika Kapus-Kolar US, Ljubljana Osnovna objektna interpretacija jezikov tipa Prolog je kreiranje in brisanje modulov. Nekateri jeziki te družine (npr. Delta Prolog) uvajajo vzporedno/zaporedno kompozicijo in eksplicitno komunikacijo, zaradi česar so primerni za specifikacijo komunikacijskih protokolov. Najvažnejša ideja pričujočega dela je ločitev pojma modula od pojma cilja, tako da lahko vsak modul sodeluje v več ciljih (sestavljenih modulih). Jezik Hornovih stavkov z vzporedno/zaporedno kompozicijo atomičnih dogodkovnih in nedogodkovnih ciljev smo dopolnili z novimi sintaktičnimi elementi, ki v luči nove izvedbene semantike omogočajo bolj jedrnato specifikacijo komunikacijskih protokolov, posebno tistih, pri katerih so potrebne številne operacije na posamezni zapleteni podatkovni strukturi. Jedrnatost dosežemo s temeljito izrabo možnosti, ki jih nudi struktura sestavij enih modulov, ki je ponavadi precej preprostejša kot sintaksa atomičnih modulov. The basic object paradigm of Prolog-type languages is creation and deletion of modules. Some languages of the family (e.g. Delta Prolog) introduce parallel/sequential composition and explicit communication, what makes them suitable for specification of communication protocols. The main contribution of the paper is separation of the "module" concept from the concept of "goal", so that a module may participate in several goals (compound modules). Some syntactic enhancements have been proposed for the language of Horn clauses with parallel/sequential composition of atomic event and non-event goals, which in the light of the new operational semantics provide for more concise specification of protocols, particularly those requiring multiple operations on a complicated piece of data. The core idea of the new language is full exploitation of the structure of compound modules, which is usually much more simple than the syntax of atomic modules. 1. Introduction The basic idea behind languages of the Prolog family is to find solutions to a problem (goal) by its reduction into more and more trivial subproblems (subgoals). A Prolog program, [4], is a set of universally quantified first order axioms (Horn clauses) of the form A:- Bi.Ba,...,B„ where the ft and the B's are atomic formulae, also called atomic goals. A is called the clause's head and the B's are called its body. The computation proceeds by selection of a goal Al from the current conjunctive goal (Ai.Aa.....Am), which is then reduced with a selected clause A' :- B. ,B=____,B.. where A and A' must be unifiable via the most common substitution e. The reduction step transforms the current goal into C Al.....Ai_i ,Bi.....Bw,Ai»».....A„)e . In the process of unification, variables of the initial goal some of the are assigned values, which constitute ■ the output of the computation. The computation terminates successfully, when the initial goal is reduced into an empty goal, but may terminate unsuccessfully, if no further reduction is possible, or not terminate at all. Several successful computations of a program may exist, resulting from various selections of clauses for reduction . Graphical representation of a Prolog program is an AND/OR tree with AND nodes modelling composition of goals into a clause body and OR nodes enumerating the suitable clauses for reduction of a particular goal. Several goals can be reduced in parallel (AND-paralle 1 ism) and several alternative solutions searched for in parallel (OR-parallelism). True concurrency is allowed, if atomicity of reduction steps is preserved. The inherent AND-para11 e 1 ism of Prolog programs makes them suitable for operational specification of communication protocols. An AND subtree of the AND/OR tree models a particular execution of a system, while the search of the entire AND/OR tree represervts verification of all ■ possible behaviours of the system. Note, that logic programming is also suitable for axiomatic specification and verification of communication protocols, but the paper does not deal with this aspect. The language has two major deficiencies: First, by introducing RND-paralleliam, the execution order is controlled by the goal-subgoal relation only, ao it is difficult to describe sequential protocols. Second, communication between goals is implicit and asynchronous via coimion variables, while partners in communication protocols are usually loosely coupled (not sharing any variables). To solve the first problem, many Prolog-type languages (e.g. Delta-Prolog (DP) [6,7]. Concurrent Prolog (CP) [5], M-Prolog [9]) maJ bl(RS.A c;{LS.A d)#M; (event goal - true; reduction state - no-reduction)# execution-ordering relations: 1.composition operator: ((a), (alb), (a;b;c), (alblcid)) < {(b), (c), (d)-, (bic), (c;d), (bicid)) 2.composition operator: <(c), (d)) < {(bIc), (albic), (bicId), (alblcid)) 3.composition operator: ( (a) , (b) , (c) > < ((d) , (cid) . (bIcId) , (alblcld)) ignored relations: < (bXXalblcId) , (cXXalbIc), (cXXalblcId) , (dXXalbIc), (dX Xalbl eld) > Fig.2: The execution-ordering role of composition operators. A compound module may be a non-exclusive or an exclusive composition of modules. The nonexclusive forms of the sequential and the parallel composition operator are I and II. while their exclusive forms are / and //, respectively. Each module of.an exclusive composition of modules is attached a set of goals (drawn from the set of all goals of the node) representing the guard of the module (see section 5 and Fig.3 for an example). body: (((a#M: (reduction state - pending; reduction type - weaK-common)# lb#M: event goal - true* ) I c ld#M: event goal - true* )((ll)M] // (e#M: (reduction state - pending; reduction type - weak-common)* If ig :h#M: event goal - true* ) // (i#M: (reduction state - pending; reduction type - wea)<-common) * lj#M: event goal - true* ) )#M: reduction state - no-reduction; WM: event goal - true* scenario : execution of event goal (((alb) lc!d)//(eiflg;h)//(i:j) ) -> ((alb)lcld) not ready for selection, (elflgih) and (ilj) ready for selection -> the node transformed into (elflgih) or into (ilj) -> execution of event goal (h) (or event goal (j)) Fig.3: An example of a guarded command. After the guard of a module has been executed. the next operation on the module may only be its selection for further execution or its deletion from the system. Several modules with executed guards may exist, but exactly one of them is selected non-deterministically and the entire exclusive composition of modules replaced by the selected module, which from that moment behaves like an ordinary, module. Because guards are regular processes of a system and one of the modules in exclusive composition disrupts the others, this is a model of process disruption, more general than the one of LOTOS. 3.3. Exacution of Rsductlon Goals In DP, a reduction goal is executed either by the ordinary type of reduction (reduction of a goal into more and more trivial subgoals). or by participation in an event as exactly the whole event goal. In our language, a reduction goal can also be executed in event, where it is just a submodule of the relevant event goal. Hence, according to this criterion, there are three types of reduction. 1. On-the-apot reduction is the ordinary type of reduc€ion and could serve for specifying an internal process of a node. It may be non-trlvlal or trivial. Reduction of an atomic module is non-trivial, as it potentially creates descendants in the architectural tree. Reduction of a compound module is trivial, as it is just an observation that all the reduction goals within the module have been executed. 2. Strong comnon reduction takes place, when a module is a reduction goal and an event goal at the same time (the DP-type event goal). When the event goal is executed, the reduction goal is executed, too. The adjective "common" steams from the fact that the participants can execute the reduction as a conwon action, without any of them executing the reduction on the spot. Common reduction could serve for exchange of values of any origin. 3. Weak coiiison reduction is like strong common reduction, but the reduction goal may also be just a submodule of the relevant event goal. To .facilitate observation of final (exit) results of modules, we introduce a fourth type of reduction, which is a weak common reduction with some additional requirements: which one contains a tion goal. reduction spot" or 4. Observed reduction takes place, when a reduction goal participates in an event, in of the participating event goals submodule, unifiable with the reduc-That submodule must be an executed goal with reduction type "on-the-must have been unified with such a goal in one of the previous events. In this way, the node does not have to execute the reduction goal on the spot (that might be a difficult operation, if the event goal is atomic), but just gathers the necessary results by observing someone, who has already executed a matching goal on the spot or has learned the results from another node. Observation of exit results is important from several aspect: First, it can strongly reduce the execution effort. Second, it can reduce non-determinism by forcing various nodes to accept the same solution to various incarnations of the same problem. Third, it could serve to implement monitors of overall system activity. Fourth, the concept of exit results is another step towards LOTOS. On-the-spot reduction may be thought of as being executed in the node, containing the reduction goal, observed reduction as executed in another node and common reduction as executed in the space between nodes. Observed and common reduction are treated as trivial, as they do not create descendants. At the time of its creation, each module is assigned its reduction type and state. The possible reduction types are the four types, declared above. The possible states are "executed", "pending" and "no-reduction". If a module is a reduction goal, its initial reduction state is "pending" and its initial reduction type may be any type. If a module is not a reduction goal, its initial reduction state is "no-reduction" and its reduction type is "weak-common". When a reduction goal is executed, its reduction state is set to "executed". If reduction type of a reduction goal is "strong-common", the module is an event goal by definition. If reduction type of a reduction goal is "observed" or "weak-common" and the module is not a submodule of any event goal, it is an event goal by definition. Implicit modules are never able to propagate exit results of an on-the-spot reduction, while explicit modules are always able to do that. When created, reduction goals with the reduction type "on-the-spot" are assigned unique reduction identifiers. Reduction identifiers of other modules are undefined, until they begin to propagate results of an on-the-spot reduction. In that case, their reduction type and state are set to "on-the-spot" and "executed" and their reduction identifier is set to the identifier of the reduction they propagate. Reduction identifiers have been introduced to distinguish among various incarnations of a procedure and to facilitate specification of events with a limited number of active roles, in which the participating event goals may enroll (see section 5 for the example in Fig.7). Each atomic reduction goal with reduction type "on-the-spot" is attached a predefined or user-written procedure for unification with clauses' heads. Similarly, heads are attached procedures for unification with reduction goals. Such procedures may be treated as sets of constraints. A necessary condition for reduction of a reduction.goal with a particular clause is, that their proposed constraints can be satisfied simultaneously. The reduction is executed exactly according to the constraints, proposed by the goal or the head. The default unification procedure is the most common substitution. simultaneously. The event is executed exactly according to the constraints, proposed by at least one participant. When a group of event goals is ready to execute a common event, the pending event is created in the system as a free module, which may (or may not) later be executed (deleted from the system). Each of the participating event goals (according to its synchronization requirements) may be executed simultaneously with the event or before the event, but never after the event. Event goals remain formal participants of an event, until the event has been executed, even if they have already been executed or even deleted from the system. If not forbidden by the existing participants, new participants (sometimes even an unlimited number . of them) may join with time. In that case, a participant, which has not requested an immediate execution, can not be executed while new participants could potentially change its execution results (e.g. if they could assign some of its remaining variables). Regardless the type of the execution procedure, an event must mandatory execute all reduction goals, that are submodules of the participating event goals, and must not introduce any new tight coupling of nodes. We propose to classify requirements, posed by execution procedures, into those considering 1. the number of participants, ' 2. timing relations (e.g. synchronization, de lays), 3. relation between the state of the participants before and after the event, and 4. potential side-effects. The proposed defaults are: any non-zero number of participants, full synchronization (all event goals executed simultaneously with the event), no special side-effects and the third relation defined by the following unification procedure : The procedure first tries to make the participating event goals unifiable via substitution, together with a legal distribution of roles. If it succeeds, the event goals are unified via substitution and their pénding reductions . executed. The exclusive • and the non-exclusive version of composition operators are treated as equivalent. To make the event goals unifiable via substitution, the procedure may apply to them the following transformations, which are not visible after the event: 3.4. Execution of Event Goals An event goal can execute, if it meets a group of suitable event goals. Execution must be fair in the sense that an event goal, which is ready to execute, must not wait indefinitely, if suitable groups keep occurring, and must be allowed to join a group, which is able to accept it. If there is more than one suitable group, the event goal selects between them non-deterministically. While an event goal is waiting for execution, its variables might be getting assigned by other goals, so its selectivity improves with time. Each event goal is attached a predefined or user-written procedure for its execution. A necessary an sufficient condition for a group Of event goals to realize an event is, that their proposed constraints can be satisfied - permutation of modules in parallel composi-.tion, - grouping of modules (creation of explicit modules for the time of the execution of the event). The new modules are neither reduction nor event goals and are unable to propagate results of an on-the-spot reduction. The first transformation type supports the idea of using parallel and sequential composition operators for data ordering and reflects the fact that modules in parallel composition are not ordered. The second transformation type facilitates structured observation of unstructured data. Usually, an event goal (EG) can be transformed in several ways to meet the requirements. In that case, the selection between the transformations is non-deterministic and the procedure acts as a generator of permutations of modules (e.g. Fig.4). 1.EG: (A!IB) - ready to receive data into A and B 2.EG: (al!b) - ready to send data-items a and b possible transformations before unification and the resulting EG: l.EG 2.EG l.EG after unification A B 1. (AI;B) (ai:b) (al lb) 2. (Al IB) (blia) (blla) 3. (B1 :A) (al:b) (b! la) 4. (BIIA) (bi:a) (al lb) Fig.4: An event, which does not preserve the order of data. When the event goals have been made unifiable via substitution, sets of corresponding modules can be identified (e.g. Fig.5). We are interested only in the explicit modules of the event goals (the event goals themselves are treated as explicit modules). 1.EG: (al(blICIId)) 2.EG: (al(X!!ciId)) sets of corresponding modules: ((a),(a)>; {(b),(X)>; ((C), (O); ( (d) , (d) ) {(bl IClId),(XIIC:Id)}; { (al (b!IC;Id)),(al(XI lei Id)) ) Fig.5: An example o£ sets of corresponding modules. differs from the default procedure for unifying atomic goals with clause heads only in the way of unifying variables, which remain unassigned in the event: The corresponding variables are not unified into a single variable, but retain their identities to prevent tight coupling of loosely coupled modules. The modules of the event goals, which have a corresponding module with the reduction type "on-the-spot" and are able to propagate results of an "on-the-spot" reduction. are assigned this property. 4. The Problem of Verification The ease of verification of specifications in the new language depends on the nature of procedures for execution of goals. For the case of the proposed default procedures we provide some basic guidelines, how clauses of the language could be converted into the familiar and widely treated form with just atomic event and non-event goals, the classical parallel and sequential composition, guarded sequences of goals and synchronous events, which require just pure unification. The behaviour of a node can be represented as a set of possible execution sequences of "on-the-spot" reduction goals and event goals. If a reduction goal is executed simultaneously with an event goal, it is not represented separately. As goals are not executed more than once, the set is finite and so are the sequences. Hence, they can be specified with the classical composition operators and guards. Each event goal is then replaced by an OR composition of all its forms, that can be generated by grouping and permutation of submodules. {^hanging any term into an atomic goal is just a syntactic operation, but an exotic component of the language still remains, namely the procedure for execution of event goals. A distribution of roles between the participating event goals is legal if the distribution of reduction types, states and identifiers of the corresponding modules is legal for all sets of corresponding modules. We define the procedure for checking the distribution for a particular set of corresponding modules from the point of one of the modules of the set. The distribution from the aspect of each module of the set must comply with the following rules: 1. If the reduction type of a module is "no-reduction", any distribution is legal from the point of the module. 2. If the reduction type of a module is "on-the-spot", the corresponding modules must not have this property, unless they have the same reduction identifier. 3. If the reduction state of a module is "pending", the required reduction must be trivial . 4. If thè reduction type of a module is "observed", there must exist a corresponding module with the reduction type "on-the-spot". 5. If the reduction type of a module is "strong-common" and its reduction state is "pending", the module must be a whole participating event goal. If the distribution of roles is legal, the event goals are unified by a procedure, which The problematic part of the proposed default execution procedure is the role distribution checking part. It involves checking and setting of the three implicit variables, associated with each submodule of the participating event goals: the reduction type, state and identifier. When changing an event goal into an atomic goal, its modular structure must be retained, so that every submodule can explicitly be attached the three reduction variables. As the values of the variables are passed between goals, every variable must have its input and its output copy. Analogously, each atomic non-event goal must be attached a variable for generation of its reduction identifier. 5. A Simple Form of the Language and Some Examples An elegant and detailed syntax for the language is beyond the scope of the paper. To be able to provide gome examples. just a very simple form of the language is proposed informally. A specification is a set of Horn clauses the following conventions: with a) All composition operators (I, II, /, //) should be used as infix operators. If all types of composition operators are treated as one, a clause's body is a hierarchical sequence of modules. For each composition operator it is obvious, which is the sequence, it helps to create. Each module of a sequence is explicitly or implicitly followed by its belonging composition operator. The presence of a composition operator may be implicit, if it belongs to the last module of a sequence and no comment needs to be attached to it. If there is a comment, attached to a module, it may (from the aspect of the syntax) also be treated as attached to the belonging composition operator. In a comment, attached to a composition operator, various subsequences of the body can be defined, relatively to the position of the operator, with the following syntax: B: the body. Mi the module, belonging to the composition operator. 3: the sequence, created by the composition operator. S(n)i n:(0),1.2..: S(0) -S. S(n+1) is the sequence, to which S(n) belongs as the rightmost element of its left subsequence. LS(n); the left subsequence of the sequence S{n). The left subsequence of S is the subsequence to the left of the composition operator. H3(n): the right subsequence of the sequence S(n). The right subsequence of S is the subsequence to the right of - the composition operator. (nin)Xi the subsequence of a sequence X, starting with the n-th element and ending with the m-th element of the sequence X. The constant s denotes the size of a sequence X. Note: If X is a sequence with a single element, (11)X denotes the first element of the element, not the element, and (mn)X denotes a subsequence of the element. Sequences with a single element, which is again a sequence with a single element. are forbidden. b) Sets of modules, referred to in comments, may be constructed by intersection (.), union (+) and difference (\) from the following simple sets: X: the set of all modules, belonging entirely to a sequence X. WX: the module, which covers exactly the whole sequence X. UX: the set of all modules, containing at least a part of a sequence X. E: the set of all explicit modules of the body. I: the set of all implicit modules of the body. A: the set of all atomic modules of the body. C; the set of all compound modules of the body. G; the set of all modules of the body, which are goals. RG: the set of all modules of the body, which are reduction goals. EG: the set of all modules of the body, which are event goals. c) Each explicit module may be followed by a conroent *...#, declaring the non-default properties of sets of its submodules and itself. If a property of a particular module is defined in a conment. attached to an explicit module, and again in a comment, attached to one of its explicit submodules, the first declaration is ignored. All specified sets of modules are implicitly in intersection with M. The non-predefined properties of modules are: to be a reduction goal, to be an event goal, the reduction type and, if the module is an event goal, the required number of participants of the event, in which it will be executed. d) Each composition operator may be followed by a comment <..), enumerating some execution-ordering relations in the form S1. - Guards: [A.RG.(ll)M], if the module is compound, or [RG.M], if the module is atomic. system:- sender 11receiverl: Ireceiver2. sender:- ((waitl:lwait2)#A: (event goal - true: reduction state - no-reduction; participants - 2)# : proces3l(X,Y) ) . processKX.Y) :-. receiver2:- ((a(X):;b(Y) )#WM: (reduction type -strong-common ; reduction state - pending); A: reduction type - observed* ! () wait2*M: (event goal - true; reduction state - no-reduction; participants - 2)* ;{LS process! process!:-. ) . active2:- (( a(X) lla(Y)#M: reduction type - observed* llb(Z)*M! reduction type - observed* )#WM: event goal - true* 1{LS process3 ) . processa:-.......... Fig.7: Distribution of data from several sources and the concept of roles. Example in Fig.7: A synchronous event' is specified, involving collection of data-items from several sources, merging of data into a compound message and its dissemination to all modules of the system, active! and actlve2 will wait for each other to execute the first event but will not wait for the passive observer if Its event goal is created to late. If the event was asynchronous, allowing an unlimited number of participants, the passive observer could receive the message regardless of the execution speeds. There are three roles in the event (a, a and b), the first played by aotive2 and the others by active!. sender:- (Addres3#M: event goal - true* ;(LSo reviewed for possible publication In one o1 the ISMM journals: International Journal of Mini and Microcomputers, and Microcomputer Applications. INTERNATIONAL PROGRAM COMMITTEE G. Rabbat, General Chairman U.S.A. M. Kabuka U.S.A. V. Oklobdzija U.S.A B. FurtiL Program Chairman U.SJV. P. Liu U.S.A. 0. Pettovk: U.S.A. P. Alpar U.S.A. E. Luque Spain A.M.Salem Egypt M. Carapic U.SA N. Marovac U.S.A. B. Soucek U.S.A. R. BIsianI U.SA G. Mastronardi Italy W.V. Suhhnra/o U.S.A. E. Fernandez U.S.A. J.D. Meng U.S.A. D. Tabak U.S.A. 0. Gulch U.S.A V. Milutinovic U.S.A. t^. Tapia U.S.A. M. Hamza Canada D. Mokiovan U.S.A. J. Urtan U.S.A. C.C. Hsu R.O.C. S.C. Moon Korea F. Vajda Hungary T Ishlko Japan B.N. Naumov U.S.S.R. P. Visuri Rntand M. Vuskovic U.S.A. ADDRESS For correepondenco, submlssloo of extended summaries, and to bo placed on the mailing list, write to: Dr. B. Furht. Director of Advanced Technology. Modoomp, 1650West McNab Road, P.O. Box 6099, Mall Stop 650, Ft. Uuderdale, FL 33340-6099, U.S.A. Please complete and return this form to: ISMM Secretariat, P.O. Box 25. Calgary, Alberta, Canada T3A 2G1 Please serid me information concerning: □ The International Journal of Mini arxl Microcomputers □ Microcomputer Applications Joumal □ The Intemational Joumal of Robotics and Automation □ Expert Systems, Los Angeles, December 1968 □ Computer Applications In Design Simulation and Analysis, Reno, Nevada, U.S.A., February 1968 □ Reliability and Quality Control, Los Angeles, December 1988. □ Send me call for papers to conferences in the following areas:_ THE NORMALIZATION OF RELATIONAL DATABASE INFORMATICA 3/1988 UDK 681.3.06 PROLOG:519.24 Tatjana Welzer Ivan Rozman J0zsefGyörkös University of Maribor After a brief presentation of base and some definitions neded, the aim of the article is to deal with the normalization of relational database.The implementation of normalization process will be shown by PROLOG, the fifth generation language. The ascendancy of this language over the languages of the fourth generation la that the program is not defined as a sequence of steps but as a discription of relations between objects. This enables a logical conclusion in questions that are put in various ways. The built-in database of PROLOG will be exploited as well. Po kratki predstavitvi relacijsko baze in definicij, ki Jih potrebujemo v nadaljevanju, bomo v članku predstavili proces normalizacije relacijske baze podatkov. Izvedbo procesa normalizacije bomo predstavili s PROLOG-om, Jezikom pete generacije. Prednost tega jezika pred jeziki četrte generacije je v tem, da program ne definiramo kot zaporedje korakov, ■temveč kot opis relacij med objekti, kar omogoča logično sklepanje ob različno zastavljenih vprašanjih. Prav tako pa bomo izkoristili tudi PROLOG-ovo vgrajeno bazo podatkov. 1.0 IHTBODOCTION One of the most important modules for various computer applications is database. The database can be a hierarchical database,' a network database or a relational database. The latter is more and more often used instead of the first two databases and is successfully gaining ground on all fields off application. Its advantage is above all in its simple and user friendly transfer from the paper to the computer. Successful work with the relational database can be ensured only by a thoughtful formulation of base. Because of its extensiveness this formulation should be aided by a corresponding tool. 2.0 RELATIOMAL ĐATABASS Relational database is a temporally variable multitude of relations /ALAG84/. R(A1,A2.....,An) is the relation over multitudes Dl,D2,...,Dn if the submultitude of Descartes product is as follows: R a { D1 X D2 X X Dn } D1,D2,....,Dn mean the domains of attributes. The attributes Al,A2,...,An denote the structure of the relation which is called relational sehe 2.1.0 RELATIONAL ALGEBRA Relational algebra is a simple formal language which enables data manipulation /CODD70/. Relational algebra consists of operations over multitudes (union, intersection and difference) and special operation (projection,selection,join and division). For our further work, operation of projection is of main importance. There is the following relation: R(A1,A2.....An). X is a submultitude of the multitude of attributes' Xfi {Al,A2,...,An}, Y is the complement {A1,A2,...,An}/ X. The relation R(A1,A2.....An) can be written as follows; R(X,Y). The operation of projection of the relation R according to attributes X is marked as follows: R[X] and defined: R[X] = {X ) 3y : (X.y) e R(X,Y) } 2.2.0 LOGICAL DEPEHDENCES 2.2.1 FONCTIONAL DEFKNTfEHCK There is relation R(A1,A2,...,An) and submultitudes of the multitude of attributes X s {A1.A2.....An} and Y « {Al, A2, . . . , An} . R[XY] denotes the projection of the relation R according to attributes from X and Y. The functional dependence X —> f exists if and only if it is valid for RtXY] in every moment that there is a fiaictional dependence RfX] --> R[Y]. The functional dependence X —> Y is said to be c««)lote if for every real aubmultitude Xf (X' c X) it is valid that X' -/-> Y. If it is valid that X' —> Y then the functional dependence X —> Y becamea a partial functional dependence. 2.2.2 KKY R(A1,A2.....An) forms a relation. X which is a submultitude of the multitude of attributes is said to be the key of the relation R if and only- if the following two conditions are fulfilled: (i) X determines functionally all attributes of the relation R, X —> Ai for i = 1,...n. (ii) no real submultitude of the multitude X possesses this characteristic, for X' a X X' -/-> Aj is valid l Ai, for i = l,...,n, then the key of the given relation is a complete multitude of attributes A1,A2,...,An. 2.3.0 NORMAL TOBtC Normal forms are rules on the joins of attributes into relations in which logical dependences are taken into account /DATE86/. Taking these rules into consideration the iregularities (anomalisms) of data input, deleting ,and updating are avoid. 2.3.1 THE riBST KOBMAt FORM The relation R is in the first normal fora if and only if the values in the domains are atomic for every attribute A in the relation R. 2.3.2 THS SECOMD HOHMAL FORM Let X be the multitude of all attributes R(A1,A2,...,An), which are not a part of the key of the relation R. It is said that the relation R Is in the second normal fom if and only if each attribute from X is completely functionally dependend on each key of the relation R(Al,A2,...,An). If the relation R(A1,A2,...,An) is not in the second normal form, then their exists a deconposition of the relation R(A1,A2.....An) into a multitude of relations which are in the second normal form. The relations obtained in this way can be united again into a previous relation by means of the operation of natural Join. There is the relation R(A1,A2,...,An) which does not exist in the second normal form. The relation R can be recorded equivalently in the form R(X,Y,Z). In this case X means a multitude of key attributes and Y means a multitude of non-key attributes. X --> Y forms a partial functional dependence. The multitude Z covers all the remaining attributes of the relation B(A1,A2,...,An) which exist neither in the multitude X nor in the multitude Y. The multitude X can be shown by X = X'X''. Then it is valid: X' —> Y. It is a complete functional dependence. If the relation R(X,Y,Z) is supplanted by the projection Bt*Z] and R[X'Y], then the projection R[X'Y] Is in the second normal form because X' —> Y forms full functional dependence. It should be found in. which normal form the projection R[XZ] exists and, if necessary, this projection should be decomposed in the same way as R{X,Y,Z). The procedure is final because after each decomposition of relation the relations with less number of attributes are obtained. The previous statements can be confinned by the following demonstration: R[X'Y] *x' R[XZ] = R[X'Y] *x' R[X'X"Z] = = R[X'YX"Z] = R[X'X"YZ] = R[XYZ] = R(X,Y,Z) 3.0 APPLICATION 07 PROLOG IN TH8 NORMALIZATION PROCES 3.1 NOTATION OF RSLATION IN PROLOG The description of structured of individual relations is presented by a relational schema. To model our relational schema the structured analaysis tools of DeMarco /DEMA79/ and Gane and Saraon /GANE79/ (data flowcharts, data dictionary, data store) were used. The result of modeling is the relational schemas wich are used for data storage by the relational database management system. The relation (the relational schema filled up with data) exits, depending on the choice of method in the first normal form or unnormalized. The tables obtained were inrespective of their normal form, stored, in the form of PROLOG structure. PROLOG'S built-in database ensures a basic mechanism for data storage and data access. The notation of relation, that is of the whole relational base is a simple one. The data obtained from a relation are record in the form of PROLOG'S facts, consisting of predicates and attributes. The name of relation is written in predicate; the values of attributes obtained from relational scheme are written in attributes. After the input of all data into the relational schema we can see that there is a record on the screen of the terminal which is equivalent to the record on the paper. This means that copying the relation from the paper to the screen is 1:1 (one-to-one). 3.2 IMPLKMKNTATION OF PROJECTION BY MEANS OF PROLOG The table into which the required columms were translated and in which the redundant lines were deleted is the result of operation projection. ' The presented relations are described by means of PROLOG and in this, way the program implementing a projection of suitable relation is designed. * Program Projection * proJection(List_of_solutlons,Solutions): -flnd_equal(List^of_solutions,Solutions). find_equal([],[]). find_equal([HIT],Solutions): -member(H,T), find_equal(H,Solutions). find_equal([HIT],Solutions):-not_meraeber(H,T), write(T), ni, find_equal(T,[HlSolutions]). member(X,[]):-!. memeber(X,C_1YÌ):- meraeber(X,Y). not_memeb0r(X,[]):-! . not_memeber(X,[YIZ]):- X \== Y. not_memeber(X,Z). f indalKX, H,_) : - asserta( found (mark) ), call(H), ass©rta(found(X)), fail. findall(_,_,L);- colleotlfound([],M), I i'= M. collect_found(S,L): - getnext(X), collect_lound(Ij,L). collect_found([X1S] , L) . getnext(X):- retraot(found(X)). [ x'\== mark. In the working version of the program Projection the Implementation of the operation is released by the predicate findall and projection. ?-findalK[cho3en_atribute3*], name_of_relation*(all_atribute3*),Solutions)), projectlon(Solutions,M). In the relation chosen all possible solutions are looked for, first. Then in the list of solutions (List_of_3olutions) all redundant lines are excluded so that equal records (find_equal) are looked for which are not placed (not_member) on the list of final solutions (Solutions). 3.3.0 CHSCKIHQ THK HBLATIOH IH THK LiaHT OF ITS NOBHAL rOSH 3.3.1 ONN(»iMALIZSD RELATIONS According to the definition from Chapter 2.3.1, the relation exists in the first normal form if and only if the values in domains are atomic. That is the values in the domain are not lists or sets of values or composite values. In practice such records are found very often. If there is an unnomalized relation over wich we want to perform certain operations, then the relation should be translated into the first normal form. For the normalization of such an table the following is required: unnormalized - to check the existence of redundant lines and to exclude them, - to find out whether the values of individual attributes in the domain are recorded as multitudes or lists. If such records exist, they should be translated into a corresponding form. The program of record in PROLOG is based on checking the elements in the structure of list into which the previously written relation has been translated. When the number of elements in individual lists is found out, the paralel lying elements are joined into lines which are then transmited to the screen of the terminal in their normalised form. * In the operation ohosen_atributes, name_of_relation and all_atributes are substituted with the real names of atributes and relation. * Program Normalization * ' normalization(A); - A == tab,!. normalizBtion(A): - nonvar(A), A \== tab, A =.. X, write(A), write('.'), nl, change(X), read(Al), normalizationC.Al). norraalization(A): - read(Al), normalization(Al). change([H|Tail]):- P = H. 3plit(P,Tail,List_of_goal3). split(P,Tail,List_of_goala): -count_arg(Tail,N), count_el_arg(Tail,K), [HlT]=Tail, Join.rest ( [H|T],N,1,S,K,1,1,ist_of_goals ) , form_goals(P,G,List_of_goal3). count_arg([],-1). count_arg([GIT],N) count_arg(T,Nl), N is Nl + 1. count_el_arg([H,[HI 1[]]IT],1). count_el_arg( [H, [Hl'.X] IT] ,K) count_el_arg([H,X!T],Kl). K is K1 + 1. Join_rest(_,_,_,S,K.M,Sl) M2 is K + 1, M2 = M, rever3e_list(S,0), S1=0,!. join_re3t(Tail,N,Nl,LÌ5t_of_soals.K,M,Sl) :-join_el(Tail,[],N,N1,M,S), Ml is M + 1, join_ro3t(Tail,N,l,[S|List_of_goals],K,M1,S1). form_goals(_,_,[]) :- I. form_goals(P,H,[HI ITI]) :- reverse_list(Hl,H2), X =..[P,H.H2], tab(30), write(P), write('('),wrlte(H),copy(G2),write(').'), nl, form_goal3(P,G,Rl). copy([]) ! copy([G!R]) write(','), write(H), copy(T). joln_el(Ll,L2,N,Nl.M,List) ; - N2 is N + 1, N2 = Nl, List = L2,I. join_el([HlT],T1,N,N1,M,S) append_link(T,Nl,M,T2), N2 is Nl + 1, Join_el([H|T],[T2|T1],N,N2,M,S). append_link(T,Nl,M,X) : - n link(Nl,T,Arg), n_link(H,Arg.X). n_link(l,[H1T],C) C = H, !. n_link(N,[HlT],C) : - Nl is N - 1, n_link(Nl,T,C). reverse_list([] , [] ). reverse_lÌ3t([H|T],L) ; - rever3e_lÌ3t(T.LI), append(Ll,[G],L). append([],L,L) . append([H|RT,L.[H:T1]) append(T,L,T1). 3.3.2.0 STATING THK SKCOHD NORMAL FOBM In Chapter 2.3.0 we pointed out that in inputting, deleting and updating irregularities can occur if normal forms are not taken into account. An irregular input can prevent to add new lines if all the values for attributes are not known. In deleting the lines the information on certain attributes can be lost while the updating of one attribute value requires a change in all relations where this attribute appears. 3.3.2.1 STATING THK LOCAL AND PARCIAL FUNCTIONAL DKPKHDKNCB According to the definition in chapter 2.2.1, the existence of functional dependence is stated by checking the values of attributes that form the multitudes X and Y, between which-we would like to shate the existence of functional dependence (X —> Y). It is valid that for each value x, x C X there is exactly one y, y e Y. To state the functional existence by means of PROLOG the program Projection is used first to design the relation H[XY]. Then in this relation the condition RtX] —> R[Y], according to chapter 2.2.1 is fulfilled. By means of a modified predicate find_equal from the program Projection equal x's are searched. If they exists then the value of belonging y's we can conclude to state the existence of functional dependence. According to Chapter 2.2.1 the functional dependence can be a full or a partial one. To state this characterictlc the multitude atribute X should be decomposed into real submultltudes (X', X" , X" . Then the existence of partial dependence between the real submultltudes (X', X", X'",...) and the multitude of attributes Y should be checked according to the procedure described. A rule to decompose the list (multitude X) into sub-list or elements (real submultltudes of the multitude X) should be added to the program in PROLOG. The fifth .generation language PROLOG was chosen because of its simple copying of relation into the structure of PROLOG'S facts and definition of rules (records of program) which Implemented certain actions within the normalization process. To bring the application nearer to the circle of potential users (also to those possessing no knowledge how to program) the application will be transfered to a Personal Computer by means of operation system DOS (TURBO PROLOG Borland, Inc. will be used). In this development phase, the application offers above all an aid for good design of relational database which provides the existence of auccessfull Information system. 5.0 LITKRATDRK COOD70 E.F.Codd: A Relational Model of Data for Large Shared Data Banks, Communication of the ACM, Volume 13, No.:6, June 1970 CLOC84 W.F.Clocshin, C.S.Hellish: Programming in Prolog, Springer-Verlag, Berlin 1984 DKYI84 Deyi Li: A Prolog Database System, Research Studies Press LTD,1984 DATE83 C.J.Date: Database: A Primer, Addison-Wesley Publishing Company, 1983 DATE86 C.J.Date: An Introduction to Database Systems, Volume 1, Addison - Wesley Publishing Company, 1986 KELL87 R.Keller: Expert System Technology Development and Apppllcation, Yourdon Press, Prentice-Hall Company Englewood Cliffs, NJ 1987 HARC86 C.Marcus: Prolog Programming, Addlson-Wesley Publishing Company, 1986 WAH86 B.W.Wah, Guo-Jle Li: Tutorial: Computers for Artlflcal Intelligence Applications, IEEE 1986 3.3.3 HORMALIZATIt» OJ RELATION INTO THK SKC(»n) NORMAL FORM The relation which was found out that it was not in the secon normal form should be decomposed into several tables that would meet the condition on second normal form. According to the definition in Chapter 2.3.2, the relation R(A1,A2,...,An) is decomposed into two tables S[XZ3 and HIX'Y] which form the result of the projection. The relation R[X'Y] exists in the second normal form because the following condition should be met: X' —> Y forms full functional dependence. To normalize the relation into the second normal form given programs for projection and full functional dependence are used. To check the relation according to its third normal form similar atepts (required for the third normal form) should be carried out. 4.0 OONCLDSION The described process of normalization in PROLOG is performed by US PROLOG on the main frame computer VAX 8800. The local information system of research group was chosen as a model. The data on research group members, their activities, working results and the tools used by the member are recorded. A SIMULATION APPROACH BEFORE USING THE INDUSTRIAL MICROCOMPUTER CONTROLLER UDK 681.326.06:519.876.5 Anton Zorman Maksimiljan Gerkeš Viljenì Žumer Krista Rizman Tehniška fakulteta Maribor In this paper we describe a simulation packet that enables the verification of the software portion of the controller before implementating the controller on a real object. This program is unique of its kind, as far as we know, because it enables the examination of the controller's behavior in planner's workplace and so considerably reduces start expensés. The simulation packet enables controlled execution of the user's program, clearly arranged writing out of data on the screen or on the printer and gives a chance for data modification. SIMOLAGIJSKI PRISTOP PRED UPORABO INDOSTRIJSKKQA MIKRORACDNALNISKEGA KMIILNIKA. V članku opisani BÌaulaciJski paket omogoča yerif ikacl.lo programskega dela krmi Ha pred vgraditvijo krmilnika na objekt. Po nam znanih podatkih Je to edini tovrstni program, ki omogoča preizkus obnašanja krmilja na projektantovem delovnem mestu in s tem znatno znižanje zagonskih stroäkov objekta. Sisulaoijski in pregleden lapis vrednosti na zaslon ali na tiskalnik in podatkov. 1 Initial oonsiderations about the industrial microcomputor oontroller and It's oinulation Requests for a system which upgrades standard programmable controller functions came from industry. Initial efforts were made by Metalna, Maribor. After it's definition phase the project was supported by the Research Society of Slovenia (Raziskovalna Skupnost Slovenije). Intention and practical use of the industrial microcomputer controller The controller is intended for control in capital equipment facilities plants, where heavy environment conditions and the immense equipment costs, do not allow any compromise. A number of unique functions were built in the controller to obtain the required functionality. Special attention was dedicated to the user's program - control application development and verification tools. The paper decribes a unique part of the user development and verification software which allows controlled application verification at the planner's workplace. This function reduces starting expenses when a capital object is put into work. With convenient tools, software design methods and simulation, most of the mistakes, bugs and imperfections of the controller's software are discovered and removed before implementation on an object. Thus, the simulation of the controller's software can be carried out in different ways. Module simulation is specially efficient. It allows that only verified software blocks are put together into larger structures. Typical software modules are functions and sobroutines like structures in high level language, and assembler like macros. Simple use of the simulation packet is assured with it's hierarchical tree structured menu. The user selects from the menu on the screen the actions to be executed. Each action is determined with a function key on the keyboard. The user selects the desired action by pressing the adequate function key on the keyboard. Figure 1 shows an example of this principle. N E r « L U • Rirlbor I K 0 U 9 T R I « I CONTROLLER S 1 n U L « T I 0 N Fl F8 SIHULATION EHO Of 81KU.«TI0II Fig. 1: The initial simulation menu. After selecting the adequate menu's window of a selected action, it lights up in yellow colour. This light is an advertisement for the user to notice which action he had selected. In the same way, the simulator advertises the user when he returns back over the menues. If there is no special, objective reasons, the selected action is executed immediately. The user can present his program for the controller eitheir in a graphic form, the so-called coatact networks, or in textual, mnemonic form. The user must call the analyser before applying the simulation of his program. The analyser is a kind of compiler. It was designed for this special purpose: it translates the user's program together with the declaration module and possibly with some other files for functions or subroutines into the 'object form' which is 'understood' and executed by the simulation, when requested. The simulation can be executed only when the analyser does not find and report any errorCs) in the user's program file, nor in the declaration module's file. A example of both files is on Figure 2a and Figure 2b. MAIN SET RESET BP ADD SÜB MUL W17 = DIV BP AND CPL NEG BP RLC SLC TRANS TRANS Q = JPQ NOP 33 L237 M21 BP NOP BP END. Ml M2 6 CB12, CW7, CL323, CW17 CWlll, 9 W16, CB12, CB12, 10 CL328, CBH5. CB328, .CW8, CL818, CW71, W17, B12 B13 65, 5, B1 W16 L234 W12(W17), W20 W19 L235 B235 L236.7 M250 CB115.3, 3, M300, 100, Ml 33 = L236 = N ( (Ml A M2) 0 (W16 LT CW87) ) 20 25 CL215 CL287 CL300 CL328 CL818 ENDCONST lOSPEC MODI is M0D2 is M0D3 is M0D4 is BLOCK - 215 - 287 - 3000000 - 328000 - 818000000 TY31 TY31 TY31 TY31 CS 11, YES, 70 C 11, M6. M7. M8, M61,M62, M63. CS 12, NO. 80 C 12. M6, M7, M8, M9, MIO, Mil,. CS 13. YES, 90 C 13, MIO, Mil, M5, M6, M16, M17, TS 12. 10ms, YES. 999 T 12, M2, M29, M3, - TS 11. 100ms, NO, 50 T 11, Ml. M2. M3, M4 TS 13, 1ms. NO, 100 T 13. M3. M4, M2, Ml TXS 23. READ. 2, "START" TX 23. M22. M3 TXS 24. WRITE. 2. "O.K.' TX 24, M21. M3 NÜMWRITE, 2: TXS 25. ,3333 TX 25, M20. M3 TXS 28, NUMREAD, 2 , L338 TX 26, M26. M3 MS 13. 100ms, HO. 333 M 13. M2, M20 MS 14, 10ms. YES, 238 M 14. M3, M27 MS . 15, 100ms, NO, 669 M 15, M27, M84 DS 8. Is, 11. 8. B D 8, M2, M32. M33 DS 16. Is, 18. 16, W D 16, M25. M26. M37 DS 32. Is. 13. 32, L D 32. M2, M21. M30 RS 16. FIFO, 22, L R 16. M2. M24. M32 . M41, M52 RS 17, LIFO. 30, B R 17, M2. M25. M35 , M43, M63 RS 18, FIFO, 20. W R- 18, M3, M55. M55 . M53, M57 Fig. 2a: The user's program (file TEST.MPR) ENDBLOCK ENDIO END. Fig. 2b: The declaration module (file D2.DCM) DECLAR CONST CBIO CB12 CB115 CB119 CB123 CB321 CB328 CB378 CW17 CW71 CW73 CW78 CW87 CWlll CW200 CW312 CH419 CW788 CLO CL5 CL46 CL49 CL64 CL175 CL200 <- 10 <- 12 <- 115 <- 119 <- 123 <- 30 -<- 32 <- 37 <- 17 <- 71 <- 7300 <- 78 <- 87 <- 111 <- 2000 <- 312 <- 8841 <- 788 <- 0 <- 5 <- 46 <-49 <- 64 <- 175 <- 2000000 NOTE The user does not need to write the file type (MPR for user's (or main) program or DCM for declaration module), because special purpose editors do this. File types are always hidden from the users ! Fig. 3a: Reading a name of the main program. After all neccessary files were translated, the simulation establishes the presence of error(3) very simply. If the analyser finds any error(s), then it does not produce the object file, which is a direct input to the simulation. In case of an error the simulator writes a message on the screen. In this message it tells the user that he can not execute the simulation because the error(s) 18 is(are) found and that the user can correct the error(s) in a corresponding editor. The program SIMULATION firfst of all reads the name of user program's file (or main program's file) and the name of the declaration module. Figures 3a and 3b show the user's answers to both questions. Fig. 3b: Reading the .name of the declaration module. After successful return from the analyser and before the simulation execution, the simulator writes a detailed report about constants and function blocks used in the declaration module (Figures 4a and 4b). C 0 N 8 T A K T S 1 6180MI m- ' Fig. 4a: The report about CONSTANTS. If the value of a constant is too large for it's data type, then the simulator assigns the largest positive or negative value to that constant, depended on its sign! The data type of a constant is appointed by the second letter of the constant's name: B, W or L for byte (8 bits), word (16 bits) or a longword (32 bits). The data type identifies how considered as interpretation of an instruction operand many bits of storage should be a unit and what is the of that unit to be. The simulator only recognises the Integer, BCD and ASCII data. An integer can be stored in a bit, byte, word or in longword. Some instructions interpret the integer data as a signed value, while others as a bit strings. I L 0 C K S t Fig. 4b: The report about FUNCTION BLOCKS. 1.1 Representation of a types of data and function blocks The user can use the following types of data: (a) (b) CONSTANTS The user assigns initial values to constants in the declaration module. During the execution of. the simulation the simulator has read only access to it's value. The user can assign a new value to a constant in the later described menues SINGLE CBANOE and ADJÖST EDITOR. The controller's system data are set up by the operating system. The-simulator simulates this function by (c) assigning them values. It can read only system data. The same principle to modify the system data is in valid as for constants. INTERNAL DATA Internal data are general purpose data. The simulator can use them similarly as variables in a high level language: their values can be modified by the simulator. (d) (e) TNPDT DATA Input data are external inputs into the controller. physical Output data are physical from the controller. outputs out We use 'the single asslgnaent rule' for all types of data, because of the simulation of parallel execution mutualy exclusive events. Overview of the controller's data t)rpea The user can use almost all combinations of types of data with data types in simulation. This survey is shown on Figure 5. TYPE TYPE'S TYPE'S DATA DATA OF DATA DATA TYPE'S TYPE'S A DATA NAME MARK NAME MARK SAMPLE CONSTANT DATA: BYTE Constant C Byte B CB18 WORD Constant C Word W CW555 LONGWORD Constant C Longword L CL234 SYSTEM DATA: BIT System S Bit ♦ S12 BYTE System S Byte B SB373 WORD System S Word W SW383 LONGWORD System S Longword L SL947 INTERNAL DATA: BIT Internal * Bit M M991 BYTE Internal * Byte B B3 WORD Internal * Word W W495 LONGWORD Internal * Longword L L952 OUTPUT DATA: BIT Output 0 Bit * 012.13 BYTE Output 0 Byte B OBIO.4 WORD Output 0 Word W OW4.10 LONGWORD Output 0 Longword L OL2.2 INPUT DATA: BIT Input I Bit * 15.13 BYTE Input I Byte B IBB.10 WORD Input I Word W IWIO.O LONGWORD Input I Longword L ILI.3 NOTE Asterisk "*" means that at this place there is no mark! Fig. 5: Survey about types of data. The user has six types of function blocks besides the types of data mentioned above. The function blocks are: (a) nUEB The timer enables temporal control over events in an object. After a certain time delay something can happen, the value of which is programmable. (b) (C) (d) (e) (f) The monostable enables temporal control, too. It generates a pulse of specific duration, the value of which is programmable. The main difference between the monostable and the timer is the following: the user can programmably control the timer through its inputs. After the user had enabled the monostable to start running, he can no longer programmably influence the monostable. Only one exception is allowed: the user can repeatedly start the monostable from the beginning! COUNTER The counter permits the upcounting and downcounting of events. These two operations can be performed simultaneous/ or not, as required. The drum controller enables temporal or event-driven (through its inputs) control: values of output bits of current drum step are assigned to actual bits. The two mentioned modes of operation are mutually exclusive. The register enables storage of data in two different ways: * FIFO stack or * LIFO queue. TEXT The text enables simple input/output operations (communication between the user and the controller). 1.2 Simulation of a user's program execution The simulation receives the user's program merged together with other files in object code on a file. The file has sequential organization. It consists of records arranged in the sequence in which they are written in the file (the first record written is the first record in the file, ... and so on). Particular instruction needs more records. Records of the same instruction are always arranged in this way: a first record contains an operand which will have a result (one or two for division), a following record is a second operand, if it indeed exists in syntax of an instruction. After operands, if the instruction has any, comes the operator. This is an instruction which will be executed. The simulator reads the records in the described regular sequence, too. Simulation of execution is baaed on the principle of stack coBputer. The simulator reads a record from the object code's file. Records are already in correct sequence, in so-called reverse Polish notation. The content of a record is either an operator or an operand. If it is an operand then the ^ simulator pushes it on the stack. If it is an operator then the simulator pulls the corresponding number of operands from the stack, executes the operator (Instruction) and assigns a value to a result. The IMCL (Industrial Microcomputer Controller Language) is a mnemonlg profframmaMe language for our controller. The user can simulate all of the instructions of the IMCL: ARITHMETIC OPERATIONS: (1) ADD - arithmetic addition (2) SUB - arithmetic substraction (3) DIV - arithmetic division PlYlde by sero: The simulator assigns the largest positive or negative value to the result, dependebly on the numerator sign, a zero to the remainder and reports the overflow of the result. The simulator writes the values of condition flags (Negative, Zero, overflow and Carry) on the screen, then follow the messages about the mode of execution and about the current number of cycles reiterations of execution of the user's program. In case of dividing by zero the simulator always breaks execution and writes a message. After the message the user can continue with the execution of his program. He must press the key RON - Figure 6! (4) MUL - arithmetic multiplication BIT OPERATIONS: (6) A - logical AND operation over a bit's expressions (6) 0 - logical OR operation over a bit's expressions (7) N - negation of a bit's expression (8) SET - bit set (9) RESET - reset bit (10) P - protection and assignement BIT OPERATIONS BETWEEN TERMS (8, 16 or 32 bit string's length): (11) OR - logical OR operation (12) XOR - logical XOR operation (13) AND - logical AND operation (14) NAND - logical NAND operation (15) NOR - logical NOR operation COMPLEMENTS: (16) NEG - one's complement 117) CPL - two's complement TRANSFER OF BIT STRING: (18) SLC - shift left (19) SRC - shift right (20) RLC - rotate left (21) RRC - rotate right (22) TRANS - general purpose transfer of bits between bit strings RELATIONAL OPERATORS: NE EQ LT (23) NE - operands are.not equal ? (24) EQ - are both operands equal ? (25) LT - first operand is less than second one (26) LTE - first operand is less than or equals to the second one (27) GT - first operand is greater than second one (28) GTE - first operand is greater than or equals to the second one CONVERSIONS: (29) CBIN - conversion from BCD to two's complement (30) CBCD - conversion from two's complement to BCD CONTROL OPERATIONS: (31) JPQ - jump if Q bit is equal 1 (32) JPnotQ - jump if Q bit is equal 0 (33) JPX - jump if X bit is equal 1 (34) JPnotX - Jump if X bit is equal 0 (35) JP - unconditional Jump The simulator writes a message to the user that the next step will be to execute a labelled program statement corresponding to the label of the JUMP statement. Jump skips the statements between JUMP instruction and this statement I The simulator writes this message only in step-wise mode of execution! CALL OPERATIONS: (36) CALLM - calling a module (37) CALLQ - conditional calling a module MISCELLANEOUS OPERATIONS: (38) BP - break point When the simulator reaches a break point that it is not cancelled out in the user's program, it breaks te execution of simulation. The simulator writes a message about the break point irrespective of the mode of execution: step-wise mode or continous mode. (39) EQUAL - assignement an operand's value to a result (40) NOP - no operation In the step-wise mode of execution the simulator writes only a message that it reached the NOP instruction and reassigns all condition flags to zero. Instructions are orthogonal which means that the user can use the same instruction with different data types. For example: once with a byte, some other time with a longword. Internal types of data, which are longer than one bit, we can address also in index mode and indirect (deferred mode); for example: ADD (W3), W4(>16), W3. In such cases the value of indirectly addressed internal variable tells the simulator on which internal datum (variable) the instruction will be actually executed, or in Index mode of addressing, (indexed variable is within round brackets) a sum of both internal variables' values gives index (address) of actual internal datum. X.3 Representation execution of user's program You can repeatedly execute the simulation of yours program as many times as you like. Every time you can choose one mode from the following modes of execution: (a) more cycles, (b) single cycle, (c) step-wise mode, (d) continous mode, (e) with break point(s) or (f) without break point(s). operand names and values and values of conditional flags (Negative, Zero, oVerflow and Carry). The simulation can start with the following default modes of execution: a single cycle, continous mode and with break points! If the user does not choose the step-wise mode then the entire user's program is executed at least once (depended on the number of cycles -iterations of execution!) without the simulator writing out any message, except if there is a run time error or a break point instruction or a jump instruction! STEP HISE I Ko Nutbtr D? cyclti I 1 CxKutlon tlm t SM u (of oni cyili i) fop zi t h I f i t t Thi progri» li REUI iar tiicution If you «ish HWS COfV of thi icrftn priii ! fl KUN ik i Ä 4 H f7 e5?t Fig. 6: A fundamental menu of simi lation. The user selects either the step-wise mode or the oposite continous mode, with the key STKP WISE (Figure 6). Iha gteo-wiae mada and tha contlnQus mižds are mutually exclusive. A new state is oposite to a previous state. At commencement of execution the default atate is the continous mode, so if the user wishes the step-wise mode, he must press the key STEP WISE (Figure 6). The key more cycles permits to Inscribe value of the number of cycles (Figure 7). Kiubir of cyclii i 5____ It luit bi politivi ind 1(11 thin 32001 t the If you (iih HARDtSPT of tht Krim presi (SHIFT) ! Fl F2 fZ F4 F5 n F7 F8 RUN Wu m w £nr Fig. 7: The user inscribes the value of the number of cycles. The user can cancel out all of the used break points or Just some of them, or gives them active status, if he chooses a menu of break points (the key BREAK POINT), which is shown on Figure 8. Somé modes of execution are compatible with others. The user can, for example, execute the simulation in step-wise mode, with break points and has more cycles. One cycle is one iteration of the user's program execution. BSE« - POmTS 8P5 BP9 BPIO BPJO BP23 The key RUN (Figure 6) enables a commencement or a continuation of user's program execution. The step-wise mode of execution enables the user's program execution step by step, one instruction after another. For particular instructions a message is written on the screen. The message contains rudimentary informations: which instruction is executed. Br«k-point il KOT CMCEI COIOR Mini : 1» ! Brxk-point ii UNCELEt I CA^EL M.1. Ih flU CAÌ ON CL 111 F8 EIIT Fig. 8: a menu of break points. If break point (BP) is cancelled out, then execution of•simulation is not broken! the Before executing an instruction, the simulator verifies if the neccessary operands have values. If they do not have, the simulator calls the user's attention to this fact. The user can choose either to inscribe an initial value to a datum or to confirm a simulation's proposal to assign a zero value to that datum. The simulation enables all inscriptions of digits (numerical data) in: (a) binary number system, (b) octal number system, (c) decimal number system and (d) hexadecimal number system. The user indicates the desired number system by inscribing the first character: B, 0 or H for biliary, octal or hexadecimal number system. For decimal number system he does not inscribe any letter before digits! During the inscription of an integer number, the simulator ignores the prohibited characters. For example: letters that do not have sense for the selected number system, or letters the values of which are larger than the basis of the number system decremented by one. Likewise, the simulator reports an error if the numerical value exceeds the allowed integer interval of datum's data type (a bit, a byte, a word or a longword) . • During execution (depending on the selected modes of execution and menues) the user can make hard-copy of the screen, use ADJUST MODE that permits an overview and adjustment of used data and function blocks, select different modes of execution, cancel out or not cancel out break point(s) and, if he wishes, he can terminate the simulation. This function is enabled by the key EXIT, that always brinaa ua iiilQ the previous mean. The simulation permits the user to repeatedly execute different user's programs or combinations of the same user's program with different declaration modules. 2 An instance of step-wise simple user's program execution of a Figure 9 shows an example of step-wise execution of a simple user's program, the source mnemonic form of which was presented on Figure 2a. We cut off the fundamental menu (presented on Figure 6) in order to spare space. Each message is written above this menu. Temporal order of messages is from top to the bottom of a paper. STEP VtSE : Yn Nuibir o< cyclii ; 3 --------'-'I- , 500 15 Fligi : Excution tiic (of ont cyclt !l Initruction ; SET Rttult(i) STEP ItlSE I Th Nutltr of cycln i 5 Exicution till I SM ii lof out cyclt !l Instruction t RESET Fligi N i V C 0 10 0 Riiultl!) i 112 ! Th( ixKution ol the progni it brtikid it BPS ! STEP KISE I Yet Nuibtr of cycl« i 5 EnKution tlu : SOC •( (of oni cycli ! Initroction i ACD OptrtniKtl FUgt I V 0 0 C63M I 32 fl(iult(i) B1 ! 44 STEP msE Nuitiir Eiicut ISE Ì U, of tyclii I 3 ion titt I 300 OpiriniKil ! FUJI I II ; V C 0 0 0 0 •I (of ont cycli !l Initructim i SUB Riiultli) : Uli I 11239 STEP KISE I Yii Nuibtr of cycl11 i 3 Exicution till I 300 ti (of oni cyclt !l Initruction i MJL Opiriiid(s) : CLBlS I BIBOÒÒMO Reiulttil : L234 1 21474BJ647 FUJI I K 0 V C 1 O STEP KISE 1 Yn Nuiber of cvclii t 3 - ■• 1 500 IS FUJI ! K ! V C 0 0 0 0 Exrcution tla OprindU) Risultli) 1 lof oni cycli !l Instruction ! « 1117 : ■ ? J n Exicution Opirindlil I (of ont cyclt !l Initruction i DIV Ritultii) CKIII : CK71 I I12(K17I ! K20 I ( —> Nil 1 (rniindirl Tht citciition of tht progru it brtikid it BP9 ! STEP mSE I Yii Nvabir of cfcltt i 9 EiKiition tlM i SOC tt (of otti cycli !) Flio« : H 2 ' 0 » D{ifrandlil Rtiultit) : Initruction i AND «li i OOlOlDII 111110 «17 1 00000000 ooei- «19 ! 00000000 00010001 STEP mSE I Yd Nutb«- of cvclii I 3 EsKutlon ttH I SOO li lo< oni cfcli !l FUgi I N OptriniKi) ! RtiuU(i) Imlruclion i CPL CBI2 I 00001100 B12 : 11110100 STEP «1SE , »M ' ? I Nuilifr of tycltt i 3 EiKution tut : 300 as (of on> cycli !) Initruction i HES 0|i»rand(il : Riiultli) CB12 i OOOOllDO BU I 11110011 Tht iiicaticn of thi progni ii trtikid it BPIO ! STEP «ISE : Yt. '85? Nuittr of cvcIm i S Eiicution tiM I SOO it (of ont cycit II Initruction i »LC Opirind(il ! CL328 I OOOOOOOO 00000101 00000001 01000000 RDtitt no. i iS ( >> 1 !!! I Rtiullttl 1 L2U I OOOOOOOO OOOOIOlO OOOOOOlO lOOOOOOO STEP mSE I Yti Nviilitr of cvclti I 3 Exication tlH i 300 ti (of oni cyclt !l loitruction : SLC Optrtnd(i) t FUgs CIII3 : OUlOOll Shift no. 1 3 Rtiult(i) B2U ! 01100000 STEP «ISE I Ym Nuibtr of cvclti I 3 ExtcutiGd till I 300 It lof one cyclt !l Initruction i TUNS Ostrind(il i .0. of^'lli ! FUgi ! « 2 V C 0 0 0 0 liitult(i) I L23i : OOCOOOlO 00010101 01000111 00111011 STEP «ISE ! Yti Fligi I « 2 V C 0 0 0 0 Nuilitr of cycltt i 3^ ExKution tlu I 300 is (of ont cyclt !) Initruction : TRMS Optrinddl : ^^^^ ^ 5000OOOO OOOOOOOO OOOOOOOO OOOOOOOO ... Ko, of biti I 100 fitiuUlil I II2S0 I OOOOOOOO OOOOOOOO OOOOOOOO OOOOOOOO ... STEP mSE i Ytt Muiiiir of cycltt : 3 Execution tin 1 500 » (of ont cyclt !1 Initruction i • Optrindjil ! Flagi I II 2 V C 0 0 0 0 Riiult(i) : B I Tht ixtcution of tht progni it briittd it LABEL 13 ! STEP mSE I Ytt Nutbtr of cycltt 1 3 Eitcution tilt I 300 li (of ont cyclt !l Initruction 1 • Dptfind(il I L2J4 Fl igt I N 0 RttuUd) I L237 34?«»2J Huibir'of c cltt ! 5" Extcutlo« till" ! 300 ii (of oni cyclt II Initruction ! A Opirind(i) I FU,., j. 112 I 111 I '""''iu 1. . STEP VISE , I Ttt Nuibir of cycltt ! 3 Extcution tilt I 300 it (of ont cyclt II Instruction t LT Opirind(t) I cSŽ'7 i Rtiult(sl ) fIttuU it i V C 0 0 FUgt i N I V C 0 10 0 STEP mSE i in Nu»ber of tycln : 5 CuKution tiM : iOO if Igf one cycle !l Fligi M I 0 I Instruction i 0 Oper inditi ! Stick Stick Itick - TOP ! - TOP ! Retultli) : Reiult is STEP KISE Ì tes KuebK of cycles i 5 EjKutioj) tiM I 500 IS (of one cycle !l Instruction i N "'"•"^^{ick'- TOP > Resultisi : Result IS STEP VISE ! yes NuibK of cycles i I Eiecution tiu : 300 is lof one cycle I) Instruction i « Opertnd(s) i Stick - TOP Retult(s) nji I The eiecution of the projrii is breiked at BP20 ! STEP KlSE 1 Yes Nuiber of cycles : 3 Enecution tilt : SOO is Fligs : (of one cycle !l Instruction i NOP The execution of the progni is briiked at BP2S STEP mSE t In Nuibtr of cycles ! i EiKution tlM I SOO IS (of one cycle !l Start of eiecution of THE FUNCTION BLOCKS. "'S' 'SIX 0 0 0 Fligs ! N 2 V C 0 0 0 0 STEP NISE : Yet Huiber of cycles i 5 Execution tiie : 900 is (of one cycle !) End of cycle :S STEP MISE : Vet Nuiber of cycles : 0 Execution tiM : 500 is (of one cycle !) End of the file ! Execution of thi progni is finished ! Fig. 9: A step-wise mocJe of execution of a simple user's program. 3 Adjustment and writing out values In the fundamental simulation menu (Figure 6), the user must select ADJUST MODS (Figure 10). The simulator permits two modes of adjusting and writing out data. If you listi HARD COPY of thi scrieti press ! f? fJ Ft F F9 C^'T prw DRUn PRUT ac, yHE EIIT VIE* EDTOI) all EDI Oft CMME Fig. 10: A menu of ADJUST MODE. The first mode is directed to a particular datum or function block and so we call it SINGLE CHANGE (Figure 11). The second mode is directed to all values of the same type of data - ADJUST EDITOR (Figure 12). If you lifh HARD COPY of thi screed prm ! CONsUr sy k &M C inteÌkal ÙAÀTABI f Fi input output e5?t ronostable ree tikr druh' teit Fig. 11: A menu of SINGLE CHANGE, cm 1 000107 000137 0U20I Constant ^d 7 000021 OOC127 You can uii'keyi on H f F il paÌE PA8E i igt F7 CHMS e5?t BD t OWN m BOTTO« DMl 1ä N ÜSIIf lue ? Fig. 12: A menu of ADJUST EDITOR. The way of selection is identical for both modes, because it runs through similar menues. The user selection starts on menu of types of data (Figure 13a). There are constants, internal data, system data, input and ouput data. The user chooses between a bit, a byte, a word and a longword in the next menu of data types (Figure 13b). The user can choose all data types for any selected type of data except a bit for constants, because the simulator does not have a constant bit! H you >ish MfiO COPY of the icrien pfE!i ! CON^AHT v«?1|LE INTEm VARIABLE F4 IHPUT OUTPUT E5!T Fig. 13a: Menu of types of data. H rou lish HWt corf Df thr icreen prt» (SHIFT) ! 24 (HI) (112) « 0 -I • 0 - T 11 PRESET VALUE I SO NODIF I »0 CURRENT VALUE l 0 r- 0 (101 u R (n4l Fl f2 f3 F4 FB BITS BYTES UORDS LOHBNROS EJIT Fig. 13b'. Menu of data types. 3.1 Adjustment and writing out values function blocks' data of The menu SINGLE CHANGE (Figure 11) enables adjustment and writing out values of function blocks' data. After selecting the type of a function block, the user inscribes its successive number and then, if it actually exists, the simulator draws its picture on the screen. The simulator then writes important information about it: type of function block, its successive number, names and values of its input and output bits and current values of its typical variables. In a menu, under each drawing, the user can read which variables he can adjust and what actions he can use (Figures 14a, 14b, 14c, 14d, 14e and 14f). S (Iß) k R 11(20) II rou ni Ih HARD copr of till icrein pri» ! Fl F2 F3 FB Tine BASE CURREKT VALUE PRESET VALUE EIIT Fig. 14d: A menu of TIMER. - D 32 - R (Iß) " 0 -U (Uli • O H EKT VALUE ! ' MT.VALUf.. I Oj TATEsi " 00000000 00000000 00100000 - F IBJO) ■ o » pu >ish HARD COPY of thi serem priu (PrtSc) ! T?ÄE CU^EMT VALUE PRESET MJHBER CUfl^KT F3 BASE VALUE OF STEPS STEP EIIT Fig. 14e: A menu of DRUM. TEIT 2* S (1121) ■ O - WUT/OUTPUT i »RITE STRIKe L - D (fl3l • O Your leitiji li O.K. . If you »iIh HARD COPY of th« (criin priit (SNIH) (PrtSc) ! Fl f2 F8 If yoti Kith HARD COPY of thi icrtin pn» (SHIFT) ! Fl F2 f? INPUT MTA RESISTER LEN8TH tin ÒUTI^T DATA NUIBIR OF DATA CONTENTS Fig. 14b: A menu of REGISTER. u (US) D m ' D -i ' O 1 - C 12 PRESET VALUE i BO nOMF : NO CURRENT VALUE t O k E (UIC) - D Hill) - F (1112) « O • O . o Fig. 14f: A menu of TEXT. 3.2 AdjuBtment and writing out values of data "As mentioned above, the user can adjust and write out values of data in two places in our simulation. 3.3 SINGLE CHANGE After selecting type of data and its data type, the user inscribes its successive number in menu SINGLE CHANGE. If the entered name is correct in the context of Figure 5 and has a value, then the simulator writes out its value in binary, octal, decimal and hexadecimal number system. Now, the user can adjust the value or return to the menu of data types. An instance of choosing and adjusting of a datum CH200 in menu SINGLE CHANGE is shown on fugures 15a and 15b. Conitint Mord NUIIKR i 200„ It iutt hi (riitir thin -I tnd liii thin 1000 ! If you niih HARD COPY of thi »criin pri» .............To left on lini (End).............To rioht on lint (Pay«).............Pj9» up .............Pije dom (Up Arroii>...........Line up (Daun Arroii)..........Line doiin ■it left lit right 0 tag ol pjge 0 bottoi of gioe ............0 lop ot HI« 1) (PgDn)......... 0 bottoa of file ;L) (Left Arron) . . ... . . Kord leU <1 Arrtm). ht Arro«> .1) (Č RL> (End). (C RL> (foUp> (CTRL) (Sight Arro«> or (Tib) , Kord right You ctn uu l(iyi on tha Nuiiric Keypad! Help; prtii (Alt) K 1 F paJe Ài F» ffP F! 1 \ ■6 U BO foH ewii RISHT bdttqh tL V :6 :N N LUE ? Fig. 16: The possibilities of ADJUST EDITOR. We can move * to top of a file and * to bottom of a file. We can move window * up, » down, * left and » right. Within a window we can move * to top of a page and » to bottom of a page. We can move a line * up and * down and inside of the line » to left on line (beginning of line); , * to right on line (end of line) Besides these, function keys, we can also the keypad's keys for the same purpose. The key CHANGE VALUE permits adjustment of values and the key PRINT enables writing out all values of the selected type of data, clearly arranged on the printer. 4 Conclusion The presented simulation packet is written in the programming language Turbo Pascal. The user can execute it on all personal computers IBM XT/AT type, or compatible, equiped with an operating system MSĐOS. The simulation packet is a composition of twelve independent programs, which are connected with standard procedure Execute. The number of source program lines exceeds 50000, the object code is more than 360k. bytes of lenght. The simulator'is an integral part of the user's development tools. Consequently, the entire project offers the special purpose environments to the users. 5 References: * The industrial microcomputer controller's architecture (in slovene). Metalna Maribor, 1987, * V. Zumer et al., Workstation for software development. Technical report - in slovene, 1966 * V. Zumer et al.. Workstation for software development. Technical report - in slovene, 1987 * Programmable Controllers SIMATIC 85 (different variants), SIMENS, 1984 * Programmable Controllers TSX (different variants), Telemecanique, 1986 and from one datum to another * a datum left and * a datum right. * R.E Fairley, Software Engineering Concepts, McGraw-Hill Book Company, 1985 We.can move out of a current window only by moving a window, because by moving within a window we can not come out of it. VAX Architecture Handbook, Equipment Corporation, 1981 Digital Such moving is often time-consuming and as we wished to increase the efficincy of the ADJUST EDITOR, we added the above described possibilities still another one: the movement INFORMATIONAL LOGIC I INFORMATICA 3/1988 Anton P. Železnikar UDK 519.72 Iskra Delta The first part of this article deals with an intuitive background and with a coarse symbolic introduction of the subject called informational logic (or logic of information). In this context it examinea the notion and possibilities of formalization of informational inference (reasoning) as a foreground of the arising logical discourse. First, as a representative of the class of all possible informational operators, the notion of the operator of informational arising (or of Informing) is determined, covering several informational necessities and possibilities of an infix, prefix, and postfix operator, of parallelnes and serialness of informational processes, and of its arbitrary semantic particularization and universalization. In this respect, the informational operator of arising |= can be abstracted (particularized and universalized) according to the needs and goals of its application. Two types of operators of general Informing (|= and =|) and general non-Informing (f and H) are introduced, to enable also a description of some (reduced) parallel informational cases in a general (linearized) form. Further, the notion of the so-called informational cycle as an autonomous informational unit is introduced, so that operators of cyclical Informing (|- and H) and non-cyclical Informing Ot" and vj) are meaningful. Some cyclical informational schemes or scenarios are discussed within informational systems SI to S9. Within the philosophy of the informational cycle some modal properties of informational operators are pointed out concerning counter-Informing and embedding of counter-information (systems S8 and S9). The next, currently concealed and unsufficiently revealed informational phenomenon is parallelism. In a symmetrical way to general and cyclical operators of Informing, for future axiomatical expressing of parallel informational processes the introduction of adequate parallel informational operators becomes necessary. In this sense, two sets of parallel operators are proposed, namely the cyclical parallel HI, ||/, HI) and the general parallel ones (IH, Nil IH I A)- It is evident that these parallel operators need additional ones which will enable the expressing of communication and interaction among parallel informational processfes. The principle of operational particularization and universalization represents the last point of this part of the essay. In the process of formation and transformation of informational formulae, informational operators can be particularized and universalized ( semantically determined) due to the needs and goals of an arbitrary informational application. Again, all of the 16 proposed informational operators proposed are listed and described. At the end, two examples of a scenario of questioning (a discourse concerning information, appearance of a question, processes of. questioning and answering, and an answer) are presented in the notation using informational operators. Informacijska logika I. Prvi del tega ölanka se ukvarja z intuitivnim ozadjem in z okvirnim simboličnim uvajanjem predmeta, ki se imenuje informacijska logika (ali logika informacije). V tej povezavi se raziskujejo pojem in možnosti formalizacije informacijskega sklepanja kot predpogoji za nastajajoči logični diskurz. Najprej se opredeljuje pojem operatorja informacijskega nastajanja (ali informiranja) kot predstavnika razreda vseh možnih informacijskih operatorjev, ki hkrati zadoäCa različnim informacijskim potrebam in možnosti infiksnega, postfiksnega in prefiksnega operatorja, paralelnosti in serailnoati informacijskih procesov in poljubne semantične partikularizaclje in univerzalizacije. Tako je mogoče informacijski operator nastajanja ^ abstrahirati (partikularizirati in un i verzal i zi rat i ) skladno s potrebami in cilji njegova uporabe. Uvajata se dve vr^ti operatorjev za aploSno informiranje {[= in =|) in za aploSno neinformiranje di' in tako da je omogočeno tudi opisovanje nekaterih (reduciranih) paralelnih informacijskih primerov v sploäni {linearizirani) obliki. Nadalje se uvaja pojem t.i. informacijskega cikla kot avtonomne informacijske enote in operatorji cikličnega informiranja (|- in in necikliCnega informiranja in v)) postanejo tako smiselni. Obravnavajo se nekatere ciklifine informacijske sheme ali scenariji, in sicer v okviru informacijskih sistemov SI do S9. V okviru filozofije informacijskega cikla so prikazane nekatere modalne lastnosti informacijskih operatorjev, ki opisujejo proti informi ranj e in vmefiöanje protiinformacije (sistema S8 in S9). Naslednji, trenutno Se prikriti in nezadostno pokazani informacijski pojav je paralelizem. Simetriöno k sploänim in cikličnim operatorjem informiranja so uvedeni ustrezni (eksplicitni) paralelni operatorji, ki naj bi omogočali aksiomatsko izražavo paralelnih informacijskih procesov. V tem smislu ata predloCeni dve množici paralelnih operatorjev, in sicer ciklično paralelni (Ih, l^, 4) in sploSno paralelni (i=, 1/t, 4)- Očitno bo tem paralelnim operatorjem potrebno dodati Se operatorje za izražavo komunikacije in interakcije med paralelnimi informacijskimi procesi. Princip operatorske partikularizacije in univerzalizacije je opisan v zadnjem poglavju tega dela eaeja. V procesu formiranja in transformiranja informacijskih formul je mogoče informacijske operatorje partikularizirati in univerzalizirati skladno s potrebami in cilji neke poljubne informacijske aplikacije. Tako so ponovno nafiteti in pojasnjeni vsi predloženi informacijski operatorji. Na koncu eseja sta prikazana dva primera scenarijev vpraševanja (diskurza, ki obravnava informacijo, pojavitev vprašanja, proces vpraševanja in odgovarjanja in odgovor), in sicer v notaciji predloženih informacijskih operatorjev. called informational logic (6) as a special and extended logical system. Maybe, the strict mathematical doctrine and algorithmically based computer science will depreciate these trials, concluding that they belong to the domain of science-fiction. They will traditionally assume that it is not possible to change the principles which have been arising for thousands of years and have been approved as a doctrine and as a practice. Had there really been so, when the purposes and philosophies of new development, constructive possibilities, and human mind have been changed dramatically too? P A K T O N AN IN T U I T I V E _ B A C K O R O U N INFO R M A T I O N A O F LOGI 0. Introduction Some brain-damaged human beings, like computers, deal with familiar domains in that completely- logical manner. Patients suffering from a neurological disorder called "agnosia" exhibit a total dependence upon analysis and rational explanation. For them everything must be decomposed into features and relationships before it can be understood. For example, a victim of agnosia presented with a triangular object will first report that it has three angular corners connected by straight sides and only then will conclude that it is a triangle. Restricted to understanding of only this kind, the patient is unable to f una ti on adequately in the everyday world. Hubert L. Dreyfus and Stuart E. Dreyfus [1] 64 0/0 Modal logic has already taken its triumphant course in the field of artificial intelligence. As a tool of research, it is able to capture the domain of various "non-scientific" objects to which beliefs, awarenesses, and reasonings of human mind may belong. Of course, modal logic as a system of necessity and possibility does "not concern only the "must be" and the "may be", but also various other (imaginable,, psychological) modal operations (viz. "believe", "know", "reason", "understand", etc.). As the research in this essay will show, informational operators will possess (merely a kind of) modal and a regular operational nature and, in this sense, will remain in the investigational realm of commonsense reasoning. This part of the essay represents an intuitive and roughly symbolic introduction into the possibilities of informational objects and operations which will constitute a kind of logic. There are appeared and will appear several objections stigmatizing the so-called informational principles [4] and particularly trials to develop a discipline 0/1 Briefly, informational logic could be understood as the logic of informational existence, potentiality, and phenomenology, all of which root in spontaneous informational arising. It is the logic concerning not only information processing in living organisms, but also the coming of information into existence and uaing this information for processing of life and survival. Such a logic, as presented on lingual (extroverted) level, needs a metalinguistic power of different languages hidden in their composite verbal or even sentential expressiveness. In this way, this essay will be a study of formal informational logic, raising a substantial number of questions relating not merely to the philosophy of information, but also to other philosophical realms. Informational logic is a new term and represents the marker for a particular logical system that arises from the concepts of information, as they were determined by the author (2, 3, 4, 5, 6]. Informational logic uses it's own language with characteristic syntax and semantics. This language is trying to capture the most general, but also the most characteristic notions of the philosophical and mathematical logic, as well as some particular notions of the informational arising as it is understood from the philosophy of information. When possessing its own language, informational logic constitutes a formal system with its own logical calculus (or axiomatic basis in the generative sense) . For the purpose of the expressiveness of informational logic and informational calculus, a set of standard and non-standard signs will be introduced. However, some of the standard signs will obtain additional, generally more flexible meanings, although they will retain their particular ones. 1. The Notion and Foraalization of Inforaational Inference Truth and falsity belong to the main polar categories in philosophy and particularly in logic. In a two-value formal logic, propositions of the logical calculus are estimated for truth and falsity. In a multivalue formal logic there exist intermediate values of propositions, ranging from the absolute truth to the absolute falsity. However, it has to remain in the foreground of our discourse that truth and falsity are only very particular and also substantially and abstractly narrowed forme of information, even in those cases where they are semantically dispersed between their absolutes. In many theoretical and practical cases truth and falsity can simply be shifted outside of the field of relevance. Informational truth can be a generative set of informational cases representing various informational forms and processes concerning truth. Similarly, informational falsity can be an adequate generative set of Informational cases which are estimated to support falsity. These two generative sets can in no case be disjoint. As they appear within living information, truth and falsity can depend essentially on beliefs, awarenesses, reasonings, etc. of living inforaational agents. In general, truth and falsity are coming into existence as information, which arises from case to case and is informationally observed, estimated, investigated, and understood as truth and falsity according to various valid, counterfeit, and .contrariwise forms and processes of information. 1/2 ... we do not yet (and may never) know whether there is anx proof that js elegant, concise, and completely verifiable by a (human) Mtathematioal mind. Kenneth Appel and Wolfgang Haken [7] 162 1/0 At the construction of a logical system, symbols and rules for combining symbols into formulae and for manipulating these formulae have to be set up. Further, meaning has to be given to these symbols and formulae. An axiomatic basis of a logical system consists of primitive symbols, formation rules, axioms, and transformation rules. The well-formed formulae (wff) obtained by application of transformation rules are called theorems. A thesis of a given system is either an axiom or a theorem. Thus, an informationally interpreted logical system can be obtained. Within such a system, questions of adequate information concerning informational arising and other informational possibilities, for instance of truth and falsity, can be raised. As pointed out, informational inference will deal with a sort of adequacy in cases of concluding, reasoning, and oriented thinking. Informational inference will embrace processes of Informing in the broadest sense. Although Informing by itself will be understood as informational arising, the informational arising by itself will be understood as the most basic informational regularity. And what is the observed regularity other than a kind of logic? The process of Informing will be formalized by steps of informational inference and, within these steps, information will regularly arise from one informational step to another. In this respect, in a process of Informing the so-called derivative steps of truth and falsity will appear as special cases of inference. Informational logic will deal with much more general informational cases as truth and falsity could be by themselves. This logic will be derived from the principles of information [4], considering informational circularity (recurrence), spontaneity, arising, counter-Informing, embedding, etc. Since all these cases are merely particularities of informational arising, the arising itself will be denoted by the unique and specific symbol Or more precisely, several families of specific symbols, denoting informational arising in a general sense, in the framework of the ao-called informational cycle, and in the domain of the informational parallelneaa will be used. It will be shown how informational operatora with a general meaning can be specialized (or even additionally universalized), so that they adopt a particular function. In this manner, the known and common logical, functional, set-theoretical, and other operators can be replaced by the particularized informational operators. In the sections following, several different cases of the arising symbols (operators) or symbols of arising will be revealed. 2. The Operator of Inforaational Arising 2/0 The goal of the following sections is to introduce the most general notion of informational arising. As we have learned in [6], the informational arising can be understood as a parallel-seria1 sequence of informational cycles. Information is arising spontaneously in a cyclical manner. It means that it is arising paral1 el-serially, cyclically, and spontaneously within a cycle itself, so that each informational cycle has its characteristic Informational subcycles or cyclical parallel-serial steps (subarisings). Instead of informational arising often the term Informing will be used. Arising is nothing else but the Informing of information. The term Informing can be used also for denoting the so-called informational steps (derivations) occurring within a cycle (processes of sub-Informing). The production of counter-information can be denoted aa the counter-Informing and the procesa of the embedding of counter-information into the original or source information aa the informational embedding (or aimply embedding). However, Informing can be used alao for denoting the entire arising-embedding cycle or also a para11e 1-s eria 1 sequence of several informational cycles. In this manner. Informing is the most general term to denote the proceaaea of informational acting (arising, embedding. Informing, counter-Informing , etc ) . It would be reasonable to introduce a universal operator of Informing (functor, quantifier, relator, derivar, deducer, circulator, generator, creator, etc.) or even several different families of operators of Informing. As mentioned in [3], Informing has its aemantical örigin in the verb 'inform'. This" verb incorporates the meanings of all possible verbs, sentences, and their linguistic combinations and can be used for -the substitution of any operating information. The verb 'inform' represents the generative set of all possible semantical values, also potential ones, which can appear within a natural language or even in a language of thought or of mind. Moreover, in the same way as information denotes any information, the moat simple and also the most complex one, the verb inform can represent any operational (relational, functional) information, i.e., also any combination of notions and their undèrstandings. It means that semant ically Informing as informational process is actively and passively operative in any possible, yet impoaaible, or arbitrary (apontaneoua) way. In this sense under operational information each instructive, imperative, transformative, arising-transformational, information- changeable form of operation will be understood. As logic does, not concern necessarily only the problema of truth and falsity, informational discourse does not Investigate merely information belonging to the generative sets of informational truth and informational falsity. The moat general informational truth ia that information arises, that it informs and counter-inf orma, that in its Informing it is circular (cyclic) and spontaneous, that counter-information has to be informationally embedded otherwise it ceases as informational noise, that two informational cases are always different, etc. In logic we aay that "something is true" while in informational logic we will say that "something informs". Similarly, in logic we aay that "something ia falae", and in informational logic we will aay that "something informs in another or different way". In a similar way that ordinary logic concentrates its investigationa around the notions of truth and falsity, the informational logic will concentrate them around the notion of Informing, i.e., around the notions concerning information, Informing (of information), counter-Information, counter-Informing, information of embedding, informational embedding, informational arising (spontaneity), informational circularity (recurrence), etc. The goal of informational logic will be to relate and to connect essential informational items, pieces, and cases and to introduce an effective symbolism (formalization) for the purposes of the already developing future informational calculus. The main problem of this task will be to keep the concept of information open, i.e., not to close the discourse of Informational logic and its formalism, but to enable further development of informational logic and the increasing of its investigational power. 2/1 In [6] we have introduced the symbol of arising A of information i by the expression Ai (maybe, in this case, the notation 3i would be more appropriate). In this expression A was classified as a sort of quantifier (informational opera'tor), similarly to the notion of quantifiers in mathematical logic (for instance V and 3). The quantifier A could be similar, for Instance, to the logical quantifier of existence (for instance, the informational arising is the coming of information into existence). It can be comprehended that the difference between existential and arising quantifier is nothing if not philosophical. The existence of information is subjected to the informational arising, so that the arising is not only a more precise, but also a more complex notion of informational existence. Including the 30 existing, changing, occurring, coming into existence, ceasing, vanishing, disappearing of information, etc. Arising denotes the coming of information into existence and not only the existence of unchanged, and spontaneously non-arising and non-ariaen information. 2/2 According to our discussion concerning the operator A, we have to define a new, complex, and general operator (not only a quantifier) of arising. In the informational calculus this operator will be used to replace the most general, but also the most particular operation. In philosophical, two-value logic, for instance, the so-called relational symbols of truth (t=.p) and falsity (Hp) will be introduced. By these symbols, it is possible to create the so-called 'deductive' chains (calculations) when proving or deriving (by means of transformation rules) theorems from given set of axioms. In this sense, relations 1=^ and f=p are used as a sort of operations stepping from one derivation to another ( in a deduction chain), within a logical system. DFl The most general operator of informational logic will be the sigh , representing the broadest (the most complex, parallel, circular, and spontaneous) meaning of Informing (or of arising) of information. In general, if a is information, the notations a t= and N oc will have the meanings 'a informs' and 'a is informed', respectively. While has a general (universal) meaning of Informing, it can be also semantically particularized in arbitrarily different ways, for instance, in respect to the so-called informational cycle, parallel-serial Informing, or to an arbitrarily distinct application. 0 DF2 The sign can represent one or several cycles of Informing, but can as well be a part of cyclical Informing. A cycle and also the so-called subcycles (substepa) of an informational cycle can be distinguished through the use of the sign h. Thus, « h and I- oc have the meanings 'a informs in one cycle' and 'a is informed in one cycle'. In this sense, and (- are operators of Informing through one or several cycles and of Informing in only one single informational cycle, respectively. Since the notion of the verb 'inform' is very broad and embraces all possible linguistic (predicative) expressiveness, the existing and the potential one, the signs and |- really do represent the most general operators of informational arising, that is of Informing. Operators (= and are expressed in the so-called left-right notation, where the left operand informs and the right one is being informed. In a similar manner, the reverse (right-left) operators ^ and H can be defined, where the informed operand stands on the left side and the informing operand at the right side of the operator. The notions of left-right and right-left operators of arising can be extremely useful within the philosophy of information. Informing, cycling, parallelism, and recurrence. It is possible to combine both sorts of operators, where one of them (for instance, the left-right one) is dominant and the other (for instance, the right-left one) is subordinated to some degree or subjected regarding the first one. Thus, the property of operator hi representing a case of general Informing, can be denoted by (= for example, where (= in the denotation is dominant to H< ao that h A is the dominance relation between these operators. In this notation, as the upper index of operator , the sign H signifies the possible influence of the right operand to the left one within a case of general Informing. 2/3 DF3 When information arises from information, the primordial notations a f=, h o: > and the functional notation a(a) [6] can be replaced by the notation a 1= a 0 DF4 This notation can be used in the case of the recurrent arising instead of the notation in which it is explicitly exposed that has arisen and arises from a^^ through Informing of arises also (to some ttj and information ocj^ degree) through the backward Informing of a 2' The notation a |= a is read in the following way: a on the right of the sign t= arises from a on the left of this sign through Informing of a and vice versa; in this mechanism also the arising of a on the left of the sign t= coming into existence. Within this fact lies the reasonableness of the recurrent notation a a. The philosophic&l meaning of o t= a would be that information a is interpreting itself, or that a constitutes its own interpreting and developing (arising) system. DF5 In general, information a arises out of itself and out of other information o^; in this case the reasonable notation ia oc, ot^ N a Information I- or simply by the integral parallel cyclic operator F. It means that it will be possible to decompose a cycle |- into or into j-j, hgi ... , h I respectively. fi 2/4 3/1 DF6 Certainly, it is possible to treat the arising of information as a recurrent phenomenon also in a much more complex manner. Commonly, two informational cases o and a^ can interfere mutually. In this case, the meaning of the notation a, «J h a, Oj is that a as well as a^ are developing from a and Oj, or, that in this process a and a^^,: each in its own way, arise recurrently dependent from themselves and from each other. DF7 Evidently, the notation using the operator of arising can be as complex as possible. Generally, it seems quite reasonable to introduce the case "l- "2' ••• ' "j "k+l' «k+2' where j, k, and m are integers. "k + H 3. Soae Operators within the Cycle of Arising 3/0 According to information principles [4], information arises cyclically and spontaneously. Informational cycle will be understood as a unit or as a step of arising. However, this unit will be divisible into several elementary steps, as they are, for instance. Informing in a narrower (but also broadened) sense, counter-Informing, embedding, etc. In some parts of our discourse, the cycle of informational arising will represent the most elementary scheme of informational arising. For this cycle the symbol |- will be introduced. In this sense, symbol will represent at least one cycle, however in general an arbitrary number of sequential cycles of arising. However, within an informational cycle (marked by |-),also a general Informing (marked by t= ) can occur. DF8 It is to stress that besides of the sequential nature of the cycle of Informing, parallel components of Informing within the cycle can exist or can come into existence. We shall introduce the parallelness of information into our discourse already in thia section. It Processes, arising within the cycle of informational arising, were described in [6]. Several kinds of approximations of an informational cycle have been discussed (for instance, the first, the second, and the third approximation in functional, differential, and integral notation). As it could be comprehended, the cycle of arising can be subdivided into several phases (depending on a particular approximation concept). Particular substeps of the arising cycle can be denoted as follows : hj [Informing in the narrower sense], [counter-Informing], hg [informational embedding], etc. To point out the parallelness of operators within the informational cycle, it can be introduced l-j [Informing in parallel], H-^ [counter-Informing in parallel] Ihg [informational embedding in parallel], etc., with other processes appearing in the cycle. On the basis of introduced serial and parallel operators of the type and , respectively, it is possible to express approximations discussed in [6] by the new symbolism, concerning sections 6/4 (functional approach), 7/3 (functiona1-differentia1 approach), 8/3, 8/4, and 8/5 (functional-= differential-integral approach). 3/2 Let us now rewrite the so-called first functional approximation proceeding from information oc and closing the informational cycle by putting ot^ equal to ot : SI I = a(a); ß = I(ot) ; E = oc(a, ß) ; a = E(a, ß); g In this cycle, a, I, ß, and E denote information, Informing, counter-Information, and embedding, respectively. This functional presentation has the advantage that it can be understood aerially or parallel or that it is a sequence of four expressions or an array of four parallel acting processes. Applying the subcyclical serial operator > one can Imagine the following equivalent notation of the four upper equations: 32 « ^ ^ I »-I I; a 1 I, ß »-I ß! ot. I, ß ^ß ß; a, I, ß. E »-a E; a, I, ß. E ^E E; a, ß. E ^E a I a, ß, E a ; Resolving the left sides (operands) of the upper expressions, the following four groups of elementary parallel expressions are obtained: S6~ (1) K ^ '^"a a Ihi I; I ll-i i; In the previous section, the informational cycle was interpreted through the functional concept ([6], 6/4) and through the indexed (particularized) operators of arising within the informational cycle (cycle of Informing). Within this cycle several cases of information and of Informing have been introduced such as source information,, counter-informat i on, information of embedding, information of Informing, etc., aa well as informational processes which actively generate and change information such as Informing, counter-Informing, embedding, etc. In this sense, we dealt with some kinds of basic cyclic informational forms and processes. In [6], section 7/3, another interpretation of the informational cycle has been given, introducing the notion of informational differentiation, which concerns a particular cyclic information, called counter-information. Counter-information ß was obtained through the process of informational differentiation of a dynamic form of source information, marked by a{a), by information a. Symbolically, this process was labeled by ß = D^ a(a) where D^ denotes the operation of differentiation (instead of d/dot). In this case, D can be understood as a modal operator of differentiation where a is the agent of differentiation. It can be fixed that this process of informational differentiation represents the so-called counter-Informing. It is to understand that counter-Informing arises in parallel with counter-information and that they have influence upon each other. It ia evident that D has the function of a classical modal operator. The notation D^ y can be read as 'agent x derives (or differentiates) y'. Instead of D, which is a particular modal operator concerning counter-Informing, the notation C^ Oj can be used, which ia read as 'information o counter-informs information ocj^ ' ■ Now, the result of this counter-Informing can be labeled as ß, which represents the arisen counter-information, so that a transformation, using the symbolical equality (2) a 11-j ß; I ll-j ß; ß »"I ß; a »-p ß; I IHß ß: ß ll-ß ß; (3) a Ih^ b; I e; ß e; e h^ e; a Ihg e; I Fg B; ß Ihg e; e If-g e; (4) a J-g oc; ß Ihg a; E « a; ß h^ a; E a; 9 These informational processes are parallel and show informational complexity of a case of informational cycle. ß = Cj. a can be introduced meaningfully. Let us rewrite the so-called third approximative system ([6], 7/3), putting a = ttj, in the form 38 I = aoI(a, I) ; ß = Io(C^a(a) Oj Cja(a) O^ Cpa(a) O^ E = aoK(a, I, ß, E); a = Eoo(a, ß, B); fi 34 This system can be rewritten into 5. Parallel Informational Processea ^a"' ^a^' ^a^' ' ' I, p, E Ih^^g E; P- ^ ^Eca ® Similarly as in the case of S6", the system S8' can be split into detailed parallel processes too. The last interpretation of the informational cycle will be the counter-Informing/embedding one which proceeds from Section 8 in [6]. The consequence of embedding E in an informational cycle is the appearing of the so-called embedding information £ which connects arisen counter-information ß into source information a. In this case, operation of embedding E becomes a modal operation of various informational agents. The modal operator of embedding performs by the production of information of embedding t which is necessary for integration of counter-information ß into source information cc (by means of information e). For an integrational modal operator INT two of its agents have to be considered: the informational domain into which counter-information ß will be integrated (the first informational agent) and information by means of which the act of integration will be performed (the second informational agent). In this way, the expression e = INT„ „ I has the following meaning: counter-information ß integrates Informing I into informational domain oc, producing information of integrative connectivity e. Currently, parallelism belongs to the most concealed and unrevealed informational phenomena which calls for philosophical and technological illumination. Parallel informational processes open the most complex spatial and temporal interweaving, dependence, and arising as have ever been imaginable. Although, human mind in its basic structure and organization operates in a parallel and parallel-serial manner, on the the higher cortical levels, in its global informational organization (e.g., in functions of awareness, reasoning, and intention) it appears, behaves, and experiences primarily as a serial or sequential apparatus. Since the basic parallel-serial informational structure and organization of the mind are not directly reflected in human awareness and conscious reasoning, the conscious part of human mind does not dispose of the required fundamental experience for an adequate conceptualization of Informational parallelness. Thus, a philosophical background of informational parallelness has to be investigated and constructed, for it cannot be discovered sufficiently in detail. Two kinds of parallel informational operators will be used: the general (1^=) and the cyclical ones (Ih). General and cyclical parallel operators of Informing can be particularized (through their indexing or replacing by already known, however, semantically broadened ones) or universalized (complexed). The consequence of introducing parallel operators of Informing can be the arising of specific theoreas which govern the concept and construction of parallel structured and organized information systems. DF14 The general parallel operator of Informing will be denoted by Thua, for For the second approximative system from Section 8/5 [6] we have at a = o^: 39 I = a(a); ß = C^a(a) O Cj.a(a); e = INT^^^ß . INT^^pI; a - aoE(o, ß, t) - INT^^pe Oj INT^^^ß O^ 9 This system can be rewritten into a composite parallel-serial form, for instance: 39' a if^ i; C^a, CjO Ih ß: INT ß, INT „I h e; Ol,a a,ß INT^ .e, INT^ ß, INT. „E ||- a; 9 a , p e , e p , a This system can be split into more detailed parallel informational processes using particularized parallel operators of the type a m and |= o the meaning will be 'a informs in parallel to (some other parallel processes)' and 'a is informed in parallel to (some other parallel processes)'. Again, has a universal meaning of parallel Informing and it can be particularized arbitrarily (through its indexing) or universalized. 0 DF15 Within an informational cycle, it is possible to introduce (the already discussed) parallel cyclical operators of the type I-. Thus, o U" and I- a have the meaning 'a informs in a cycle in parallel to (some other parallel cyclical processes)' and 'a is informed in a cycle in parallel to (some other parallel cyclical processes ) ' . Q DF16 Similarly as in definitions DF3 and DF4, it is possible to define, for instance, a |t= a and where the operator |t= in both cases guarantees the existence of at least one parallel process of the form Og ||= a^. Introducing parallel proceaaes, aome generali cases of Informing can be determined in more detail. For instance, the case of DF5 can be defined in the following way: SIO "o 1= "Df a IN oc, oc^ |t= ot a It is evident that a, a^ |= a concerns the parallelness of processing through or within the operator (=> however, in the parallel system a a, a^ a this parallelness is more explicit, although it is not determined in a greater detail. In this reapect, a parallel system using parallel operators has to be and can be further formally decomposed by introduction of additional parallel operators, enabling also to explicate the communicational (or coordinational) connectivity of parallel information. Similarly, DF6 can be redefined as the following parallel system: This formula explicitly expresses how a informs, namely through its Informing I , which ot is exactly the way in which o informs at all. Let us look at the following six possibilities: (X N I a f= I^ V a t= a ^ I V a a H ^ I V a These cases can be explained in the following way : flj a ^ I with t= A =j says that a is dominantly informing I^ and that a non-dominant Informing of I on a a exists. Logically, this can be explained by oc H =1 I ((3(a 1= A =1)) A,I (3(a =1 I„)(P(H A 1=)))) Sil a 11= a, a |t= a, "l "l As mentioned, parallel connections and interactions among occurring informational entities a and ct j of Sil can exist in imaginably possible way. The question is if such connections and interactions are possible also on the level of occurring parallel operators |t=. Untili now; we have not studied informational decomposition of an informational operator, so that an informational inference in and out of its body would be possible. As it is evident, DF7 can be rewritten into its parallel structured equivalent in the following manner : This case corresponds adequately to the idea of informational arising or Informing of information. On the right side of the equivalence sign, the meaning of the sign (= is the simple one (not recurrent). (2) oc H ^ with ^ A t= says that I^ is dominantly informing a and that a non-dominant Informing of a on I_ a exists. Logically, this can be described by (3(a ^ I )(H A 1=)) A„ . I S12 cc, IH «1 IH «1 °'k+m' "2 11= «k+m- "j «k + l' «j ^ "k + 2' ' «j "k+m 9 Now, further parallel decomposition of this system can take its course. It becomes quite obvious that additional parallel informational operators must be introduced to express the possibilities of interprocessing communication and interaction. In this case, I is influencing oc to a oc higher extent than it is the case vice versa. Informing of information is stronger, more effective than is information' by itself, from which this Informing arises. For instance, questioning which was generated through a given question, can become more relevant from the initial question itself, this case is, within a normal idea about informational arising or Informing of information, unrevealed, and to some extent unusual, although it can occur accidently. (3) « H I with hah 6. Particularization and Universalization of Informational Operators In the previous discussion and examples it was shown how a logical system can proceed from a sufficiently universal informational operator from which every particular case of operation can be constructed. Vice versa, a given operator can be universalized to symbolize even a more complex function. A universalization of an operator can be obtained through its definition in a recurrent manner. In a general case, Informing I^ of information a arises through an informational process This case is dilemmatic because of t= A »ij. The negation of the relation ^ (this is the upper relation means that Informing in the backward direction is not taking place. The question is, if H and ^ can be put into relation of dominance at all. Does it mean that in the relation a ^ I^ the influence of I^ on a is hidden, in some way? This influence of can be understood in the manner that a is informed about the non-influfnce of I^ on a. Formally, this can be described again with ((3(a h I^)(t= A H)) A„ (3(a A>)))) « 1= I In this case, where I Informing I arises from a, cx does not influence a at all. 14) a H Ijj with =1 /i t= is similar to the case (1), but with exchanged operators. (5) a =1 with H A is similar to the case {4), but with exchanged operatora. (6) a with ^ A 1= is similar to the case (2), but with exchanged operators. Up to now we have diacusaed the following operators o f^ the type )= : operators concerning general, general cyclical, parallel cyclical, and general parallel Informing or processes of Informing. In this course we can have the following four seta of definitions: DF17 This definition concerns the general type of informational operators: (= is the general, main, usually from the left to the right directed logical operator of Informing which can seize a particular or universal operation of Informing; it can be generally a multiplex (down to unary) operator, of the infix, prefix, or postfix type; it can be arbitrarily particularized or universalized; in an expression (informational well-formed formula) it can function in one direction (e.g. left-right) or another (right-1 eft ) , or in both directions, where directional operations can be in a defined (functional) relation (e.g., of dominance, where the operation in one direction is subordinated in concern to the operation in the reverse direction). Usually, operator \= can represent any other operator including all of the listed informational operators which follow; is similar to |= , but with the opposite (right-left) direction of operation. In this case the dominant direction is from the right to the left side of operator (if it has its function in the opposite direction at all). Informational operator H can be useful in cases dealing with parallel informational processes, so that two of them can be linearly presented (composed) within a single formula using general informational operators. is operational, informational negation of the -general operator of Informing . The meaning of this operator is, for instance that Informing of the type h in the left-right direction does not exist or does not arise ; i^l is similar to but with the opposite (right-left) direction of operation. Q DF18 This definition concerns the general cyclical type of informational operators. The difference between a general and a general cyclical type of operators is that an informational cycle concerns a particular unit of general Informing within which this unit has a typical, the so-called cyclical Informing (e.g. counter-Informing, embedding of information, etc.). In this regard, general cyclical operators of Informing are similar to the general ones in DF17. Thus, h is the general cyclical operator which governs the Informing within the informational cycle. This operator can represent aerial or parallel processing and any particular operation in the dominantly left-right direction within a cycle; -I is similar to h, but with the opposite (right-left) direction of operation; I/ is operational, informational negation of the general cyclical operator of Informing h. The meaning of this operator is that Informing of the type in the left-right direction does not exist or does not arise; ■/I is similar to h* , but with the opposite (dominantly right-left) direction of operation. g DF19 This definition concerns the parallel cyclical type of informational operators. Parallel cyclical operators appear only within an informational cycle. The difference between a parallel and a non-parallel operator is that parallel cyclical informational operators appearing in an informational system (of informational processes) denote the parallel connectedness of processes of the system to which they belong. This connectedness has the meaning of mutual communication (and from this communication proceeding co-ordination of involved parallel processes) in a system. This principle of connectedness is valid also for differently particularized or un ivarsa 1 i zed informational operators. The appearance of a parallel operator means that in the informational system at least one other parallel process exists which is in a certain informational relation with the source process, but may also be in relation with other processes within the system. Again, the following four cases are relevant: i- is the parallel cyclical operator of Informing and designates that at least one parallel cyclical operator exists in a parallel system. The meaning of this operator can be similar to the meanings of operators H and with the exception that I- represents parallelism within an informational cycle. -I is the case of the opposite (from the right to the left) direction of F. p is the operational, informational negation of operator |h. The meaning of this operator is that within the cycle there cannot exist an informational process parallel to the process which it concerns. HI is similar to fr', however points in the opposite direction. 0 DF 20 The last group of informational operators are the parallel general ones. These operators can be used within or outside the ooncept of the cycle, that is for cyclical or general purposes. The meaning of these operators concerns their generallity and parallelness simultaneously. Again, four cases of parallel general operators can be significant: |t= is the most general, parallel logical operator of Informing which can be particularized and universalized as already described in the previous cases of operators , |-, and 1-. Parallelnesa belongs to the most relevant, but also unrevealed concepts of information. In this respect, additional meaning (semantics) of parallel consequences of such a general operator can be studied. 4 is the opposite case of |t=. The notation using this operator enables (as already mentioned) a more compact or dense description even in cases of parallel informational processes. is operationally expressed informational negation of the possibility that to the (parallel) process possessing operator another parallel process possessing operator 11= could exist. However, there can exist parallel processes to the process possessing It^ which include other parallel informational operators (e.g., 4, 1-, HI, etc.). 4 has similar meaning as Iff, but is acting in the opposite direction. Q At the formation of informational formulae, all of the the discussed operational operators can be adapted accordingly to arising particular and universal needs and goals of the describing informational problems, scenarios, etc. 7. Soae Possible Infornational Scenarios of Questioning In everyday conversation, the most general case of monologue, dialogue, or multilogue is an informational scenario of questioning. In a process of speech, talk, or discussion, the principle of questioning seems to be the moat natural one and is the real motor of development of discourse and of the arising of living, beings-concerning information, coming into existence during a conversation. What belongs to questioning which is understood as to be an informational phenomenon? At the beginning there is a question which arises or has been already arisen within a developing information. The appearance of a question causes and triggers the process of questioning concerning the question. Within this process answers arise which are embedded into surrounding information and regard the subject of questioning. The arisen answers give rise to the appearance of additional questions or change and complete the original ones. Thus, a further questioning comes into existence which can deliver new answers again, etc. The process of questioning can continue in this or another way until its Informing becomes exhausted within its arising of possible contents, aims, or reasons of questioning. Finally, this process stops, so that Informing of information can continue its unforeseeable course of. arising. The question which appears now is the following: How can the described course of questioning be expressed in an informationally formalistic way? Is it at all possible to express it adequately and to what degree of logical relevance does it extend? Informational formalization of the process of questioning can certainly deliver constructive concepts for an implementation of questioning, for instance, in an intelligible expert system. On the other hand, the process of questioning represents a sufficiently general case of Informing, so that it can be exemplarily used in the cases of a conctructive conceptualization of similar informational problems. SCI There are several scenarios of the process of questioning possible. Let first us explain the following one: (1= a) h (N a q J) h (()= a H q) (q 1= a)) h ((q a t= a) A (a h q)) h ( ( q, a, a \= q, a, a) 1) As it can be recognized from the last expression, informational process which uses informational cycles (the operator h ) was chosen. Within distinct informational cycles, the operators |= for general Informing are used. Of course, within distinct informational cycles arbitrary operations can be performed, including the operation of definitional equivalence and other logical operations. In this respect, the last expression is absolutely logically compact. Let us look now at the meaning, or better at the interpretation of the last expression. At the beginning, information a is informed. This is the cycle in which information a is in the state to be informed or to be open for receiving of information. In the next cycle, a question q appears (the operator J). It is not explicitly expressed where is the question q arriving from, whether from information a or from information which surrounds a. The activity of Informing of a now takes over the question q, which becomes evident in the next informational cycle using definitional equivalence for the description of this fact. However, 'q informs a' has the meaning that a influences q through the hidden feedback operator of Informing =i in |=. This phenomenon of Informing is explicated in the next cycle where q informs a, a informs the arisen answer a, and a informs backward q again, etc. In the last cycle, the process of questioning stops (the operator 1) where the meaning of the last part of the expression is as follows: ( ( g, a, a ^= q, a, a) 1) = ((.iz vièe primjera za i 1 ustraci j u. Razvoj jezika nije potpuno dovrèen. TOWftRD fi SYMBOLIC STRUCTURED ftSSEMBLY LPlNGUfiGE. This article describes SYSTRflLi a habrid lansuase» which is a superstructure of the conventional assembla lansuase. The paper deals with the MC68000 version of the lansuase. Howeveri its Santax can be applied to the assembla lansuaae of ana processori with.onla a few adjustments. The formal definition of the lansuase as an ,LL(1) srammar is also presented) as well as a number of illustrative examples. The development of the lanauase has not still been finished. 1. UVOD Pisanje prosrama u zbirnom jeziku joè uvijek nije mrtva umjetnost» zbog značajnih uèteda u brzini i memori jskom prostoru /M0RT0N86/ > pa zato ima smisla nastojanje da se taj rad ućini produktivnijim. U tlanku /NEŽIĆ85/ ■ opisao sam svoje prve ideje o strukturiranom zbirnom jezikui proizaèle iz težnje da si olakéarn rad na relativno velikom prosramskom projektu u zbirnom jeziku sa kojim sam se suoćio. U to vrijeme nisam znao za druse si iòne radove: /WftLKERSlfi/, /UPILKERBIB/, /KRIEGERa0/i /WIRTH6a/i /KfiUfiia®/» /fiNDERSONBl/. Moj pristup rješavanju istos problema bio je donekle drusačiji od pristupa u tim radovima i omosućio je razvoj i obosaćivanJe osnovnih ideja» èto je rezultiralo kompleksnij im mehanizmom strukturiranja koj i se moie nazvati i Jezikom. SYSTRRL (SYmbolic STRuctured Rssembly Lanauase) Je hibridni jezik baziran na obićnom zbirnom Jeziku. Prosrami se u nJernu srade miJeéanJem strukturnih instrukcija i obićnih instrukcija zbirnos Jezika i zbos tosa sa možemo promatrati kao Jezik koji pored klJutnih riJeći» identifikatora» itd.» sadrii Joè Jedan leksićki element - blok obićnih zbirnih instrukcija. Na vièi nivo podisnuta Je satno jedna komponenta zbirnos Jezika» a to Je upravljanje tokom, prosrama. Promatrajući odnos .SYSTRfiL-a Prema zbirnom Jeziku moie se na primjer povući određena analosiJa sa odnosom također hibridnos jezika Objective C prema nJesovom baznom Jeziku C. Međutim» C» pa tako i Objective C» Je Jedinstven Jezik» dok su zbirni Jezici raznih procesora razlićiti» i razlike prevelike a da bi SYSTRAL niosao biti sasvim Jedinstven Jezik. Ipaki svi osnovni koncepti Jednaki su za sve procesore» a i razlike u sintaksi su vrlo malene. Općenito» PostoJe tri naćina implementacije strukturiranos zbirncis Jezika". implementacija pomoću makroinstrukciJ a» implementacija pomoću pretprocesora» i cjelokupna implementacija strukturiranos zbirnos Jezika. SYSTRAL se može implementirati drusim i trećim naćinom» dok. se pomoću makroinstrukciJa moie implementirati samo nJesov podskup. U vriJeme Pisanja ovos ćlanka implementiran Je kompilator u obliku pretprocesora za komercijalno dobavljiv zbirnik procesora MCSBOBB. £. KRftTPlK PREGLED SVDJSTfiVfi JEZIKfi PriJe neso pređemo na detaljniji opis Jezika dat ćemo sažetak nJesovih svojstava. SYSTRAL Je Jezik koJi sadrži naredbe za strukturirano upravljanje tokom prosrama. Odabir struktura Je takav da uz preslednost» ćitlJivost i lakoću prosramiranJa omosućuJe i efikasnost. Uz uklJućivanJe opti mizacionih alsoritama u. prevodilaćke mehanizme dobiveni kod sotovo u svirn slućaJevima može biti Jednako efikasan kao onaj dobiven direktno u zbirnom Jeziku» pri temu Je preslednost prosrama i lakoća koJoni se mosu provoditi izmjene u prosramu neusporedivo veća. Definirana su dva nivoa Jezika: SYSTRfiL-l (može se implementirati Jednoprolaznim pretprocesorom) i SYSTRAL—£ (za implementaciju Je neophodan dvoprolazni pretprocesor). Prvi nivo Je podskup drusos. ProsramiranJe se strukturiranih i obićnih 1 ini Ja. vrèi .miješanjem zbirnih prosramskih Losićki uvjeti baziraju se na ispitivanju status bitova procesora» no takvi osnovni uvjeti mosu se povezivati u složene losićke izraze korištenjem AND_ i OR- operatora» a na drusom nivou Jezika u losićkim izrazima mosu se pojavljivati i zasrade. Nazivi stanJa status bitova sastoJe se od cijelih riJeći ili dniih skraćenica) a razna stanJa postoJe i razni nazivi. znaòenJa istog Detalji u oblicima ciljnih instrukcija kooe će generirati kompilator mosu se kontrolirati i.i izvornom tekstu koriètenJein inodifikatora za modifikaciju njihovih unaprijed definiranih oblika. Resistrirna procesora mosu se pri dje 1 j i vat i simbolićki nazivi: tj. simbolićki opisi njihovih trenutnih znaćenja. BYSTROL je u velikoj mjeri prenosiv na razne procesore» uz koriétenJe sotovo iste sintakse. Razlike za razne procesore oćituju se ualavnom u razlićitim mo'di f ikatorimai raz li ti t im ar-suinent i ma u FOR_) SWITCH_ i CfiSE-naredbama i razlićitim nazivima stanja "status bit ova. 3. DETALJNI OPIS JEZIKfi Jeziki tj. njesovu verziju za procesor MC6B00®) ovdje ćemo prikazati služeći se opisnim» dakle neformalnim naćinonu te formalnim) u vidu LL ( 1 > >3ramatike> pri ćemu se oba prikaza uzajamno dopunjuju. Opi žimo najprije notaciju kojom ćemo se koristiti u prikazu gramatike. 3.1 Notacija za prikaz sintakse Svi završni simboli (ključne riječii interpunkcije itd.) prikazuju se- kao identifikatori sastavljeni od velikih slova i znaka "_" (npr. IF_, ENDIF_» ZfiREZ) DfiTfi..REG) . Svi nezavrèni simboli prikazuju se kao identi fi kat or i sastavljeni od malih slova i znaka "_" (npr. prosrariD 2 ista_naredbi) faktor). Format prikaza produkcija sramatike Je slobodaru osim u jednom elementu: nezavržni simboli na lijevoj strani produkcija uvijek započinju na samoim lijevom rubu prikazai dok svi simboli sa desne strane produkcija započinju sa određenim pomakom od lijevog ruba pri kaza : 1 ijeva-strana —> prvi_simbol drusi_simbol treći _s imbol Sve produkcije sa jednakom lijevom stranom nalaze se na Jednom rnJestu i zapisuju skraćeno - simbol sa lijevih strana tih produkcija PoJavlJuJe se samo jednom» prije zapisa desnih strana: nez_simbol —> desna_strana_prve_produkciJe —> desna_strana_dru9e_produkciJe —> desna-strana-zadnje-produkcije Rko je desna strana produkcije prazna» to se označava navođenjem simbola EPS (skraćenica od "epsilon" )» npr. : nez_simbol —> desna-Strana..prve-produkciJe — > EPS 3.S. Organizacija programskih lini Ja Programe u SYSTRflL-u gradimo miješajući obične instrukcije zbirnog Jezika (uključujući i direktive) sa instrukcijama strukturiranja. Miješanje se vrèi na nivou programskih liniJa. Dakle» uviJek razlikujemo običnu zbirnu programsku liniju i strukturiranu programsku liniJu. Svaka strukturna programska linija ima oblik sličan kao zbirna liniJa: (labela) klJutna_riJeč (parametri) (komentar) (elementi navedeni unutar zagrada mosu i zostat i). Iako se na početku strukturne linije moie nalaziti labela» ona se u općem slučaju zanemaruje» pri černu postoji nek.olikoi i zuzetaka. 3.3 Leksički elementi 1 za se Između Pojedinih leksičkih elemenata unutar strukturnih programskih liniJa mosu se proizvoljno pojavljivati praznine tabulatori. Ukoliko nisu neophodni razdvajanje susjednih elemenata oni zanemaruju. Prilikom neformalnog ODisa leksičkih elemenata Jezika navodit ćemo i njihove simbole koJi se koriste u formalnom prikazu sintakse. 3.3.1 Ključne riječi Sve ključne riječi su rezervirane i sadrže na kraJu znak "-" da bi se izbjegla mogućnost kolisiJe prvenstveno sa direktivama zbirnog Jezika. Tako se npr. ključne riJeči IF-» ELSEIF-» ELSE- i ENDIF- zahvaljujući znaku "_" razlikuJu od uobičajenih direktiva IF. ELBEIF» ELSE i ENDIF. SYSTRAL sadrži slijedeće ključne riJeči: IS- GR- flND_ NOT_ IF- ELSEIF- ELSE- ENDIF- LOOP- WHILE- REPEAT- FOR- NEXT- EVENT- UNTIL- MONITOR- WHEN-SWITCH- CASE- RESUME-ENDSWITCH- Simboli koJi se koriste za prikaz ključnih riječi u opisu sintakse Jednaki su samim ključnim riječima. 3.3.£ Nazivi stanja status bitova Sa ci 1 Jem povećanja čitljivosti pro-srama zamišljeno Je ovakvo tretiranje naziva stanja status bitova: — .za određeno stanJe status bita može postojati više od Jednog naziva» Jer PoJedina stanJa mosu imati više značenja ovisno o kontekstu u koJem se ispituJu - svaki naziv umjesto samo Jednos ili dva slova sadrži cijelu rijeć ili barem dužu skraćenicu. U tablicama 1 i S dani su nazivi stanja status bitova za procesore MCSBCBÖ i ZB0. fiko izuzmemo nazive EVEN i ODD» preostali nazivi stanJa status bitova procesora Z80 su podskup naziva procesora MC68000. Slovo "U" u nazivima LESS-U. GRERTER-U itd. označava da se radi o brojevima bez predznaka (unsi gned). U formalnom opisu sintakse za leksičku kategoriju naziva stanja status bitova upotrebljava se simbol UVJET. SYSTRAL zbirni Jezik EQURL ZERO EQ FALSE NGTEQURL NOTZERO NE TRUE LESS LT GRERTER GT LESSEQURL LE GRTEQURL BE LESS-U CS CfiRRY GREfiTER_U HI LESSEQUfiL_U LS GRTEQUfiL_U CC NOTCARRY POSITIVE., PL NEGATIVE MI OVERFLOW VS NOTOVERFLOW VC duso3 skokai budući da su rtaóàeèòs ciljne instrukciJ kratki i d".i9i) a ako dnjsatiJe specifici tracislat irarija implic efikasnije ki"atke skokciVG. niJestu u prosratiiu umJest dusi skoki ielJeni ubacivanjem mod ifi katora mjesto. instrukcije skokova e. Skokovi moau biti niJe eksplicitno rano mehanizmi it no seneriraJu Ukoliko Je na nekom o kratkoa potreban efekt Postiže se duso3 skoka na to Zbo3 uske povezanosti sa instrukciJama cilJnoa zbirnos Jezika) u broJm značenjima i sintaksnim Pravilima za upotrebu mod ifi katora koncentrirana Je većina razlika u verzijama SYSTRfiL-a za razne procesore. Svi modifikatori sastoje se od Jedno3 ili vièe znakova unutar vitićastih za3rada! pri ćemu niJe dozvoljena upotreba praznina. Slijedeća tablica daJe presled svih rnodifikatora u verziji za procesor MCBSCÖiZit njihovih simbola u formalnom opisu sintaksei te riJeći ćiJa su poćetna slova sastavni dijelovi rnodifikatora! Modi fi kat or ■CL> •ca: <-1} Simbol MDDIF_L MODIF_B MDDIF_fi MODIF.Q MODIF_M I zvor Lons Byte fiddress Quick ZnaćenJa pojedinih modifikatora bit će opisana kasnije. Tablica 1. Nazivi stanJa status bitova procesora MCBSiZiiZii? 3.3.4 Identifikatori i konstante SYSTRAL EQUOL ZERO FOLSE I zbirni Jezik NOTEDUflL NOTZERO TRUE LESS_U CRRRY 6RTEG!UfiL_U NGTCftRRY NZ NC Budući da Je SYSTRAL hibridni Jezik i naJlakée sa Je implementirati u obliku pretprocesora za neki PostoJeći zbirniki a razni zbirnici sadrže i različita pravila za tvorbu identifikatora) numeričkih i znakovnih konstanti) on ne određuje Jedinstvena pravila za tvorbu tih leksičkih elemenata. U slućaJu implementacije u obliku pretprocesora preuzimaju se pravila konkretnos baznos zbirnois Jezika. U formalnom opisu sintakse za ove leksičke elemente upotrebljavamo simbole IDENT) NUM_KONST i ZN.KONST. 3.3.5 Re3istri POSITIVE NEGATIVE I EVEN ! OVERFLOW ! ODD 1 NOTOVERFLOW I N PE PO Tablica £. Nazivi stanja status bitova procesora Z80 Jedna od specifičnosti SYSTRflL-a Je mo3učnost pridjeljivanja simboličkih naziva registrima procesora. RiJeć "simbolički" u nazivu Jezika odnosi se upravo na ovu mosućnost. Zbirni Jezici omoaučavaJu koriètenJe simbola samo za označavanje memoriJ skih lokacija i konstanti) dok naJčežče korišteni objekti — re3istri - irnaJu standardne nazive koJi međutim ne opisuJu trenutna značenJa sadržaja resistara) i ne PostoJi način izražavanja takvih značenJa u izvornom tekstU) osim u komentarima. Modi fikatori Modifikatori služe prvenstveno zato da bi se u izvornom kodu niosli kontrolirati detalji u oblicima ciljnih instrukcija koJe će generirati kompilatori tJ. za eksplicitno modificiranje implicitnih oblika tih instrukcija. Kao primjer možemo navesti modifikator U SYSTRfiL-u se svakom registru za koJes Je predviđena ta mosućnost može na bilo koJem mJestu u programu pridijeliti simbol ički'opìs nJesovüs .trenutnos znaćenJai Jednostavno tako da se standardnom imenu resistra doda znak koJeg slijedi OPis "_" i "-"i npr.: IF_ LOOP_ 1 REPEPIT- " " ! ENDIF_ Time je povećana preglednost prikaza St rukt uri ranih pros rama. 3.A.£ Struktura prosrama P'rije neao pređemo na opìs pojedinih dijelova jezika> utvrdimo kako može izgledati lesalan prosram. Svaki prosram ima oblik liste) tj. niza naredbii pri čemu svaka naredba moie biti sloiena (jedna od struktura jezika) ili jednostavna (blok. zbirnih instrukcija ili strukturna instrukcija EVENT_). Ovdje su prikazani sintaksni elementi (pro3ram>i <1ista_naredbi>t i . Element ( 1 ista_naredbi> često se koristi i unutar pojedinih strukturai kao éto ćemo vidjeti u daljnjem tekstu. Prosram 1ista_naredbi —> 1ista_naredbi naredba EPS 1 i sta_naredbi Znak Simbol ZAREZ L.ZRG D_ZftG DZNflKfi-BRQJft TOČKO MINUS PLUS 3. 3. B Blokovi zbirnih instrukcija Zbos principa mijeéanos kodiranjai blok od jedne ili vièe zbirnih programskih linija uključujući i Dotpuno prazne č-ini jedan leksički element kojeg označavamo simbolom fiSM_BLQK. 3.3.9 Zavréeci strukturnih linija naredba —> fiSM-BLOK —) event.naredba —) if_struktura —) loop_struktura —> for_struktura —) rnonitor_struktura —> switch_5truktura 3.4.3 Logički izrazi = =:=:=n=s=:=:=s = =: = » = =zs;==c= U SYSTRRL-U se mogu tvoriti složeni logički izrazi upotrebom flND_ i ÜR_ operatora. Međutim» osnovni logički uvjeti sui kao i u običnom zbirnom jeziku» zasnovani na status bitovima. Qpièimo najprije kako se specificiraju osnovni losički uvjeti. 3.4.3.1 Instrukcija IS_ Iz istog razlosa neophodno Je i postojanje ovog leksičkog elementa. On se može sastojati samo od znaka za završetak linije (npr. CR)» ali i od komentara kojeg slijedi CR. Označavamo sa simbolom NEWLINE. U zbirnim jezicima ispitivanje određenog uvjeta provodi se u dva koraka: 1) obnavljanje status bita £) ispitivanje stanja status bita i provođenje grananja ovisno o stanju. Zboa tosa SYSTRAL omogućava podržavanje obje ove faze. Razdvajanje tih dviju faza u svim upravljačkim strukturama jezika omogućuje instrukcija IS_ . Na primjer» osnovni oblik IF_ strukture izgleda ovako: IF_ (Iista_naredbi_l> IS- ENDIF- Element < 1 ista_riaredbi_l> i instrukcija IS_ zajedno čine najjednostavniji oblik 103ićk03 izraza - <1 Ì5ta_naredbi_l> obnavlja status biti a instrukcija IS_ Xuvjet) 9a ispituje i ovisno o njesovom stanju provodi srananje. Prethodnu konstrukciju treba shvatiti i ćitati na slijedeći način: Rkc obnavljanje status bita rezultira određenim stanjem status bita tadf« izvrèi listu naredbi £. Pritom je <1 Ì5ta_tìaredbi_l> primjer sintaksnos elementa <1ista_naredbi> opisanos u prethodnom poslavlJuj a se sastoji od leksičkos' elementa UVJET kojemu može Prethoditi NOT_ operator (leksički element UVJET predstavlja nazive stanja status bitova). Element <1ista_naredbi> moie biti sastavljen i od sloienih strukturai no u funkciji obnavljanja status bitova on će se najčešće reducirati jednostavno u blok zbirnih instrukcija ili tak u praznu listu naredbi. No bez obzira na sastav <1iste_naredbi_l> prevodilački program zamijenit će ključnu riječ ENDIF- labelomi a instrukciju IS_ uvjetnim skokom na tu label u. Za ilustraciju kodirajmo jednostavni zadatak - ako su resistri D0 i Dl Jednaki tada u rssistar D£ treba upisati broJ 1: IF_ CMP. L Dei, Dl IS_ EDUftL MOVE. L «1»D£ ENDIF- Prevođenjem ovo3 odsječka dobiva se slijedeći ekvivalentni zbirni prosram (zbos veće preslednosti uključene su i izvorne instrukcije u obliku komentara): Slijedeći o>-imJer ilustrira koriètenJe instrukcije IS_ u povezanosti sa ključnom Y~ijeti ELSEIF- i ujedno prikazuje slučaj u kojem je neophodno da lista naredbi za obnavljanje status bita bude prazna. Zadatak je slijedeći: u resistar Dl treba upisati broJ 01 1> ili £'i ovisno o tome da li Je riJeč u registru D0 jednaka nulii negativna ili pozitivna. IF- TST Dia IS_ ZERO MOVE #ei>Dl ELSEIF- IS- NEGATIVE MOVE *1.D1 ELSE- MOVE #£i DI ENDIF- OdsJećak za obnavljanje status bita između ključnih riJeći ELSEIF- i IS_ u ovom slučaju Je prazani no ponekad se moie javiti potreba da on sadrži neku od struktura Jezika, kao u slijedećem zadatku - u reaistar Dl treba upisati broJ 0, 1, ili £ ovisno o tome da li Je apsolutna vrijednost riječi u resistru D0 jednaka 0, veća od 100, odnosno manJa ili Jednaka 100: IF- TST D0 IS- ZERO MOVE #0, D1 ELSEIF- 1 L ! IF- ! IB- NEGFlTIVE ! ! NEG D0 1 ! ENDIF- ! "cMP #100, D0 IS- GREATER MOVE #1, Dl ELSE- MOVE #£> Dl ENDIF- CMP. L D0, Dl BNE.S LOBI MOVE. L #1,D£ LPIBI i IF_ ! IS- EQUAL ; ENDIF- Poèto se ključna ri Ječ 1F_ ne translatira u nikakav kod, odsječak za obnavljanje status bita može JoJ i prethoditi umjesto da se nalazi između nJe i ključne riječi IS-. Tako Je slijedeći prosram potpuno ekvivalentan prethodnom : CMP.L D0,Dl IF_ IB_ EDUftL MOVE.L #1,DE ENDIF- Instrukcija IB- predstavlja u SYSTRRL-u Jedini naćin za eksplicitno izražavanje primitivnih uvjeta baziranih na status bitovima, a primiJenJuJe se u povezanosti sa svim instrukcijama koJe zahtijevaju izražavanje takvih uvjeta (u sornJim primjerima to Je bila instrukcija IF_), najčešće po ovom obrascu: IS- Osim u IF- strukturi instrukcija IS_ upotrebljava se i u drusim strukturama Jezika. U slijedećem primjeru ona se PoJavlJuJe u strukturi petlje sa izlazom na dnu. Prosram služi za računanje broJa nesativnih batova u bloku određenom resistrima 00 (početna adresa) i 01 (zavréna adresa). CLR.W D0_COUNT LOOP- ! IF- I I TST.B WHILE- ili EVENT— može biti IF_. ELSEIF-, 3.4.3.E ONO- i 0R_ operatori IristrukciJa IS_ u sprezi sa odsječkom za obriavl jarioe status bita koji joj Prethodi predstavlja najjednostavniji oblik losiikos izraza. Složeniji izrazi tvore se povezivanjem ovakvih osnovnih pod-izraza pomoću fiND_ i 0R_ operatora» a implementiraju se natinom koji se ponekad naziva kaskadama skokova /WfiITE84/. Uz pretpostavku da izraz sadrži dva operanda (pod-izraza) povezanih fiND_ ili 0R_ operatoromi takav natin implementacije znači da se evaluacija izraza prekida nakon evaluacije prvoa operanda ako ona daje dovoljnu informaciju da se odredi rezultat cijelos izraza. Pravila su slijedeča! - ako izraz, sadrži dva uvjeta povezana flND_ operatorom i prvi uvjet nije ispunjeni tada nije ispunjen ni uvjet čitavog izraza ako izraz sadrži dva uvjeta povezana 0R_ Za primjer kodirajmo slijedeći zadatak -treba pozivati potprogram POTP koji vraća rezultat u resistru Ddip sve dok je rezultat u granicama između 50 i 100: LDOP_ BSR POTP REPEfiT_ WHILE- CMP #50, D0 IS_ NÜT_ LESS FIND- CMP #100, D0 1S_ NDT_ GREFlTER Losički izraz u slijedećem primjeru je neèto složeniji - ako je ispunjen uvjet kojeg bi u nekom vižem jeziku specificirali kao ul and not u£ and ( u3 or u4 > tada treba komplementi rat i u5 ( ul, u5 ) su rnemorijske lokacije sa logičkih varijabli ): uć', . . , značenjem operatorom i prvi uvjet je ispunjen, tada je IF_ ispunjen i uvjet čitavog izraza. TST. B Ul IS- TRUE flND_ U vižim jezicima koji definiraju evaluacij u TST. B U£ logičkih izraza na ovakav način, logički IS- NOT- TRUE OND- izrazi se evaluiraju slijeva nadesno, dok se u TST. B U3 SYSTRRL-U može govoriti •o evaluaciji odozgo IS- TRUE 0R_ prema dolje, s obzirom da se logički izrazi TST. B U4 razvijaju vertikalno, a ne horizontalno. IS- TRUE NOT. B U5 Definicija logičkih izraza razlikuje se ENDIF- za prvi i drugi nivo jezika. Prvi nivo predviđen je za jednostavniju implementaciju jednoprolaznim pretprocesorom pa su stoaa nužna određena ograničenja. Sintaksno su logički izrazi na prvom nivou jezika podskup onih na drusorn, no i za sintaksno iste izraze, na raznim nivoima semantika se može raz 1 i kovat i. Prije opisa logičkih izraza za pojedine nivoe definirajmo sintaksne elemente i (modifikator dugog skoka) zajedničke za oba nivoa: not-operator jmpmodi f — > —> —> NOT-EPS MDDIF_L EPS S.'i-.S.S. 1 ftND_ i DR_ operatori - nivo 1 Na prvom nivou jezika fiND_ i DR_ operatori imaju jednak prioritet, upotreba zagrada u logičkim izrazima nije dozvoljena, osnovni logički uvjeti podliježu pravilu desne asocijativnosti (odnosno asocijativnosti odozdo prema gore), a NOT_ operator može se koristiti sarno za negaciju naziva stanja status bitova. Nepostojanje eksplicitnog grupiranja pomoću zagrada, jednaki prioriteti operatora i Pravilo desne asocijat ivnosti daju efekt kao da se nakon svakog fiND_ ili 0R_ operatora nalazi otvorena zagrada, a sve zagrade se zatvaraju na kraju izraza. Logički izraz može se sastojati od proizvoljno mnogo IS_ instrukcija, pri čemu svakoj prethodi lista naredbi za obnavljanje status bita, a svaka IS_ instrukcija osim posljednje u izrazu sadrži fiND_ ili 0R_ operator. Sintaksa je jednostavna: logički-izraz -) NEWLINE lista-naredbi IS_ not-operator UVJET jmpmodif ostatak_izraza Svakom logičkom izrazu pridružene su dvije labele: labela koja odgovara ispunjenom uvjetu izraza i labela koja odgovara neispunjenom uvjetu izraza. P»-evodilački mehanizmi svaku IS_ instrukciju zaraijenjuju instrukcijom uvjetnog skoka, pri čemu se razlikuju tri slučaja: ako IS_ instrukcija sadrži flND_ operator generira se instrukcija uvjetnog skoka na labelu neispunjenog uvjeta (uvjet skoka suprotan je uvjetu u IS_ instrukciji) ako IS- instrukcija sadrži 0R_ operator generira se instrukcija uvjetnos skoka na labelu ispunjenog uvjeta (uvjet skoka jednak je uvjetu u IS- instrukciji) - ako IS_ instrukcija ne sadrži FIND- ili 0R_ operator moguća su oba gornja oblika instrukcije uvjetnog skoka, éto ovisi o kontekstu u kojem se nalazi logički izraz. Kompilator implicitno generira kratke skokove, no oni se mogu eksplicitno modificirati u duge primjenom modifikatora dugog skoka {LJ . U logičkim izrazima on se uvijek ubacuje iza naziva status bita u IS_ instrukciji: IF- IS- EQUAL iLy ORIS- ZERO 'CL) ENDIF- 3.4.3.2.S flND_ i 0R_ operatori - nivo 2 Na drugom nivou jezika PlND- operator ima veći prioritet nego DR_, u logičkim izrazima je dozvoljena upotreba zagrada uz proizvoljnu dubinu gniježđenja, a NOT_ operator moie se koristiti i za negaciju čitavih složenih pod-iiraza. ostatak-izraza —) fiND_ losički_izraz —) 0R_ logički-izraz — ) EPS Kao i ria ot-vorn nivou» i sraz moie sadržavati vièe IS_ iristrukciJa od kojih samo zadnJa nema ili DR_ ooeratori a svakoj prethodi odsJetak za obnavlJarije status bita. Naravno» sintaksa Je neèto složenija! losićki_izraz —> òlan —> ostal i_òlanovi —> —> faktor ostali_faktori —> —> tlan ostali_òlanovi faktor ostali_faktori 0R_ član ostal i_ćlanovi EPS NEWLINE lista.naredbi IS_ not-operator UVJET j rnpinod i f not-operator I__ZPlG lositki-izraz D_ZfiG fiND_ faktor ostali_faktori EPS 11 ustr irajrno sintaksu na nekoliko primjera. U prvom primjeru kodirat temo izraz ( ul or u£ ) and ( u3 cr u4 ) : IF_ ( TST.B Ul IS- TRUE OR- TST.B U2 IB_ TRUE ) RND_ ( TST.B U3 IS- TRUE DR- TST.B U4 IS- TRUE > NOT.B Ü5 ENDIF- Ovaj odsjeòak translatira program u zbirnom jeziku: LOBI slijedeći IF- ( LPlBS LftB3 TST. B Ul BNE. S LABI i IS- TRUE OR- TST.B U£ BEQ. S LAB3 ! IS- TRUE > AND. TST. B U3 BNE. S LABS ; IB- TRUE OR- TST. B U4 BEQ. S LAB3 ; IB- TRUE ) NOT. B U5 ! ENDIF- Kao 4to se vidi iz primjera» pored labela ispunjenog i neispunJenos uvjeta ciljevi pojedinih uvjetnih skokova moau biti i labele senerirane unutar izraza (u ovom slutaju LfiBl). To je i razlos zaèto se ovaj način implementacije lositkih izraza naziva kaskadama skokova. U slijedećem primjeru kodirat ćemo izraz (ul or u£ and not (u3 or u4)) and u5 : IF- ( TST. B Ul IS- TRUE TST.B U2 GR- IS- TRUE TST. B U3 AND- NOT- ( IB- TRUE TST.B U4 OR- IS- TRUE TST. B U5 > ) AND- IS- TRUE NOT.B U6 ENDIF- Gornj i primjer ilustrira upotrebu NDT_ operatora za nesaciju sloienoa pod-izraza. Implementacija se temelji na de Morsanovim teoremima - 0R_ operatori se tretiraju kao ftND- i obratno uz negaciju operanada. 3.4.4 IF- struktura = 1= = = = i===s = = = ==——= U dosadaènjem tekstu naveli smo viée primjera sa ovom strukturom. Osim èto uključuje specifične logičke izraze ona Je slična odgovarajućim strukturama u viéirn jezicima (npr. u jeziku RDR) i zato nema potrebe za nJenim detaljnim opisivanjem. NajprečizniJe je opisuje formalni prikaz sintakse : if-struktura —> elseif-lista —> else_blok — > IF- logićki-izraz NEWLINE 1 ista-naredbi elseif-lista else-blok ENDIF_ NEWLINE ELSE I F- Jmprnodif lo9ički_izraz NEWLINE 1ista-naredbi elseif-lista EPS ELSE- Jmprnodif NEWLINE 1 i sta-naredbi EF'S Prilikom prevođenja klJućne riječi ELSEIF- i ELSE- zariiiJenJuJu se bezuvjetnim skokovima na kraj strukture. Implicitni kratki oblici tih skokova mogu se modificirati modifikatorom dugog skokai npr. : IF- IS_ EQUAL ELSEIF-"'ÌL> IS- TRUE . ELSE- ìl:-ENDIF- 3.4.5, L0(DP- st rukt ura Struktura petlje raole imati oblika: sa izlazom na vrhui na izlaza na vrhu ili dnu. Sva- tri imati i izlaze iz sredine. tri osnovna dnui i bez oblika mogu 3.4.5.1 Petlja sa izlazom na vrhu Logički izraz koji predstavlja uvjet ponavljanja petlje nalazi se' na nJenom početku iza ključne riječi WHILE-i a kraj petlje označava ključna riJeč REPEAT-: LOOP- WHILE- (logički_izraz>, REPEAT- Pojedine IS_ instrukcije u izrazu translatiraJu se u uvjetne skokove na prvu instrukciju iza petlje» a instrukcija REPEAT-u bezuvjetni skok na početak petlje. TaJ skok moie se mod ifi ci rat i navođenjem modi fi kat ora dugog skoka iza klJućne riJeči REPEAT__ 3.4.5.2 Petlja sa izlazom na dnu Sa ovim oblokom petlje već smo se susreli u Primjerima. Logički izraz također slijedi riJeč WHILE-» ali se nalazi na kraju petlje: LOOP- REPEPIT_ WHILE- ( los ićki.i sraz) Pojedine IS_ iristrukciJe u . izrazu trarislatiraju se u uvjetrie skokove na pcćetak Pet 1 Je. 3.A.5.3 Petlja bez izlaza na vrhu ili dnu sintaksom; whilB_Iista —> WHILE, losiòki-izraz NEWLINE lista-naredbi wh i1b_1i sta ~> EPS 3.4.5.5 Modifikator ulaska u petiJu Loaićki izraz ovdJe se ne PoJavlJuJe ni na poćetku ni na kraJu petlJe: LOOP_ REPEftT_ Instrukcija REPEflT_ translatira se u bezuvjetni skok na početak petlJei koJi ■ se može modificirati modi fikatororn dusoa skoka. 3.4.5.4 Izlazi iz sredine petlJe U slućaJu naJJedriostavni Jes losićkos izraza u svakom prolazu petlje sa izlazom na dnu izvràava se samo Jedan skok» dok se kod PetlJe sa izlazom na vrhu u svakom prolazu osim eventualno u prvom izvrèavaJu dva skoka» što Je manJe efikasno. Petlja sa izlazom na dnu moie postati losički ekvivalentna petlJi sa izlazom na vrhui ali efikasnija od nJei pr irnJenorn modifikatora ulaska u petlju <-0 : LOOP. Izlaze is sredine petlJe mosu imati sva tri osnovna oblika petlJe. Promatrano sa stanovišta.losičkos srananja prosrarnai potreba za nJirna obično se javlja samo kod trečes oblika» a u ostalim oblicima izlazi iz sredine mo9u pridonijeti efikasnosti. Izlaz iz sredine petlje specificira se primjenom ključne riJeći WHILE- koJu sliJedi losički izraz: LDOP_ <1ista_naredbi> WHILE- <1ista_naredbi> REPERT- Pojedine IB_ instrukcije u losićkom izrazu Prevode se u uvjetne skokove na orvu instrukciju iza PetlJe. Ovakvih izlaza u JednoJ petlJi može biti proizvoljno rnnoso» npr. : LOOP- <1ista_naredbi> WHILE- <1 ista_naredbi> WHILE- (lo3ički_izraz>' <1ista_naredbi> REPERT- WHILE- (1 osički-izraz> Činjenica da kod procesora MC6a000 neizvrženi kratki skok traJe manje od izvrèenos može se iskoristiti za optimi ziranJe brzine petlJi sa izlazom na dnu na račun rnemoriJskos prostora /MDRT0N66/. To se postiže "odmatanjem" petlJei éto u SYSTRflL-u omosućuJu upravo izlazi iz sredine petlJe. Na primjer» PetlJu za traženje prve lokacije Jednake nuli: LOOP- TST.B (R0)+ REPEfiT- WHILE-IS- NDT_ ZERO REPEAT- WHILE-IS- EQUAL OvaJ modifikator aenerira bezuvjetni skok na odsječak iza klJučne riJeći REPEAT-. TaJ skok izvrèava se samo prilikom ulaska u petlJui a može se modificirati da postane dua : Smisao oznake -1 Je u neizvršavanju tiJela petlJe u prvoj iteraciJi. Sintaksa modifikatora ulaska u peti Ju Je si ijedeča: entrarnodi f — ) — > MODIF_M Jmomod i f EPS 3.4.5.6 UNTIL- - EVENT- mehanizam Dosad opisanim mehanizmima ne mosu se izraziti sve potrebe za izlazima iz petlje koJe se mosu PoJaviti - takav Je slučaj kad se unutar peti Je nalazi neka struktura i na nekom rnJestu unutar te druse strukture Je potrebno izvršiti izlazak iz PetlJe. U svim dosad prikazanim oblicima strukture petlJe vizualnim presledom strukture vrlo lako se mosu uočiti svi nJeni izlazi Jer su specifikacije izlaza uvijek smJeètene uz neku od sranica strukture: sornJu» donJu ili lijevu. Sličan Je pristup kod mehanizma za omosučavanje izlazaka iz drusih struktura unutar petlJe: na početku petlje mora se deklarirati da POStoJe izlazi nesdJe na sredini. Deklaraciju obavlja naredba UNTII__» a stvarni izlazak iz petlJe provode EVENT-naredbe. Naredba možemo napisati i ovako» čime se postiže veča brz ina : LOOP- TST.B (flei) + WHILE- IS- NOT- ZERO TST.B (00)+ REPEAT- WHILE-IS- NOT- ZERO UNTII__ može se PoJaviti na početku svih oblika petlJe. Element koJi smo ovdJe označili kao u EVENT- naredbi mora biti jedriak onome u pripadrioj UNTII__ naredbi. IlustriraJno primjenu UNTII__ - EVENT- mehanizma primjerom: treba ispisati datoteku na ètampatu» ali tako da na poćetku i kraju svake stranice određeni brod linija ostane prazan. Pretpostavljamo da potprosrani GETCHRR ćita slijedeći znak datoteke sa standardnog ulaza u resistar D0) a PRINT ispisuje znak iz resistra DB na štampać. EMPTY EQU 3 PfiGE EQU 7£ - £ ♦ EMPTY CR EQU 13 EOF EQU -1 MOVEM.L D0-D£i-(SP) MOVE.B # CR> D0_CR spremi resistre LOOP- UNTIL- END-OF-FILE ! ! FOR- D1_L1NE. # EMPTY C-l} »C I! I PUTCHfiR DiZi-CR ! ! I NEXT- D1_LINE ! ! I- ) I ! FOR- Dl-LINE, # PAGE 't-D . #ei !l ! ! LOOP- ! ! ! 1 ! GETCHFIR D2-ZNRK 1 I ! I ! I EVENT- END_OF_FILE IF_ I I I ! ! ! I CMP.B # EOF, D£-ZNflK ! ! 1 I ! ! ! IS- EDUOL ! I I ! t I.J___________________________! ! ! ! I ! PRINT D£-ZNfiK I I ! ! ! REPEfiT- WHILE- , ! ! ! ! I CMP. B Dei_CR. D8-ZNRK I I ! ! I IS- NOT- EOURL ! ! I ! NEXT- Dl-LINE I I I ' — ' ' ! FDR- Dl-LINE. # EMPTY {-1> , #0 ÌÌ ! PUTCHflR D0_CR I ! ! NEXT- Dl-LINE i ! I II REPERT- ! MOVEM.L (SP)+7D0-D£ RTS obnovi res i stre Unutar PetiJe sa UNTII__deklaracijom može se nalaziti proizvoljno rnnoso naredbi sa istim indikatorom dosađaJa; drusim riJeòimai izlaza iz te Petlje može biti proizvoljno mnoso. Doses deklaracije dosađaJai tj. podruòj'e u koJem Je ona aktivna, proteže se od nJene POjave na Poćetku petlje do kraja petlje. Deklaracija može u dijelu svo3 dosesa biti nevidljiva, ako Je prekriva drusa deklaracija istos identifikatora. U primjeru LOOP- UNTIL- FOUND EVENT- FOUND LOOP- UNTIL- FOUND EVENT- FOUND REPERT- REPEAT- prva EVENT- naredba odnosi se na vanjsku petlju, a' drusa na unutarnju. Elementi UNTIL- - EVENT- mehanizma iraaJu slijedeću sintaksu: unt il_blok — > — > event-naredba —> event_ostatak —> — ) UNTIL- IDENT EPS EVENT- IDENT event-ostatak NEWLINE Jmpmodif IF_ lositki_izraz 3. <■+. 5. 7 Sintaksa LOOP- strukture 'Poèto srno ooi-sali sve njene elemente, konaćno niožemo predstaviti sintaksu ci Jele LDOP_ strukture: loop-struktura --> loop-ostatak 1 oop-i z laz LOOP- entramodif unt i 1_b1ok 1oop-ostatak NEWLINE WHILE- losićki-izraz NEWLINE 1 ista_naredbi while-lista REPERT-Jmpmodif NEWLINE 1 ista-naredbi while-lista REPERT-loop_izlaz Jmpmod i f WHILE- lositki-izraz ■ 3.4.6 FOR- struktura = = ====: = =: = = = =: = = = = = = =:= Drusa struktura petiJe u SYSTRRL-u nije tako općenita kao analosne strukture u vièini Jezicima. Ulosu kontrolne varijable peti Je ima neki od resistara procesora, petlja uvijek napreduje u silaznom sraJeru sa korakom -1, a krajnja vrijednost petlje Je fiksno definirana (kod procesora MC6a000 ta vrijednost je 0i a kod Z80 ,1). Struktura se implementira pomoću instrukcija tipa "decrement and branch" (DBcc kod MC68000) ako procesor sadrži takve instrukcije, a inaće instrukcijom za smanjivanje sadržaja resistra i zatifn uvjetnim skokom. Struktura FOR_ - NEXT_ može imati tri osnovna oblika, analosno LOOF'_ strukturi: FOR- ... . NEXT- ... FOR- ... WHILE- NEXT- ... 58 FDR_ .,. NEXT_ ..."'WHILE_ » i NEXT- mora biti podatkovni resistar, za početnu vrijednost ( ) su dozvoljeni svi adresni načini procesora» a krajnja vrijednost ( ) je uvijek «0. Naravnoi registar koji se pojavljuje u NEXT- naredbi mora biti jednak resistru iz FOR_ naredbe. Modifikator ulaska u petlju opisali smo u prikazu LOOP- strukture. On omogućuje ukazak u petlju na njenom dnu umjesto na početku, a u FOR- strukturi moie se pojaviti iza specifikacije početne vrijednosti petlje, bilo da je ona Puna ili prazna. Slijedeći primjer je varijanta prethodna dva - broj članova polja određuje memorijska lokacija N: Kap primjer napièitno odsječak za zbrajanje 10 članova polja: CLR D0_SUM I FOR- D1_CDUNT, » 9, « 0 ! I ODD (fi0-TflBLE)+, D0-SUM ! ! NEXT- Dl-COUNT ! Instrukcija FOR_ translatira se u instrukciju punjenja kontrolnog re9istra početnom vrijednošću, dakle MOVE « 9, Dl ; a NEXT- u DBRR instrukciju. Početna vrijednost nije 10, već 9, poiato Je krajnja vrijednost 0. 3.4.6.1.1 Izostanak specifikacije početne vrijednosti petlje Početna vrijednost petlje ne tnora se uoPće specificirati, već ss umjesto nje rnosu navesti dvije uzastopne točke. Tada kompilator ne senerira Početnu instrukciju inicijal izaćije resistra. Jer se smatra da je registar već inicijaliziran i sadrži ispravnu početnu vrijednost petlje. Potreba za ovakvim oblikom FOR- naredbe može se Javiti npr. u slučaju kad je kontrolni resistar petlje argument potprograma u kom se petlja nalazi." Transformirajmo prethodni primjer u potprogram sa argumentom u registru Dl koji predstavlja broj članova PolJa: CLR D0_SUM FOR- Dl-COUNT, N ■[-!> , #0 ODD (fi0-TflBLE)+, DiZ«-SUM NEXT- Dl-COUNT Modifikator ulaska u petlju generira bezuvjetni skok na kraj petlje, dakle na DBRft instrukcij u. U FOR_ strukturi oznaka -1 izražava ne samo neizvrèavanJe tijela petlJe u prvoJ iteraciJi, već i činjenicu da se prije prvos izvY'èavanja t i Jela petlje (ako do nJega uopće dođe) Početna vrijednost petlje smanjuje ža 1. 3.4.6.1.3 Modifikator! početnog punjenja registra petlje Početno punjenje kontrolnog registra petlje implicitno se ostvaruje MOVE instrukciJörn. Međutim, ponekad mogu biti prikladnije instrukcije MOVE.B, MOVE. L ili MOVEQ i tada zahtjeve za generiranjem tih instrukcija izražavamo ubacivanjem modifikatora početnog punjenja registra petlje u izvorni tekst. To su 'CB} , iL} i -'.a:- . Navode se iza specifikacije početne vrijednosti petlje, npr.: ili FOR- D0 i (fll) {B} , »0 FOR- D£ , »7 {D> , »0 a ako postoji i modifikator ulaska u petlJu on se navodi iza nJih. Sintaksa Je slijedeća: loadmodif sizemodi f MODIF-Q si zemodi f — > MODIF_B MODIF-L Element (sizernodif) koristi se i u SW]TCH_ strukturi. (iiemorija 3. 4. 6. £' FOR- PBtljà sa losičkirn izrazom ria d ri u FDR_ petlJij sa losićkim izrazom na vrhij ne treba posebno obJaénJavati> pa zato prelazimo na treći oblik petlJe: FOR.. i (noò_vrij>5 <1ista_naredbi> NEXT_ (resistar> WHILE- I__ZOG adresni-resistar D_ZfiG Plus —> MINUS L_ZftG adresni _re3 ist aY~ D_ZflG —> vrijednost ind-način — > L_ZfiG adresni-Pc_re9 istar drusi-resistar 0_ZRG EPS PLUS EPS —> NUM-KONST — ) IDENT —> ZN-KDNBT dru3i-resistar —> ZfiREZ resistar ~) EPS Vidimo da se kao resistar podataka? adresni resistar i neposredni argument može pojaviti i supstitucija makro arsurnenta (SUPST). U slućaJu adresnos resistra elementu SUPST mora prethoditi modifikator adrese {fl}. 3.4.È.4 Sintaksa FDR_ strukture Sintaksa ciJele strukture Je ovakva! for_struktura —> FÜR_ data-resistar ZfiREZ drusi_arsument entramodif ZftREZ OZNRKR-BROJR NUM-KDNST until-blok for_OBtatak f0r_05tatak —> WHILE- 1 os iiki_i zraz NEULINE lista-naredbi while-li St a NEXT-data_resistar --> NEWLINE lista-naredbi while-lista NEXT-data-resistar for-izlaz for-i z 1az —> WHILE- losićki-izraz — > EPS drusi-arsument —> arsument loadmodif —> TDČKfi TOCKfl Od sintaksnih elemenata koJe ćemo ovdJe prikazati» u FOR- strukturi koriste se . a u SWITCH-strukturi i te (memoriJa>. ars ument res i star dat a_res istar — > —> — > — > adresni-res i star —> — > res i star OZNflKfi-BROJfl neposredni-arsument mernor i J a data-resistar adresni-res istar DfiTfi-REG SUPST fiDR_REG MODIF_fl SUPBT adresni_pc_resi star —> adresni-res istar .—> PC-REG neposredni-arsument —) NUM_KONST —> IDENT ~> ZN-KÜNST —> SUPST 3.4.7 MONITOR- struktura Ova struktura omosućuJe strukturi rani zapis u onirn si ućaJevima koJ i se ne mosu efikasno riJeéiti upotrebom precistalih stn.iktura. Dna predstavlja proéirenJe koncepta UNTII__ - EVENT- za omosućavanJe izlaza iz petlJe sa bilo koJes nivoa sniJeiđenJa unutar nJe. Opći oblik strukture Je slijedeći: MONITOR- i .. i <1 ista-naredbi > WHEN- <1 ista_naredbi-l> WHEN- (dosađaJ-N) <1 i st a_nared b i-N> RESUME- U naredbi MONITOR- deklariraju se dosađaJi koJi se nadziru" u listi naredbi koJa si i Jed i. Unutar te liste naredbi nalaze se EVENT-naredbe koje indiciraju PoJavu pojedinih dosadaJai tj. prenose kontrolu na pripadne liste naredbi specificirane odsovaraJućim WHEN- naredbama. Kada se dosodi neki dosađaJi nakon izvršavanja pridruierie liste naredbi struktura zavrèava» tj. kontrola se prenosi na instrukcije èto Je si i Jede. fiko se unutar prve liste naredbi ne do9odi ni Jedan dosa(3aJ i kontrola dode do prve WHEN_ naredbei struktura odmah savréavs. Za razliku od LDDP_ i FOR_ strukture u kojima se doses deklaracije dosađaJa proteie cijelom strukturorni doseg deklaracija u MONITOR- naredbi proteie se od Poćetka strukture do prve WHEN_ naredbe. Bilo koji doaađaJ deklariran u MONITOR.. LDOP_ ili FDR_ naredbi može u diJelu svo3 dosesa biti nevidljivi tJ. prekriven deklaracijom istos dosadaJa u drusoJ MONITOR-. LOOP- ili FOR-naredbi. BroJ i redoslijed WHEN- naredbi mora biti Jednak broJu i redoslijedu dosađaJa deklariranih u MONITOR- naredbi. Svaka WHEN_ naredba translatira se u bezuvjetni skok na kraJ strukture« te u labelu - cilJ skokova dobivenih translaciJoni EVENT- naredbi. Skok koJi generira WHEN_ naredba moie se modificirati, npr.: WHEN- SUCCESS {L} Međutim. u nekim slučajevima taJ skok Je nepotreban uzrokuje samo generiranje adrese). a ne i skoka. labele (simbolićke Za ilustriraciJu dajemo program za binarno pretraživanje tabele. prikazan na slici 1. Baziran Je na primjeru iz reference /HflRMfiNQ5/. Poćetna adresa tabele Je u registru Pieii u Dl Je broj članova tabele, a u D£ broJ batova koJei sadrii svaki član. Prvi bate svakog člana Je klJuč koJi se usPoreduJe sa zadanim ključem u DÖ. U registru 06 vraća se adresa člana tabele gdje Je nađen klJuč. ili 0 ako nije nađen. MOVEM.L D2-D5.-(5P) ! spremi registre SUBQ.W #1. D£_END ; end ' = broJ članova - 1 CLR.L D3-BEGIN ; begin = 0 MOVE.L D3_BEGIN7 flG-RDR-KEY ; izlazni registar = 0 MONITOR- FOUND, LOOP- NOT-FOUND EVENT- NOT-FOUND IF_ CMP.W D£-END, D3-BEGIN IS- GREATER ; ako Je begin > end pretraiivanje ; zavrèava neuspjeèno MQVEiW D3-BEGIN, D4-MIDDLE fìDD.W D£-END. D4-MIDDLE LSR.W #1. D4_MIDDLE i middle = begin + end / £ MOVE.W D4-MIDDLE, D5_GFFSET MULU Dl-LENGTH. D5_0FFSET ; offset = middle * length EVENT- FOUND IF_ CMP.B 0(ft0-TftBLE.D5_QFFSET).D0_KEY IS_ EQUAL ; ako Je ključ Jednak vrijednosti u ; tabeli na mJestu middle ; pretraživanje JeuspJežno zavrženo IF- IS- LESS ! ako Je manJ i SUBQ.W D4_MIDDLE MOVE.W D^-MIDDLE» D£_END ! end = middle - 1 ELSE- i ako je veči RDDD. W f»l, D4_MIDDL£ MOVE.W D4_MIDDLE, D3_BEGIN ; begin = middle + 1 ENDIF- REPEOT- WHEN- FOUND •CPi;' LEft 0(FI0-TfiBLE, D5_0FFSET) . PI6_ftDR-KEY ! upiéi u izlazni registar adresu ; gdJe Je nađen klJuć WHEN- NOT-FOUND 'Cfl) RESUME- MOVEM.L RTS 1 i st a_ i dei-it ost_iderit when_li St a wherirnodi f MDNITDR_ li5ta_ident NEWLINE 1ista_naredbi when_lista RESUME-NEWLINE —> IDENT 05t_ident —> ZRREZ li5ta_ident —) EPS — > WHEN_ IDENT whenrnodif NEWLINE 1ista_naredbi when_li 5t a — > EPS —> MODIF_L —> MODIF_fi —> EPS svaki arsLirnsrit ssnerira se CMP> CMPfl) CMPI ili TST iristrukcijai te uvjetrd skok ,(rnòie sa modificirati modifikator srnjeéten iza arsuinenta). Ci IJ skoka za zadnji arsurnent u listi Je slijedeća CfiSE_ ili ELSE_ naredba ili kraj strukturei a za zadnji arsuinent poćetak pripadne liste naredbi. Za primjer kodirajmo zadatak ispitivanja da li je slovo u resistru DÖ sainoslasnik. Izlazna informacija ostavlja se u resistru Dl: SWITCH- D0_ZNfiK (BJ CnSE_ » 'fi', # 'E'» » 'I', # '□', » 'U' MOVE #1) Dl_SfiMOGLfiSNIK ELSE- MOVE «0, Dl-SRMOGLRSNIK ENDSWITCH- Na kraju prikazujemo sintaksu strukture: SWITCH- struktura SWITCH- struktura ornosućuje selekciju (naJvièe) jedne od mno3Ìh mosućih akcija u zavisnosti o vrijednosti selektorskos arsumenta. Svakoj akciji pridružen je skup unaprijed definiranihi u naćelu konstantnih vrijednosti. Ukoliko Je neka od tih vrijednosti Jednaka vrijednosti selektorskos ars.umenta izvodi se oripadna akcija i zatim struktura završava. U suprotnom se ■ izvodi akcija adređena ključnom riJeći ELSE-, a ako ona ne postoj i struktura odmah zavrèava. SWITCH- struktura moie se implementirati na vièe naòina: pomoòu CMP i TST instrukcija, pomoću indirektnog skoka preko tablice adresa, a uz neka osranićenJa i pomoću DBRfi instrukcije. Pristup SYSTRfiL-a Je podržavanje svih triju naći na pri ćemu prosramer u izvornom prosramu specificira željeni naćin. Implementacija indirektnim skokom mosuća je samo'kod dvoprolaznos kompilatora, tako da je definirana samo na drusom nivoa jezika. Razvoj SYSTRfiL-a niJe potpuno završen. Trenutno je potPuno definiran samo prvi oblik SWITCH-strukture i zato će jedino on biti ovdje opi san. Gpći oblik strukture je ovakav: SWITCH- (selektorski-arsurnent) <1ista-naredbi) CFiSE- (1 ista_.ar3umenata> < 1 ista-naredbi) switch-struktura —> <1 i sta-arsumenata> <1 i Sta_naredbi > CfiSE-ELSE- <1 i sta-naredbi > ENDSWITCH- Selektorski argument može biti resistar podataka, adresni resistar ili memorijska lokacija, i ovisno o tome struktura se implementira pomoću CMP, CMPfi ili CMPI instrukcija, a ako sa si i Jedi modifikator velićine instrukcije dobivaju ekstenziJu .B i 1 i . L . Prva lista naredbi, ako ni Je prazna, sluii za određivanje vrijednosti selektorskos arsumenta. U strukturi mora postojati najmanje jedna COSE- naredba. Osim prve, sve ostale kljućne riJeći COSE-, kao i ELSE- naredba, translatiraJu se u bezuvjetne skokove na kraj strukture i stosa ih mosu slijediti modifikatori dusos skoka. Kao arsumenta COSE- naredbi dozvoljeni su svi adresni naći ni procesora MC6B000. Pojedini arsurnent i u listi odvojeni su zarezima. Za =w_arsuinent —> 1 ista-arsumenata —> SWITCH- sw_arsument sizemodif NEWLINE 1ista_naredbi CfiSE_ 1ista-arsumenata NEWLINE 1ista-naredbi case-lista sw-else_blok ENDSWITCH- NEWLINE resistar memorija arsument Jmpraodif ostal i-argument i ostali-arsument i caSE-1i sta sw_else_blok —> —> — > ZRREZ EPS 1ista-arsumenata COSE- jmpmodif 1 ista-arsumenata NEWLINE 1 ista-naredbi case_lista EPS ELSE- jmpmodif NEWLINE li Sta-naredbi —> EPS 3.4.9 Optimizacija kvalitete koda U prvoj fazi prevođenja svaka struktura se prevodi zasebno, neovisno o kontekstu u koJern Je smještena, zbos ćesa dobiveni kod nije uviJek optimalan. Kasnija faza optimizacije može poboljšati kvalitetu koda. Osnovna potrebna optimizacija Je optimizacija lanaca skokova. Takav lanac ćini npr. skok na mjesto sdJe se nalazi drusi bezuvjetni skok, sdje se eventualno tnože nalaziti drusi bezuvjetni skok, itd., kao u slijedećem primjeru! LGOP- IF- IS_ ZERO ENDIF- REPEOT- Lanac zapoćinJe uvjetnim ili bezuvjetnim skokom, DBRfi ili DBcc instrukcijom. Optimizacija ćini cilJeve svih skokova u lancu jednakim cilju PoslJednJes skoka. Ostale potrebne optimizacije zahtijevaju postojanje posebnih sintaksnih rnenanizama, u ovom ćasu nepotpuno definiranih. 3.4.1.0 ÜPciJe kompilatora U naredbi za aktiviranje kompilatora posebno su korisne opciJe -1 i -s koje specificiraju da će svi generirani skokovi biti duali odnosno kratkii bez obzira na postoJanJe mod ifikatora. Prilikom razvoja prosrarnai kad se on testo mijenjat kompiliramo prosrarn uz opciju -1; konaćnu verziju kompiliramno sa -s da vidimo sdje su potrebni du3i skokovi; tada na ta mjesta ubacimo modifikatore i kompiliramo bez opciJa. 4. ZAKLJUČAK U tlanku su opisane strukture i mehanizmi simboliòko3 strukturirano3 zbirnos jezika SYSTRAL. Razvoj jezika nije potpuno dovréen. U toku protekle sodine tlanovi ekipe projekta disitalne resulaciJe električkih strojeva u Elektrotehničkom institutu "Rade Končar" koristili su SYSTRAL za razvoj prosratnske podrèke. Osnovni zahtjev postavljen na prosranisku podriku t03 projekta je vrlo velika brzina rada. Zahtjev je zadovoljen jer je prilikom razvoja Jezika i odabira nJesovih struktura i mehanizama maksimalna painJa posvećena efikasnosti. /KAWAieei/ S. Kawaü "ft Semi block Structure for Low-level Languages"! Software -Practice and experiencei vol. 10i 11-19 (1980) /SMITH85/ M.F.Smith, Y.Hoffner. M. A. Sealeu: "Mappins Hi3h - Level Santax and Structure Into Assembla Lansuase", IEEE MICRO, Ausust 1985, &7-ai /ANDERS0NS1/ A.Anderson, M.Tracu, P. Wasson; "FORTH-79 Tutorial and Reference manual, Apple II Version, Volume I, Appendix II: 6502 Assembler", MicroMotion, 1981. /HARMANS5/ L.Harman, B.Lawson: "The Motorola MC68000 Microprocessor Ramila: Assembla Lansuase, Interface Desisn, and Sastem Desisn", Prentice-Hall, 1985. /M0RT0N86/ M.Morton: "68000 Tricks and Traps", BYTE, September 1986, 163-17£ /WAITE84/ W.M.Waite, G.Goos: "Compiler Construct ion", Sprinser Verlas, 1984. /NEŽ1ĆB5/ H.Nežić: "Strukturi rano pro3ramiranJe u asembleru". Informatica, 1/1985, 5S-60 5. ZAHVALE , Posebno zahvaljujem T. CrnoèiJii prvom korisniku SYSTRAL-a, ćiJa su iskustva i primjedbe pridonijele povećanju mogućnosti jezika i razlučivanju bitnih i manJe bitnih aspekata. Zahvaljujem i Ž. Peleèu i I. Šumisi čiJe su Primjedbe također pridonijele PobolJèanJu Jezika, te N. Periću na podréci pruženoj razvoju ovos projekta. £. LITERATURA /KNUTH74/ D.E.Knuth: "Structured Prosramrains with 30 to statements". Computing Surveas, 6, 4, £61-301 (1974) /CDHENB3/ A.Cohen! "Structure, Losic, and Program Design", John Uli lea, 1983. /ZAHN74/ C.T.Zahn: "A control statement for natural top-down structured prosrammins"> Symposium on Prosrammins Lansuases, Paris, 1974. /WALKER81A/ B.Walker: "Toward a Structured 6809 Assembla Lansuase, Part I : An Introduction to Structured Assembla Lansuase", BYTE, November 1981, 370-3B£ /WALKER81B/ G.Walker: "Toward a Structured 6809 Assembla Lansuase, Part £: Implementing a Structured Assembler", BYTE, December 1381, 198-££8 /KRIEGER80/ M.Krieser: "Structured assembla lansuase suits programmers and microprocessors". Electronics, Januara 17, 1980, 63-71 /M0SAKB2/ fi.Mosak: "Structured Prosrammins Can be Applied to Microprocessors - Even by Novices (A Review of Structured Microprocessor Programming)", IEEE MICRO, Februara 198£. /WIRTH68/ N.Wirth: "PL360, A Programming Language for the 360 Computers", Journal of the ACM, Vol 15, No. 1, Januara 1968, 37-74 IBM - ENHANCED GRAPHICS ADAPTER (EGA) KARTICA INFORMATICA 3/1988 UDK 681.325 Matjaž Debevc Metka Zorič Rajko Svečko Dali Đoniagič Tehniška fakulteta Maribor POVZETEK Na podroćju' računal niitva prihaja vedno bolj do izraza področje ratunalniéke gra-fike. Osebni računalniki postajajo tudi vedno bolj pri»topni iirokim množicam uporabnikov. Trenutno najbolj aktualna možnost gra-fičnega prikazovanja nam podaja EGA grafična kartica za IBM in kompatibilne osebne računalnike. Delo opisuje zgradbo, osnovo in programiran je te kartice. ABSTRACT Computer graphics is becoming more and more districtive in the ■field o-f computers. Personal computers are becoming acessible to a wide number o-f users. At the moment the EGA graphics card presents the best possibility of graphic display -for IBM and a compatible personal computers. The present thesis discribes the structure and programming o-f this card. 1. UVOD 2. IBM - Enhanced Graphic* Adapter Računalniška grafika je ena najbolj spektakularni h možnosti, ki nam jih dajejo računalniki. Računalniška grafika je poseben medij, ki omogoča najlažjo in najhitrejžo komunikacijo med človekom in strojem. Cloveiko oko lahko dosti hitreje razbere informacijo z grafične slike, kakor pa s tabele, polne ètevilk. Dolga leta je bilo to področje izredno drago in težko dostopno. Zadnjih 30 let je čutiti enakomeren padec svetovnih cen na področju računalništva. Ta padec se giblje ia. okoli 15X letno. To je vzrok, da postajajo računalniki z velikimi zmogljivostmi vedno bolj dostopni. Povečanje zmogljivosti in padec cen se med drugim tudi čuti na področju osebnih računalnikov IBM in njemu kompatibilnih. Nekdaj niti pomisliti nI bilo mogoče na visoko zmogljivo grafiko. Slika, ki je bila nekoč narisana v nekaj minutah z majhno resolucijo zaslona, se danes nariše v trenutku na visoko resolucljskem ekranu. NI daleč čas, ko bo trodimenzionalna grafika čisto nekaj vsakdanjega. Na osebnih računalnikih IBM in nJemu kompatibilnih Je danes najbolj aktualna grafična kartica EGA, ki je našla pot v marsikateri osebni računalnik in je največkrat obravnavana kot standard za ostale grafične kartice. EGA kartico imenujejo tudi IBM-HR (High Resolution) kartica. To je kartica, ki postavlja nove možnosti na.področju grafike na osebnih računalnikih. 2e več kot dve leti je ta kartica na trgu in že obstaja cela vsta tako imenovanih kompatibilnih EGA kartic, V grafičnem načinu je. EGA kartica z resolucijo 640 « .350 točk za 150 grafičnih vrstic boljša od stare barvne grafična kartice CGA (Colour Graphic Adapter). Takšna resolucija nam omogoča ukinitev utripajoče slike, ne glede na to ali uporabljamo monohromatski zaslon ali novi IBM "Enhanced Color Display". Seveda omogoča EGA kartica tudi emuliranje starega zaslona s resolucijo 320 » 200 ali 640 ♦ 200 (glej Načini EGA kartice). Za individualno uporabo EGA kartice sedaj ne obstaja veliko uporabniških programskih paketov. Družba Borland International predstavlja s svojim TURBQ PASCAL-om verzija 4.0 zelo dober in tudi poceni programski paket, ki med drugim podpira tudi EGA kartico. Vendar običajno tako velikega programskega paketa niti ne potrebujemo. Poleg tega mora bijti program napisan v pascalu. Za pisanje samo nujno potrebnih, kratkih funkcij za uporabo EGA gra+ične kartice je potrebno poznati zgradba in delovanje gra-fićne kartice. 2.1. ZSRADBA EGA KARTICE Programiranje za EGA kartico je teiko ie zaradi množice registrov (70), kakor tudi zaradi mnoiice funkcij, ki jih ta kartica omogoća. te ko pogledamo v "Technical Referance Manual" in blokovni diagram za EGA kartico (slika 1), nam postane jasno, da je potrebno natančno razumevanje funkcij in registrov, će telimo, da bomo imeli pravilno delujoč programski paket. Kot osnova nam »luii knjiga "IBM - Personal Computer, IBM -Enhanced Graphics Adapter". c»v «A44.0VI ^OMTI^I slika 1 I Blokovni diagram EGA kartice Glede na blokovni diagram delimo EGA kartica na i 2.1.1. CRT Controller CRTC (Cathode Ray Tube Controller) je po funkciji raz*irjeni 6845. Generira »inhroniz i rane signale za horizontalne in vertikalne premike. Odgovarjajoči parametri se programirajo v 19 CRT registrih. Vertikalni registri so dolgi 9 bitov, kar nam da resolucijo 512 slikovnih točk. Ce je drugi bit v "Mode Control Register" enak 1, se lahko resolucija podvoji na 1024 vrstic na sliko, kar pa pomeni, da potrebujemo poseben monitor. Nadalje skrbi CRTC za obnovitev slike shranjene v dinamičnem RAM-u. Naslov za obnovitev »like je dolg dva byta, kar pomeni, da CRTC dovoljuje naslavljanje do &4 Kbytov. CRT kontroler dosežemo z vhodno/izhodnim naslovom 3?4 in ■3?5, kjer "?" pomeni B ali D.B uporabimo za Monochrome način, D pa za barvni način. 3?4 je naslovni register, medtem ko je 3?5 bralno pisalni podatkovni register. Vsebina registrov: 1. Address Register 2. HorizontalTotal 3. Horizontal Display End 4. Start Horizontal Blank 5. End Horizontal Blank 6. Start Horizontal Retrace 7. End Horizontal Retrace 8. Vertical Total 9. Overflow 10. Preset Row Scan 11. Max Scan Line 12. Cursor Start 13. Cursor End 14. Start Address High 15. Start Address Low 16. Cursor Location High 17. Cursor Location Low 18. Vertical Retrace Start 19. Light Pen High 20. Vertical Retrace End 21. Light Pen Low 22. Vertical Display End 23. Offset 24. Underline Location 25. Start Vertical Blank 26. End Vertical Blank 27. Mode Control 28. Line Compare 2.1.2. Zaslonski pomnilnik Zaslonski pomnilnik se sestoji iz ćtirih pomniIniékih prostorov (Bit Planes). V osnovni verziji je vsak prostor velik 16 Kbytov in se nahaja na EGA kartici. V dveh korakih se lahko kapaciteta dvakrat poveča. Potem govorimo o 64, 128 ali 256 Kbytni EGA kartici. Slika z resolucijo 640 » 350 ima BO • 350 bytov. Organizacija slikovne točke v zaslonskem pomnilniku je v grafičnem načinu naslednja: Prvih osem slikovnih točk zaslona (zgornji levi kot !) se nahaja na naslovu OOOH slikovnega pomnilnika, naslednjih osem na naslovu OOIH itd. Prva slikovna točka znotraj enega byta je bit 7, naslednja je bit 6. 2.1.3. Gra-flćni in takstavni način Štirje pomnilniiki prostori zaslonskega pomnilnika reprezentirajo v grafičnem načinu tudi naslov barvnih atributov ene slikovne točke (16 barvi. Ta naslov je označen v Attribute-Control1 er-ju kot indeks v barvnem registru. Več o tem je napisano v poglavju q Attn ibut-Control1 er-ju. Ce ima EGA kartica 64 Kbytov na voljo, lahko uporaDimo samo 4 barve. V tekstovnem načinu je pomnilnléki prostor znakovno kodni pomnilnik, pomnilniéki prostor 1 je pomnilnik za atribute, pomnilniéki prostor 2 pa je znakovni generator. Ce se selektira tekstovni nadin, prenese B1QS enega od dveh znakovnih stavkov v pomniInižki prostor 2. 2.1.4. Sekvenćni genarator in multiplexer Naslovni multiplexer (MUX) krmili naslove zaslonskega pomnilnika, ki pridejo enkrat direktno od CPU-ja (naložitev zaslonskega pomnilnika) in drugič od CRTC (zaslonska osveiitev). Sekvenčni generator (SEQ) generira krmilne signale za zaslonski pomnilnik in takt za zaslonsko ponavljanje. Map-Mask-Reg ister omogoča individualno vpisovanje na zaslonski pomnilnik. Zraven lahko tudi izberemo določeno barvo. Za tekstovni način (A/N) se nahaja v Character-Map-Select registru izbira itirih znakovnih stavkov. Sekvenčni register dosežemo z naslovi 3C4 (select naslova) in •'SCS (podatkovni vhoano - izhodni register). Vsebina registra : 1. Naslov 2. Reset 3. Clocking Mode 4. Map Mask 5. Character Map Select 6. Memory Mode 2.1.5. Srafićni kontroler Gra-fični kontroler lahko dela v dveh načinih; v gra-fičnem ali v tekstovnem. V gra-fičnem načinu se prenesejo podatki serijsko preko tako imenovanih Bit-Plane vodil CO, Cl, C2, C3 k Attribute Control er-ju. Ta étiri vodila, vsako za zaslonski pomnilniéki prostor .(Bit Plane Map) tvorijo 16 moinih barv (glej Attribute Controller), Prvi gra-fični kontroler je za zaslonski pomnilniéki prostor O in 1 (2 byta) , drugi grafični kontroler pa za ostala dva (2 in 3). Oba grafična kontrolerja imata vsak po 16 bitni podatkovni register, kjer se lahko vpiée ali bere 32 bitov slikovnih podatkov v enem pomnilnièkem ciklusu. Nadalje se nahaja v obeh grafičnih kotrolerjih že krmiljenje za izbiro slikovne točke in njegove barve, kakor tudi étiri logične funkcije (zamenjava, AND, OR, XOR). Color-Compare register omogoča hkratno primerjanje z eno določeno barvo preko osmih slikovnih točk enega byta. V tekstovnem načinu se podatki transport iraj o direktno v Attribute-Control1 er. Register dosežemo z naslovi 3CE (select naslova) in 3CF (podatkovni vhodno izhodni naslov). Vsebina registra: 1. Graphics 1 Position 2. Graphics 2 Position 3. Graphics 1 & 2 naslov 4. Set/Reset 5. Enable Set/Reset 6. Color Compare 7. Data Rotate ' 8. Read Map Select 9. Mode Register 10. Miscellaneous 11. Color Don't Care 12. Bit Mask 2.1.6. Attribut Controller Ta kontroler je zadnja postaja slikovnih podatkov na poti k zaslonu. Ima 21 registrov. Prvih 16 naslovov so tako imenovani barvno paletni registri. Biti O do bita 5 teh 16 registrov omogočajo dinamično izbir.o 64 možnih barv. Barvno paletni register se naslavlja preko étirih vodil CO - C3, ki pridejo od grafičnega kontrolerja. To se dogaja serijsko, torej točka za točko. Preden enega od teh 16 registrov naslavljamo, gredo podatki tudi preko Color-Plane-Enable registra. Ponavadi se naslov pusti tukaj na miru, da imamo lahko na voljo 16 barv. Z Color-Plane-Enab1 e registrom pa lahko omogočamo prikaz enega od itirih slik, ali pa kombinacijo teh itirih slik. V tekstovnem načinu se tekstovni podatki prenašajo paralelno iz slikovnega pomnilnika v Attribut Controller. Osvežilni naslov generiran od CRTC se naslavlja najprej na slikovni pomnilniéki prostor O in 1. Byte naslova, shranjen v pomnilnièkem prostoru 1 se prenese v Attribut Controller, kjer ima za vsakokratno prikazano črko svojo veljavnost. Prebrana znakovna koda iz pomni 1 niékega prostora O, na primer 41H za črko "A", se naslavlja v povezavi z Row-Scan-Count registrom zaslonskega pomni 1 niékega prostora 2, kjer se nahaja ta v ROM-u naložen znak. Prebrani biti se poéljejo skozi grafični koatroler k Attribut kontrolerju, skupaj z barvnimi vrednostmi in so nato vodeni serijsko dalje k zaslonu. Row-Scan-Count register nastavi vertikalno viéino znaka na zaslonu, to pomeni étevilo horizontalnih vrstic iz katerih je znak sestavljen. Znak je lahko velik maKimalno 32 znakov in se nastavi v CRTC registru 9. Vsebi na: M E M F M 10 640 X 200 640 X 350 640 X 350 1. Address Register 2. Palette Register 3. Mode Control Register 4. Overscan Color Register 5. Color Plane Enable Register 6. Horizontal Pel Panning Register 3, PROGRAMIRANJE ESA KARTICE C - IBM Color zaslon, E - IBM Enhanced Color M - IBM Monochrom zaslon 3.1.1. Za vklop in izklop grafičnega zaslona uporabljamo naslednje BIOS funkcije« AH = Oi izbira BIOS načina AL: EGA naćin po zgornji tabeli Prejàne poglavje je bilo namenjeno spoznavanju zgradbe in strukture EGA kartice. To poglavje pa je namenjeno programi ranju EGA kartice. Namesto da bi pisali velik programski grafični paket, včasih potrebujemo samo osnovne ukaze za risanje na ekran, kakor so na primer vklop, izklop grafike, risanje črte in brisanje zaslona. V resnici obstaja veliko programskih paketov, ki podpira grafiko na EGA kartici za IBM-PC in kompatibilne, vendar programerji , ki želijo imeti hitre in učinkovite programe raje sežejo po osnovnih funkcijah, ki jih lahko sami napišejo. Za programi ranje EGA kartice potrebujemo EGA-BIOS funkcije. V ROM-u kartice se nahajajo poleg teh funkcij ée oba znakovna stavka in ena samostojna funkcija. EGA-BIOS vsebuje interrupt (prekinitvene) vektorje 05H in lOH. (H pomeni heksadeci mal no). Interrupt 05H uporabimo za izpis na zaslon, medtem ko uporabljamo interrupt lOH za 19 krmilnih funkcij EGA kartice. Ker se na PC-ju največkrat uporabljata prevajalnika TURBO-PASCAL in TURBO-C od firme BORLAND, so tudi podrogrami napisani v teh dveh jezikih. Prenos na prevajalnike ostalih firm ni problematičen, samo potrebno je vedeti, kako kličemo BIOS funkcije. Programa vključujeta ukaze za vklop, izklop grafike, risanje točke (pixla) in brisanje ekrana. 3.1. Nastavitev načina EGA kartice Kadar želimo risati z EGA kartico, moramo najprej vklopiti EGA v ustrezni način. Delovni načini EGA kartice: EGA način resoluci ja Število bar C 0 320 X 200 16 E 0 320 X 350 16/64 C 1 320 X 200 16 E 1 320 X 350 16/64 C 2 640 X 200 16 E 2 640 X 350 16/64 C 3 640 X 2i:i0 16 E 3 640 X 350 16/64 C 4 320 X 200 4 C 5 320 X 200 4 C 6 640 X 200 2 M 7 720 X 350 4 C D 320 X 200 16 AH = OFH; prikaz trenut. zaslonskega statusa parametri, ki vračajo podatke so: AL: EGA - način AHt število znakov/vrsti co BHt število trenutnih zaslonskih strani Podprograma; Ce uporabljamo verzijo 4.0 TURBO-PASCALA, potem v glavi programa vstavimo : uses DOS| tip pa je definiran z Registers. Kadar pa uporabljamo verzijo 3.0 pa je potrebno dodati : type Registers = record case integer of li (ax,bx,cx,dx,bp,si,di,ds, es,flgsi integer); 2i (al,ah,bl,bh,cl ,c,dl ,dhi byte)j end; procedure Graf ika(vklopi boolean); var regi Registers; načini integer; begin if vklop then begin < branje aktualne nastavitve zaslona > reg. ax I *> »OFOO; Intr(»10,reg)5 < shranitev načina > nacint"» reg.al; < ESA način za Enhanced Color Display } reg.axi=: COOIO; Intr(«10,reg>; end el se begin reg.ahi» 0; -C izklop grafičnega načina > reg.ax J" način; Intr(»10,reg); end; endt <6rafika> Jezik C: M include union REGS regj int načini Grafi ka el se < reg.h.ah = 0; reg.x.ax = nacin; int86<0xl0,®,tireg) ; > procedure brisiZaslon; begin reg.ahi» »07; reg.alx = Oj rBg.chs= 0; reg.cii= O; reg.dht= 24; reg.di := 79; reg.bh;= 0; Intr(«10,reg); end} y C jeziku < pomik strani navzdol < vstavitev okna > < spodnji levi rob > < zgornji desni rob > < barva ozadja > 3.1.2. Za risanje to(ike uporabljamo naslednje BIOS funkcijei ftH = OCH; nariši gra-fićno točko BH! tekoča stran DX: . Y pozici ja (O - 349) CX: X pozicija (O - 639) AL; barva (O - 63) brisi Zaslon() < reg.h.ah = 0x07; rsg.h.al reg.h.ch reg.h.cl reg.h.dh reg.h.d1 reg.h.bh O; O; Oi 24; 79; O; int86<0xI0, « reg.ah;= »OC; reg.exi= x; reg.dxi= y; reg.al:= barva; Intr(»10,rog); end; < riSi grafično točko > IBM Personal Computer: TURBO PASCAL V4.0. Program v C jeziku: Točka 3.1.3. Za brisanje ekrana uporabimo naslednjo BIOS funkcijo: GRAFIČNA KOMUNIKACIJA VAX - ISKRA DELTA PARTNER INFORMATICA 3/1988 UDK 681.326 Matjaž Debevc Rajko Svečko Mark Martinec* Tehniška fakulteta Maribor * Institut »Jožef Stefan« POVZETEK V ielji, da bi uporabili Partner kot samostojen gra-fićni terminal, je bil napisan grafitni protokol med njim in med računalnikom VAX. S tem smo dosegli, da se uporabljajo vsi Partnerjevi gra-fični ukazi. Pri tem smo uporabili pomožni knjilnici TEKUSR na Partnerju in SUNLET na VAX sistemu. ABSTRACT In wish that we use Partner as an inäepandet graphic terminal, was -written a special graphic protocol between Partner and Vax. With that we are able to use all Partner's graphics instructions. We used additional libraries: TEKUSR on Partner and SUNLET on VAX . 1. UVQD Zaradi raznovrstnih moinosti i.iporabe vseh mogočih gra-fičnih paketov, ki so namenjeni velikim, dragim in teiko dostopnim tujim gra-fičnim terminalom bi bilo ugodno, ko bi lahko vse te pakete uporabljali kar na mikroračunalni ki h - sadovih naèe, jugosl ovan.ske ustvar jal nost i . Primer takega mikroraćuna1nika je Iskra-Delta Partner z grafično kartico, hikroračunalni k Partner je samostojna enota z enobarvnim, grafičnim, rastrskim terminalskim zaslonom in največjo resolucijo 1024 « 512. Partner bi zadostoval za osnovna spoznavanje delovanja grafike, vendar le do takrat, ko bi uporabnikove ielje postale zahtevnejèe. 2al Partner nima dovolj prostora za velike grafične pakete, ponavadi instalirane v HOST računaln i ku. Takèni paketi so na primer' Gk.S (Gr aph i ca 1 Kernel System), CGI(Computer Graphics Interface), CGM(Computer' Graphics Metafile), PHIGS(The Programmer's Hierarchical Interactive Graphics System). Za večino programskih "paketov je značilno, da poskušajo biti čimbolj aparaturno neodvisni. Izjema je le krmilni del(DRIVER), ki skroi za pravilno komunikacijo »osrednjega neodvisnega dela s terminalom. Za vsak terminal ga je potrebno napisati znova. Da bi lahko napisali takéne programe za Partnerja, ga moramo uporabiti kot samostojen grafični terminal hkrati z riOST računalnikom, s katerim je povezan. Na ta način lahko kličemo grafične podprograme in funkcije v HOST računalniku m pri tem izkoriščamo vse grafične lastnosti mikroračunalnika Partner. Za realizacijo te komuni!acije je potreben protokol za čim hitrejéi odtok m pritok informacij v mi kroračunal n 11: . 2. PROTOKOL GRAFIČNE KOMUNIKACIJE Protokol pomeni v splošnem aogovor o obnaèanju komunikacije med računalniki oziroma terminali. protokoli so oogovorni za generiranje in procesiranje podatkov. Najoolj znana mreia OSI/ISO( Open System Interconection / International Standard Organisation) na primer vsebuje sedem nivojev: 1. •fizićni nivo 2. nivo podatkovnih povezav 3. mreini nivo 4. prenosni nivo 5. usklajevalni nivo Ò. predstavitveni nivo 7. aplikacijski nivo Za usklajevanje aplikacijskih nivojev uporabimo aplikacijski protokol; v tem okviru »e giblje tudi protokol za gra-fično komuni kac i jo. Osnovni in najbolj grobi princip protokola za grafično komunikacijo je v tem, da program v Partnerju prebere niz doloćenih znakov, poslanih s HOST računalnika, in pri tem pokliče ustrezni Partnerjev gra-fični ukaz. Kadar želimo risati na Partnerju brez pomoči HOST računalnika uporàbljamo gra-fične ukaze s sistemske datoteke BIOLIB.PfiS. V njej so podprogrami in -funkcije za risanje na Partnerju. Pri tem je treba paziti le, da piiemo programe s katerimi kličemo te ukaze, v TURBO pascalu. Ukaze za komuniciranje z grafičnim procesorjem kličemo s pomočjo funkcije BI0S(29) - (Basic Input/Output System)) od tod tudi ime datoteke. - Pri iskanju spoznavnega niza grafičnih znakov ne smemo motiti ostalih nizov, ki označujejo ukaze, namenjene HOST računalniku. Poiskati je treba takèen niz znakov, ki se pri normalnih ukazih skorajda nikoli ne pojavi Pri bolj zmogljivih grafičnih terminalih uporabljamo ubežne sekvence (escape sequence) za klicanje grafičnih funkcij. Partner tega ne pozna, zato smo se odločili za razpoznavni niz "X3". Znak "%" se zelo redko pojavi, vendar je ée mnogo manjèa verjetnost, da se bo za tem znakom pojavil znak "D". Pred vsakim nadaljnim ukazom stoji zopet znak "3" za kontrolo, če bi priélo do kakène motnje pri komunikaciji. S tem je dana moinost, da se ne zruöi celoten sistem, ampak je napaka samo pri enem ukazu. Za znakom "3" sledi spoznavna koda ukaza. S to kodo ugotovi program z imenom GRAFIKA, kateri ukaz bo moral poklicati iz datoteke BIOLIB.PAS. Tej kodi sledi niz znakov, ki predstavljajo parametre, potrebne za tekoči grafični ukaz. Niz parametrov se zaključi z znakom "3" za označitev začetka naslednjega ukaza. Za popolno zaključitev poéiljanje znakov grafike nam sluii znak "Z". Za izvajanje grafične komunikacije vtipkamo ukaz GRAFIKA, za zaključitev komunikacije uporabimo znak "\". S HOST računalnikom, v naéem primeru z VAX-8800 in MikroVAX, ielimo najti dostop do teh podprogramov -in funkcij v datoteki BIOLIB.PAS v Partnerju. Za doseg te realizacije, poèi1 jamo s HOST računalnika nek določen niz znakov. Na Partnerju deluje program za zaznavanje znakov na vhodu/izhodu, pri spoznavnem nizu zaustavi nadaljno vnaéanje in izvede ustrezno grafično funkcijo. Po potrebi poélje tudi določen niz znakov nazaj k HOST računalniku. 3. REALIZACIJA PROGRAMA ZA PARTNER Glavna naloga tega programa je torej, da bere niz znakov iz vhoda/izhoda v Partner, pri določenem spoznavnem nizu pokliče ustrezni grafični ukaz in po potrebi poèlje ustrezne parametre HOST računalniku. Problem se pojavi pri branju in pisanju na vhod/izhod Partnerja, kjer je bilo potrebno tudi občasno zaustavljanje tega procesa. Ta problem je reèen s podprogrami in funkcijami, napisanimi v datoteki TEKUSR.INC. Ti nam omogočajo dokaj preprosto branje ali pisanje na vhod/izhod Partnerja. Razvili so jih strokovnjaki v Iskri - Delti v Ljubljani. 4. REALIZACIJA MODULA ZA VAX Za poéiljanje in sprejemanje kod s HOST računalnika smo razvili modul z imenom GRAFPART.PAS. Modul nam omogoča klicanje ukazov z enakimi imeni, kakor pri BIOLIB.PAS v Partnerju tako, da poèlje ustrezne razpoznavne kode in' njim pripadajoče parametre. Pred tem poskrbi za pretvorbo parametrov v znake. Naravna ètevila se pretvorijo v niz ètevilskih znakov in logične spremenljivke v posamezen znak (TRUE <=> "T"). Pri sprejemu pa se znaki pretvorijo v ustrezne vrednosti parametrov. V datoteki GRAFPART je spremenjeno le ime gtext vtext, oodani pa so podprogrami InitWs, CloseWs in Update. Za interaktiven vhod in izhod smo uporabili knjižnico SUNLET, točneje modul TTIO. Knjižnico so razvili.na Institutu Jožef Stefan v Ljubljani. Da bi bil komunikacijski program čim bolj učinkovit, se lahko držimo naslednjih pravil: - poslane kode naj bodo čim krajše, - za spoznavanje ukazov raje uporabimo črke namesto étevilk, s čimer prihranimo pomnilniéki prostor, - pri kodiranju oziroma pri dekodiranju uporabimo hitre algoritme, - uporabimo knjižnico SUNLET-TTIO, - za izpis znakov imamo tri možnosti! «) uporaba ločila, ki se ne sme pojaviti v tekstu dvakrat zapored, b) uporab« ločila, ki se v tekstu ne sme pojavi ti , C) uvedba parametra za ètevUo črk v nizu. Za izpis teksta smo uporabili moinost pod C), ki je bila za to komunikacijo najbolj priiti»rna. Naslednji primer nam prikaie potil janje kod s strani HOST računalnika (GRAFPART)! . xaAiacaH2o 20 reRAFiKASB X3 = začetna razpoznavna koda A = vklop grafike 1 •= tip resolucije SC = brisanje zaslona aH = znak za tekat 20 20 = vrednosti za način pisanja 7 = àtevilo črk GRAFIKA =» tekst 38 = zaključek gra-fike 7. PRIMER Naslednji primer nam prikaže uporabo podprogramov, napisanih na računalniškem sistemu VAX-8800. Narici poln krog s koordinatama x = 100 in y = 100 in s polmerom rad ■ 50 ! C INHERIT t ' gr«-fp»rt ' > 3 < vstavitev ukazov za grafiko > program primari bag in < inicial. delovne postaje in SUNLET > InitHsi < inicializacija grafike 1024 • 512 > ginlt(l)I < risanje polnega kroga > dl>c(l00,100,s0)i < zaklučitev grafičnega načina > g«xit| < zaključitav knjižnice SUNLET > ClosaWst and. Ko dobi program GRAFIKA na Partnerju na primer niz "aAl", pokliče funkcijo ginitd) z datoteke BIOLIB.PAS. Ko program zaključimo, ga prevedemo in nato povežemo z objektno datoteko SRAFPART.OBJ in knjižnico SUNLET. 3.. SHEMA PROGRAMOV I Partner VAX 6. SEZNAM UKAZOV IN NJIHOVO DELOVANJE a. ZAKLJUČEK Ta komunikacija nam torej omogoča pisanje krmilnih programov za grafične pakete tako, da uporabljamo ukaze, ki Jih pozna mikroračunalnik Partner. Seveda ne smemo pozabiti, da mora pri tem na Partnerju ves čas delovati komunikacijski program z imenom GRAFIKA. InitWS - i ni ci al i zacija delovne postaje in knjižnice SUNLET CloaWS - zaključitev dela z delovno postajo ginit - postavitev v grafični način in nastavitev resolucije gaxit - zaključitev grafičnega načina gclr - brisanje grafičnega načina ■gxy - premik na pozicijo (x,y) taxt - pisanje grafičnega teksta vbar - nari4e blok circ - nariàe krog disc - nariàe polni krog ring - nariSe zapolnjen kolobar dr«M - nariie črto vact - nariàe črto z relat. koordinatami scroll - premik slike po. y-osi gatpix - pove ali je točka na mestu, kjer se nahaja grafični kurzor prižgana qfill - polnjenje omejenih področij v vodoravni ali na^vpični smeri gatcuraor - vrne koordinate točke Hardcopy - kopira ekran na printer Updata - ažuriranje slike Programi so napisani brez odvečnih znakov in poskuiajo omogočiti čim hitrejéo komunikacijo med HOST računal ni kom(VAX 8800, MikróVAX) in mikroračunalnikom partner. Razlika v hitrosti delovanja grafičnega programa na samem Partnerju in hitrosti delovanja programa preko HOST računalnika je skorajda neopazna. Knjižnico je uporabljena tudi za pisanje krmilnega programa GKS sistema za grafiko na Partnerju. LITERATURAi TURBO PASCAL, Gams Matjaži Osnova dobrega programi ranja, VAX - Il PASCAL: Language Reference Manual, VTO ERII Projekt-Mreže. ZASNOVA RAHLO-SKLOPLJENEGA PORAZDELJENEGA SISTEMA ZA VODENJE INDUSTRIJSKIH PROCESOV UDK 681.3:62 Dragan Mrdaković, Primož Krajnik Institut »Jožef Stefan«, Ljubljana POVZETEK - V Članku je predstavljena zasnova rahlo-sklopljeneja porazdeljenega sistema z razllCnini verzijami osebnih raCunalnikov za opravljanje posameznih nalog pri vodenju industrijskih procesov. Osnovne zahteve pri konstrukciji takSnega sistema so bile; - uporaba že obstojeCe materialne in programske opreme, - primeren za vodenje v realnem Času, enostavna instalacija, vzdrževanje in rekonfiguracija. Za povezavo postaj v sistem smo izbrali mrežo tipa AHCNET, kot najbolj primerno za industrijsko okolje. BASICS OF LOOSELY CXXJPLKB DISTHIBOTKD SYSTEM FOR IKDÜSTHY PBOCES CONTROL - This paper presents basics for loosely coupled distributed system for manufacturing automation based on various types of personal computers and input/output digital and analog extension boards. Basic needs in constructing such a system were: - use of existing hardware and software, simple implementation, maintenance, reconfiguration and flexibility. We choose ARCNET as an appropriate industry standard for factory floor communications between personal computers. 1. UVOD Vse večja popularnost osebnih računalnikov pri raziskovalnem in inženirskem delu je vplivala na proizvajalce materialne opreme. Na svetovnem trgu je možno kupiti Široko paleto zelo kvalitetnih vhodno/izhodnih modulov. Skupaj z ustreznim ohiijem in filterskimi hladilnimi napravami lahko uporabljamo osebni računalnik v industrijskem okolju za nadzor in vodenje procesov. Pomanjkljivosti PC vodila (vodilo osebnih računalnikov) so znane: - precej zaprta arhitektura v primerjavi s konkurenti (STD, VMB, Multibus) in - omejena hitrost. Ne glede na to, izredno pestra že izdelana programska oprema za pisarniško okolje in nizka cena vpliva na izbiro osebnih računalnikov za vodenje industrijskih procesov, (npr. programi za tabelarično poslovanje lahko direktno sprejemajo podatke iz procesov za obdelavo, kot je LOTUS MEASURE). Glavna prednost osebnih računalnikov je njihova nezahtevnost programiranja, saj za konfiguriranje in aplikativno delo uporabniku ni potrebno podrobnejše znanje programiranja - včasih sploh nič. Uporabniki in programerji imajo danes na razpolago vrsto kvalitetnih programskih jezikov, z ustreznimi knjižnicami in pripomočki za testiranje svojih programov. Ponujajo se operacijski sistemi za vodenje v realnem času, kot so QNX, C-DOS, ... S pojavom novega več-opravilnega operacijskega sistema OS/2 firme MICROSOFT pričakujemo, da se bodo na Široko odprla vrata za uporabo osebnih računalnikov pri vodenju industrijskih procesov. Želo pomembna je tudi možnost povezovanja osebnih računalnikov v lokalno mrežo, kjer lahko računalniki med seboj . izmenjujejo informacije ža čim bolj racionalno in učinkovito vodenje procesov. Na IJS imamo že izkxiSnJe s porazdeljenim sistemom DMS-860 glede povezave PC/XT/AT osebnih računalnikov v mrežo, primerno za vodenje procesov. ^ 2. ZASNOVA RAHLOTSKLOPIJKNEGA SISTEMA VCfflENJE INDUSTRIJSKIH ITOCESOV FSIMERKBaA ZA 1.) 2.) 3.) 4.) 5.) 6.) Uporabiti že izdelano standardno aparatumo opremo, ki je lahko dostopna in zamenljiva. Možnost uporabe že izdelane programske opreme, ki za izvedbo aplikacij ne zahteva preveč dodatnega dela - v čim večji meri izkoristiti obstoječo programsko opremo, ki dopušča enostavne in učinkovite spremembe za aplikacije. Povezati aparatumo opremo s standardno lokalno mrežo, ki je primerna za delo v realnem času v okolju z aotnjani. Preprosta instalacija in vzdrževanje, Možnost enostavnega dodajanja novih postaj in funkcij v sistem, Vse to doseči s čim manjšimi potrebnimi vlaganji. Pri zasnovi takSnega sistema za vodenje industrijskih procesov smo si zastavili naslednja izhodišča: /lit. 1.3,4,5/ Naloge sistola so razdeljene v dve skupini: - naloge, ki jih opravlja centralna mikroračunalniSka postaja in - naloge, ki Jih opravljajo periferne postaje neposredno ob procesu. Funkcije centralne aikroračunalniSke posta.ie so: - operaterju omogoCa dostop do sistema in možnost izvajanja akcij v sistemu, - prikaz stanja in izpis informacij o sistemu, - alarmiranje, beleženje in arhiviranje alarmnih situacij in drugih važnejših podatkov o sistemu, - komuniciranje z ostalimi mikroračunalniSkimi postajami v sistemu - postaja ima lahko nekakšno monitorsko funkcijo nad sistemom. Naloge perifernih mlkroraC. Večje mreže dosežemo z uporabo mostičkov (bridge) - večje ät. postaj ali uporabo optičnih vlaken za premostitev večjih razdalj. - AHCNET Je ena najlažjih mrež, kar se tiče instaliranja. Pravila povezovanja so zelo enostavna z le malo omejitvami. Pri mrežah na sploSno Je proces konfiguriranja mreže, dodajanja in odvzemanja delavnih postaj težka in zapletena naloga. Pri ARCNET mreži pa so vsi ti procesi implementirani heurdversko z VLSI tehnologijo integriranih vezij. Ta ARCNET kontroler zato ne potrebuje posredovanja programske opreme, saj te funkcije izvaja avtomatsko; Tako ne obremenjuje procesorja v sami mikroračunalniflki postaji. Procesor ima opravka samo Se s sprejemanjem in oddajanjem sporočil. V starih izvedbah se je pojavljal prcblea "overhead-a", da so aktivnosti za mrežo vzele preveč časa procesorju , zaradi česar se Je zmanjšala dejanska propustnost oz. hitrost prenosa na nivo 100.000 bitov/sek. Poleg tega je procesor imel manj časa za opravljanje svoje primarne vloge, npr. ni mogel skrbeti le za proces, ki ga Je kniilil, zaradi česar se algoritem ni izvajal optimalno. - AHCNET dejansko lahko uporablja skoraj vso operacijsko programsko oprano za mreže. 3. OPIS ABCNKT LAN /lit. 1,5,7/ Arcnet Je baseband (z enopasovnim prenosnim medijem) token-passing (s podajanjem žetona) lokalna mreža, ki se odlikuje z enostavnim povezovanjem, fleksibilno topologijo, zanesljivostjo in ustrezno propustnostjo. Izdelani sta dve vrsti vmesnikov, eni za medsebojno povezovanje IBM PC/XT/AT sistemov in drugi za povezovanje sistemov z VMS vodilom. ARCNET uporabniku zagotavlja naslednje funkcije in možnosti: - ker temelji na token-passing protokolu je zakasnilni čas lahko deterministično določljiv v nasprotju s CSMA/CD, kjer obstaja le verjetnost dostopa določene postaje na vodilo. - hitrost prenosa je 2,5 Mbitov/a, prenos je enopasovni - baseband, zaradi česar je vmesnik enostavnejši in cenejši, - AHCNET ponuja različne možnosti povezovanja. Izbiramo lahko med topologijo zvezde, vodila ali kombinacije obeh. S tea se lahko približamo industrijskemu procesu in zmanJSamo stroSke za kabliranje. Standardni prenosni medij Je koaksialni kabel (baseband R8-62/U), lahko pa 4. POVEZOVANJE MIE20 OSEBNIH RAČUNALNIKOV V ARCNET AHCNET omogoča topologijo zvezde, vodila ali kombinacijo obeh. /lit. 7/ Zvezdasta struktura se priporoča za prostorsko medseboj bolj oddaljene postaje. V osebni računalnik se vgradi ARCNET vmesnik tipa 110. Postaje povezujemo med seboj preko centralnih vozlišč. Obstajata dva tipa vozliSč za povezovanje postaj: - 8-vhodno aktivno in - 4-vhodno pasivno vozlišče. Rsizdalja med aktivnim vozliščem in postajo lahko z uporabo koalcsialnega kabla doseže 620 m, pri pasivnem vozlišču pa le 30 m. Za fizični medij pri povezovanju lahko uporabljamo v isti mreži hkrati koaksialne kable in optična vlakna. Priključevanje je izvedeno z navadnimi BNC konektorji. Pri topologiji vodila se uporablja koaksialni kabel z BNC T konektorji. Topologija vodila Je zelo ekonomična pri povezovanju postaj, ki se nahajajo blizu skupaj. Tu ne potrjujemo vmesnih aktivnih vozliSČ in kabli so kraJSi. PosaHezen odsek Je dolg 300 ■ in nanj lahko priključino do 8 postaj v katere vgradimo ARCNET 210 vmesnik tipa 210. Te vmesnike za večje SLIKA 2. prikazuje primer ARCNET mreže z vpisanimi tipi vmesnikov instaliranih v osebnih računalnikih, vozliäC, vmesnikov za povezovanje in no2ne najveCje razdalje med sestavnimi deli mreže. konfiguracije povezujemo z aktivnimi dvo-vhodnimi vmesniki, ki jih Je več vrst, za povezovanje odsekov s koaksialnim kablom ali optičnimi vlakni (do 3,6 kn odsek, ki lahko alu21 povezovanju različnih stavb ali bližnjih dislociranih obratov). Osnovna karakteristika predloženega rahlo-sklopljenega sistema je njegova fleksibilnost. Sistem omogoča prilagajanje konkretnim potrebam, enostavno nadgrajevanje in priključitev novih izdelkov. Pričakujemo, da bo zadoSčal tudi za vodenje zelo zahtevnih industrijskih procesov. 5. ZAKLJUČEK LITERATURA: Pojava Široke palete vhodno/izhodnih modulov in že obstoječa programska oprema opravičujejo uporabo osebnih računalnikov v industrijskem okolju. Z njimi smo dosegli osnovne cilje pri zasnovi rahlo-sklopljenega sistema primernega za vodenje industrijskih procesov kot so: - uporaba že izdelane aparatume in programske opreme primerne za delo v realnem čaau, - enostavna instalacija in vzdrževanje in podobno. Hrbtenica takSnega sistema je komunikacijsko vodilo. Odločili smo se za mrežo tipa ARCNET (več kot 500 000 vgrajenih vmesnikov v svetu, oz. 25 *-ni delež na tržišču mrež). Omogoča dokaj hiter prenos informacij, deterministični dostop do vodila, različne topoloäke strukture, uporabo optičnih vlaken in koaksialnih kablov v isti mreži, enostavno rekonfiguriranje. Izkušnje na Institutu "Jožef Stefan" so pokazale, da mora biti vmesnik za mrežo čim bolj samostojen - z inteligentnim kontrolerjem, da razbremeni glavni procesor. Za mrežo tipa ARCNET je razvit niz komponent, ki opravljajo vse naloge vazane na vzdrževanje žetona, konfiguracijo in rekonfiguracijo sistema. /1./ Colin Bartram: An ARCNET System Links MultiVendor Robots, Control Engineering, 2.October 1987, stran 38-39; /2./ D. Mrdaković, M.TanBiC, M. Vidmar: Osnovne karakteristike distribuirane višeaikroračunarske mreže DMS-880, Tehnika, 10, 1985; /3./ Dick Leflcon: A LAN Primer, Byte, July 19B7, stran 147-154; /4./ Donald A. Dytewski: Planning Remains the Necessary Ingredient to make MAP work. Control Engineering, 2.October 1987, stran 19-20; /5./ George Thomas: Arcnet Simplifies Factory Floor Communications, Control Engineering, 2.October 1987, stran 40-41; /6./ INTEL: Local Area Networking (LAN) Component User's manual, September 1985; /7./ Standard Microsystems Corporation: ARCNET Overview, 1987. KOMUNIKACIJSKI VMESNIK KV8 INFORMATICA 3/1988 UDK 681.326 Darko Kodrič Iskra Elementi TOZD Hlpot Šentjernej Članek predstavlja Korauniacijski vmesnik KV8, namenjen povezavi različnih računalniških sistemov po RS232 standardu. Komunikacijski vmesnik KV8 omogoča priključitev in povezavo do 8 sistemov, ki lahko komunicirajo med sabo preko tega vmesnika. V članku je podan princip delovanja komunikacijskega vmesnika KV8. Communication Interface KV8 This paper presets communication interface KVO, used for connection of maximum 8 different systems through RS232 interface. All systems, connected through KV8, can communicate to each other, but maximum 4 connections can be made in the same time. Paper presents principles of operation of this communication interface . 1. üvod Komunikaciski vmesnik KV8 je bil razvit za povezavo različnih računalniško krmiljenih merilnih sistemov s poslovnim sistemom, za prenos podatkov o kakovosti proizvodnje in merilnih rezultatov med posameznimi merilnimi sistemi in za prenos podatkov za poslovno informatiko. Komunikacijski vmeänik KV8 je zgrajen modularno, tako aparaturna, kot programska oprema, da je enostavna Širitev vmesnika. Ce je to potrebno. Komunikacija lahko poteka med posameznimi kanali, pri tem je mozno istočasno prenašati po 4 poteh, Ce se vzpostavijo komunikacije med različnimi kanali. Poleg osnovnih 8 kana vmesnik KV8, se dodate tokovna zanka, za pri omogoča v nadzornem naC rametre serijskih vmesn le. Preko prvega kanala vni sistem, je moZno v komunikacijo, za normal vem kanalu. lov ima komunikacijski n serijski kanal, 20 mA kljuCitev terminala, ki inu dela spremeniti pa-ikov za posamezne kana-ki je vezan na poslo-zpostaviti tudi direktno no delo terminala na pr- 2. Materialna oprema Komunikacijskega vmesnika KV8 Materialno opremo Komunikacijskega vmesnika KV8 tvorijo moduli CPE, 16Kbyte RAM pomnilnik, in 4 moduli z dvema serijskima vmesnikoma.(siika 1) Širitev materialne opreme je mo2na z dodajanjem modulov z dvema nadalnjima serijskima kanaloma. Na komunikacijskem vmesniku je možno poljubno nastaviti na vsakem kanalu RS232 serijsko komunikacijo, ali pa 20mA tokovno zanko ( tty I. 2.1. CPE ( centralna procesna enota ) CPE vsebuje poleg 8 bitnega mikroprocesorja se 1 K byte RAM pomnilnika, v katerem so locirani sklad, vsi statusi vmesnikov, statusi povezav, naslovi pomnilniskih vmesnikov vseh kanalov in ustrezni kazalci, ki omogočajo komunikacijo med posameznimi kanali komunikacijskega vmesnika. 4Kb EPROM pomnilnika vsebuje vse potrebne programe za delovanje komunikacijskega vmesnika KV8. Na CPE enoti se nahaja se serijski komunikacijski adpter za priključitev terminala (20mA tokovna zanka), ( slika 2 ), za nastavitev parametrov . 2.2. 16 Kbyte RAM pomnilnik Pomnilnik je razdeljen v bloke 1 Kbyte za sprejem in 1 Kbyte za oddajo na kanal. Zato morajo biti paketi podatkov za prenos manjši od 1 Kbyte znakov. LoCen pomnilnik sprejemnika in oddajnika pa omogoča sprejem podatkov na posameznem kanalu se preden je linija z oddajnikom vzpostavi jena. 2.3. Serijski Vmesniki Na vsakem modulu sta dva serijska vmesnika, ki sta programsko nastavljiva. To sta vezji SN2651 , ki jima je moZno programsko nastaviti hitrost prenosa, dolžino besede, pariteto, število stop bitov in nacin dela. Za vsak modul je moZno izbrati poljubni 8 bitni naslov, ki definira številko kanala za programski dostop do vmesnika. Nastavitev komunikacije vsakega kanala na RS232 ali na 20 mA tokovno zanko je moZno z nastavitvijo kratkospojnikov na modulih z vmesniki. Ob inicializacij i so vmesniki nastavljeni na 7 bitno dolžino besede, hitrost prenosa 1200 baud, 1 stop bit, pariteta prepovedana. 76 3.Programska oprema Programski paket sestavljajo številne rutine, ki omogočajo inicializacijo komunikacijskega vmesnika, Čitanje znaka posameznega kanala v sprejemni buffer tega kanala, prenos znaka iz oddajnega bufferja v serijski vmesnik, prenos znaka iz sprejemnega vmesnika kanala I v oddajni vmesnik kanala J, ce je vzpostavljena povezava med kanalom I in J. Rutine testirajo zasedenost oddajnika pri vzpostavitvi zveze sprejemnika in oddajnika, vzpostavitev zveze, prekinitev zveze ob koncu prenosa podatkov med kanaloma I in J, kjer velja I O J, ter I,J=(0,1, ... ,7). Za vse rutine je Številka kanala vhodni podatek za določitev odmika v tabeli parametrov kanala in tabeli kazalcev na vhodne in izhodne pomnil-niske vmesnike ter flage povezav. Opis posameznih rutin: 3.1. Inicializacija Inicializira vse vmesnike na hitrost prenosa 1200 baud, dolžino besede 7 bit, 1 stop bit, ni paritete, vse povezave so dovoljene, nobena povezava ni vzpostavljena, podatkovni vmesniki so prazni, poslan je 'ctrl Q' ukaz v vse serijske vmesnike - dovolitev prenosa. Cita status načina delovanja in ce je v nadzornem načinu delovanja omogoca delo priključku na CPE modulu. 3.2. Sprejem Rutina cita status serijskega vmesnika izbranega kanala in Ce ta vsebuje znak, ga prenese v sprejemni vmesnik tega kanala. Istočasno testira znak in v primeru, da je 'ctrl S' ali ■ctrl Q' vrne znak med parametre za prenos podatkov preko tega kanala, kar definira flag za dovolitev oddajanja na kanalu. Prav tako testira, ce je sprejet znak STX, za določitev povezave sprejemnika z oddajnikom -po sprejemu tega znaka je mozno vzpostaviti povezavo sprejemnika in oddajnika prenosa. 3.3. Oddaja Ta rutina prenaša znake iz oddajnega bufferja k serijskemu vmesniku kanala. Ta prenos poteka toliko casa, dokler ne zazna v pomnilniku zapisan znak EOT - konec prenosa. Ob prenosu vsakega znaka ugotavlja. Ce status dovoljuje nadaljevanje prenosa. 3.4.Kopiranje Ko je določena povezava Ze vzpostavljena in so določeni vsi kazalci, ki bodo omogočili prenos podatkov iz sprejemnega vmesnika kanala I v oddajni vmesnik kanala J, kopirna rutina prenaša podatke v ustezni vmesnik. Naslov ponora podatkov je določen prehodno z rutino, ki ob znaku STX ugotovi. Ce je možno vzpostaviti zvezo in jo, ko je roozno, tudi vzpostavi. Ob koncu kopiranja iz kanala I v kanal J , ob znaku EOT, se zveza razdre, ko pa so vsi podatki preneseni, pa bo oddajni del kanala J zopet na razpolago za prenose, kanal I pa je prost za delo 2e ob koncu kopiranja podatov. 4.Prenos podatkov Prenos podatkov iz kanala I v kanal J je mogoc takrat, ko je v kanalu I moten sprejem znakov, kar pomeni, da je kanal prost in je bil na kanal I poslan znak "ctrl Q' . S tem lahko prične sprejem znakov v sprejemni buffer kanala I. Kanal J pa lahko prične sprejemati znake od kanala I v trenutku, ko je končal prenos znakov, ki jih je imel v oddajnem bufferju kanala V 0 D 1 L O C p E SERIJSKA KOMUNIKACIJA MIKRO-PROCESOR RAM EPROM podatkovno vodilo naslovno vodilo nadzorno vodilo Slikal,- BLOKOVNA SHEMA CPE J. V tem trenutku se najprej vzpostavi zveza raed tema dvema kanaloma, istočasno so lahko 4 zveze, ki omogočajo prenose podatkov v KV8. Po vzpostavitvi zveze je postavljen flag, ki dovoljuje kopiranje, iz kanala I v kanal J, zveza pa je zapisana v parametrih obeh kanalov, in sicer v kanalu I, je vpisana vrednost J, v parametrih kanala J pa vrednost za kanal I. Vsak prost kanal ima v parametrih zveze kanala vrednost FFH. Do vzpostavitve zveze je lahko prialo po sprejemu znaka STX v sprejemnem vmesniku kanala I, sprostitev zveze pa je mogoCa po prenesenem znaku EOT pri kopirni rutini. Nove zveze pa kanal J ne bo vzpostavil, dokler ne bo prenesen kompleten blok podatkov. 5. Sklep Prenos podatkov v Komunikacijskem vmesniku KV8 je izveden v pooling načinu delovanja celotnega mikroracunalniskega sistema, mozno pa bi bilo popraviti sistem na interruptni naCin delovanja, vendar je za izbrano aplikacijo, kjer je relativno majhno Število prenesenih podatkov, ki pa se tudi malokrat prenašajo, ustrezna rešitev popolnoma zadovoljiva. Vsi vmesniki so vecji, kot je maksimalno Število prenesenih podatkov v eni transakciji, zato je bil izbran tak nacin dela Komunikacijskega vmesnika KV8. NASLOV NASLOV PODATKI STX PODAT.BLOK ETX EOT SPREJ. ODDAJ. NADZOR ZA PRENOS Slika 3: Struktura podatkov za prenos v KV8 Ta vmesnik bo omogočal v aplikaciji prenose podatkov med merilnimi sistemi v proizvodnji Hibridnih vezij, omogočal bo povezavo le teh z laserji za aktivno justiranje uporov na hibridnih vezjih tgr povezavo merilnih mest z poslovnim računalniškim sistenom, za prenos podatkov o opravljenih meritvah kvalitete izdelkov. 16 ram polnilnik podatkovno vodilo naslovno vodilo nadzorno vodilo si02 . 1 cho chi 7\ SI0 2 cho chi A A SI02 cho CHI Ä A s 102 U cho chi A V V V V V V V V ser.kanalo ser.kanali ser.kanal2 ser.kanal3 ser. kanal i. SERKANALS ser.kanal 6 ser.kanal7 Slika2: BLOKOVNA SHEMA KVM 8 FORUM INFORMATIONIS FORUM INFORMATIONIS V ČASOPISU INFORMATICA Forum Informationia (FI) je nova, stalna rubrika časopisa Informatica, ki bo prinaäala polemične, kritične in druge aktualne prispevke s področja računalništva in informatike. Tudi Slovensko društvo Informatika je na seji svojega Izvršnega odbora, dne 8. 4. 1988, ustanovilo interesno skupino z imenom Forum Informationis, ki naj pospešuje in razvija javno razpravo o bistvenih problemih domačega in tujega informaci jsko-razvojnega komleksa, ki ga sestavljajo npr. problematika industrije, raziskovanja, izobraževanja, uporabe informacijskih sredstev, publicistike, zakonodaje, integracijskih procesov, drobnega gospodarstva, vodenja, zaščite, ekonomike, poslovanja, politike, mednarodnega povezovanja itd. Pri tem gre za strokovne, intelektualne, kulturne, razvojne in druge vidike v kontekstu socialne relevantnosti računalništva in informatike. Časopis Informatica se tako ustvarjalno vključuje v krizno in razvojno polemiko sodelavcev in bravcev časopisa Informatica. nji: industrija, raziskovanje in izobraževanje. Ce računalniška industrija in z njo povezana infrastruktura ne bosta preživeli, se prav lahko začne postavljati vprašanje o smiselnosti nadaljevanja raziskovalnih in izobraževalnih naporov kompleksa računalništva in informatike. (Verjetno bi Slovenci s tem lahko vstopili v zgodovino človeštva kot ena prvih civilizacij, ki se je zavestno odpovedala lastnim možnostim oblikovanja informacijske družbe.) Namen prvega FI je bil informativen. Sprejeta pa so bila priporočila, da se takoj oblikujejo interesne skupine za pripravo koreferatov, ki bodo obravnavali področje industrije, izobraževanja in raziskovanja. Posameznim skupinam naj bi zaenkrat predsedovali podpisani, prof. dr. Jernej Virant in doc. dr. Saša PreSern. Za področje industrije naj bi bil sklican naslednji FI konec junija. Predloženo je bilo (Hija Repovž) , da se k delu industrijske skupine pritegnejo tudi mlajši, "nedogmatični" ekonomisti. V korpus te skupine so bili predlagani Bufon, Faleakini, Gerkeš, Jerman-Blažič, Kajzer, Leskovar, Kupnik, Sočan, Sprah, Voh, Vovk itd. KRATKO POROČILO S PRVEGA ZASEDANJA FORUM INFORMATIONIS Prvi sestanek FI je bil za okroglo mizo, dne 5. maja 1988, v sejni dvorani SOZD Iskra, v Ljubljani, Trg revolucije 3/XIV. Na ta začetni sestanek je bilo vabljenih 42 strokovnjakov, novinarjev, zasebnikov itd. s področja računalništva in informatike. Udeležba je bila polovična s prisotnotjo 20, in sicer: Božidar Blatnik (Intertrade), Petar Brajak (I Delta), Vanja Bufon (I Delta), Rado Faleskini (SOZD Iskra), Bogo Horvat (TF Maribor), Marko Jagodič (I Telematika), Andrej Jerman-Blažič (I Telenvati-ka). Srečko Klančar (I Avtomatika), Mitja Ko-airnik (študent FE), Milan Mekinda (I Mikro-elektronika), Peter MirkoviC (Teleks), Alenka MiSič (GZS), Saša PreSern (I Delta in IJS), Mija Repovž (Delo), Ivan Rozman (TF Maribor), Uroš Stanič (IJS), Bruno Stiglic (I Electronics, Santa Clara, Ca), Marko Valič (I CEO), Jernej Virant (FE) in Anton Zeleznikar (I Delta). Večina povabljenih neprisotnih se je opravičila. Prisotne sta pozdravila predsednik Slovenskega društva Informatika Milan Mekinda in član KPO SOZD Iskra za raziskave in razvoj Rado Faleskini. Podpisani je poskušal navesti razloge, ki so pripeljali do ustanovitve FI. Konec prejšnjega leta so se inženirji Iskre Delte resno začeli soočati s problemom finančne nezadostnosti Iskre Delte pa tudi s trendi demotivacije zlasti v raziskovalno-razvoj nem sektorju. Z izjemo projekta Parsys, ki je reševal svoje preživljanje s potencirano samoorganizacijo in s stiki s svetom, ao ostali veliki razvojni projekti stagnirali, se osipali in drseli v svoje prenehanje. Hkrati je postajalo očitno nesorazmerje med "napredovanjem" znanosti in "nazadovanjem" industrije, med znanstveno samo-namembnostjo in njeno finančno potešenostjo na eni in kriznostjo industrije na drugi strani. Znanost je dosegla finančno neodvisnost od industrijske neuspešnosti predvsem z delovanjem svojih lobijev. Vrstni red razreševanja krizne problematike v okviru FI za letošnje leto bi lahko bil nasled- Dnevno časopisje je poročalo o prvem FI (Delo dvakrat in Teleks). Teleks je ocenil FI kot provokacijo, čeprav se podpisani bolj nagiba k oceni reševanja, kar se reSiti Se more. Predvsem pa ostaja funkcija FI prej ko slej oblikovanje nove intelektualne (dejavne) zavesti na področju Ril. A. P. Zeleznikar Informatica SpoStovani: že vseh dvanajst let občasno spremljamo ra;:voj časopisa Informatice. Po svojih močeh si namreč tudi sami prizadevamo sa razvoj računalništva in vsaj tistega dela informatike, ki je vtäzan na računalništvo, na katerega se vsaj malo spoznamo. Časopis Informatica je igral pomembno vlogo pri razvoju računalništva pri nas. Do pojava Mojega mikra (in Bita) je bil edina slovenska revija, posvečena računalništvu. Seveda je takih pomembnih dogodkov v razvoju računalništs'a pri nas še veliko. Spomnimo se le kongresa If'IP, ki je leta 1970 pripeljal v Ljubljano celotno svetovno računalništva. Potem je tu še ustanovitev RRC, pa začetek visokošolskega študija računalništva, ki qa izvajata FE in VTOZD matematika in mehanika, pa začetki slovenske računalniške industrije in še bi lahko naštevali. Bojimo pa se, da vloge časopisa Informatice v današnji situaciji ne razumemo več. Zato bi prosili predvsem glavnega in odgovornega urednika, mogoče pa še koga drugega izmed urednikov ali pa članov zaenkrat še anonimnega Forum informationis za odgovore na naslednja vprašanj a. 1. Kakšen je koncept in kakšna je perspektiva časopisa Informatice? Komu je namenjen? Ce gre za strokoven časopis, namenjen jugoslovan- skini strokovnjakom, čemu so potem v njem prispevki v angleščini, nt;kateri celo s pov::etk:i v. japonsčini(I)? Ali pa gre nemara 2a znanstven časopis? Kakšna je tedaj znanstvena raven tega časopisa? Ker niti med uredniki niti med avtorji ni zasleediti vidceti uglednih tujih raziskovalcev, pa tudi'nikjer v tujini še nismo videli, da bi se l;do sk:liceval na rezultate, objavljene v Informatici, bi lahko sklepali, da cire za tretjerazredni znanstveni časopis, ki v znanstvenem svetu nima nikakršnega odmeva.' Veseli bomo, če nas prepričate, da so naši sklepi napačni. 2.'Kakšni recenziji so podvrženi prispevki za časopis In-formatico? Kolikšen odstotek prispevkov je zavrnjen? ICakšna je bila vloga tehničnega odbora in čemu je bil z desetim letnikom'le-ta ukinjen? Ali'so prispevki lektorirani? Kako časopis skrbi za slovensko računalniško terminologijo? Kdo skrbi za angleščino? da Naslednje vprašanje pa je glavni razlog, = rno se odločili za pisanje tega pisma. Ciglejtno si naj prej nekaj citatov iz za-dnjifi dveh številk: a) "Umetna inteligenca prihaja na sam rob racionalizma, ko govori o inteligenci, ki pa ni več racionalistična kategorija. Razumevanje inteligence je povezano z novim pojmovanjem informacije. Stroji, ki bodo imeli vgrajeno inteligenco, ne bodo več zgolj-raciona-listični." Informatica 1/88, str. 5, b) "We hope to (be) able to receive your technical reports and to exchange information in the future." Informatica 1/88, str. 79. c) "We look forward to fruitful joint research" Informatica 1/88, str. 81. d) "Have I really done nothing in the last years" Informatica 1/88, str, 91. two e) "The goal of this preliminary discourse is, of course, to lay out the way which leads to something termed inf.ormationa 1 logic. In the framework of such new logic, it will become possible to develop essentially changed concepts of set, relation, function, category, etc. as was the case in today's and yesterday's mathematics,", Infor'matica 2/GB, str. 31. f) "Zaključek tega razmišljanja je torej tak, da tako človek kakor stroj nista determinirana in imata ustvarjalne sposobnosti". Informatica 2/8B, str. 116. Omenjene citate smo izbrali zato, da bi ugotovili, da stil prispevkov v Informatici močno odstopa od stila običajnih uglednih mednarodnih znanstvenih in strokvnih revij. Podobnih citatov hi lahko nabrali predvsem v zadnjih ).etnik:ih še precej več. V citatu a) gre očitno za filozofsko spekulacijo. Ker pri nas obstajajo takim problemom primerne revije (npr. Anthropos), bi po našem mnenju veljalo take prispevke objavljati tam, Citat d) kaŽE-D na polemiko. Mislimo, da polemiJ:a brez strokovnih argumentov ne sodi na strani I nformatiče. Citata e) in f) pa imata skupno predvsem to, da dišita po lažni znanosti. Prispevka, iz katerih sta vzeta citata, po našem mnenju namreč nista znanstvena. Morda sodita v filozofijo. V tem primeru bi ju ponudili npr. spet Anthroposu. Morda sadita tudi v znanstveno fantastiko, vendar o tf?m težko sodimo, ker se na znanstveno fantastiko ne spoznamo. Na vsak način, nikakor ne sodita v Informatico. V Informatici dajeta vtis, kakor da. gre za pravo znanost. Dopuščamo seveda možnost, da se motimo. Kaj pa če je res mogoče dokazati, da ima stroj ustvarji^lne sposobnosti (!) ? Mogoče pa gre res za temelje čisto nove logike, ki bo pospravila z obstoječo logiko in matematiko. V obeh primerih se čudimo skromnosti avtorjev, da sta za tako epohalna odkritja izbrala revijo s takn majhno ddmevnostjo. Menimo, da avtorja iskreno verjameta v to, kar pišeta. Zato ju rotimo, da pošljeta prispevka v či.ngleSčini v ponovno objavo. Ce se ne moreta odločiti, katero od uglednih revij izbrati priporočamo, da prispevke pošljeta prijateljem: M. klalosu, D. Sieworeku, 1. Segal lu ali T. Winogradu (glej njihove slike na straneh Inf ormatice ) , ki bodo že vedeli, k:je je pravo mtesto za take rezultate. Ce so omenjeni rezultati re?snični, bi avtorja zaslužila vsa najvišja odličja, .vključno z Nobelovo nagrado. In zdaj še vprašanje. ki 3. Zakaj Informatica objavlja prispevke, se prikazujejo kot znanost, pa to niso? Za konec še pojasnilo. Ko govorimo o primernosti in neprimernosti prispevkov za Informatico, imamo v mislih uredniško politiko in strokovno recenzijo, nikakor pa ne cenzure. Mislimo, da bi družba morala poskrbeti za objavo še tako spornih prispevkov - vendar nismo prepričani, da ravno na straneh Informatica, če le-ta ne redefinira svojega koncepta, (npr, časopis za računalniško filozofijo in znanstv6?no fantastiko). Alternativa bi bila, d-a bi vpeljali rubrike za računalniško filozofijo, računalniško znanstveno fantastik:o in računalinški humor, v katerih bi lahko brez zavajanja bralcev objavljali ustrezne prispevke seveda C3b strokovni recenziji in ob obveznem lektoriranju vseh prispevkov. Z veseljem bi vam poslali tole pismo z elektronsko pošto, pa nimamo vašega naslova. Mogoče bi lahko v eni prihodnjih številk pojasnili, kako vam lahko elektronsko pošiljamo prispevke, V upanju, da pismo razumete v smislu natančnejšega določevanja uredniškega koncepta časopisa Informatice, vas lepo pozdrav 1 j amo. Tomaž P'isanski, Vladimir Batagelj, Marko Petkovšek, Spegel, Boštjan Vilfan, Iztok Tvrdy Marj an V citatih b) in c) je opaziti, da gre za obljube, torej za nekaj, kar naj bi se zgodilo v pr"ihodnosti . Mislimo pa, da za take obljutse ni mesta v resni reviji. F'ričakuj emo, da bomo o konkretnih uspehih projekta Parsys lunalu brali v Informatici in v drugih, mednarodnih revijah (v nasprotnem primeru pa gre za razmetavanje z j «m -■ vsaj kar se prostora v Informatici tiče). O ODGOVARJANJU NA ODPRTO PISMO Odprto pismo, ki ga objavljamo, načenja vrsto vprašanj, ki ne zadevajo le problematike časopisa Informatica, temveč se razprostirajo preko domene aktivnosti, ki jih časopis le reflektira. Vsako poenostavljeno odgovarjanje, ki bi bilo brez nadaljnega mogoče, bi hkrati podpiralo tudi sprenevedali je in blasfemijo podpisnikov pisma in tako prav gotovo ne bi odkrivalo izčrpnejSih in za prakso strokovnih in drugih dejavnosti informatike (in računalništva) uporabljivih odgovorov. Predvsem bo na vsa vprašanja piscev pisma odgovorjeno, vendar se to zaradi omejenih možnosti hkratnega odgovarjanja ne bo zgodilo v enem samem izčrpnem paketu. Nekateri očitki so pač takSni , da jih ne bo mogoče dokazovati le z navedbami iz domačih logov pa tudi ne tako poenostavljeno, kot to upajo pisci pisma. Pri tem bo potrebno poseči v navedbe (in prakso) podobnih (celo avantgardnih) strokovnih časopisov po svetu (v mislih imam npr. časopise kot so Artificial Intelligence, New Generation Computing, AI Communications, IEEE Computer, IEEE Transactions on System, Man, and Cybernetics itd., ki so na svojih področjih strokovne in tudi znanstvene relevance - beri računalniške in informacijske-vodilni na svetu). To pa bo zahtevalo nekoliko več dela, ki ne bo brezplodno in bo prav gotovo koristilo domačim (T. Pisanski bi bržkone hitel poudariti "tretjerazrednim") razmišljanjem. Seveda pričakujem, da bodo v kritični dialog, ki se s tem začenja, posegli tudi bravci. Končno se začenja tudi to, kar bi lahko imenovali "normalni polemični in kritični dialog na področju informatike in računalništva". Ta dialog je seveda zaželjen in časopis Informatica ga mora podpirati v razumnih mejah., dokler se vpraševanje odprtega pisma ne bo izčrpalo. Seveda prosim pisce pisma za določeno potrpežljivost, da počakajo na sadove njihovega vpraševanja . Urednik NEZNANSTVENO KRATEK ODGOVOR UREDNIKA Znanost lahko odgovarja le z dejstvi, ta pa so v primeru tudi na urednika naslovljenega pisma kratko tale (po vrstnem redu vpraševanja): 1, Koncept časopisa Informatica je stroka, znanost, raziskovanje, obveščanje, izobraževanje, industrija, proizvodnja, razvoj, zanimivosti, novosti iz računalništva in informatike itd. Perspektiva časopisa je lahko samo njegova zadostna aktualnost na področju opisanega koncepta. Časopis je namenjen inženirjem, raziskovalcem, razvijalcem, študentom, podi-plomcem, tudi vodilnim učiteljem itd. na področju koncepta. Da pa v tako opisanem okolju koncepta ni filozofskega, se verjetno ni mogoče strinjati (našemu doktoratu znanosti ali tehnike rečejo v Ameriki doktorat filozofije) . Prispevki v angleščini so koristni vsaj iz dveh razlogov: zaradi možnosti neposredne izmenjave prispevkov z znanci, prijatelji in priložnostnimi interesenti v tujini (recimo kar od Amerike do Japonske) in zaradi obvladovanja (tudi učenja) jezika, ki je nujnost pri pripravi prispevkov (tudi tistih, ki izhajajo v Informatici) za objavo v tujih časopisih. Časopis Informatica sodi torej v "nacionalno ligo" jugoslovanskih strokovnih časopisov, kar je bilo tudi povsem jasno ob njegovi ustanovitvi. Povzetki v japonščini so bili res maloštevilni (izjemni) in so bili predvsem kulturni preizkus možnosti japonskega zapisa na slovenskih tleh. V industriji že danes poudarjamo nujnost obvladovanja japonščine, ki se nam za naš razvoj kaže enako pomembno kot obvladovanje angleščine. Informatica prinaša tudi znanstvene prispevke, ki se financirajo v obliki raziskav iz znanstvenih družbenih skladov. V tem svojem segmentu je Informatica znanstveni časopis, četudi tretjerazreden, kot ga lahko pač oblikujejo domači znanstveniki. Na koncu tega dolgega odgovarjanja lahko odgovorim zaradi meni vsi- ljene konverzacije le v slogu "milo sa drago": tudi med podpisniki pisma ne vidim nobenega posebno uglednega domačega ali tujega znanstvenika in tako naprej. Za to nekorektnost se upravičujem, vendar piscem kaj boljšega ne znam povedati. Seveda bi bilo zanimivo spremljati odmevnost člankov v Informatici. Verjetno bi za to uslugo lahko zaprosili VINITI (Vsezvezni institut za znanstveno informacijo) v Moskvi, ki mu časopis redno pošiljamo. 2. Recenzija prispevkov v časopisu je za naše razmere normalna, čeprav bi lahko bila strožja pa tudi mednarodna in z višjo pedagoško stopnjo (tudi ob večji angažiranosti podpisnikov). Normalni sistem recenzije bi lahko deloval s podpisanimi formularji treh neodvisnih (po posameznih lobijih ločenih) recenzentov, kjer bi moral vsak recenzent dokazovati predvsem bolj, zakaj članek podpira, kot pa, zakaj ga zavrača. Glavni urednik bi lahko bil le razsodnik v primeru nasprotujočih mnenj recenzentov. Recenzija prispevkov v Informatici je opravljena navadno na mestu njihovega nastajanja, dajejo jo mentorji, navadno po konzultaciji z glavnim urednikom. Zavrnitev prispevkov je vselej spremljana s pomočjo za njihovo dodelavo. Razmerje takih prispevkov (od začetne do končne faze) znese vsaj 30%, Problem tehničnega odbora je bila de facto njegova samoukinitev, saj so se v tem razdobju pojavili novi mentorji in sodelavci, ki so bili v časopisu aktivni. Tehnični in uredniški odbor sta bila imenovana v začetku leta 1977 po tedaj veljavnem teritorialnem in strokovnem "ravnotežju" in seveda s ciljno strategijo, da je potrebno oblikovati zadosten krog pišočih v okviru časopisa. Lektoriranje člankov je dolžnost samih avtorjev, kar je bilo tudi razumljivo v dobi proizvodnje prispevkov a pisalnim strojem in v obliki, v kateri se prispevki objavljajo (fotokopiranje). Za terminologijo je v okviru tehničnega odbora (vendar ne recenzije) skrbel prof. dr. L. Pipan, za angleščino pa avtorji oziroma njihovi lektorji angleSčine. Odgovor, ki zadeva t.i. glavne razloge za pisanje pisma piscev, bo v tem preliminarnem odgovoru urednika karseda kratek. a) Za to izjavo, ki je iz teksta sicer iztrgana, stojim brez pridržkov. To potrjuje danes že praksa nekaterih komercialnih izdelkov (glej npr. predavanja prof. B. Součeka v okviru SAZU, MIPRO '88 in njegovo knjigo o nevralnih računalnikih, ki je nedavno tega izšla pri založbi J. Wiley). b), c) in d) Ti citati se nanašajo na podvig, ki sem ga imenoval ekspedicija Parsys. Verjetno moti pisce pisma najbolj to, da je projekt Parsys tudi za strokovno javnost osamljen primer, ki se ni rodil v univerzitetnem in inStitutskem okolju. V industriji gledamo na slovensko računalniško znanost morda neobjektivno kot na posebno obliko počivanja in spavanja. Ce je pismo piscev tudi odločenost, da s tem prekinjajo, potem to pismo vsekakor pozdravljamo . e) Da nastaja danes "nova matematika" v različnih oblikah po svetu, ni nobena skrivnost. Te "matematike", ki si nadevajo različna imena, seveda Se niso znanje, ki bi bilo zrelo za sprejemanje v matematične katekizme. Razvoj enostavno kaže, da so minili časi t.i. izključno trdne matematične doktrine in da postaja matematika kot disciplina občutljiva tudi za mehkejši konceptualizem (npr. adaptivna, fuzzy matematika in cel» vrsta aksiomatiziranih logik kot so že stara modalna logika, pa logika prepričanja, zavesti, umovanja, inteligence, informacije itd., ki trasirajo prav pot uporabe nevralnih računalnikov oziroma se priznavajo kot smiselne in zdravorazumske formalizacije v okviru umetne inteligence, kognitivne znanosti, filozofije). Vse to se seveda dogaja brez blagoslova pravoverne matematike, vendar prav v teh raziskavah sodelujejo tudi matematiki in seveda industrija (npr. IBM). Informatika paC ni matematika, kar je menda razumljivo. O teh poskusih bomo lahko zapisali već podrobnosti v naslednjih prispevkih Informatice. f) Kaj je v citiranem stavku narobe, bi morali izpostaviti predvsem pisci, ne pa le kazati nanj, kako je sporen. Da ta stavek ne more potrjevati prepričanja in tudi ne apriori-stičnega pudarjanja nepreklicne znanstvenosti piscev, je tudi razumljivo. Glede stila nekaterih, prav gotovo ne vseh prispevkov, vkljuöno s pismom piscev, pa se s pisci niti približno ne bi mogel strinjati. Zato naj mi bo v posebnem prispevku dovoljeno citiranje neobičajnih, fantastičnih (to je grda slovenska beseda, ki zveni kot psovka), laži-znanstvenih in neznanstvenih izjav v najuglednejših mednarodnih znanstvenih in strokovnih revijah s področja računalništva in informatike. 3. Na to vprašanje iz pisma je bilo odgovorjeno že na več načinov. Poudarjam, da sem v pismu piscev iskal tudi znanstveno razpravo in ne le namigovanja, ki nimajo z znanostjo in trditvijo,/ kako so pisci znanstveni, ničesar skupnega. Pismo podpisnikov razumem predvsem kot njihovo pripravljenost, da v slovenskem, jugoslovanskem in mednarodnem znanstvenem prostoru dajo svoje znanje in svojo znanost v objavo in v sodelovanje tudi v časopisu Informatica. Menim, da bi s tem časopis Informatica postal tudi lažje znanstveni tržni produkt, Razmere so vsekakor dozorele: to pa ni samo redefinicija neke politike, temveč je spremmeba vedenja in vednosti akterjev, ki s svojim delom in sodelovanjem lahko proizvajajo ustreznejši časopisni produkt. Urednik SE O SONCIH V PRAZNEM PROSTORU Anton. P. Zeleznikar, Iskra Delta Veliko sonc kroži v praznem prostoru : vsemu, kar Je temnega, govorijo s svojo svetlobo - meni molčijo. O, to Je sovraštvo luči nasproti svetećemu, neusmiljeno hodi svoja pota. Na dnu srca Je krivično nasproti svete-čemu: mrzlo nasproti soncem - tako se giblje vsako sonce po svoji poti. Friedrich Nietzsche [1] 112 O ločevanju znanosti in filozofije znanstvene relacije (za znanost) se ne bi skliceval na avtoritete iz matematično-filozof-skega sveta, npr. na Descartesa, Pascala, Lebniza, Whiteheada, Hilberta, Russia, Wittgensteina itd. ali na kritična stsliSča samih akterjev umetne inteligence, kot so npr. D. McDermott (Artificial intelligence meets natural stupidity [6]), Winograd, Flores [3], H. L. Dreyfus, S. E. Dreyfus [4], kritika in odgovori na kritiko v časopisu Artificial Intelligence [5], vrsta kritičnih prispevkov v Mind Design [6] itd. O teh in podobnih izhodiščih sem pisal tudi sam [7]. Sonce informacije - če uporabim Nietzschejevo prispodobo - ima svojo pot, ki ni prema (plato-nična) steza matematike, SolniSke podatkovne strukture, umetnointeligenčne (ljubljanske) subkulture, dorečene in varne znanosti in njenih v njih zaverovanih uživalcev. Matematika se jeSvarno in seveda skladno z mejami svojih možnosti ognila bistvenim problemom informacije, čeprav je nekakšno merjenje (količino) informacije razglasila za informacijsko teorijo. Sicer pa je Dretske [8] dal dovolj objektivno in umirjeno kritiko te skrajno zožene in poenostavljene discipline (glej nekatere teh značilnih citatov v [14]). Ne domišljam si, da sem v svojih delih (9, 10, 11, 12, 13, 14] sploh zapisal kaj izredno izvirnega o informaciji, kar bi bilo izven obstoječega območja zdravega razuma, ki te stoletja govori o pojavu, ki ga razume kot informacijo, čeprav mu nadeva različna imena (npr. tudi pomen, bistvo, bit, eksistenca, pojem itd.). Kibernetsko pojmovanje informacije v živem in tehnološkem je vsaj od Wienerja dalje to, kar je predmet mojih spisov. Kot živo bitje pa nosim prepričanje, da je te informacijske principe mogoče simbolično formalizirati in strniti v logično konstrukcijo tako, da bi ta lahko postala predmet uporabe zmogljivejših in novih strojev, kot so npr. t.i. nevralni ali paralelno masivni računalniki. To pa seveda ne pomeni, da postopek simbolične formalizacije informacijskih principov ne bo proces nastajanja, ki se bo razvijal skozi prihajajoče obdobje z domiselnostjo in iskanjem novega in predvsem s povezovanjem filozofskega in znanstvenega, konceptualnega in konstruktibiInega. Tudi si ne domišljam, da bo termin informacijska logika v okviru redefinicije informacije, kot jo predlagam, preživel. Verjetno se bo našel nov pojem za nekaj, kar je v bistvu postinformacijsko. Ze danes se slišijo glasovi, da je doba informacijskega (seveda na temeljih starega razumevanja informacije kot nekakšnega pretoka znanja) v zatonu in da prihaja doba umskega (mind-like), ki naj bi prekvasilo ne le znanost in tehnologijo, temveč tudi ekonomiko in socialno filozofijo in akcijo. To, kar posebej "odlikuje" "današnjega človeka" kot človeka znanosti. Je, da ne ve o sebi ne kdo ne kako JE in da se s to svojo nevednostjo niti ne sreča kot z zadevo svoje lastne človeškosti. Ivan Urbančič [2] 428 Da znanstvenik ni filozof in filozof ni znanstvenik, to bi lahko bila resnica predvsem domače (izvirne), naravoslovno pravoverne utopije. Seveda, če bi bilo mogoče ukinjati prepletenost kulturne informacije (filozofije, znanosti, tehnologije, zdravega razuma) in povezanost informacije znanosti (npr. interdisciplinarnosti umetne inteligence: psihologija, kognitivne znanosti, neurofilozofija, modalna logika itd.). V tem domačem dialogu s kritiki o škodljivosti ali neprimernosti filozofsko- O citiranju in kritiki citatov Ideologikritika ni mišljenje, a si le tako zagotavlja svojo premoč nad vso filozofi Jo in tudi ideologijo. Ivan Urbančič [2] 428 Citiranje uporabljam navadno kot vodilo oziroma vzpodbujanje, ki se določenemu miselnemu toku prilega in mu daje metaforično usmeritev. Seveda pa je citiranje mogoče uporabiti tudi kot napad na določena stališča in izjave. Vendar je v tem primeru smiselno in civilno kulturno upoštevati kritično toleranco predvsem takrat, kadar so informacijska ozadja izjav-Ijavcev in kritikov preveč oddaljena in se zaradi tega pojavlja problem razumevanja kritiziranega. V citatu (a) [0], v katerem se mi oóita filozofska spekulacija [15], gre za opozorilo študentom, da v okviru nekaterih danaSnjih računalniških predmetov (operacijski sistemi in prevajalniki) ne bo mogoče razreševati problemov inteligentne uporabe strojev. Opozorilo je pedagoško in je izziv Studentu, da razvija potrebno kritičnost do zmogljivosti danaSnjih al gor itmičnih konceptov, ki obvladujejo in omejujejo današnjo računalniško uporabo. Stvar osebnega okusa je, kako je mogoče študenta motivirati in ga pripravljati na problematičnost njegove poklicne dejavnosti, ki bo drugačna od pričakovane^. Morda pa je vendarle simpto-matično, da študentje, na njim lasten način, demonstrirajo bojkot (tihi štrajk) predavanj, v katerih se zrcali strokovna in pedagoška nesposobnost učitelja, ki zmore le pomanjkljivo interpretirati "znanost", ki ni predmet njegovega lastnega raziskovalnega dela in je le mehanično in pedagoško pomanjkljivo prenašanje znanega pa tudi nerelevantnega. Ob tem bi se morali zamisliti prav uči teljevalski podpisniki pisma, ker ta ugotovitev velja tudi za njih same. Seveda ne hi imel posebnih zadržkov do objavljanja nekaterih mojih spisov tudi v filozofskih časopisih, čeprav sera prepričan, da v njih ne gre za "filozofsko" filozofijo. Citat (e) [0] je programska izjava o možnostih nastajanja informacijske logike. Ozadje te logike je podano z možnostjo informacijskih principov, kot sem jih formuliral v [12]. Tu ne gre za platonsko izjavo, saj bi bilo v (bistveno) omejeni obliki mogoče formulirati tovrstno logiko tudi s pomočjo navadnega matematično-logičnega konstruiranja (npr. s posiljevanjem formalnega jezika v okvire predikativne logike prve stopnje). Da pa rojevanje take logike ne bo enostavno in matematično rutinsko, opozarjam implicitno in eksplicitno prav s filozofijo določenih pojmov. Področja informatike in njenih problemov nisem nikoli razumeval kot trdne, algoritmične discipline, čeprav računalniški "strokovnjaki" (v stilu objektov iz razreda "Fachidiot") prepričujejo sami sebe, da je informacijsko (tudi inteligenčno) v bistvu prav in samo njihova racionalistična znanost. O histeričnem pamfletlranju Znanost danes ne misli: in samo v njena moć, učinkovitost. tem Je Ivan Urbančič [2] 428 Menim, da pisci pisma iskreno verjamejo v to, kar so zapisali. Odstavek, ki govori o ponovni objavi prispevkov, pa bo - upam na iskreno veselje piscev pisma - upoštevan. Seveda ne gre za ponovno objavo kar vsega povprek, saj je npr. potopis [16] le pričevanje o določeni izkušnji projekta paralelnega računalnika. Po srbskem reklu bi lahko prostodušno ugotovil, da se nekoliko histerično mešajo babe in žabe. Za objektivno komunikacijo bi bilo potrebno odprto pismo prevesti v angleščino - in to bi lahko storili pisci sami. Ker domači znanosti ne velja zaupati, naj bi tudi za pisce pisma veljalo le to, kar bo pripravljen potrditi nek zunanji klan. Upam, da se bo to zares zgodilol Ke morem si kaj, da odprtega pisma ne bi razumel kot histerično pamf1 e t iranj e , ki dosega svoj vrh z Nobelovim nagrajevanjem. Ali se morda motim, če govorim o čustveni razdražlji-vosti piscev pisma, njihovi nagnjenosti k blasfemiji, posebni avtosugestij i in o njihovih motivativnih konfliktih? Ali ne kaže "napad povprek" na dramatično obliko vzklikanja in celo neprikrite agresije, ki je daleč od kulturnega. ali vsaj znanstveno sprejemljivega dialoga, za katerega je potrebna prisotnost publike, čeprav seveda "kritika" ni nevarna za okolico? Mislim, da bi pisci pisma svoj problem veliko lažje razrešili s svojim lastnim znanstvenim delom, ki bi ga z veseljem objavljali v Informatici in spremljali njihovo uspešnost v tujini. Tako pa se mi njihova intenzivna čustva kažejo predvsem kot simptom nemoči, nedozorelo-sti in žal tudi govorjenja v tropu (organici zma ) . O rotenju, zaklinjanju in herostratstvu Znanstveno rotenje in zaklinjanje ne zaležeta, če sta predmet in metoda rotenja in zaklinjanja deklarativno znanstvena. Naj mi bo dovoljen tale citat [17], ki se prav gotovo lepo prilega formalnemu vzklikanju piscev pisma: Tine: MoJa metoda Je metoda znanosti. Igor: To so visokodoneče besede! Toda ali ne vidiš, da uporabljaš krožno dokazovanje : metoda ti pove, kaj Je znanost, le-ta pa potrjuje metodo. V formalni logiki nisi ravno doma, ali ne? Pa tudi po motivacijski in logični plati ne verjamem, da je pri določenih obratih v mišljenju in tudi v znanosti herostratstvo primerna metoda, da se prav z njim blokirata napredek in razvoj disciplin, kot so npr. t. i. discipline umetne, nevralne in molekularne inteligence (ta klasifikacija je povzeta prosto po B. Součeku). Informatika kot disciplina verjetno Se ni dosegla svojega zenita, čeprav se ji danes že očita, da je zastarela in da ne dosega tega, kar se imenuje inteligenca oziroma um. Sam sem seveda toliko konzervativen, da trdim, da sta inteligenca in um kot živi procesnosti tudi informacijski obliki. Kakor koli že, politika celotne znanosti razvitega sveta kaže, kako bo ta prej ko slej postala del strategije, ki jo predsednik ZDA Ronald Reagan imenuje economy of mind. Kje smo v znanstvenem razmišljanju o trendih tega razvoja pri nas, na univerzah, v institutih in v industriji? Ali je sploh mogoče znanstveno raziskovati brez določene filozofije, ki vselej nastaja izven čiste znanosti in izven dosega mišljenja znanosti predanih in le njej vzklikajočih služabnikov? Ker tudi res nismo daleč od tega, kar pravi švedski matematik Axel Berringson: "Nesmiselno je iskati zabavo v matematiki v trenutku, ko je pol človeštva lačnega." Slovstvo [0] Odprto pismo (T. Pisanski etc.), Informatica 12 (1988) St. 3, (okviru te rubrike). [1] F. Nietzsche, Tako je dejal Zaratustra, Slovenska matica, Ljubljana 1974. [2] I. Urbančič, Mišljenje - pesnenje. Nova revija 7 (1988) St. 71-72. [3] T. Winograd, F. Flores, Understanding Computers and Cognition, Ablex Pubi. Corp. Norwood, NJ (1986). [4] H.L. Dreyfus, S.E. Dreyfus, Mind over Machine, The Free Press, Mcmillan, New York, 1986 . [5] T. Winograd, A Response to the Reviews, Artificial Intelligence 31 (1987) 250-261. [6] J. Haugeland (Editor), Mind Design, The MIT Press, Cambridge, Mass 1981. [7] A.P.Zeleznikar , Artificial Intelligence Experiences Its Own Blindness, Informatica 11 (1987) No. 3, 25-28. [8] Dretske, Knowledge and the Flow of Information, Basil Blackwell Publisher, Oxford 1981. [9] A.P. Zeleznikar, Na poti k informaciji, Informatica 11 (1987) St. 1, 4-18. [10] A.P. Zeleznikar, Information Determinations I, Informatica 11 (1987) St. 2, 3-17. L 11] A.P. Zeleznikar, Raziskave računalnikov in informacije v naslednjem desetletju, Informatica 11 (1987) St. 2, 57-59. [121 A.P. Zeleznikar, Principles of Information, Informatica 11 (1987) St. 3, 9-17. [13] A. P. Zeleznikar, Information Determinations II, Informatica 11 (1987) St. 4, 8-25. [14] A.P. Zeleznikar, Problems of the Rational Understanding of Information, Informatica 12 (1988), St. 2, 31-46. [151 A.P. Zeleznikar, Uvodno predavanje. Informatica 12 (1988), St. 1, 3-5. [16] A.P. Zeleznikar, Parsys Expeditions to New Worlds II, Informatica 12 (1988), St. 1, 77-91. [17] V. Pečjak, Nastajanje psihologije. Dopisna delavska univerza Univerzum, Ljubljana 1983. Prafeći razvoj novih kompjulerizironih lehnologijo i po-slupaka za proračunovanje, projektiranje i oblikovanje, le poslovne i proizvodne sisleme kao i napredak u teoriji informacijskih, plansko-poslovnih i proizvodnih sislemo, odlučili smo da za ovaj, jubilarni, 10. međunarodni simpozij «Projeklironje i proizvodnja podržani računalom -PPPR '89., koji će se održali od 17-19. 10. 1989, bitno proširimo i drugačije grupiramo teme Simpozija. Naime, suvremeni pristup sve više zahtijeva integraciju i sistemska znanja, Jto istovremeno nameće nopulfonje, podjele po užim strukama. Teme bi pored CAD, CAM, CIM i CAE trebole zahvotiti i u područje ekspertnih sistemo, umjetne inteligencije, problemotike velikih sistema, dajući i pregled postojećeg stanja i predvidivi bliski razvoj preko ovih novih područja. To su i razlozi zbog kojih je Programski odbor zamijenio dosadašnje sekcije zasnovane na slrukania [elektrotehnika, strojarstvo, brodogradnja, građevinarstvo itd) novim temama, koje obraduju računarske postupke primijenjene na probeme zojednič-ke rozličitim strukama. TEME SIMPOZIJA JEZICI 1. Metode proračuna deformabilnih tijela (elostičnih, plosMčnih, viskoelasHcnih, viskoplosHcnih itd) 2. Metode proračuna polja (elektromognelskih, toplinskih, hidromehoničkih, oerome^ioničkih, opličkih ild) 3. Projektironje Informacijskih sistema {tehničkih, poslovno-planskib, zdrovsfvenih itd) 4. Operacije i proizvodni procesi (metode anolize, sinlere, simulocije i optimiranja kontinuiranih i diskretnih procesa u tehničkim sfstemimo roziičitih staiko) 5. Oblikovanje roeunalom (oblikovanje proizvoda no donoj ili pretpostovlienoj osnovnoj morfološkoj, topološVoj i geometrijskoj strukturi, koje proizlozi rjelovonjem primarnih (funkcijskih) 1 sekundornih (onolize) procesa. To se zovrlno obliko-vonje temelji na kriterijima funkcionalnosti, ergono-mičnosfi, estetičnosfi itd) 6. Novi horizonti u primjeni računara (koncept ekspertnih sistemo, nove metode rozvojo $oftwore-o, komunikacijo između radunare i korisnika, vrlo kompleksno projekironje, metode upravljanja aplikacijama, utjecoj novih metodo u grofici i novih gro-fičkih mogućnosti, utjecoj novih jezika i očekivanih slandcrdo) Službeni jezici Simpozija su hrvotskosrpski i engleski jezik uz simultono prevođenje. Zbog međunorodnog karaktera Simpozija, mogućnosti bolje komunikacije i mogućeg objovljivanjo u stronim časopisima posebno preporuče-mo outorimo da rodove pi$u na engleskom jeziku. HOTELSKI SMJESTAJ Za sudionike Simpozija orgonizotor će osigurati smjeStaj u hotelimo A i B kotegorije. Sve detaljne informacije kao i način vršenjo rezervacije smjeStojo biti će objavljene u 2. obavijesti. PREDSJEDNIŠTVO ORGANIZACUSKOG I PROGRAMSKOG ODBORA SIMPOZIJA Predsjednik Dr Zijod Hoznodor, redovni profesor Elektrotehničkog fakulteta SveučiliSto u Zagrebu Potpredsjednik Dr Vesna Jurčec, sovjetnik Republičkog hidrometeorolos-kog zavodo SR Hrvotske, Zagreb ROKOVI PRIJAVE SUDJELOVANJA S RADOM Tojnici Mr Seod Berberović, asistent no Elektrotehničkom fokul-tetu SveuČiliSta u Zogrebu Dubravka Pavlović, ATLAS, putnička agencija, Kongresni odjel Zagreb Ispunjenu prijovu zajedno sa sažetkom od oko 500 riječi, koji dobro ilustrira sodržoj i svrhu rado poslati najkasnije do 1. n. 1988. godine no odrcsu tehničkog orgonizatoro - ATLAS, Kongresni odjel Zogreb. Odobrene rodove, napisane prema uputomo koje će outori dobiti uz obavijest o uvjetnom prihvotu rodo no temelju sažetka treba posloti predvidivo do 3. 4. 1989. Predovočimo će prilikom izlogonja biti na raspolaganju diaprojektor, grofoskop, videoprojektor (VHS sistem). Jeden autor može prijoviti najviie dva roda, bilo kao outor ili kao koautor. Obavezni, sostovni dio prijave rada je anketo o radu tiskona no poleđini prljcve. U obzir zo tisok će se uzimati somo radovi autora zo koje bude pravovremeno uplaćeno kotizacijo. ADRESA TEHNIČKOG ORGANIZATORA ATLAS - Kongresni odjel Trg senjskih uskoka 7 41020 Zogreb Telefon, 041/525-333, 528-094 Telex: 22413 oflcon yu Telefox: 041/S25-4Ì8 KOTIZACUA Informocije o visini kotizacije i nočinu uploćivonja bili će objovljene u 2. obovijosli (predvidivo svibanj 1989. godine]. MJESTO 1 VRIJEME ODRŽAVANJA Simpoii) će se cdrioii u Kongresnom centru Zagrebačkog vetesajmo. Avenija Borisa Kidriča 2, Zagreb, u okviru specijalizirane priredbe INTERBIRO-INFORMATIKA od 17-19. 10. 1989, godine. STRUKTURA SIMPOZIJA Usmeno izlogonjo, poster sekcije, prezentocije hcrdv/ore-o i software-o, izložbe.