Zygmunt Ryznar SpL Specification Language
this paper has been written by Author and is licenced as Creative Commons – 3.0
SpL 1 is a descriptive specification language aimed at improving
documentation and communication by providing simple formal
description of any object in terms of structure and behaviour. A
vocabulary of this language is a small set of simple English
words. The precise compact „dictionary” of words and statements
is the base upon which one can compare objects independently of
country, time, profession and type of business. Author presents the
kernel and subsets of SpL© covering such different areas as
business, human-being and computer software. 2
I. INTRODUCTION
The specification languages are focused usually on the following
domains:
a. the collection of entities, their relationships and attributes
(e.g. PSL/PSA–Problem Statement Language/Problem
Statement Analyzer in ISDOS project)
b. the collection of objects, their structure, behaviour and
unlimited relations not restricted to dbms
c. documenting programs written in a given language (e.g.
ANNA – ANNotated Ada)
d. an overall program description (e.g. PSL – Program
Specification Library)
e. modelling programs in terms of data types and functions
performed upon them (e.g. VDM-SL)
f. a real time process control (e.g. SDL from TUI).
The SpL belongs to the b category. Almost all languages are
oriented toward information systems and relations embedded in
data bases while scope of SpL includes any object (real or
conceptual) and uses innovative data structures (spiral, free-space,
swarm, triangle, tunnel, curve,blackhole) as well as classical ones
(network, hierachy, line).
SpL is a descriptive language, so it should not be compared with
algebraic languages such as CASL, ASM, ACM. It also has no
features for mathematical modelling used in simulations e.g.
calculating time dependent variables such as net income for each
month of a year.
It differs from the SDL (Specification and Description Language),
which focuses on process control and real-time applications with
asynchronous communication between components. It is not as
extended as UML (Unified Modeling Language), VDM-SL
(Vienna Development Method – Specification Language) and not
equipped with diagram technology.
SpL is a tool for a simple but formal description of any object in
terms of structure and behaviour. It is a metalanguage with scope
defined globally and locally. The kernel of SpL contains common
(standard) phrases and keywords, dedicated to any object. An
extension of the language for selected areas is defined in subsets
called here SpL-B (business), SpL-H (human-being), and SpL-S
(systems). This collection of subsets presents possibilities (and
limitations) and is extendable for new areas. A Subset is similar to a
shell in an operating system for a group of users allowing each
group to use its own commands and keywords.
1 The primary name “OSL” was replaced by “SpL” to avoid confusion
with OSL-Open Software Licence
2 This work was not supported by any organization. My profession is in
the field of information system analysis and design. During the course of
many years of interaction with business and IT professionals, I concluded
that there is "a must" for a precise specification of subject matter.
Objects may be concrete or abstract (existent or conceptual, virtual)
independent or dependent, etc. An object has at least its own
name, identifier, properties, structure, interface, behaviour and
"history". An important feature of the object is its ability to
collaborate with other objects using visible relations and interface.
External (outside of the area or subject) links may be specified
using definitions in the ENVIRONMENT section.
The “subject” is the main class of an object within area, e.g.
„bank” in area of „banking”. The subject list may consist of a set
of types (e.g. „bank” may be universal, retail, wholesale, short
term cash loans etc). The specification and definitions may be
common for all subjects and private for each type or even for a
given instance. The definitions in the kernel are common to any
area.
SpL uses “classical” forms of data and geometric conceptual
(nongraphical) figures for presenting the layout and behaviour of
objects. Geometric view creates a new type of data for cognitive
computing (shapes automatically discovered by analysis of variety
of information).
List of geometric figures:
1.Spiral (single- and multi stranded)
2.Swarm (moveable homogeneous population with variable density)
3.Tunnel (population inside of cylinder)
4.Cylinder (population on the edge)
5.Triangle (layout defined by 3 factors)
6.Container (trunk, regular 3-dimentional figure)
7.Black hole ("off the face of the earth")
8.Wormhole (injection of foreign, strange information)
The spiral differs from iteration in that sense, that every her roll
can possess different mechanisms and content and is a subject to
change (in the learning processes and normal behaviour). Examples
of strands in business could be profit, competitiveness, credit
ability etc. The swarm relates to the homogeneous reloctable dense
population – e.g. franchising network.
The free space means unstructured information (no rules). The
tunnel is three-dimensional population with the value X (e.g. the
sum of credits) along the time Y and densed acording to the third
factor Z (e.g. credit ability). The cylinder differs from the tunnel
with the feature that it carries the values on the surface, and the
tunnel has the full interior. The triangle coud represent "shadows"
of object on its 3 angles surface, e.g. for employment angles are
age, education, sex.
The „black-hole” marks the irreversible disappearance of the object
(e.g. the bankruptcy of the firm) and the „strength of drawing in” is
her value (e.g. the speed of the bankruptcy).
The documentation of an SpL application contains a kernel
(global definitions), area subset definitions and (optionally) a
detailed specification worked out for objects which belong to the
area. A definition section deals with “abstract objects“, while
specification contains descriptions of physical objects (instances)
using phrases and keywords located in definitions. Definitions
written in the specification are local (like local variables in
computer programs).
One vital question concerning the implementation of SpL is a
computer-aided support to input, correcting the specification
(after validation) and outputting readable results. In further
development one can imagine an „Application Software Factory”,
that generates ready to use application software from definitions,
specifications and skeletal building blocks. II. SpL NOTATION (ver.4)
<!...> comment
< > container
=> link to something external (outside area)
start-end of language/subset definition
start-end of a given object specification
iiiiiiiii keywords: by,from,to,when
::= type assignment
:= list items
= value assignment
: name assignment
@ mark of attibute,feature,property
@dark unknown, to obtain, to discover
:: belongs to
(x,y,..) list
[name] executive/operational object
xxxxXxxx special or complex names
XXXX basic object
UUUU.XXXX qualified name of object
xxxxxxxx some complex or important keywords
KKKKKK SpL keywords ((capital letter)
xxxxxxxx operational keywords: event,action
tags: id,def,spec
& / conjunctions: and or
<-> Bidirectional unitary relation 1:1
<- -="" 1:1="" back="" directional="" relation="" unitary=""> Forward directional unitary relation 1:1
<=> <= => Many to many relations
Writing of specification should be supported by a specialized
editor, that automatically (based on the SpL notation) converts
words into bold, inverted font and capital/small letters. Otherwise
all the text (excluding object names) may be written in lower case.
Another useful facility would be virtual keyboard with such keys
as
ENV:=(REGULATIONS, INFRASTRUCTURE)
ENV.INFRASTRUCTURE:INFR
ENV.REGULATIONS:=(LegalActs, Resolutions,
Decisions)
INFR:=(IT,ORG,HR)
INFR.IT:= (Servers,OperSystems,Applications,
TransDataBases,Users, prLanguages)
INFR.ORG:=(OrgStructureOfCompany)
INFR.HR:=(HumanResources)
defLang:=(BSL,HSL,SSL)<! defined subsets of SpL>)
defList:=()
specList:=()
object.id
class
object.type::=(eobject,
dobject,
iobject,
vobject ,
sobject ,
oobject)
@sobject:=(noiceReduction,selfTeach,selfRepair,selfKill,
selfRestore,selfRestart)
@oobject:=(input(parameters,data),output(info,messages),
structure(addComponent,addRelations))
dynamics::=(event,operation/transaction,action,process)
dynamics::=(ev,op/tr,ac,pr)
dynamics.scenario::= (scevt,scop,scac,scpr)
event:ev<!-elementary atomic fact >
trans
ftrans
operation:op
action:ac
process:pr
reverseMode::=(rev,rac,rop,rtr)
pr::=(trigger,action(),endEvent)
scenario:sc
scenario.rank:=(best,worst)
object.Info
keywords:kwords
olh:=(timeline,events,aging-curve)
object .role:=(interface, trigger,generator,agent,integrator,
component,monitor,commander,
executor/performer,initiator,terminator,
destructor,participator,owner, stockholder,
customer,supplier;partner,employee)
relations::=(activatedby,activates, assisted by,
appearence depends on , belongs to
/is owned by , built from ,
calls (),
consists of ,contained in/contains,
controlled by/controls,derived from,
existence depends on,exists when/in/for,
included in,linked to ...by/links,
refers to, relates to, related by affinity,
represented by/represents,involved in,
shared by/shares, used by/uses)
state:=(active,inactive,dark,dormant,suspended,aborted,
idle/waiting,lost,expected,deleted,homeless)
status:=(generic,real,virtual,undefined)
role:=(driver,trigger,reactor,agent,executor,generator)
reactor::=(acceptance, rejection,constructor)
rank:=(critical,necessary,most wanted,optional,worst,best)
rule:=(decision-table,logical-when-if,formula).
{control-flow
ac::=(ev1,ev2,ev3, ..)
pr::=(ac1,ac2,ac3,...)
s(ev1,ev2,ev3, ..)
p(ev1,ev2,ev3, ..)
pr::=s(ac1,s(ev1,ev2,ev3),ac2(p(ev4,ev5,ev6),(ev7,ev8,..))
repetition:=(iteration,single spiral,multiband spiral)
activated by <..> with at
2 when
finished at < > with <...> when .<..>}
{body::=(Contents,Script,Metadata)
contents
script
metadata}
layout:=(free-space,swarm/hive,network,hierachy,line,
triangle,tunnel,curve,spiral,blackhole,wormhole)
spiral:=(helix,logarithmic,hyperbolic,polygonal,rational,spherical,
conical,circle-involute, cornu,daisy,epispiral,archimedian,
fermat,nielsen,poinsot,phyllotaxis)
helix
spiral.parameters:=(center-point,number-of-rotation,number-of-
band,starting-radius, points-per-rotation,
growth-per-rotation(horizontal,vertical))
<\def>
IV. SpL-B SpL FOR BUSINESS
Subset SpL-B named BSL (Business Specification Language) is a
subset of SpL dedicated to business objects. The simple banking
simple example presented below is for illustration purposes only.
The full specification should contain also such objects as
headoffice, branch, channel of product delivery, customer, deposit
account, loan accout, loan credit line and executive operational
objects, like account manager, teller, dealer and IT infrastructure
objects.
BUSINESS:=(BANKING,MANUFACTURING, SERVICES)
ENV.business id:=BIC
BANKING:=(RETAIL,WHOSALE,UNIVERSAL,MONEY-
MARKET,DERIVATES,SHARES)
ENV:=(bank.id:=BIC,account.id:=IBAN,dadaTables)
dataTables:= (LIBOR,OperatingCurrences,ExchangeRates)
kwords:=(customer.id,accountCurrency,creationDate,
fTrans,fTransLimit,infoSet,Resources,
operation
action
driven/sorted by (fTrans,product, customer, date,
schedule,frequency)
matched/matches)
retail.product:=(CURR-ACCOUNT,DEPOSIT,LOAN)
object.Info:=(BIC,country, bCurrency,
FinancialYear, number of branches>)
dataTables:=(CorrespondentBanks,Branches,
calendarWorkingDays,bkAccountChart,
productList,interestRateTable)
kwords:=(branchNr,customerId,accountNr,rate,
balance,balanceSheet)
OperationalObjects:=[teller,accountMgr,customerMgr,
productMgr,trader]
Bank.objects:=(product,currency,limit,account)
limit:=(country,industry,customer,currency)
iobject:=(customerPosition,monthlyBalancesheet)
bank.type:=(dmBank,
frBank,
corrBank)
bkAccount:=(bsAccount
nbsAccount
batchOperations:=(eodOperation,
eomOperation,
eoyOperation,
eopOperation)
objectInfo:=(Account id,owner,co-owner)
minBalance,actualBalance,historyStatement)
Relates to Customerid
rtTrans:=(Open,Quit,Cash-in,Cash-out,
transfer)
eomOperation:=(printMonthlyStatement)
transaction-limit=<...>
info.set(transactions) :=(account,fTrans.incoming,
fTrans.outcoming,balance)
@sorted by date
info.set(products):=(deposit,loan)
info.set(channels):=(branch,echannel)
V. SPL-H SPL FOR HUMAN
Subset SpL-H named HSL (Human Specification Language) is a
semiformal notation for a human being for anyone interested in
ontology and existential psychology. Further development of HSL
could be achieved with collaboration of psychologists and medical
professionals.
One possible usage of HSL language is creation of a
human resources database in a corporation or even on an
international scale for locating individuals which meet certain
psychological, intelectual and professional requirements.
Similarly to other subsets of SpL this one contains only additional
phrases and keywords that do not exist in kernel of the base
language.
class1:=(animals.mammalia.primates.homidae)
class2:=(nation.ethnic-group.profession.person)
kwords:=(life-space,behaviour,scope )
scope::= (BIOPHYSICAL,GEOGR,CULTURAL,
3 SOCIAL, LEGAL)
ENV:=(WORLD,CONTINENT,COUNTRY,
REGION,SITE)
ENV.LEGAL:=
ENV.CULTURAL:=(tradition, history, education,
religion, ideology, art, radio-tv)
ENV.BIOPHYSICAL:= (animals.homosapiens)
ENV.GEOGR:= (homeaddress,company,school)
object.Info:=(id,sex,birth-data)
homeaddress::= (country,site,street,house,flat)
sex=(male/female/x )
family::=(gentree,parent,child,son,daughter,
grandSon,grandDaughter,granMa,granPa)
emotion:=(love,hate,satisfaction,frustration,
agression,enjoyment,anger)
psychComplex:=(fear of insupport,regression,
inferiority,persecution)
habit,hobby,profession,
health:=(measures, physical-examinations, illness-
history),
role::=(advisor, spouse, manager,patron, partner, customer,
supervisor,participator,owner,supplier),
appearence depends on ,
assisted by,belongs to,
matched/matches
relates to
used by,uses,not used,misused,abused
state:=(active,inactive,dormant,suspended,
aborted,idle,lost,dead,homeless,retired,
married/divorced/single,ignored)
place:=(point, area,everywhere,nowhere>
life-space:=(psychological,social,educational,
financial)
behaviour
behaviour.rational::=(selfrealization,need,
satisfaction)
behaviour:=(marriage,friendship,career,ilness,aging)
genotype,fenotype,
olh
cluster:= (self, profile/type, attitude,leadership, ability,
extraversion,anxiety,independence, healthState,
lifeStyle,creativePotential,happiness,
BipolarPersonality)
self:=(self-identity,self-assesment,self-sentiment,self-
esteem,self-regard,self-reliance,self-control,
self-image,self-extension,self-structure)
leadership:=(assertive,creative,facilitative,independent,
stable,permissive,leadershipStyle,
leadershipPotential)
ability:=(toughMinded/openMinded,creative,fast/slow,
toleratesDisorder/perfectionistic,
grounded/abstracted, improving own learning,
problem solving, IQ, ......)
need:=(biological(food,medical,emergency,rescue,
coping),cultural,psychological(love,esteem,
selfrealization),financial-security)
BipolarPersonality:=(Warmth,Reasoning,EmotionalStability
Concillation,Dominance,Liveliness,Openness,
Tension,Rule-Consciousness,SocialBoldness,
Sensitivity,Vigilance,Abstractedness,
Privateness,Apprehension,OpennessToChange,
Self-Reliance,Perfectionism)
Warmth=Reserved/Warm
Reasoning=Concrete/Abstract
EmotionalStability=emotional/stable
Concillation=concillatory/aggressive
Dominance =Deferential/Dominant
Liveliness =Serious/Lively
Openness=extraversive/introversive
Tension=Relaxed/Tense
Rule-Consciousness=Expedient/Rule-Conscious
SocialBoldness=Shy/Socially Bold
Sensitivity=Utilitarian/Sensitive
Vigilance=Trusting/Vigilant
Abstractedness=Grounded/Abstracted
Privateness=Forthright/Private
Apprehension=Self-Assured/Apprehensive
OpennessToChange=Traditional/Open to Change
Self-Reliance=Group-Oriented/Self-Reliant
Perfectionism=Tolerates Disorder/Perfectionistic
sex=male
family=(married, parent of 3, grandfather of 4)
state:=(retired, active)
cluster.self=average
ability=(openMinded,creative,fast,abstracted)
need=psychological.self-actualization
temperament=(emotional,sensitive,
introversive,tense,reserved)
cluster.happiness=good+
IQ=> http://www.iq-test.com/
VI. SpL-S SpL FOR SYSTEM
Subset SpL-S named SSL (System Specification Language) may
help the structured design methodology dealing not only with
“well” (usually it means “hierarchically”) structured problems and
systems built under a long-term schedule of integration.
But a real cause for computerization should be actual business
needs (there must be a managers who want information for current
decisions).
The basis for such design is an understanding the business of
company and afterwards the creation of initial state of the system,
called the pre-system, containing fundamental technological
elements built according to the rules that enable their use in many
applications and in changeable environment.
There is a need to develop a specific technique to help
programmers to design skeletal programs that have standardized
(but sometimes multifunctional) control flow and are equipped with
many “modifiers” that require processing by a tuner. The tuner
may perform operations such as inserting data names and
parameter values, choosing entry points, generating CALL
statements, generating empty modules (driver or stub type),
inserting expressions into macrostatements and invoking database
schema.
4
INFR.IT:= (servers,operSystems,applications,
transDataBases,dataWarehouses,
networkMgtSystem,users,prLanguages)
::=(SYSTEM.SUBSYSTEM.MODULE.
PROGRAM.PR-BLOCK)
PR-BLOCK
kwords:=(version,interface,run,runTime,integrated,
standalone,inDevelopment,accepted,
notAccepted,library,creatDate,updDate,tested,
rejected,pcode,ecode,callValue,trace,errorCode,
inItems,outItems,flow)
trace::=(path,callValue,outValue,errorCode)
process::=(trigger,action(),endEvent)
object.Info:=(pr-name,version,author,creatDate,
updDate,prLanguage,operSystem)
{ control-flow
activated by with
at when
finished at < time-point /no-of-repetition> with
when }
<\def>
objectInfo:=(name,version,author,updDate,codeSize,
prLanguage,operSystem)
resources:=(dataBuffer,eventTrace,stackHandler)
{trigger::=call
ac(verif)
ev(checkPassword,callVerif)
when callVerif failed exit
ac(initial) when first call
ev(bufferDecl,stackDecl),
act(tuning)
ev(paramAnalysis,transform,generateExecutable)
ac(activate)
ev(paramAnalysis,tuner),
ac(run)
ev(load,perform,releaseResources,exit)
}
call::=(,,
,,
(),inItems,outItems)
<\def>
<\def>
Structure of specification:
SUBSYSTEMS:=(list of subsystems)
......
<\spec>
<\spec>
<\spec>
VII. CONCLUSION
SpL is a conceptual schema of the „world” centered on the
structure, behaviour and relations of objects. This language is
oriented on communication between people and in case of the IT
documenting core features of „system” before, during or/and after
design.
In reality any business is highly complex and dynamic. The key
to meet this challenge is improving a communication between
busines and IT people, modernization of design approach to
create systems with variable structure and undefined borders using
a library of tunable predefined generalized blocks. Future IT
systems should function as a collection of many incarnations based
on the same generalized set of blocks, which can be located
anywhere in the system, tuned and properly interfaced. It would be
a good “hybrid” solution both for the specification as well as for
execution.The „engine” (to be developed) of the SpL language
should be capable to process the contents of the specification at all
possible analytical levels, trace relations between objects, and
present them in tables and graphs, verify (if possible) and make
the final global presentation of a given area.
The SpL language equipped with computer-aided tools would
seem be a useful initiative to facilitate the documentation of
structured design centered on objects, events, processes and
structure.
REFERENCES
[1] Zygmunt Ryznar.1978. A conceptual model of an
interfunctional data base system. Information and Management
2/1978
[2] Zygmunt Ryznar.1981. S&DL – Structured Design Language.
Angewandte Informatik-Applied Informatics.12/1981 ->->
UNIWERSALNY JĘZYK SPECYFIKACYJNY OSL (Object Specification Language)
sobota, 21 stycznia 2017
Geometric view - SPL language
niedziela, 30 października 2016
Pokusa opracowania uniwersalnego języka specyfikacyjnego nęciła mnie od dawna. Przez lata dokładałem kolejne słowa kluczowe i zwroty, aż propozycja języka przybrała odpowiedni kształt. Język powstawał hobbystycznie (w czasie prywatnym bez jakiegokolwiek wsparcia firmowego) wyłącznie z inspiracji wewnętrznej na gruncie doświadczenia zawodowego w charakterze projektanta i programisty. Wydaje się mieć charakter teoretyczny, jednak dla mnie jest pomostem pomiędzy teorią i praktyką. Głównym celem niniejszej publikacji jest bezinteresowne zainspirowanie kogokolwiek do dalszych prac rozwojowych i implementacyjnych
Uniwersalność języka OSL (Object Specification Language) starano się wykazać na przykładzie tak różnych obiektów jak biznes bankowy, system informatyczny i istota ludzka [12]. Został on zaprojektowany warstwowo: istnieje uniwersalne jądro oraz specjalizowane podzbiory, w których można definiować dodatkowe słowa kluczowe i ekwiwalenty skrótowe zgodne z potrzebami obszaru (“AREA”). W opisie obszaru wyróżnia się warstwę środowiska zewnętrznego UNIVERSE (np. w bankowości dla banku jest to środowisko biznesu finansowego) oraz warstwy wewnętrzne związane ze specyfiką branży np. z typem banku, specjalizacją oddziału, rodzajem klienta itp. W podzbiorze opisującym system informatyczny szczególną uwagę zwraca się na obiekty komponentowe podlegające strojeniu i montażowi. W założeniu język spełniać ma zadania dokumentacyjne, technologiczne i poznawcze, reprezentując podejście obiektowo-komponentowe. Jak wiadomo, obiekt jest scaleniem (enkapsulacją, hermetyzacją) struktur danych, procedur i reguł zachowania się. OSL specyfikuje strukturę funkcjonalną obiektu i jego dynamikę poprzez procesy, akcje, transakcje, zdarzenia. Modelowanie danych pozostawia się systemom zarządzania bazami danych.
Tak jak język programowania służy do pisania programów, to OSL jest narzędziem do pisania specyfikacji. Jednakże w odróżnieniu od tego pierwszego, ten język może stać się modyfikowalnym metajęzykiem gdy do jego implementacji zostaną użyte zmienne tezaurusy (słów kluczowych, zwrotów i fraz) dopasowane do potrzeb obszaru, języka narodowego i środowiska informatycznego.
Notacja języka zawiera oprócz “klasycznych” struktur także konceptualne (nie graficzne) figuralne prezentacje procesu i populacji, takie jak spirale pojedyncze i wielopasmowe, rój, tunel, przestrzeń swobodna, czarna dziura, zwykłe figury geometryczne (trójkąt, kwadrat, koło) itp. Rodzaj wybranej figury zależy od rozkładu danych i zachowania obiektów. W trójkącie można np. przedstawić preferencje zatrudnienia zależne od 3 czynników: wiek, wykształcenie, płeć. Spirala od iteracji różni się tym, iż każdy jej zwój może posiadać inne mechanizmy i treść. Typową ilustracją spirali są procesy uczące się. W postaci spirali wielopasmowej można przedstawić równoległe kształtowanie się kilku wskaźników globalnych firmy (np. zysku, zdolności konkurencyjnej, kredytowej). Rój odnosi się do jednorodnej przemieszczalnej populacji o dużej zmiennej gęstości ‑ może ilustrować np. zachowanie firm globalnych z usługami franczyzy. Tunel odnosi się do przestrzennej populacji z dużym nasyceniem wartości (np. sumy różnorodnych kredytów) w określonym przedziale na osi czasu oraz w określonym przedziale współczynnika globalnego (np. zdolności kredytowej). Walec tym różni się od tunelu, ze nosi populację na powierzchni, a tunel ma wypełnione wnętrze. „Czarna-dziura” oznacza nieodwracalne zniknięcie obiektu (np. bankructwo firmy) a jej wartością jest „siła wciągania ” (np. szybkość bankructwa). Zakłada się, że figury mogą być predefiniowane dla obiektów na podstawie ich przewidywanego zachowania, a potem weryfikowane danymi rzeczywistymi poprzez uczenie modeli figur, podobnie jak to ma miejsce w przypadku sieci neuronowych.
Język OSL składa się ze zwrotów sformalizowanych i słów kluczowych specyfikowanych do używania w lokalnym obszarze biznesowym (AREA) lub globalnie w ramach tzw. świata (UNIVERSE). Są pisane zwięźle w prostym języku angielskim (z możliwością definiowania ekwiwalentów w języku narodowym), dlatego posiadają walory dokumentacyjne. W notacji używane są znaki dostępne na zwykłej klawiaturze, co sprzyja zastosowaniu języka.
Opis dokonywany jest w imieniu głównego podmiotu (SUBJECT) jakim może być np. instytucja realizująca działalność biznesową czy system. UNIVERSE, AREA i SUBJECT są superklasami. Wyróżnia się również tzw. obiekty wykonawczo-operacyjne (np. pracownicy) oraz obiekty infrastruktury (np. serwery, bazy danych). Opis obiektu może być obszerny, lecz występuje skrótowa charakterystyka obiektu w postaci tzw. okienka informacyjnego (infoWindow), które może być pokazywane w zbiorczym indeksie obiektów.
JĘZYK OSL v.3.1
NOTACJA
<! komentarz>
<.> <!pojemnik-container>
<def nazwa obiektu> <!początek sekcji definicji obiektu>, </def><!koniec definicji>
<spec nazwa specyfikacji><!początek spec, wystąpienia obiektu>,</spec> <!koniec specyfikacji>
::= <!przypisanie typu (np. klasy, obiektu)>, := <!przypisanie funkcyjne lub przypisanie do listy>
= <!przypisanie wartości czyli podstawienie> : <!przypisanie obiektowi atrybutu>
:: <!przynależność> = = <!ekwiwalentność>
{.....} <!ograniczniki sekcji>, (……) <!ograniczniki listy> ,<!ogranicznik frazy>
N# <!liczba wystąpień>, (x,y,..) <! lista>,(x/y/..) <! lista rozłącznych elementów>
YYYYYY.UUUUU(XXXXXX) <!struktura, kwalifikowana nazwa obiektu>
name/[name] <!obiekt wykonawczo-operacyjny>,
XXXX/(XXXX) <!obiekt podmiotowy np.biznesowy>,
<-> <!relacja dwukierunkowa 1:1, jednostkowa - unary>
<=> <!relacja dwukierunkowa n:n, many to many), <=, => <!jednokierunkowa n:n>,
<- <!relacja jednokierunkowa zwrotna>, -> <!relacja jednokierunkowa pierwotna>
JĄDRO JĘZYKA
<def OSL>
subsets::=(BSL,SSL,HSL)
keywords:=(id <!identyfikator obiektu>,role,relation,message,data,state,status,
objectTypes,infoWindow<! informacje uzewnętrzniane przez obiekt>,
flow, infoFlow<!przepływ informacji>,dataFlow<!przepływ danych np. w programie>,
controlFlow<!przepływ sterowania>,infoTable<!zestaw informacji>,message,
dataTable <!tablica z bazy danych,plik>,dbase,bigdata,szbd,hurtd,transFile,
< x>OBJECT <!typ obiektu>,olh<!object life history>)
message:=(text,picture,clip,graph),info:=(message,report),
data:=(field,record,file)<! Struktury danych opisane w systemie zarządzania bazą danych>,
state := (active,inactive,dormant,suspended,aborted,idle,lost),
status:= (generic,real,virtual,projected),
Class0::=(UNIVERSE, AREA,subAREA,SUBJECT),
objectTypes::=(eOBJECT<!obiekt elementarny>,iOBJECT<!obiekt informacyjny>,
mOBJECT<!obiekt materialny>,fOBJECT<!obiekt finansowy>,
vOBJECT < obiekt wirtualny>,dOBJECT<! obiekt dynamiczny>)
dOBJECT::= (ZD==ZDARZENIE,TRANS==TRANSAKCJA,AKCJA,PROCES)==
(EVENT,TRANSACTION,ACTION,PROCESS) <! definiowanie dwujęzyczne>
<! ZDARZENIE jest to elementarny fakt, czyn, działanie lub zaniechanie działania>
<!TRANSAKCJA jest to sekwencja zdarzeń mająca na celu realizację konkretnego celu >
<!AKCJA jest to działanie kilku zdarzeń>
<!PROCES jest to ciąg akcji i zdarzeń posiadający wspólne zadanie inicjowany przez zdarzenie
inicjujące i kończony przez zdarzenie końcowe)>
role:= (commander<!obiekt sterujący procesem, odpowiedzialny>,
trigger<!obiekt inicjujący/uruchamiający>,
generator<! obiekt generujący np. zdarzenia>,
agent<! reprezentuje usługę np. agent w call-center>,
integrator<! obiekt integrujący obiekty>,sender,receiver,
monitor<! śledzi wykonanie/przebieg procesu>,component
maker,executor,,participant,cooperator,
owner,stockholder,customer,supplier,partner,employee)
relation:=(activated by/activates, activated when/if,
appearence depends on,coming from,built/made(by,of,in),
assisted by, belongs to /is owned by,called by,used by/uses,using,
communicates to <…..> using <…..>,sends <message>,
calls <obiekt> (xxx,yyy) <!xxx elementy przekazywane., yyy elementy zwracane>,
consists of <parts> , contained in/contains, controlled by/controls,derived from,
driven by(date,schedule,frequency),involved in,shared by/shares,
existence depends on, exists when/in/for, evaluated as (critical,mostWanted) ,
included in,evaluated by,linked to ...by / links,matched/matches,performed by,
refers to,related by affinity,represented by/ represents)
controlFlow:=(repetition :=(iteration, single spiral, multiband spiral),
activated .... BY ...with <initial-value> AT <time-point> WHEN ..,
finished AT <> with <value> WHEN ...,process==pr action==ac event==ev
ac::=(ev1,ev2,ev3, ..),pr::=(ac1,ac2,ac3,...),
s(ev1,ev2,ev3, ..)<!sekwencja>,p(ev1,ev2,ev3, ..)<!równoległy przepływ zdarzeń>,
pr::=s(ac1,s(ev1,ev2,ev3),ac2(p(ev4,ev5,ev6),(ev7,ev8,..))<!złożony proces>),
dataFlow:=(<data> from (<.>) to (<.>) using <data-transformation>)<!global flow>,
infoFlow:=(<info> from <sender> to <receiver> AT (time-point,schedule,onDemand))
{body:=(Contents,Script,Metadata)
contents <!zawartość ciała np. treść dokumentu, kod programu>
script <! lista działań generowanych przez obiekt>
Metadata:=(layout,simulation/modeling)
layout:= (freespace/swarm==rój/network/hierarchy/line/triangle/tunnel/cylinder/blackhole)
simulation/modeling:=(deterministic,heuristic,stochastic,neuralNet)}
</def>
OSL-B (BSL) BUSINESS SPECIFICATION LANGUAGE - OSL do opisu obiektów biznesowych
Jak wspomnieliśmy, w OSL zwraca się szczególną uwagę na dynamikę poprzez definiowanie zdarzeń, transakcji, akcji i procesów. Zdarzenie jest to elementarny niepodzielny fakt, czyn, działanie lub zaniechanie spodziewanego działania np. niedokonanie spłaty raty kredytu w terminie zmienia status kredytu. Transakcja jest to sekwencja zdarzeń mająca na celu realizację krótkoterminowego celu, np. otwarcie lokaty i dokonanie wpłaty. Akcja jest to złożone działanie np. uzgodnienia transakcji, ocena kategorii kredytowej i tworzenie rezerw na trudne kredyty. Proces jest to ciąg akcji i zdarzeń posiadający wspólne zadanie inicjowany przez zdarzenie inicjujące i kończony przez zdarzenie końcowe np. proces obsługi rachunku na koniec dnia obejmujący naliczenie odsetek, pobranie opłat, kapitalizację odsetek itd.
Zamieszczony przykład dotyczy fragmentów biznesu bankowego i stanowi jedynie ilustrację metody.
<def OSL-B><!BSL>
ENVIRONMENT==ENV:=(REGULATIONS,INFRASTRUCTURE,KIR,ELIXIR,KNF,RPP,NBP)<!środowisko>
ENV.REGULATIONS:=(AktyPrawne,Regulaminy,Zarządzenia)
keywords:=(company,division,businessArea,objectives,decisions,board,infoRequirements)
flow::=(mFlow<!materialny>,eFlow<!energetyczny>,lFlow<! labour-zatrudnieniowy>,
fFlow<! finansowy>, iFlow<!informacyjny>),
iOBJECT<!obiekt informacyjny np. informacje o tzw. pozycji klienta>,
vOBJECT < obiekt wirtualny np. lustrzane rachunki Nostro>,
dOBJECT<! obiekt dynamiczny np. transakcja>, eOBJECT<!obiekty elementarne>,
dOBJECT::=(ZD,TRANS,AKCJA,PROCES)==(EVENT,TRANS,ACTION,PROCESS)
relation:=(activated by.. when.. using..,
driven by (transaction,product,customer,regulations,schedule,date,frequency)
existence depends on/exists when/in/for <! np. istnienie konta zależy od istnienia klienta>,
evaluated,linked to ...by/links to, matched/matches),
attribute:=(standard,warning,critical,mostWanted)
<def AREA(BANKING)>
MODULE::=(RACHUNKI,LOKATY,KREDYTY,INFO_O_KLIENTACH,RYNEK_PIENIĘŻNY,
AKREDYTYWA,PŁATNOŚCI,PAPIERY_WARTOSCIOWE)
OBJECT::=(BANK,ODDZIAŁ,PRODUKT,RACHUNEK,KLIENT,WALUTA,DELIVERY-CHANNEL)
<def UNIVERSE(INTERNATIONAL_BANKING)>
id :=BIC<!międzynarodowy identyfikator banku macierzystego>,
keywords:= (IBAN<!International Bank Account Number>,
ICC <!International Chamber of Commerce>,BIC<!Bank Identification Code>),
infoTable:= (LIBOR,REUTERS2000, UCP500, ICC500, URR525,SWIFTmessages,
InternationalBanks,StockMarket)
<def SUBJECT(MÓJ_BANK)>
infoWindow:=(idBanku,Typ,kraj,WalutaBazowa,DługośćRokuFinansowego,
LiczbaOddziałów,LimityWalutowe),
infoTable:=(BankiKorespondenci,Oddziały,KalendarzDniRoboczych,PlanKont,
Waluty,Produkty,Transakcje)
keywords:=(NrOddz,idKlienta,NrRachunku,StopaOds,KursWym,DataKs,DataEfekt,
SaldoDostępne,SaldoKsięgowe,kwota,kapitał OdsetkiNal,OdsetkiSkapit,
DataWygas,Limity,SaldoDebet,zdolnośćKredyt,overDraft,Ryzyko,end-of),
End-of(day,month,year)==(eod,eom,eoy),
Ryzyko:=(ryzykoKredytu,ryzykoKlienta,ryzykoWaluty,ryzykoKraju),
Limity:=(LimKraju,LimBranży,LimKlienta,LimWaluty,LimDebetu),
OperObjects ::= [dysponent,kasjer,MgrRachunku,MgrKlienta,MgrProduktu]
PRODUKT ::=(RACHUNEK,LOKATA,KREDYT,PAPIER_WARTOŚCIOWY,DERYWAT,AKREDYTYWA),
RACHUNEK ::=(ROR,RK-FIRMY,KONTO_OSZCZEDNOŚCIOWE),
eOBJECT::=(KLIENT,RACHUNEK.ROR,KONTOKS,WALUTA),
iOBJECT::=(POZKLIENTA), WalutaBazowa=PLN,
cashFlow:=driven by end-of(day,month,year) for WALUTA(PLN,$,Euro),
KLIENT:=(prKLIENT<!OsobyPrawne>, fzKLIENT<!OsobyFizyczne>),
BANK:= (krBANK <!krajowy>,zagrBANK <!zagraniczny>, korBANK<!bank korespondent>),
KONTOKS:=(bilKONTOKS <!KontoBilansowe>, pozKONTOKS < ! KontoPozabilansowe>),
ZD:=(zdi <! inicjujące>, zdk<! końcowe>, zdz<!zawieszające>, zdu<!usuwające>)
<def PRODUKT>
infoWindow:=(TypProduktu,waluta ),
<def RACHUNEK>
infoWindow :=(Właściciel,Wspólnicy,Pełnomocnicy,MinSaldo,Saldo,Obroty,HistoriaRachunku),
Relates to idKlienta,
TRANSAKCJE:=(OtwRku,LikwRku,Wpłata,Wypłata,Przelew,TrBankomat),
<def RACHUNEK.ROR>
id:= (NrRachunku),
exists for fzCUSTOMER <!tylko dla osób fizycznych>,
initiated by PierwszaWpłata,
infoWindow:=(LimitDebetu,ZleceniaStałe,TypWyciągu,KartaVisa,Opłaty,
WarunkiOdnowienia),
Procedures:=(GenerKsięgowań, NaliczOds, OdsKarne),
eodTRANSAKCJE:=(StałeZlecenia,PobrOpłat,NaliczOds,OdsKarne),
dataTables:=(Opłaty,IndeksStóp,Księgowania),
calls NaliczOds=(30,360,90,Zmienne,IndeksStóp),
calls zdiArch(30d,eod)<!zdarzenie inicjące archiwizację transakcji z 30 dni
wykonywane na koniec dnia>,
calls zduArch(5y,eoy) <!zdarzenie usuwające z archiwum transakcje starsze od 5 lat
wykonywane podczas zamykania roku>)
</def></def></def></def><!kc definicji PRODUKT>
<def KLIENT>
Belongs to <segment> evaluated by dataMining(segm),
RACHUNEK:<lista rachunków klienta>,
RACHUNEK(KREDYT) activated when (wniosek-kredytowy,dataMining(zdolnośćKredyt),
POZKLIENTA driven by eom<!zawiera m.i.sumaryczne obroty wg produktów i walut>,
N#(rachunek,transakcja,overDraft)<!liczba rachunkow, transakcji, sald ujemnych)
</def>
</def></def></def></def><!kc definicji AREA(BANKING)>
<def AREA(INDUSTRY)
…….(<! m.i. przepływy materiałowe, energetyczne>
</def>
<def AREA(TRADE)
…….
</def>
<def AREA(SERVICES)
…….
</def></def><!kc definicji OSL-B>
OSL-S (SSL) System Specification Language - OSL do opisu systemu informatycznego
Zakres systemu informatycznego może być bardzo obszerny. Na przykład system banku uniwersalnego składa się kilku tysięcy programów dla kilkuset produktów (z których każdy wymaga innego algorytmu) i kilku tysięcy rodzai transakcji, software’u do zarządzania ryzykiem oraz obsługi różnorodnych kanałów dostępowych (okienko w oddziale, internet, bankomat, infolinia).
W obiektowo-komponentowym ujęciu możliwe staje się „uproszczenie” obrazu takiego systemu, gdyż jednostka aplikacyjna powstaje z komponentów, które wyrażają tzw. logikę aplikacji. Logika ta jest dostępna poprzez zestaw usług, zaś projektant buduje aplikację znając tylko usługi, nie zaś sposób ich realizacji. Przykładowo, w obiektowo zdefiniowanym systemie bankowym znając zachowanie się usługi produktów bankowych możemy projektować aplikację projekcji przepływu pieniężnego oraz zbadać wpływ zmiany rozwarcia stóp procentowych na ryzyko płynności w skali banku. W zależności od wyników analizy możemy tworzyć nowe obiekty (nowe produkty bankowe) z nowym zestawem parametrów (np. inny okres lokaty/kredytu, inne stopy procentowe). Podane poniżej zwroty dotyczą głownie komponentów wykonawczych umożliwiających strojenie (tuning) oprogramowania aplikacyjnego.
<def OSL-S><!SSL>
ENV.INFRASTRUCTURE== ENV.INFR,
ENV.INFR:=(compCenter,mainComputer,network,operSystem,application,transDataBase,dbms,
dataWarehouse,dataMart,dataMining,bigData,prgLang,prgName,prgLibrary)
AREA:=(MIS,PCS,ERP)<!Management Information System, Process Control System,Enterprise
Resource Planning>
<def AREA(BANKING.MIS)
<def SUBJECT(MÓJ_BANK.MIS)>
MIS::=(SUBSYSTEM.MODULE.PROGRAM.B-BLOCK),
SUBSYSTEMS::=(RETAIL,CORPORATE,MONEY&CAPITAL,RISK-MGT,CRM,CONTROLL-BUDGET,…),
B-BLOCK<!building-block,generic-program/subprogram>,
keywords:=(version,interface,run,runTime,integrated,standalone,accepted,notAccepted,
failed,library,creatDate,updDate,tested,rejected,pCode,eCode,trace, comes from,
put,call,exit,when,callValue,trace,errorCode,inItems,outItems,execMode)
state:=(inPlan,inProgress,inTest,accepted,rRun<!ready to run>),
<data> from <dataMart> to <dataWarehouse> using (cleaning,compression)<!globalny przepływ>,
OperObjects::=(analyst,designer,programmer,tester,operator,user),
dOBJECT::=(RUN,JOB,TASK)===(PRZEBIEG,PRACA,ZADANIE),
JOB<!several RUNs>,TASK<!sequence of JOBs>,
trace::=(path,callValue,outValue,errorCode),process::=(trigger,action(<events>),endEvent),
execMode:=(RT <!real time>,BAT<!batch>,OND <!on demand>)
<def PROGRAM>
infoWindow:=(prgName,version,state,author,creatDate,updDate,prgLang,operSystem)
prgBody:=(interface,inputData,main,(prc1,prc2..<!lista procedur>),outputData)
controlFlow:=(activated by <prg/prcName> > at <timePoint> when <condition>
with <initialValue/inputData,
finished at < timePoint /no-of-repetition>
with <returnValue/outputData> when <condition>)
<\def>
<def B-BLOCK(name)
objectInfo:=(name,version,author,updDate,codeSize,prgLanguage,operSystem)
prcBody:=(init,main,end)
resources:=(dataBuffer,eventTrace,stackHandler)
<def flow>
{call comes from <prg/prcName> with callValue
action(verif)
event(checkPassword,callVerif)
exit when callVerif failed
action(initial) when first call
event(bufferDecl,stackDecl)
action(tuning)
event(paramAnalysis,transform,generateExecutable)
action(activate)
event(activate)
action(run)
event(load,perform,releaseResources,exit)
}
</def>
<def interface> <! Journal zawiera aktualny stan zasobów dla każdego call>
journal:=pCode,list(eCode..)<!pCode-marker procesu wywołującego,eCode-kod zdarzenia>
call::=(<callingName>,<calledName>,<tunerName>,
entryPoint>,(<parameters,modifiers >),input,output)
<\def>
<def main>
…….<!główna procedura przetwarzania danych>
</def>
<\def>
<spec MIS(MÓJ_BANK.POWSZECHNY)<!specyfikacja systemu>
Refers to def (MÓJ_BANK)
……..<!opis podsystemów,modułów, programów systemu dla Banku Powszechnego>
</spec>
Uwagi końcowe
W stadium obecnym OSL ma zdefiniowaną notację i podstawowe frazy, znajduje się więc w pozycji startowej. Od startu do mety jest wiele do zrobienia. Niniejsza publikacja ilustruje możliwości języka.
Praktyczne użycie języka OSL uwarunkowane jest osadzeniem w środowisku komputerowego wspomagania m.i. poprzez procedurę wyszukiwania obiektów, użycie specjalizowanego edytora (zawierającego narzędzia sprawdzania poprawności formalnej opisu, podpowiedzi słów kluczowych i fraz, generowania diagramów, itp.). Wersje opisu poszczególnych obiektów utrzymywane byłyby w bibliotece, zaś specyfikacja całości dla głównego obiektu SUBJECT tworzona byłaby automatycznie w wyniku konsolidacji podobiektów składowych.
Głównym przeznaczeniem OSL jest opis obiektów, jednakże znaczenie przyszłościowe mieć będzie bezpośrednie powiązanie opisu z oprogramowaniem aplikacyjnym, a więc przejście z poziomu konceptualnego na poziom „praktyczny”. Pewne możliwości w tym kierunku wykazuje podzbiór SSL zawierający procedury strojenia modyfikowalnych komponentów. Autor zdaje sobie jednakże sprawę z tego, iż automatyczne generowanie aplikacji na podstawie specyfikacji pozostaje na razie tylko postulatem, wymaga bowiem posiadania „montażowego” oprogramowania integrującego i biblioteki „klocków” (building blocks). Warto przy okazji wspomnieć, że próby opracowania „fabryki oprogramowania” sięgają lat 70-tych ub. stulecia [10,11], a więc czasów kiedy nie było jeszcze podejścia obiektowego. Ale nawet bez tego „luksusu” język OSL może być użyty jako jednoznaczne zwięzłe narzędzie opisowe (konspekt) na każdym etapie analizy i projektowania.
Bibliografia
Ryznar Zygmunt “A conceptual model of an interfunctional data base system”. Information and Management 2/1978 s.67-74
Ryznar Zygmunt “S&DL ‑ Structured Design Language”. 526-533. Angewandte Informatik-Applied Informatics 12/1981 s.526-533
Ryznar Zygmunt "Język opisu problemu COBOL-PDL w metodzie projektowania strukturalnego" Biuletyn MERA 5/77 s.22-33
Ryznar Zygmunt "Parametryzacja procedur w języku SDL w warunkach strukturalnego projektowania" Biuletyn MERA 7/77 s.32-38
Ryznar Zygmunt "S&DL Structured Design Language - Język specyfikacyjny do projektowania strukturalnego (zarys propozycji)" Informatyka 2-3 1982
Ryznar Zygmunt “Obiektowo-dynamiczne podejście i jego język specyfikacyjny (próba definicji na przykładzie bankowości)” Informatyka 5/98 s.18-22
Johnson Richard A.,Kast Fremont E.,Rosenzweig James E. „The Theory and Management of Systems” New York, McGraw-Hill Inc., 1967
Forrester Jay W. „Industrial Dynamics” New York ‑ London, Massachusetts Institute of Technology and John Wiley and Sons Inc., 1961
Hall Calvin S., Lindzey Gardner „Theories of Personality”, New York, John Wiley and Sons Inc., 1978
DeJong S.P. „The System Building System (SBS)”, IBM Research Div., N.Y. 1973
Bratman H. „The software factory”, Computer 8, 1975 s.28-37
Ryznar Zygmunt „Human Specification Languge” http://members.upcpoczta.pl/z.ryznar3/ipedia/HSL.pdf
słowa kluczowe: OSL, BSL, SSL, HSL, podejście obiektowo-komponentowe, język specyfikacyjny