This document provides an introduction to a course on software architecture and engineering. It discusses the goals of the course, which are to teach techniques for proper software modularity and design, as well as non-programming aspects of software engineering. Some topics that will be covered include modularity, design patterns, component-based development, and software metrics. The document also provides information on projects, exams, resources and expectations for the course.
Unit - I
Mobile Computing – Mobile Computing Vs wireless Networking – Mobile Computing Applications – Characteristics of Mobile computing – Structure of Mobile Computing Application. MAC Protocols – Wireless MAC Issues – Fixed Assignment Schemes – Random Assignment Schemes – Reservation Based Schemes.
Unit - I
Mobile Computing – Mobile Computing Vs wireless Networking – Mobile Computing Applications – Characteristics of Mobile computing – Structure of Mobile Computing Application. MAC Protocols – Wireless MAC Issues – Fixed Assignment Schemes – Random Assignment Schemes – Reservation Based Schemes.
Taming Complexity: On Studying the Application of Model-Driven Engineering to...Florian Rademacher
Microservice Architecture (MSA) is an approach to the realization of software architectures that aims to foster scalability, maintainability, and robustness. To this end, MSA proposes architecture decomposition into microservices, i.e., software components that (i) provide distinct capabilities; (ii) are as independent as possible from other components; and (iii) are solely responsible for their interactions with other components. However, when compared to monolithic software systems, the adoption of MSA usually results in a significant complexity increase concerning architecture design, development, and operation.
In our current line of research, we pursue the goal to mitigate this complexity by investigating the application of Model-driven Engineering (MDE) to MSA engineering and introducing supportive abstractions to certain activities of the latter. In our webinar talk, we will (i) motivate our research on MDE for MSA; (ii) present an ecosystem of modeling languages, which aims to enable stakeholders in MSA engineering to express their specific concerns towards a microservice architecture in a concise and efficient manner; (iii) demonstrate the ecosystem’s practical applicability; and (iv) summarize the most recent insights from our ongoing research. In addition, we will give an outlook on potential future research activities, including both the reconstruction and collaborative specification of microservice architectures in a model-driven fashion.
Very preliminar intro to MDE for software developer communities and other kind of software practitioners. Contains material from several recognized sources.
Introduction to Software Engineering, Software Process, Perspective and Specialized Process Models – Introduction to Agility – Agile process – Extreme programming – XP process - Estimation-FP,LOC and COCOMO I and II,Risk Management, Project Scheduling.
Software Engineering Patterns for Machine Learning ApplicationsHironori Washizaki
Hironori Washizaki, Software Engineering Patterns for Machine Learning Applications, 2021 IEEE International Conference on Electronic Technology, Communication and Information (ICETCI 2021), Keynote, August 28, Online, 2021.
Patterns for New Software Engineering: Machine Learning and IoT Engineering P...Hironori Washizaki
Hironori Washizaki, "Patterns for New Software Engineering: Machine Learning and IoT Engineering Patterns", Keynote, AsianPLoP 2020: 9th Asian Conference on Pattern Languages of Programs, Sep 3rd, 2020.
2 September - 4 September, 2020
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
Hironori Washizaki, "Machine Learning Software Engineering Patterns and Their Engineering," 2nd International Workshop on Responsible AI Engineering (RAIE’24), Keynote, Lisbon, April 16th, 2024.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
Taming Complexity: On Studying the Application of Model-Driven Engineering to...Florian Rademacher
Microservice Architecture (MSA) is an approach to the realization of software architectures that aims to foster scalability, maintainability, and robustness. To this end, MSA proposes architecture decomposition into microservices, i.e., software components that (i) provide distinct capabilities; (ii) are as independent as possible from other components; and (iii) are solely responsible for their interactions with other components. However, when compared to monolithic software systems, the adoption of MSA usually results in a significant complexity increase concerning architecture design, development, and operation.
In our current line of research, we pursue the goal to mitigate this complexity by investigating the application of Model-driven Engineering (MDE) to MSA engineering and introducing supportive abstractions to certain activities of the latter. In our webinar talk, we will (i) motivate our research on MDE for MSA; (ii) present an ecosystem of modeling languages, which aims to enable stakeholders in MSA engineering to express their specific concerns towards a microservice architecture in a concise and efficient manner; (iii) demonstrate the ecosystem’s practical applicability; and (iv) summarize the most recent insights from our ongoing research. In addition, we will give an outlook on potential future research activities, including both the reconstruction and collaborative specification of microservice architectures in a model-driven fashion.
Very preliminar intro to MDE for software developer communities and other kind of software practitioners. Contains material from several recognized sources.
Introduction to Software Engineering, Software Process, Perspective and Specialized Process Models – Introduction to Agility – Agile process – Extreme programming – XP process - Estimation-FP,LOC and COCOMO I and II,Risk Management, Project Scheduling.
Software Engineering Patterns for Machine Learning ApplicationsHironori Washizaki
Hironori Washizaki, Software Engineering Patterns for Machine Learning Applications, 2021 IEEE International Conference on Electronic Technology, Communication and Information (ICETCI 2021), Keynote, August 28, Online, 2021.
Patterns for New Software Engineering: Machine Learning and IoT Engineering P...Hironori Washizaki
Hironori Washizaki, "Patterns for New Software Engineering: Machine Learning and IoT Engineering Patterns", Keynote, AsianPLoP 2020: 9th Asian Conference on Pattern Languages of Programs, Sep 3rd, 2020.
2 September - 4 September, 2020
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
Hironori Washizaki, "Machine Learning Software Engineering Patterns and Their Engineering," 2nd International Workshop on Responsible AI Engineering (RAIE’24), Keynote, Lisbon, April 16th, 2024.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
Unleash Unlimited Potential with One-Time Purchase
BoxLang is more than just a language; it's a community. By choosing a Visionary License, you're not just investing in your success, you're actively contributing to the ongoing development and support of BoxLang.
top nidhi software solution freedownloadvrstrong314
This presentation emphasizes the importance of data security and legal compliance for Nidhi companies in India. It highlights how online Nidhi software solutions, like Vector Nidhi Software, offer advanced features tailored to these needs. Key aspects include encryption, access controls, and audit trails to ensure data security. The software complies with regulatory guidelines from the MCA and RBI and adheres to Nidhi Rules, 2014. With customizable, user-friendly interfaces and real-time features, these Nidhi software solutions enhance efficiency, support growth, and provide exceptional member services. The presentation concludes with contact information for further inquiries.
Experience our free, in-depth three-part Tendenci Platform Corporate Membership Management workshop series! In Session 1 on May 14th, 2024, we began with an Introduction and Setup, mastering the configuration of your Corporate Membership Module settings to establish membership types, applications, and more. Then, on May 16th, 2024, in Session 2, we focused on binding individual members to a Corporate Membership and Corporate Reps, teaching you how to add individual members and assign Corporate Representatives to manage dues, renewals, and associated members. Finally, on May 28th, 2024, in Session 3, we covered questions and concerns, addressing any queries or issues you may have.
For more Tendenci AMS events, check out www.tendenci.com/events
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
Keep tabs on your field staff effortlessly with Informap Technology Centre LLC. Real-time tracking, task assignment, and smart features for efficient management. Request a live demo today!
For more details, visit us : https://informapuae.com/field-staff-tracking/
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
Into the Box Keynote Day 2: Unveiling amazing updates and announcements for modern CFML developers! Get ready for exciting releases and updates on Ortus tools and products. Stay tuned for cutting-edge innovations designed to boost your productivity.
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfJay Das
With the advent of artificial intelligence or AI tools, project management processes are undergoing a transformative shift. By using tools like ChatGPT, and Bard organizations can empower their leaders and managers to plan, execute, and monitor projects more effectively.
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
3. 3
5
Assistants
The lab session on Tuesday 9‐10:30 will be led by:
Alexander Chichigin a.chichigin@innopolis.ru
Víctor Rivera varz86@gmail.com
6
Course material
Course page:
http://university.innopolis.ru/en/research/selab/teaching
Check it regularly
Lecture material:
Lecture slides
Recommended textbooks:
• B. Meyer: Object‐Oriented Software Construction, 2nd edition,
Prentice Hall, 1997
Russian translation: Объектно‐ориентированное
конструирование программных систем, see
habrahabr.ru/post/140284/.
• E. Gamma et al.: Design Patterns
Addison‐Wesley, 1995
Exercise material:
Lab slides
Material will be made available online
13. 13
25
“Large” software systems
What may be large: any or all of
Source size (lines of code, LoC)
Binary size
Number of users
Number of developers
Life of the project (decades...)
Number of changes, of versions
(Remember Parnas’s definition)
26
Process and product
Software engineering affects both:
Software products
The processes used to obtain and operate them
Products are not limited to code. Other examples include
requirements, design, documentation, test plans, test results,
bug reports
Processes exists whether they are formalized or not
15. 15
29
Process
Emphasize:
Plans
Schedules
Documents
Requirements
Specifications
Order of tasks
Commitments
Examples: Rational Unified Process, CMMI, Waterfall…
30
Agile
Emphasize:
Short iterations
Emphasis on working code; de‐emphasis of plans and
documents
Emphasis on testing; de‐emphasis of specifications and design
. “Test‐Driven Development"
Constant customer involvement
Refusal to commit to both functionality and deadlines
Specific practices, e.g. Pair Programming
Examples: Scrum, Extreme Programming
16. 16
31
Object‐oriented culture
Emphasizes:
Seamless development
Reversibility
Single Product Principle
Design by Contract
32
Six task groups of software engineering
Describe
Implement
Assess
Manage
Operate
Notate
Requirements,
design specification,
documentation …
Design, programming
V&V*, esp. testing
*Validation & Verification
Plans, schedules,
communication, reviews…
Deployment, installation,
Languages for programming etc.
18. 18
35
A reservation panel
Flight sought from: To:
Depart no earlier than: No later than:16 Feb 2014
Choose next action:
0 – Exit
1 – Help
2 – Further enquiry
3 – Reserve a seat
19 Feb 2014
Kazan Zurich
ERROR: Choose a date in the future
36
A reservation panel
Choose next action:
0 – Exit
1 – Help
2 – Further enquiry
3 – Reserve a seat
AVAILABLE FLIGHTS: 2
Flt# SU 425 Dep 8:25 Arr 7:45 Thru: SVO, FRA
Flt# TK 082 Dep 7:40 Arr 9:15 Thru: IST
Flight sought from: To:
Depart no earlier than: No later than:16 Feb 2015 19 Feb 2015
Kazan Zurich
19. 19
37
The transition diagram
Help HelpInitial
Flight_query
Seat_query
Confirmation
Reservation
Help Help
1
1
2
3 3
2
2
2
23 3
3
1 1 1 1
1 1
38
A first attempt
A program block for each state, for example:
PFlight_query:
display ‘‘enquiry on flights’’ screen
repeat
Read user’s answers and his exit choice C
if Error_in_answer then output_message end
until
not Error_in_answer
end
process answer
inspect C
when 0 then goto PExit
when 1 then goto PHelp
...
when n then goto PReservation
end
21. 21
41
The transition function
0 (Initial)
1 (Help)
2 (Confirmation)
3 (Reservation)
4 (Seats)
5 (Flights)
0 1 2 3
Exit
Exit
Exit
Exit
Exit
Return
2
3
4
5
0
0
2
3
4
42
The transition diagram
Help
Help
Initial
Flight_query
Seat_query
Confirmation
Reservation
Help Help
1
1
2
3 3
2
2
2
23 3
3
1 1 1 1
1
52
43
0
22. 22
43
New system architecture
execute_session
initial transition execute_state is_final
display read correct message process
Level 3
Level 2
Level 1
44
New system architecture
Procedure execute_session only defines graph traversal.
It knows nothing about particular screens of a given application;
it should be the same for all applications.
execute_session
‐‐ Execute full session.
local
current_state, choice : INTEGER
do
current_state := initial
repeat
choice := execute_state (current_state)
current_state := transition (current_state, choice)
until
is_final (current_state)
end
end
23. 23
45
To describe an application
Provide transition function
Define initial state
Define is_final function
46
Actions in a state
execute_state (current_state : INTEGER ): INTEGER
‐‐ Execute actions for current_state ; return user’s exit choice.
local
answer : ANSWER
good : BOOLEAN
choice : INTEGER
do
repeat
display (current_state)
[answer, choice] := read (current_state )
good := correct (current_state, answer )
if not good then message (current_state, answer ) end
until
good
end
process (current_state, answer )
Result := choice
end
24. 24
47
Specification of the remaining routines
display (s) outputs the screen associated with state s.
[a, e] := read (s) reads into a the user’s answer to the display
screen of state s, and into e the user’s exit choice.
correct (s, a) returns true if and only if a is a correct answer
for the question asked in state s.
If so, process (s, a) processes answer a.
If not, message (s, a) outputs the relevant error message.
48
Going object‐oriented: The law of inversion
How amenable is this solution to change and adaptation?
New transition?
New state?
New application?
Routine signatures:
execute_state (state: INTEGER): INTEGER
display (state: INTEGER)
read (state: INTEGER): [ANSWER, INTEGER ]
correct (state: INTEGER; a: ANSWER): BOOLEAN
message (state: INTEGER; a: ANSWER)
process (state: INTEGER; a: ANSWER)
is_final (state: INTEGER)
25. 25
49
Data transmission
All routines share the state as input argument. They must discriminate on
it, e.g. :
display (current_state : INTEGER)
do
inspect current_state
when state1 then
...
when state2 then
...
when staten then
...
end
end
Consequences:
Long and complicated routines.
Must know about one possibly complex application.
To change one transition, or add a state, need to change all.
50
The flow of control
Underlying reason why structure is so inflexible:
Too much DATA TRANSMISSION.
current_state is passed from execute_session (level 3) to all
routines on level 2 and on to level 1
Worse: there’s another implicit argument to all routines –
application. Can’t define
execute_session, display, execute_state, ...
as library components, since each must know about all
interactive applications that may use it.
27. 27
53
The law of inversion
If your routines exchange too much data, put your
routines into your data.
In this example: the state is everywhere!
54
Going O‐O
Use STATE as the basic abstract data type (and class).
Among features of every state:
The routines of level 1 (deferred in class STATE )
execute_state, as above but without the argument
current_state
28. 28
55
Grouping by data abstractions
STATE
execute_session
initial transition execute_state is_final
display read correct message process
Level 3
Level 2
Level 1
56
Class STATE
deferred class
STATE
feature
choice : INTEGER ‐‐ User’s selection for next step
input : ANSWER ‐‐ User’s answer for this step
display
‐‐ Show screen for this state.
deferred
end
read
‐‐ Get user’s answer and exit choice,
‐‐ recording them into input and choice.
deferred
ensure
input /= Void
end
29. 29
57
Class STATE
correct : BOOLEAN
‐‐ Is input acceptable?
deferred
end
message
‐‐ Display message for erroneous input.
require
not correct
deferred
end
process
‐‐ Process correct input.
require
correct
deferred
end
58
Class STATE
execute_state
local
good : BOOLEAN
do
from
until
good
loop
display
read
good := correct
if not good then message end
end
process
choice := input.choice
end
end
30. 30
59
Class structure
STATE
*
INITIALINITIAL FLIGHT_QUERY RESERVATION
…
execute_state +
display +
read +
correct +
message +
process +
display +
read +
correct +
message +
process +
display +
read +
correct +
message +
process +
display *
read *
correct *
message *
process *
60
To describe a state of an application
Write a descendant of STATE :
class FLIGHT_QUERY inherit
STATE
feature
display do ... end
read do ... end
correct : BOOLEAN do ... end
message do ... end
process do ... end
end
31. 31
61
STATE
Rearranging the modules
execute_session
initial transition execute_state is_final
display read correct message process
Level 3
Level 2
Level 1
APPLICATION
62
Describing a complete application
No ‘‘main program’’ but class representing a system.
Describe application by remaining features at levels
1 and 2:
Function transition.
State initial.
Boolean function is_final.
Procedure execute_session.
32. 32
63
Implementation decisions
Represent transition by an array transition: n rows (number
of states), m columns (number of choices), given at creation
States numbered from 1 to n; array states yields the state
associated with each index
(Reverse not needed: why?)
No deferred boolean function is_final, but convention: a
transition to state 0 denotes termination.
No such convention for initial state (too constraining).
Attribute initial_number.
64
Describing an application
class
APPLICATION
create
make
feature
initial : INTEGER
make (n, m : INTEGER)
‐‐ Allocate with n states and m possible choices.
do
create transition.make (1, n, 1, m)
create states.make (1, n )
end
feature {NONE } ‐‐ Representation of transition diagram
transition: ARRAY2 [STATE ]
‐‐ State transitions
states: ARRAY [STATE ]
‐‐ State for each index
34. 34
67
Class structure
STATE
*
INITIALINITIAL FLIGHT_QUERY RESERVATION
…
execute_state +
display +
read +
correct +
message +
process +
display +
read +
correct +
message +
process +
display +
read +
correct +
message +
process +
display *
read *
correct *
message *
process *
68
Other features of APPLICATION
put_state ( s: STATE; number: INTEGER )
‐‐ Enter state s with index number
require
1 <= number
number <= states.upper
do
states [number] := s
end
choose_initial (number: INTEGER)
‐‐ Define state number number as the initial state.
require
1 <= number
number <= states.upper
do
first_number := number
end
35. 35
69
More features of APPLICATION
put_transition (source, target, label : INTEGER )
‐‐ Add transition labeled label from state
‐‐ number source to state number target.
require
1 <= source; source <= states.upper
0 <= target;target <= states.upper
1 <= label; label <= transition.upper2
do
transition.put (source, label, target )
end
invariant
0 <= st_number
st_number <= n
transition.upper1 = states.upper
end
source
target
label
70
To build an application
Necessary states — instances of STATE — should be available.
Initialize application:
create a.make (state_count, choice_count)
Assign a number to every relevant state s :
a [n] := s
Choose initial state n0 :
a.choose_initial (n0 )
Enter transitions:
a.put_transition (sou, tar, lab)
May now run:
a.execute_session
36. 36
71
Open architecture
During system evolution you may at any time:
Add a new transition (put_transition).
Add a new state (put_state).
Delete a state (not shown, but easy to add).
Change the actions performed in a given state
...
72
Note on the architecture
Procedure execute_session is not ‘‘the function of the system”
but just one routine of APPLICATION.
Other uses of an application:
Build and modify: add or delete state, transition, etc.
Simulate, e.g. in batch (replaying a previous session’s script),
or on a line‐oriented terminal.
Collect statistics, a log, a script of an execution.
Store into a file or data base, and retrieve.
Each such extension only requires incremental addition of
routines. Doesn’t affect structure of APPLICATION and clients.