sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget,/translations/zh_CN/trace/rv/hybrid_automatamodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/zh_TW/trace/rv/hybrid_automatamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/it_IT/trace/rv/hybrid_automatamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ja_JP/trace/rv/hybrid_automatamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ko_KR/trace/rv/hybrid_automatamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/pt_BR/trace/rv/hybrid_automatamodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/sp_SP/trace/rv/hybrid_automatamodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hHybrid Automatah]hHybrid Automata}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhF/var/lib/git/docbuild/linux/Documentation/trace/rv/hybrid_automata.rsthKubh paragraph)}(hHybrid automata are an extension of deterministic automata, there are several definitions of hybrid automata in the literature. The adaptation implemented here is formally denoted by G and defined as a 7-tuple:h]hHybrid automata are an extension of deterministic automata, there are several definitions of hybrid automata in the literature. The adaptation implemented here is formally denoted by G and defined as a 7-tuple:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh block_quote)}(hH*G* = { *X*, *E*, *V*, *f*, x\ :subscript:`0`, X\ :subscript:`m`, *i* } h]h)}(hG*G* = { *X*, *E*, *V*, *f*, x\ :subscript:`0`, X\ :subscript:`m`, *i* }h](hemphasis)}(h*G*h]hG}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh = { }(hhhhhNhNubh)}(h*X*h]hX}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh, }(hhhhhNhNubh)}(h*E*h]hE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh, }hhsbh)}(h*V*h]hV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh, }hhsbh)}(h*f*h]hf}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh, x }(hhhhhNhNubh subscript)}(h:subscript:`0`h]h0}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jAhhubh, X }(hhhhhNhNubjB)}(h:subscript:`m`h]hm}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jAhhubh, }hhsbh)}(h*i*h]hi}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh }}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh bullet_list)}(hhh](h list_item)}(h*X* is the set of states;h]h)}(hjh](h)}(h*X*h]hX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh is the set of states;}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h *E* is the finite set of events;h]h)}(hjh](h)}(h*E*h]hE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh is the finite set of events;}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h/*V* is the finite set of environment variables;h]h)}(hjh](h)}(h*V*h]hV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh, is the finite set of environment variables;}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h'x\ :subscript:`0` is the initial state;h]h)}(hjh](hx }(hjhhhNhNubjB)}(h:subscript:`0`h]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jAhjubh is the initial state;}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hIX\ :subscript:`m` (subset of *X*) is the set of marked (or final) states.h]h)}(hj&h](hX }(hj(hhhNhNubjB)}(h:subscript:`m`h]hm}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jAhj(ubh (subset of }(hj(hhhNhNubh)}(h*X*h]hX}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(ubh)) is the set of marked (or final) states.}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj$ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXC*f* : *X* x *E* x *C(V)* -> *X* is the transition function. It defines the state transition in the occurrence of an event from *E* in the state *X*. Unlike deterministic automata, the transition function also includes guards from the set of all possible constraints (defined as *C(V)*). Guards can be true or false with the valuation of *V* when the event occurs, and the transition is possible only when constraints are true. Similarly to deterministic automata, the occurrence of the event in *E* in a state in *X* has a deterministic next state from *X*, if the guard is true.h]h)}(hXC*f* : *X* x *E* x *C(V)* -> *X* is the transition function. It defines the state transition in the occurrence of an event from *E* in the state *X*. Unlike deterministic automata, the transition function also includes guards from the set of all possible constraints (defined as *C(V)*). Guards can be true or false with the valuation of *V* when the event occurs, and the transition is possible only when constraints are true. Similarly to deterministic automata, the occurrence of the event in *E* in a state in *X* has a deterministic next state from *X*, if the guard is true.h](h)}(h*f*h]hf}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh : }(hjchhhNhNubh)}(h*X*h]hX}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh x }(hjchhhNhNubh)}(h*E*h]hE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh x }hjcsbh)}(h*C(V)*h]hC(V)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh -> }(hjchhhNhNubh)}(h*X*h]hX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh` is the transition function. It defines the state transition in the occurrence of an event from }(hjchhhNhNubh)}(h*E*h]hE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh in the state }(hjchhhNhNubh)}(h*X*h]hX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh. Unlike deterministic automata, the transition function also includes guards from the set of all possible constraints (defined as }(hjchhhNhNubh)}(h*C(V)*h]hC(V)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh5). Guards can be true or false with the valuation of }(hjchhhNhNubh)}(h*V*h]hV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh when the event occurs, and the transition is possible only when constraints are true. Similarly to deterministic automata, the occurrence of the event in }(hjchhhNhNubh)}(h*E*h]hE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh in a state in }(hjchhhNhNubh)}(h*X*h]hX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh% has a deterministic next state from }(hjchhhNhNubh)}(h*X*h]hX}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh, if the guard is true.}(hjchhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj_ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hX*i* : *X* -> *C'(V)* is the invariant assignment function, this is a constraint assigned to each state in *X*, every state in *X* must be left before the invariant turns to false. We can omit the representation of invariants whose value is true regardless of the valuation of *V*. h]h)}(hX*i* : *X* -> *C'(V)* is the invariant assignment function, this is a constraint assigned to each state in *X*, every state in *X* must be left before the invariant turns to false. We can omit the representation of invariants whose value is true regardless of the valuation of *V*.h](h)}(h*i*h]hi}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOubh : }(hjOhhhNhNubh)}(h*X*h]hX}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOubh -> }(hjOhhhNhNubh)}(h*C'(V)*h]hC’(V)}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOubhV is the invariant assignment function, this is a constraint assigned to each state in }(hjOhhhNhNubh)}(h*X*h]hX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOubh, every state in }(hjOhhhNhNubh)}(h*X*h]hX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOubh must be left before the invariant turns to false. We can omit the representation of invariants whose value is true regardless of the valuation of }(hjOhhhNhNubh)}(h*V*h]hV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOubh.}(hjOhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjKubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1jhhhK hhhhubh)}(hYThe set of all possible constraints *C(V)* is defined according to the following grammar:h](h$The set of all possible constraints }(hjhhhNhNubh)}(h*C(V)*h]hC(V)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh/ is defined according to the following grammar:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hFg = v < c | v > c | v <= c | v >= c | v == c | v != c | g && g | true h]h)}(hEg = v < c | v > c | v <= c | v >= c | v == c | v != c | g && g | trueh]hEg = v < c | v > c | v <= c | v >= c | v == c | v != c | g && g | true}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h1With v a variable in *V* and c a numerical value.h](hWith v a variable in }(hj hhhNhNubh)}(h*V*h]hV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh and c a numerical value.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK!hhhhubh)}(hX1We define the special case of hybrid automata whose variables grow with uniform rates as timed automata. In this case, the variables are called clocks. As the name implies, timed automata can be used to describe real time. Additionally, clocks support another type of guard which always evaluates to true:h]hX1We define the special case of hybrid automata whose variables grow with uniform rates as timed automata. In this case, the variables are called clocks. As the name implies, timed automata can be used to describe real time. Additionally, clocks support another type of guard which always evaluates to true:}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hhhhubh)}(h reset(v) h]h)}(hreset(v)h]hreset(v)}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hj9ubah}(h]h ]h"]h$]h&]uh1hhhhK(hhhhubh)}(h>The reset constraint is used to set the value of a clock to 0.h]h>The reset constraint is used to set the value of a clock to 0.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hhhhubh)}(heThe set of invariant constraints *C'(V)* is a subset of *C(V)* including only constraint of the form:h](h!The set of invariant constraints }(hj_hhhNhNubh)}(h*C'(V)*h]hC’(V)}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_ubh is a subset of }(hj_hhhNhNubh)}(h*C(V)*h]hC(V)}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_ubh' including only constraint of the form:}(hj_hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK,hhhhubh)}(hg = v < c | true h]h)}(hg = v < c | trueh]hg = v < c | true}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1hhhhK/hhhhubh)}(hThis simplifies the implementation as a clock expiration is a necessary and sufficient condition for the violation of invariants while still allowing more complex constraints to be specified as guards.h]hThis simplifies the implementation as a clock expiration is a necessary and sufficient condition for the violation of invariants while still allowing more complex constraints to be specified as guards.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hhhhubh)}(hXsIt is important to note that any hybrid automaton is a valid deterministic automaton with additional guards and invariants. Those can only further constrain what transitions are valid but it is not possible to define transition functions starting from the same state in *X* and the same event in *E* but ending up in different states in *X* based on the valuation of *V*.h](hXIt is important to note that any hybrid automaton is a valid deterministic automaton with additional guards and invariants. Those can only further constrain what transitions are valid but it is not possible to define transition functions starting from the same state in }(hjhhhNhNubh)}(h*X*h]hX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh and the same event in }(hjhhhNhNubh)}(h*E*h]hE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh& but ending up in different states in }(hjhhhNhNubh)}(h*X*h]hX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh based on the valuation of }(hjhhhNhNubh)}(h*V*h]hV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK5hhhhubh)}(hhh](h)}(hExamplesh]hExamples}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhK "state_dest" [ label = "sched_waking;preemptible==0;reset(clk)" ];h]hS"state_start" -> "state_dest" [ label = "sched_waking;preemptible==0;reset(clk)" ];}hjqsbah}(h]h ]h"]h$]h&]jjuh1jhhhM+hj@hhubh)}(hXInvariant can be specified in the state label (not the node name!) separated by ``\n``::h](hPInvariant can be specified in the state label (not the node name!) separated by }(hjhhhNhNubjZ)}(h``\n``h]h\n}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jYhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM-hj@hhubj)}(h9"enqueued" [label = "enqueued\nclk < threshold_jiffies"];h]h9"enqueued" [label = "enqueued\nclk < threshold_jiffies"];}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhM/hj@hhubh)}(hX8Constraints can be specified as valid C comparisons and allow spaces, the first element of the comparison must be the clock while the second is a numerical or parametrised value. Guards allow comparisons to be combined with boolean operations (``&&`` and ``||``), resets must be separated from other constraints.h](hConstraints can be specified as valid C comparisons and allow spaces, the first element of the comparison must be the clock while the second is a numerical or parametrised value. Guards allow comparisons to be combined with boolean operations (}(hjhhhNhNubjZ)}(h``&&``h]h&&}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jYhjubh and }(hjhhhNhNubjZ)}(h``||``h]h||}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jYhjubh3), resets must be separated from other constraints.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM1hj@hhubh)}(hJThis is the full example of the last version of the 'stall' model in DOT::h]hMThis is the full example of the last version of the ‘stall’ model in DOT:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hj@hhubj)}(hX{digraph state_automaton { {node [shape = circle] "enqueued"}; {node [shape = plaintext, style=invis, label=""] "__init_dequeued"}; {node [shape = doublecircle] "dequeued"}; {node [shape = circle] "running"}; "__init_dequeued" -> "dequeued"; "enqueued" [label = "enqueued\nclk < threshold_jiffies"]; "running" [label = "running"]; "dequeued" [label = "dequeued"]; "enqueued" -> "running" [ label = "switch_in" ]; "running" -> "dequeued" [ label = "dequeue" ]; "dequeued" -> "enqueued" [ label = "enqueue;reset(clk)" ]; { rank = min ; "__init_dequeued"; "dequeued"; } }h]hX{digraph state_automaton { {node [shape = circle] "enqueued"}; {node [shape = plaintext, style=invis, label=""] "__init_dequeued"}; {node [shape = doublecircle] "dequeued"}; {node [shape = circle] "running"}; "__init_dequeued" -> "dequeued"; "enqueued" [label = "enqueued\nclk < threshold_jiffies"]; "running" [label = "running"]; "dequeued" [label = "dequeued"]; "enqueued" -> "running" [ label = "switch_in" ]; "running" -> "dequeued" [ label = "dequeue" ]; "dequeued" -> "enqueued" [ label = "enqueue;reset(clk)" ]; { rank = min ; "__init_dequeued"; "dequeued"; } }}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhM8hj@hhubeh}(h]graphviz-dot-formatah ]h"]graphviz .dot formatah$]h&]uh1hhhhhhhhM%ubh)}(hhh](h)}(h Referencesh]h References}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMKubh)}(h8One book covering model checking and timed automata is::h]h7One book covering model checking and timed automata is:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhjhhubj)}(hZChristel Baier and Joost-Pieter Katoen: Principles of Model Checking, The MIT Press, 2008.h]hZChristel Baier and Joost-Pieter Katoen: Principles of Model Checking, The MIT Press, 2008.}hj"sbah}(h]h ]h"]h$]h&]jjuh1jhhhMOhjhhubh)}(h,Hybrid automata are described in detail in::h]h+Hybrid automata are described in detail in:}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjhhubj)}(h{Thomas Henzinger: The theory of hybrid automata, Proceedings 11th Annual IEEE Symposium on Logic in Computer Science, 1996.h]h{Thomas Henzinger: The theory of hybrid automata, Proceedings 11th Annual IEEE Symposium on Logic in Computer Science, 1996.}hj>sbah}(h]h ]h"]h$]h&]jjuh1jhhhMThjhhubeh}(h] referencesah ]h"] referencesah$]h&]uh1hhhhhhhhMKubeh}(h]hybrid-automataah ]h"]hybrid automataah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehʌ _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jYjVjjjjj j jjj=j:jjjQjNu nametypes}(jYjjj jj=jjQuh}(jVhjj jjj jjj j:jjj@jNju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.