CN105183652B - Pushed net under time dynamic the conversion method of network - Google Patents
Pushed net under time dynamic the conversion method of network Download PDFInfo
- Publication number
- CN105183652B CN105183652B CN201510581987.5A CN201510581987A CN105183652B CN 105183652 B CN105183652 B CN 105183652B CN 201510581987 A CN201510581987 A CN 201510581987A CN 105183652 B CN105183652 B CN 105183652B
- Authority
- CN
- China
- Prior art keywords
- domain
- clock
- represent
- stack
- time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000006243 chemical reaction Methods 0.000 title claims abstract description 26
- 238000013508 migration Methods 0.000 claims description 47
- 230000005012 migration Effects 0.000 claims description 47
- 230000007704 transition Effects 0.000 claims description 36
- 230000008859 change Effects 0.000 claims description 12
- 230000009471 action Effects 0.000 claims description 5
- 230000008569 process Effects 0.000 claims description 5
- 238000010276 construction Methods 0.000 claims description 3
- 230000009467 reduction Effects 0.000 abstract description 3
- 238000004891 communication Methods 0.000 abstract description 2
- 238000000638 solvent extraction Methods 0.000 abstract description 2
- 230000000875 corresponding effect Effects 0.000 description 24
- 238000005516 engineering process Methods 0.000 description 10
- 238000004458 analytical method Methods 0.000 description 6
- 238000012360 testing method Methods 0.000 description 5
- 238000013519 translation Methods 0.000 description 5
- 230000014616 translation Effects 0.000 description 5
- 238000013461 design Methods 0.000 description 4
- 230000001617 migratory effect Effects 0.000 description 4
- 206010068052 Mosaicism Diseases 0.000 description 2
- XCWPUUGSGHNIDZ-UHFFFAOYSA-N Oxypertine Chemical compound C1=2C=C(OC)C(OC)=CC=2NC(C)=C1CCN(CC1)CCN1C1=CC=CC=C1 XCWPUUGSGHNIDZ-UHFFFAOYSA-N 0.000 description 2
- 238000005094 computer simulation Methods 0.000 description 2
- 239000005367 kimax Substances 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 239000000047 product Substances 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 210000003765 sex chromosome Anatomy 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 230000002596 correlated effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000004880 explosion Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
Landscapes
- Design And Manufacture Of Integrated Circuits (AREA)
Abstract
The present invention discloses a kind of conversion method for network of being pushed net under time dynamic, for the Real-time and Concurrent recusive modeling for describing to create containing recurrence, dynamic thread.The global clock of description continuous time is introduced first in DPN, and real number clock with time correlation global variable and stack character " age " can be described, so as to be modeled to carrying out asynchronous communication based on shared drive, and with the Real-time and Concurrent system that dynamic thread creates.Secondly to the clock equivalent technique based on integer partitioning, a kind of optimisation technique based on clock key point, reduction clock section, so as to reduce the state space after conversion are provided.Because network of being pushed net under time dynamic is a kind of abstract model of Real-time and Concurrent recursive program, clock equivalence optimisation technique based on key point is network of being pushed net under dynamic the model conversion, so by confirming whether the execution that network model is pushed away under dynamic can run to error condition, so as to detect the mistake or leak in the i.e. corresponding concurrent recursive program of this model.
Description
Technical field
The invention belongs to software security and reliability consideration field, it is related to the authentication of multi-thread concurrent recursive program
Method, it is a kind of accessibility solution technique suitable for the multi-thread concurrent recursive program abstract model containing having time, and in particular to
Pushed net under a kind of time dynamic the conversion method of network.
Background technology
With the development of multi-core technology, concurrent program has turned into the focus of present procedure design studies.Due to concurrently performing
In the presence of uncertainty, so as to cause conventional test methodologies to be difficult the mistake and leak hidden in discovery procedure.Model testing is one
The automatic Verification technology that kind passes through exhaustive search, it has also become ensure program safety and reliable important means, test can be used as
A kind of supplement of method.Approachability analysis is the important core technology of model testing by analyzing whether a certain state is reachable.
In recent years, researcher is based on automaton model, real-time clock is introduced, for describing real time system modelling and its testing
Card.Alur proposes Timed Automata (R.Alur, D.Dill, A theory of timed automata [J] within 1994
.Theoretical Computer Science, 126 (2), pp.183-235,1994.) it is to be introduced on the basis of automatic machine
The clock of continuous time is described, and gives clock equivalent technique, so as to implementation model Check-Out Time automatic machine
(J.Bengtsson, W.Yi, Timed automata:Semantics, algorithms and tools [C], 4th
Advanced Course on Petri Nets, Eichstaat.Germany, pp.87-124,2004).In order to solve containing
Recursive real time system modelling, Trivedi (A.Trivedi, D.Wojtczak, Recursive Timed Automata [C],
ATVA 2010.LNCS, vol.6252, Springer, Heidelberg, pp.306-324.2010.) propose to push away under the time automatically
Machine, and time pushdown automata is converted to by clock equivalent technique by pushdown automata, solve the reachable of minimum time cost
Sex chromosome mosaicism.Li in 2013 (L G qiang, C X juan, O.Mizuhito, Nested Timed Automata [R],
Research report (School of Information Science, Japan Advanced Institute of
Science and Technology), IS-RR-2013-004, pp.1-20,2013) nested Timed Automata is proposed, utilize
Nested thought solves the recurring problem in real-time system.But this class model can not be described with the real-time of dynamic thread establishment
Concurrent system modeling.Bouajjani (A.Bouajjani, M.M.Olm, T.Touili.Regular symbolic analysis
of dynamic networks of pushdown systems[C].Proceedings of the 16th
International Conference on Concurrency Theory.LNCS 3653, San Francisco:Cisco
Syst, 2005,473-487.) propose a kind of and give pushing system (B.Bollig, D.Kuske, R.Mennicke, The
Complexity of model checking multi-stack systems [C], Proceedings of
The201328th Annual ACM/IEEE Symposium on Logic in Computer Science, New
Orleans, LA, USA, pp.163-72,2013) extended model --- network (DPN) of being pushed net under dynamic, solve concurrent system in
The dynamic creation of new thread, the model are applied to the concurrent system modeling created containing recurrence and with dynamic thread.It is based on
DPN, Lammich (P.Lammich, M.M.Olm, H.Seidl, Contextual Locking for Dynamic Pushdown
Networks [C] .Static Analysis.Proceedings of 20th International Symposium,
Seattle, WA, USA, pp.47-98,2013.) technology that context is locked is proposed, solve stationary problem between process recurrence,
And reverse reachability analysis is carried out.Wenner (A.Wenner, Weighted dynamic pushdown networks [C],
19th European symposium on programming, Paphos, Cyprus, pp.590-609,2010.) in DPN
Weights are introduced, for solving the accessibility of shortest path.
Because above-mentioned model can not describe the situation of interaction between the concurrent recursive system thread of real-time multithread, for real-time
For multi-thread concurrent recursive program, this class method of Formal Verification will produce State-explosion problem, be brought to checking
Extreme difficulties.
The content of the invention
The technical problems to be solved by the invention are to provide a kind of conversion method for network of being pushed net under time dynamic, and its time is moved
Network of being pushed net under state is a kind of abstract model of Real-time and Concurrent recursive program, and the clock equivalence optimisation technique based on key point is the mould
Type is converted to network of being pushed net under dynamic, so by confirming whether the execution that network model is pushed away under dynamic can run to error condition,
So as to detect the mistake or leak in the i.e. corresponding concurrent recursive program of this model.
To solve the above problems, the present invention is achieved by the following technical solutions:
Push net the conversion method of network, comprise the following steps under time dynamic:
Described Real-time and Concurrent recursive program is converted to network of being pushed net under a time dynamic by step (1).
The abstract model of step (1.1) construction Real-time and Concurrent recursive program is network of being pushed net under time dynamic.
Network of being pushed net under the time dynamic constructed is a four-tuple T=(P, Γ, Δ, X), wherein:P is state set;Γ
It is stack character set;Δ=Δnop∪Δ=∪Δ├∪Δpush∪Δpop∪ΔdcIt is migration rules set, wherein ΔnopRepresent empty
Operation migration, Δ=Represent the migration of clock assignment, Δ├Represent time passage migration, ΔpushRepresent stacking migration, ΔpopRepresent
Stack migrates, ΔdcRepresent that dynamic thread creates migration;X represents clock collection, its value functionRepresent forIt is θ (x) in current value, it is also similar therewith with the global variable and stack character " age " value of time correlation.
Network situation is pushed away under institute's build time dynamicRepresent the shape of the model at a time
State, wherein:Represent current global variable g and its " age " θ (g) two tuples<g,θ(g)>;
pi∈ P represent local state node,Represent the stack content ω that stack sequence is iiWith its " age " θ (ωi) two tuples<ωi,θ
(ωi)>;Represent clock x and its value θ (x) two tuples<x,θ(x)>.
Network of being pushed net under the time dynamic constructed is described step (1.2) with operational semantics.
Pushed net under time dynamic model of the network as real-time multithread program, for describing multiple lower pushing systems while producing
Migration, its transition relationship Δ=Δnop∪Δ=∪Δ├∪Δpush∪Δpop∪ΔdcProvided below according to different migration actions
It performs implication;
1) Δ=ΔnopWhen, op=nop,Represent that general layout interior element does not change;
2) Δ=Δ=When, op=x ← I,c∈I;It is represented to clock x and specifies I scopes
Interior arbitrary value v, other general layout interior elements do not change;
3) Δ=Δ├When, op=Time ← c,Assuming thatSoAll clocks increase v in general layout are represented, when non-in general layout
Clock content does not change;
4) Δ=ΔpushWhen, op=push (a, I),V ∈ I,Variable a is pressed into by expression
Stack top, and corresponding clock is set as x, its clock value is the arbitrary value in the range of I;
5) Δ=ΔpopWhen, op=pop (a, I),V ∈ I,Represent stack top internal clock value
Ejected for the variable a of I scopes;
6) Δ=ΔdcWhen, op=dc,Represent to create new thread stack content.
Push net network T=(P, Γ, Δ, X) under the time dynamic that step (2) is obtained step (1), passes through following conversion sides
Method is converted to the network M=(P that pushed net under dynamicM,ΓM,ΔM);
Step (2.1) state PMConversion:I.e. T state set is identical with M state set.
Step (2.2) stack character setConversion:If a ∈ { Γ, ├ }, thenAnd
Step (2.3) transition relationship Δ is to ΔMTransformation rule.
Assuming that the TDPN currently containing n stack, for convenience, only describes the lower pushing system that sequence is i and performs pop down
And Pop operations, other stack operations are similar therewith.If the stack level of the lower pushing system is l, and stack bottom numbering is 1, stack top numbering
For l.The TDPN contains global variable g, clock variable x, stack content ω={ ω1…ωi…ωn, wherein ωiRepresent to push away under No. i
The stack content of system, uses ωil|ΓRepresent ωiIt is projected in Γ stack top character.Each table
Show its key point of " age " and value under clock equivalence.It is corresponding in M present clock equivalence domain so as to understand WhereinRepresentative domain RlRecord stack top character, ├ tables
Show domain RlReference clock character, ├·Representative domain RlCorresponding time passage character.
TDPN general layoutsφ=(γ, op, γ ') ∈ Δs represent T general layout migration, corresponding M lattice
Office's migration is represented byWherein p and p ' is identical with state in T, before representing general layout migration respectively
State afterwards;Rl={ R1l…Ril…RnlRepresent stack top domain, wherein RilRepresent the stack top domain of No. i lower pushing system, RlAnd Rl' respectively
Represent the front and rear stack top domain of general layout migration;Action migration collection op ' correspond to T op, below mainly describe according to different op structures
Make Rl′:
1) as op=nop, forExist in and if only if M State is only changed in T hollow operations, so general layout migration also only changes state, domain R in MlKeep constant.
2) as op=(x ← I), forExist in and if only if M The transition relationship is represented to DPN domains RlThe item that middle clock is x performsBehaviour
Make, wherein θ (x) ' ∈ I, carry out structural domain Rl′.Specific implementation procedure is as follows:
● domain RlPop, obtain RlIn itemIt is θ (x) ' to reset θ (x), forms new item
● itemInstead of domain RlIn itemObtain domain Rl', and stacking, it is transformed into new state
p′。
3) as op=(Time ← v), forExist in and if only if M Transition relationship representative domain RlIn except reference clock item (├, 0), remaining all when
Clock value carrys out structural domain R plus time passage vl +.Specifically performing step is:
● domain RlPop, except reference clock, all passed v plus the time, Expression corresponds to g, ωil, x new general term,Respectively represent corresponding new record
,Represent reference clock entry;
● new item replaces original item, obtains domain Rl +, and stacking, it is transformed into new state p '.
4) as op=push (a, I), forAnd if only if, and M is present The transition relationship represents, carries out stack-incoming operation to No. i lower pushing system, is by character
A, is worth and isItem stacking domain Ril, carry out structural domain Ri(l+1).Detailed process is as follows:
● from RilObtain itemWith
●Respectively instead of Obtain domain Ri(l+1), and stacking, it is transformed into new state p '.
5) as op=pop (a, I), forAnd if only if, and M is present The transition relationship represents that pop domain RilMiddle stack character is a, and θ (a) ∈ I item,
Carry out structural domain Ril′.Specific steps are described as follows:
● pop domain RilWith domain Ri(l-1), obtain domain RilIn item
● domain R(l-1)In the clock value of all add θ (├·), obtain domain Ri(l-1)′;
● pass through RilAnd Ri(l-1)' obtain domain Ril', Ril' item is respectively:Common stack character item comes from domain Ri(l-1)′;Commonly
Clock item, global variable item come from domain Ril;Entry all is from domain Ri(l-1)′;
● stacking domain Ril', it is transformed into new state p '.
6) whenWhen, forExist in and if only if M The transition relationship represents, creates new thread and carrys out structural domain Rl′.Assuming that TDPN models, pushed away under dynamic creation is new and be
The stack numbering of system is n+1.Specific execution step is as follows:
● pop domain Rl, the clock equivalence optimisation technique based on key point, general character item can be obtainedEntry
● itemWithAdd domain Rl,
Obtain domain Rl', and stacking, it is transformed into new state p '.
Present invention research is based on network (Time Dynamic Pushdown Networks, TDPN) of being pushed net under time dynamic,
For the Real-time and Concurrent recusive modeling for describing to create containing recurrence, dynamic thread.Description continuous time is introduced first in DPN
Global clock, and the real number clock with time correlation global variable and stack character " age " can be described, so as to based on altogether
Enjoy internal memory and carry out asynchronous communication, and be modeled with the Real-time and Concurrent system that dynamic thread creates.Secondly to being drawn based on integer
The clock equivalent technique divided, provide a kind of optimisation technique based on clock key point, reduction clock section, after reducing conversion
State space.For further reduced state space, using the dynamic converting method for being concerned only with stack top, by continuous model TDPN
Corresponding DPN is converted into, while provides corresponding transfer algorithm.Then prove its conversion correctness and TDPN up to uniformity,
So as to solve TDPN Reachability question up to technology using existing DPN.
Brief description of the drawings
Fig. 1 is xi, xjClock equivalence section.
Embodiment
The present invention proposes a kind of analysis method of reachability for being directed to and network model being pushed away under time dynamic, under time dynamic
Network model is pushed away, using the clock equivalence optimisation technique based on key point, dynamically by network mould of being pushed net under continuous time dynamic
Type is converted to and pushes away network model under discrete dynamic, so as to what is solved to the accessibility problem that network model is pushed away under time dynamic
A kind of automatic mode.
First, the TDPN model stages are constructed:TDPN models are a kind of extension of DPN models, and basic thought is to be introduced in DPN
The real-time clock of description continuous time, for describing the Real-time and Concurrent recursive program with dynamic thread creation.
Set out by TMPDN syntax and semantics, the conversion method that Real-time and Concurrent Program transformation is TMPDN is divided into stack
Migrate switch transition between conversion, stack and concurrently perform three classes of conversion.
1st, concurrent program abstract model --- network of being pushed net under time dynamic is built
TDPN models are a four-tuple T=(P, Γ, Δ, X), wherein:P is state set;Γ is stack character set;Δ=
Δnop∪Δ=∪Δ├∪Δpush∪Δpop∪ΔdcIt is migration rules set, wherein ΔnopRepresent do-nothing operation migration, Δ=Represent
Clock assignment migrates, Δ├Represent time passage migration, ΔpushRepresent stacking migration, ΔpopExpression is popped migration, ΔdcRepresent dynamic
State thread creation migrates;X represents clock collection, its value function Represent forIt is θ in current value
(x) it is, also similar therewith with the global variable and stack character " age " value of time correlation.
When TDPN models migrate, multiple lower pushing systems concurrently perform, i.e., synchronization has multiple stacks to be migrated.It is assumed that
G is global variable collection, and TDPN general layouts are represented by:Wherein:Represent current global variable g and its
" age " θ (g) two tuples<g,θ(g)>;pi∈ P represent local state
Node,Represent the stack content ω that stack sequence is iiWith its " age " θ (ωi) two tuples<ωi,θ(ωi)>;Represent clock
X and its value θ (x) two tuples<x,θ(x)>.TDPN migration behavior aggregate op includes do-nothing operation nop;Clock resetting x ← I, its
Middle x ∈ X, I represent clock span;Time passage Time ← v, wherein Time represent the time of passage, and v represents specific and passed
Real number value, in the case of no ambiguity the present invention with θ+v represent clock value increase v;Stack-incoming operation push (a, I), represent into
Stack character a, and belong to section I real number to its age assignment;Pop operations pop (a, I), first judge stack symbol a " age "
Whether meet section I, carry out Pop operations if meeting, otherwise do not perform operation;Dynamic thread creates operationRepresent dynamic
State creates a new thread.
2nd, TDPN operational semantics
For convenience, when general layout migrates, the only migration of one lower pushing system of description performs, and its remaining pushing system is not
Become, the situation that multiple lower pushing systems concurrently perform is also similar therewith, and the operational semantics of TDPN general layout transition relationships is defined as follows:
1) Δ=ΔnopWhen, op=nop,Represent that general layout interior element does not change;
2) Δ=Δ=When, op=x ← I,c∈I;It is represented to clock x and specifies I scopes
Interior arbitrary value v, other general layout interior elements do not change;
3) Δ=Δ├When, op=Time ← c,Assuming thatSoAll clocks increase v in general layout are represented, when non-in general layout
Clock content does not change;
4) Δ=ΔpushWhen, op=push (a, I),V ∈ I,Variable a is pressed into by expression
Stack top, and corresponding clock is set as x, its clock value is the arbitrary value in the range of I;
5) Δ=ΔpopWhen, op=pop (a, I),V ∈ I,Represent stack top internal clock value
Ejected for the variable a of I scopes;
6) Δ=ΔdcWhen, op=dc,Represent to create new thread stack content.
2nd, the conversion method design phase:In order to analyze TDPN accessibility, it need to be abstracted, reduce its state sky
Between, the clock equivalence optimisation technique of the invention based on key point, using on-the-fly thought, only it is concerned about the conversion of stack top,
Dynamically continuous model is abstracted and is converted into discrete DPN models, then using existing DPN reachability analysis technology, so as to solve
TDPN Reachability question.
In order to reduce the division of state space, first reduced time region after conversion, the clock based on key point is of equal value
Optimisation technique compared with integer partitioning region, can allow conversion after state space exponential reduction.Secondly based on the technology, TDPN
In model with continuous time correlated variables -- global variable and its " age ", stack character and its " age ", clock variable and its take
Value, be converted to the domain of DPN stack content described in DPN models.
Continuous time discrete time will be converted to using clock equivalent technique, general layout will be migrated using the thought of dynamic translation
Change, finished until all general layouts calculate one by one.
1st, based on crucial Dot Clock optimisation technique
In order to describe to be converted into the general layout of DPN systems, domain R concept is introduced, domain R is made up of one group of item r, and item r is
It is made up of character set Z and set of keypoints key.
Character set Z includes general character collection Y and record character set Y·, it is described as Z=Y ∪ Y·.Wherein general character JiYBao
Include:(1) clock collection X;(2) stack character Γ;(3) global variable collection G;(4) reference clock character ├, for recording time passage,
Not so it is always 0, therefore general character collection Y can be described as Y=X ∪ Γ ∪ G ∪ { ├ } unless carrying out Pop operations.Record character
Collect Y·General character Y time passage is represented, if X·={ x·| x ∈ X } represent record global clock;Γ·={ a·| a ∈ Γ } table
Show recording stack character;G·={ g·| g ∈ G } represent record global variable;{├·Record reference clock character set is represented, it is main next
Time passage is recorded, so as to renewal time during Pop operations, therefore character set is recorded and is described as Y·=X·∪Γ·∪G·∪{├·}。
For the character set arbitrarily with time correlation, its time-shift is determined by some key points, and has maximum
Value, therefore can be to any character, can each self-defined and maximum constant k of time correlationMax, it is all to be more than kMaxAll with symbol ∞ come
Represent.To any character zi∈ Z, the migration changed according to the time, the time-critical point for determining migration, therefore character z can be foundi's
Time-critical point set keyi={ 0, ki1..., kil..., kim, kiMax, ∞ }, wherein 1<l<M, 1<i≤|Z|.According to above-mentioned character
Collection and crucial point set, can obtain domain
Clock equivalence optimisation technique is exactly continuous clock value discretization, i.e. real number clock valueDivision
For two parts:(1) key point partExpression takes downwards key point to real number value x;(2) remainder
Assuming that x ∈ X are any clock element in TDPN, clock x real number value is represented with θ (x),During expression pair
Clock x carries out domain equivalence, takes key point part.Assuming that for any two clock xi, xj∈ X, when the clock for meeting following rule
Value, then be clock of equal value:
(1)θ(xi)>kiMaxAnd if only ifThat is xiClock value be more than maximum, xiTake infinitely great ∞.
(2)kil≤θ(xi)<ki(l+1)And if only ifThat is xiClock value be less than key point ki(l+1)And it is more than
Equal to kilWhen, xiTake key point kil。
(3) assumeAnd if only if re (θ (xi)<re(θ
(xj)), i.e. xiTake key point kil, xjTake key point kjl, work as xiClock value and key point kilDifference be less than xjClock value with
Key point kjlDifference when, be denoted as re (xi)<re(xj)。
Assuming that for any two clock xi, xj∈ X and key={ key1..., keyn, the clock based on clock key point
Domain rule of equal value.For example (0≤θ (xi)<ki1, 0≤θ (xj)<kj1) region, And re (θ (xi))
>re(θ(xj));In (ki1≤θ(xi)<ki2, kj1≤θ(xj)<kj2) region, And re (θ
(xi))<re(θ(xj)), then the clock value in section is clock of equal value, dash area as shown in Figure 1.
2nd, structural transform rule
For further reduced state space, using on-the-fly technologies and with dynamic translation thought, stack top is concerned only with
And next layer of domain is changed, without being concerned about stack other parts, then according to different migrations, different switching rule is provided, so as to
The TDPN accessibility problems of complexity can be converted to DPN accessibility problems.
It is DPN M=(P by T dynamic translations assuming that giving a TDPN T=(P, Γ, Δ, X)M, ΓM, ΔM), to PM,
ΓM, ΔMIt is as follows to carry out dynamic transition rules:
(I) state set PM:That is PM=P.
(II) stack character setIf a ∈ { Γ, ├ }, thenAnd
(III) transition relationship ΔMConstruction:
Assuming that the TDPN currently containing n stack, for convenience, only describes the lower pushing system that sequence is i and performs pop down
And Pop operations, other stack operations are similar therewith.If the stack level of the lower pushing system is l, and stack bottom numbering is 1, stack top numbering
For l.The TDPN contains global variable g, clock variable x, stack content ω={ ω1…ωi…ωn, wherein ωiRepresent to push away under No. i
The stack content of system, uses ωil|ΓRepresent ωiIt is projected in Γ stack top character.Each table
Show its key point of " age " and value under clock equivalence.It is corresponding in M present clock equivalence domain so as to understand WhereinRepresentative domain RlRecord stack top character, ├ tables
Show domain RlReference clock character, ├·Representative domain RlCorresponding time passage character.
TDPN general layoutsφ=(γ, op, γ ') ∈ Δs represent T general layout migration, corresponding M lattice
Office's migration is represented byWherein p and p ' is identical with state in T, before and after representing that general layout migrates respectively
State;Rl={ R1l…Ril…RnlRepresent stack top domain, wherein RilRepresent the stack top domain of No. i lower pushing system, RlAnd Rl' difference table
Show the front and rear stack top domain of general layout migration;Action migration collection op ' corresponds to T op, below main description constructed according to different op
Rl′:
(1) as op=nop, forExist in and if only if M State is only changed in T hollow operations, so general layout migration also only changes state, domain R in Ml
Keep constant.
(2) as op=(x ← I), forExist in and if only if M The transition relationship is represented to DPN domains RlThe item that middle clock is x performsBehaviour
Make, wherein θ (x) ' ∈ I, carry out structural domain Rl′.Specific implementation procedure is as follows:
● domain RlPop, obtain RlIn itemIt is θ (x) ' to reset θ (x), forms new item
● itemInstead of domain RlIn itemObtain domain Rl', and stacking, it is transformed into new state
p′。
(3) as op=(Time ← v), forExist in and if only if M Transition relationship representative domain RlIn except reference clock item (├, 0), remaining all when
Clock value carrys out structural domain R plus time passage vl +.Specifically performing step is:
● domain RlPop, except reference clock, all passed v plus the time,
Expression corresponds to g, ωil, x new general term,Respectively
Corresponding new record item is represented,Represent reference clock entry;
● new item replaces original item, obtains domain Rl +, and stacking, it is transformed into new state p '.
(4) as op=push (a, I), forAnd if only if, and M is present The transition relationship represents, carries out stack-incoming operation to No. i lower pushing system, is by character
A, is worth and isItem stacking domain Ril, carry out structural domain Ri(l+1).Detailed process is as follows:
● from RilObtain itemWith
●Respectively instead of Obtain domain Ri(l+1), and stacking, it is transformed into new state p '.
(5) as op=pop (a, I), forAnd if only if, and M is present The transition relationship represents that pop domain RilMiddle stack character is a, and θ (a) ∈ I item,
Carry out structural domain Ril′.Specific steps are described as follows:
● pop domain RilWith domain Ri(l-1), obtain domain RilIn item
● domain R(l-1)In the clock value of all add θ (├·), obtain domain Ri(l-1)′;
● pass through RilAnd Ri(l-1)' obtain domain Ril', Ril' item is respectively:Common stack character item comes from domain Ri(l-1)′;Commonly
Clock item, global variable item come from domain Ril;Entry all is from domain Ri(l-1)′;
● stacking domain Ril', it is transformed into new state p '.
(6) whenWhen, forExist in and if only if M The transition relationship represents, creates new thread and carrys out structural domain Rl′.Assuming that TDPN models, pushed away under dynamic creation is new and be
The stack numbering of system is n+1.Specific execution step is as follows:
● pop domain Rl, the clock equivalence optimisation technique based on key point, general character item can be obtainedEntry
● itemWithAdd domain Rl,
Obtain domain Rl', and stacking, it is transformed into new state p '.
3rd, in the algorithm design phase:Based on clock optimization of equal value and dynamic translation thought, propose that one kind is directed to TDPN T=
(P, Γ, Δ, X) is converted to DPN M=(PM, ΓM, ΔM) algorithm, the algorithm be directed to T transition relationship Δ, pass through change rule
Then, transition relationship Δ corresponding to M is exhaustively calculatedM。
Based on clock optimization of equal value and dynamic translation thought, propose to be converted to DPN M for TDPN T=(P, Γ, Δ, X)
=(PM, ΓM, ΔM) algorithm, the algorithm be directed to T transition relationship Δ, by the transformation rule of upper section, exhaustively calculate in M
Corresponding transition relationship ΔM.The input of algorithm is continuous TDPN T, and output is discrete DPN M.Assuming that TDPN initial lattice
Office beEach stack content is initially sky, corresponding to construct M initial domains Rinit。
If T transition relationship set has φ=(γ, op, γ ') ∈ Δs, its general layout includes global variableStack character
StringClockM current general layout be β=<p,Rl>, domain RlComprising
(├, 0) represents g, ωil, general term corresponding to x, ├,
Represent corresponding entry.According to φ and RlCan dynamic structural domain Rl', that is, transition relationship be present
The transition relationship is added to ΔMIn.
Algorithm:TDPN is converted into DPN algorithms
Input:TDPN T=(P, Γ, Δ, X)
Output:Corresponding DPN M=(PM, ΓM, ΔM)
The 1st and 2 rows represent the general layout to worker thread and the initialization in domain respectively in transfer algorithm, since the 4th row, pin
To T general layout transition relationship Δ, limit calculates the transition relationship Δ that domain representation is used in MM.Wherein the 8th and 9 rows represent do-nothing operation
Migration, corresponding M only change state, and domain is constant.10th to 12 row describes clock resetting operation migration, domain RlIn clock x valueReset to13rd to 15 row describes time passage migration, domain RlIn remove reference clock item (├, 0), remaining institute
There is the clock value of item, all plus time passage v.16th to 18 row describes stack-incoming operation migration, press-in character a.19th to 22
Row description Pop operations migration, wherein Ri(l-1)' representative domain Ri(l-1)All items all add domain RilTime passage θ (├·).23rd
Dynamic creation thread migration is described to 25 rows, the new thread of establishment is n+1.For TDPN T, the algorithm is terminable, and should
The time complexity of algorithm, had exponent relation with the cartesian product of item character set and crucial point set, with the size of program exponentially
Relation.
For TDPN T, the algorithm is terminable, and the time complexity of the algorithm, with item character set and crucial point set
Cartesian product have exponent relation, had exponent relation with the size of program.
4th, Reachability question proves the stage:By proving state pFUp to and if only if its transition status p in TDPNF′
It is reachable in DPN, so that it is determined that model conversion whether there is mistake.
TDNP Reachability questions are changed into DPN Reachability questions by clock equivalence optimisation technique, need to prove to convert from T
Into M correctness, i.e. state pFIn TDPN up to and if only if its transition status pF' reachable in DPN.
Define 1 (accessibility):If migratory system TDPN T,For T initial lattice
Office, whereinFor global variable initial value;pinitFor original state;ε is stack initial value (representing that stack is empty);For it is initial when
Clock (is entered as 0), target patternIf there is general layout migration in TThat
State pFIt is reachable in T.
If R=R0R1…RnIt is one group of domain that M stacks domain collection closes.For R1、R2Two domains, if R1It is R2Strict partial order is closed
System, remembersIf R1It is R2Non-critical partial ordering relation, remembersFor domain collection R, ifThen R is referred to as the domain of dependence, ifThen R is referred to as the weak domain of dependence.If R is (weak) domain of dependence,
Then general layout β=<P, R>For (weak) related general layout.For weak domain of dependence R=R0R1…RnWith domain R '=R0′R1′…Rn', if Rn′
=Rn、Ri′∈Ri +(wherein Ri +It is RiTime-shift domain) andThen domain R′It is domain R
Strong correlation domain.Given one related general layout β in M=<P, R>If domain R ' is domain R strong correlation domain, general layout β '=<P,
R′>It is exactly β strong correlation general layout.
Theorem 1:For T any one general layout γ, converted by the way that clock is of equal value, corresponding general layout β all be present in M.
Prove:If a M general layout β=<P, R>, a T general layoutWhereinAssuming that S is that variables collection, S are converted into the domain R in M through clock domain equivalence to migratory system T this moment.IfR=R0R1…RnWith S value θ (i.e. θ|=S), expression is set up:
● p '=p
●
●
So γ |=Sβ, i.e., for T any one general layout γ, by clock zone it is encoded translated after, all exist therewith in M
Corresponding general layout β.
Prove that accessibility need to first introduce following two law:
Law 1:For belonging to M any one canonical up to general layout β, β strong correlation general layout β '=<P, R '>, S be T this
Variables collection is carved, there will necessarily be in T therewith for general layout γ, γ be present |=Sβ and
Law 2:Any one general layout γ for belonging to T, there will necessarily be corresponding pattern β, at least in the presence of a β in M
Strong correlation general layout β '=<P, R '>, and existence domain R ' conversion set S, then γ be present |=Sβ and
Theorem 2:State pFIn TDPN T up to and if only if pF' reachable in DPN M.
Prove:First demonstrate,prove adequacy:State pFIt is reachable in TDPNIts transition status pF' reachable in DPN.
If dbjective state pF' in M it is reachable, then a canonical is there is up to general layout β (pF' the shape for being general layout β
State).Because all reachable general layouts of DPN M are all weak correlations, you can up to general layout β be weak related general layout, therefore at least have one
Corresponding strong correlation general layout β '=<P, R '>.A canonical general layout β in migratory system M is understood by law 1, a strong phase be present
The obstruction and rejection office β ' and set S for being converted into R ', corresponding pattern γ therewith is there will necessarily be in T, γ be present |=Sβ andThat is state pF(pFFor general layout γ state) it is reachable in T.
Necessity is demonstrate,proved again:State pFIt is reachable in TDPNIts transition status pF' reachable in DPN.
If dbjective state pF' it is reachable in T, understand to there will necessarily be therewith for general layout β (p in M by theorem 1F' it is lattice
Office β state), therefore at least exist a strong correlation general layout β '=<P, R '>.At one of migratory system T knowable to law 2
General layout γ, a strong correlation general layout β ' be present and be converted into R ' domain set S, corresponding pattern β therewith is there will necessarily be in M, is deposited
In γ |=Sβ andThat is state pF′(pF' the state for being general layout β) it is reachable in M.
Therefore, state pFIn TDPN up to and if only if its transition status pF' reachable in DPN.
Design mistake present in concurrent recursive program or leak can be found out by above method step, ensure program
Reliability and correctness.This method is the accessibility method for solving of automation, it is possible to achieve network of being pushed net under time dynamic is reachable
Sex chromosome mosaicism can determine that solution, excessively be participated in without user, simple, effective up to general layout calculating process.
Claims (1)
1. the conversion method for network of being pushed net under time dynamic, it is characterized in that, comprise the following steps:
Real-time and Concurrent recursive program is converted to network of being pushed net under a time dynamic by step (1);
The abstract model of step (1.1) construction Real-time and Concurrent recursive program is network of being pushed net under time dynamic;
Network of being pushed net under the time dynamic constructed is a four-tuple T=(P, Γ, Δ, X), and wherein P is state set;Γ is stack word
Symbol collection;Δ=Δnop∪ Δs=∪ Δs├∪Δpush∪Δpop∪ΔdcIt is migration rules set, wherein ΔnopRepresent that do-nothing operation is moved
Move, Δ=expression clock assignment migration, Δ├Represent time passage migration, ΔpushRepresent stacking migration, ΔpopExpression, which is popped, moves
Move, ΔdcRepresent that dynamic thread creates migration;X represents clock collection, its value functionRepresent forWorking as
Preceding value is θ (x);
Network situation is pushed away under institute's build time dynamicThe state of the model at a time is represented, its
In:Represent current global variable g and its age θ (g) two tuples<g,θ(g)>;pi∈ P represent local state node,Represent the stack content that stack sequence is i
ωiWith its age θ (ωi) two tuples<ωi,θ(ωi)>;Represent clock x and its value θ (x) two tuples<x,θ(x)>;
Network of being pushed net under the time dynamic constructed is described step (1.2) with operational semantics;
Push net under time dynamic model of the network as real-time multithread program, moved for describing multiple lower pushing systems while producing
Move, its transition relationship Δ=Δnop∪ Δs=∪ Δs├∪Δpush∪Δpop∪ΔdcGiven below according to different migration action op
Go out it and perform implication;
1) Δ=ΔnopWhen, op=nop,Represent that general layout interior element does not change;
2) Δ=Δ=when, op=x ← I,v∈I;Clock x is represented to specify in the range of I
Arbitrary value v, other general layout interior elements do not change;
3) Δ=Δ├When, op=Time ← c,Assuming thatSoAll clocks increase v in general layout are represented, when non-in general layout
Clock content does not change;
4) Δ=ΔpushWhen, op=push (a, I),V ∈ I,Represent variable a being pressed into stack top, and
Corresponding clock is set as x, its clock value is the arbitrary value in the range of I;
5) Δ=ΔpopWhen, op=pop (a, I),V ∈ I,Represent stack top internal clock value to be I models
The variable a ejections enclosed;
6) Δ=ΔdcWhen,Represent establishment new thread dc stack content
Push net network T=(P, Γ, Δ, X) under the time dynamic that step (2) is obtained step (1), is turned by following conversion methods
Network M=(the P that push net are changed under dynamicM,ΓM,ΔM);
Step (2.1) state PMConversion:I.e. T state set is identical with M state set;
Step (2.2) stack character setConversion:If a ∈ { Γ, ├ }, thenAndWherein a·Represent recording stack character a time passage, symbolExpression rounds downwards;
Step (2.3) transition relationship Δ is to ΔMTransformation rule;
If the stack level of the lower pushing system is l, and stack bottom numbering is 1, and stack top numbering is l;Push net network i.e. TDPN under time dynamic
Contain global variable g, clock variable x, stack content ω={ ω1…ωi…ωn, wherein ωiIn the stack for representing No. i lower pushing system
Hold, use ωil|ΓRepresent ωiIt is projected in Γ stack top character;Respectively represent its age and
Key point of the value under clock equivalence;It is corresponding in M present clock equivalence domain so as to understand WhereinRepresentative domain RlRecord stack top character, ├ tables
Show domain RlReference clock character, ├·Representative domain RlCorresponding time passage character;
TDPN general layoutsφ=(γ, op, γ ') ∈ Δs represent T general layout migration, and corresponding M general layout is moved
Shifting is represented byWherein p and p ' is identical with state in T, represents the front and rear shape of general layout migration respectively
State;Rl={ R1l…Ril…RnlRepresent stack top domain, wherein RilRepresent the stack top domain of No. i lower pushing system, RlAnd Rl' lattice are represented respectively
The front and rear stack top domain of office's migration;Action migration collection op ' corresponds to T op, and description below constructs R according to different opl′:
1) as op=nop, forExist in and if only if M
State is only changed in T hollow operations, so general layout migration also only changes state, domain R in MlKeep constant;
2) as op=(x ← I), forExist in and if only if M The transition relationship is represented to DPN domains RlThe item that middle clock is x performsOperation,
Wherein θ (x) ' ∈ I, carry out structural domain Rl′;Specific implementation procedure is as follows:
Domain RlPop, obtain RlIn itemIt is θ (x) ' to reset θ (x), forms new item
Instead of domain RlIn itemObtain domain Rl', and stacking, it is transformed into new state p ';
3) as op=(Time ← v), forExist in and if only if MTransition relationship representative domain RlIn except reference clock item (├, 0), remaining all
Clock value carrys out structural domain R plus time passage vl +;Specifically performing step is:
Domain RlPop, except reference clock, all passed v plus the time,
Expression corresponds to g, ωil, x new general term,Respectively
Corresponding new record item is represented,Represent reference clock entry;
New item replaces original item, obtains domain Rl +, and stacking, it is transformed into new state p ';
4) as op=push (a, I), forAnd if only if, and M is presentThe transition relationship is represented, stack-incoming operation is carried out to No. i lower pushing system, will
Character is a, is worth and isItem stacking domain Ril, carry out structural domain Ri(l+1);Detailed process is as follows:
From RilObtain itemWith
Respectively instead of Obtain domain Ri(l+1), and stacking, it is transformed into new state p ';
5) as op=pop (a, I), forAnd if only if, and M is present The transition relationship represents that pop domain RilMiddle stack character is a, and θ (a) ∈ I
, carry out structural domain Ril′;Specific steps are described as follows:
Pop domain RilWith domain Ri(l-1), obtain domain RilIn item
Domain R(l-1)In the clock value of all add θ (├·), obtain domain Ri(l-1)′;
Pass through RilAnd Ri(l-1)' obtain domain Ril', Ril' item is respectively:Common stack character item comes from domain Ri(l-1)′;Ordinary clock item,
Global variable item comes from domain Ril;Entry all is from domain Ri(l-1)′;
Stacking domain Ril', it is transformed into new state p ';
6) as op=dc, forExist in and if only if M Should
Transition relationship represents, creates new thread and carrys out structural domain Rl′;Assuming that TDPN models, it is n that dynamic creation, which newly descends the stack of pushing system to number,
+1;Specific execution step is as follows:
Pop domain Rl, the clock equivalence optimisation technique based on key point, general character item can be obtained
Entry
ItemWithAdd domain Rl, obtain
Domain Rl', and stacking, it is transformed into new state p '.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510581987.5A CN105183652B (en) | 2015-09-14 | 2015-09-14 | Pushed net under time dynamic the conversion method of network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510581987.5A CN105183652B (en) | 2015-09-14 | 2015-09-14 | Pushed net under time dynamic the conversion method of network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105183652A CN105183652A (en) | 2015-12-23 |
CN105183652B true CN105183652B (en) | 2018-01-30 |
Family
ID=54905744
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510581987.5A Expired - Fee Related CN105183652B (en) | 2015-09-14 | 2015-09-14 | Pushed net under time dynamic the conversion method of network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105183652B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105786525B (en) * | 2016-03-23 | 2019-01-25 | 鼎点视讯科技有限公司 | A kind of process model transplants the method and device of code to threading model |
CN106201881B (en) * | 2016-07-12 | 2019-02-01 | 桂林电子科技大学 | A kind of CSP concurrent system adjustment method based on ASP |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102231133A (en) * | 2011-07-05 | 2011-11-02 | 上海交通大学 | Concurrent real-time program verification ptimized processing system and method based on rewrite logic |
CN104267936A (en) * | 2014-09-16 | 2015-01-07 | 桂林电子科技大学 | Semantic tree based asynchronous dynamic push-down network reachability analysis method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100023798A1 (en) * | 2008-07-25 | 2010-01-28 | Microsoft Corporation | Error recovery and diagnosis for pushdown automata |
US8589888B2 (en) * | 2011-08-29 | 2013-11-19 | Microsoft Corporation | Demand-driven analysis of pointers for software program analysis and debugging |
-
2015
- 2015-09-14 CN CN201510581987.5A patent/CN105183652B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102231133A (en) * | 2011-07-05 | 2011-11-02 | 上海交通大学 | Concurrent real-time program verification ptimized processing system and method based on rewrite logic |
CN104267936A (en) * | 2014-09-16 | 2015-01-07 | 桂林电子科技大学 | Semantic tree based asynchronous dynamic push-down network reachability analysis method |
Non-Patent Citations (2)
Title |
---|
"一种基于时间自动机的域构造方法 ";钱俊彦等;《计算机应用研究》;20050731;68-70页 * |
"一种基于时间自动机的时钟等价性优化方法";钱俊彦等;《计算机工程》;20050930;第31卷(第8期);71-73页 * |
Also Published As
Publication number | Publication date |
---|---|
CN105183652A (en) | 2015-12-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9672065B2 (en) | Parallel simulation using multiple co-simulators | |
Quick et al. | Using pregel-like large scale graph processing frameworks for social network analysis | |
CN102929781B (en) | Based on the concurrent recursive program verification method of queue communication that context is delimited | |
CN110046810A (en) | A kind of Shop Floor Multiobjective Scheduling method based on Timed Petri nets | |
Pan et al. | A configurable state class method for temporal analysis of time Petri nets | |
Bellettini et al. | Mardigras: Simplified building of reachability graphs on large clusters | |
CN107704235A (en) | The analytic method of data flowchart, system and storage medium in mathematics library | |
CN104267936B (en) | Based on network analysis method of reachability of being pushed net under the semantic asynchronous dynamical of tree | |
Lednicki et al. | Model level worst-case execution time analysis for IEC 61499 | |
CN105183652B (en) | Pushed net under time dynamic the conversion method of network | |
CN110750957A (en) | Cache system verification method of efficient multi-core RISC-V processor | |
Liang et al. | Fast search of the optimal contraction sequence in tensor networks | |
CN110807587A (en) | Process model security verification method and device | |
CN111709138B (en) | CPS space-time property oriented hybrid AADL modeling and model conversion method | |
CN105426279A (en) | Celluar automata based servo system fault propagation analysis method | |
US8849626B1 (en) | Semantic translation of stateflow diagrams into input/output extended finite automata and automated test generation for simulink/stateflow diagrams | |
CN116483633A (en) | Data augmentation method and related device | |
Finkbeiner et al. | Reactive synthesis: towards output-sensitive algorithms | |
US12124778B1 (en) | Method for improving the simulation of complex stochastic systems | |
Jung et al. | Scalable semi-supervised learning over networks using nonsmooth convex optimization | |
Zeng et al. | Aware: Adaptive Distributed Training with Computation, Communication and Position Awareness for Deep Learning Model | |
Kulagin et al. | Software for modeling distributed systems using the Petri net apparatus | |
Adobbati et al. | Analysing multi-agent systems using 1-safe Petri nets | |
CN104657542A (en) | MSVL (Modeling, Simulation and Verification Language)-based Petri network model detection method | |
Clark et al. | Gtqcp: Greedy topology-aware quantum circuit partitioning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180130 |
|
CF01 | Termination of patent right due to non-payment of annual fee |