(*<*)
―‹ ********************************************************************
* Project : HOL-CSPM - Architectural operators for HOL-CSP
*
* Author : Benoît Ballenghien, Safouan Taha, Burkhart Wolff.
*
* This file : POTS example
*
* Copyright (c) 2025 Université Paris-Saclay, France
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* * Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************› (*>*)
chapter‹ Example: Plain Old Telephone System›
text‹The "Plain Old Telephone Service is a standard medium-size example for
architectural modeling of a concurrent system.
Plain old telephone service (POTS), or plain ordinary telephone system,[1]
is a retronym for voice-grade telephone service employing analog signal transmission over
copper loops. POTS was the standard service offering from telephone companies from 1876 until
1988[2] in the United States when the Integrated Services Digital Network (ISDN) Basic Rate
Interface (BRI) was introduced, followed by cellular telephone systems, and voice over
IP (VoIP). POTS remains the basic form of residential and small business service connection
to the telephone network in many parts of the world. The term reflects the technology that has
been available since the introduction of the public telephone system in the late 19th century,
in a form mostly unchanged despite the introduction of Touch-Tone dialing, electronic telephone
exchanges and fiber-optic communication into the public switched telephone network (PSTN).
text‹We need to see 🍋‹int› as a 🍋‹cpo›.›
―‹We may replace this instantiation by an import of "HOLCF-Library.Int_Discrete"› instantiation int :: discrete_cpo begin
definition below_int_def: "(x::int) ⊑ y ⟷ x = y"
instanceproof qed (rule below_int_def)
end
section‹ The Alphabet and Basic Types of POTS ›
text‹Underlying terminology apparent in the acronyms: 🪙 T-side (target side, callee side) 🪙 O-side (originator (?) side, caller side)›
datatype channels = tcO ‹Phones × MtcO› ―‹›
| ctO ‹Phones × MctO›
| tcT ‹Phones × MtcT × Phones›
| ctT ‹Phones × MctT × Phones›
| tcOdial ‹Phones × Phones›
| StartReject Phones ―‹ phone x rejects from now on to be called ›
| EndReject Phones ―‹ phone x accepts from now on to be called ›
| terminal Phones
| off_hook Phones
| on_hook Phones
| digits ‹Phones × Phones› ―‹ communication relation: x calls y ›
| tone_ring Phones
| tone_quiet Phones
| tone_busy Phones
| tone_dial Phones
| connected Phones
locale POTS = fixes min_phones :: int and max_phones :: int and VisibleEvents :: ‹channels set› assumes min_phones_g_1[simp] : ‹1 ≤ min_phones› and max_phones_g_min_phones[simp] : ‹min_phones < max_phones› begin
lemma nonempty_phones[simp]: ‹phones ≠ {}› and finite_phones[simp]: ‹finite phones› and at_least_two_phones[simp]: ‹2 ≤ card phones› and not_singl_phone[simp]: ‹phones - {p} ≠ {}› apply (simp_all add: phones_def) using max_phones_g_min_phones apply linarith+ by (metis atLeastAtMost_iff less_le_not_le max_phones_g_min_phones order_refl singletonD subsetD)
definition EventsIPhone :: ‹Phones ==> channels set› where‹EventsIPhone u ≡ {tone_ring u, tone_quiet u, tone_busy u, tone_dial u, connected u}› definition EventsUser :: ‹Phones ==> channels set› where‹EventsUser u ≡ {off_hook u, on_hook u} ∪ {x . ∃ n. x = digits (u, n)}›
section‹Auxilliaries to Substructure the Specification›
definition SYSTEM :: ‹channels process› where‹SYSTEM ≡ NETWORK [VisibleEvents] TELEPHONES›
text‹We underline here the usefulness of the architectural operators, especiallyconst‹MultiSync›
but also const‹GlobalNdet› which appears in const‹Oside› recursive definition.›
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.