MCRL2 by kashif khan
kashif.namal@gmail.com
Master in Computer Science University of Camerino italy
Bachelor in Software Engineering University of Bradford UK
Functional Programming in Java - Code for MaintainabilityMarcin Stepien
Functional Programming is nothing new to the JVM. But with Java 8 it was the big change in paradigm for Java developers. Learn how switching from imperative to functional results in more maintainable code.
The presentation was given at tech meetup KrkDataLink, The missing link between Functional Programming and Data Science.
A- Storage classes in C
B- Automatic variables
C- External variables or Global variable
D- Static variables
E- Register variables
Problem when extern is not used
Example Using extern in same file
Functional Programming in Java - Code for MaintainabilityMarcin Stepien
Functional Programming is nothing new to the JVM. But with Java 8 it was the big change in paradigm for Java developers. Learn how switching from imperative to functional results in more maintainable code.
The presentation was given at tech meetup KrkDataLink, The missing link between Functional Programming and Data Science.
A- Storage classes in C
B- Automatic variables
C- External variables or Global variable
D- Static variables
E- Register variables
Problem when extern is not used
Example Using extern in same file
A storage class defines the scope (visibility) and life time of variables and/or functions within a C++ Program. There are following storage classes which can be used in a C++ Program
auto
register
static
extern
what are loop in general
what is loop in c language
uses of loop in c language
types of loop in c language
program of loop in c language
syantax of loop in c language
In this lecture we will discuss about another flow control method – Loop control.
A loop control is used to execute a set of commands repeatedly
The set of commands is called the body of the loop
MATLAB has two loop control techniques
Counted loops - executes commands a specified number of times
Conditional loops - executes commands as long as a specified expression is true
Automatic Variables
extern variables
static variables
register variables
Examples of above listed variables.
Summary of storage place, Initial value, scope and life of variables.
A storage class defines the scope (visibility) and life time of variables and/or functions within a C++ Program. There are following storage classes which can be used in a C++ Program
auto
register
static
extern
what are loop in general
what is loop in c language
uses of loop in c language
types of loop in c language
program of loop in c language
syantax of loop in c language
In this lecture we will discuss about another flow control method – Loop control.
A loop control is used to execute a set of commands repeatedly
The set of commands is called the body of the loop
MATLAB has two loop control techniques
Counted loops - executes commands a specified number of times
Conditional loops - executes commands as long as a specified expression is true
Automatic Variables
extern variables
static variables
register variables
Examples of above listed variables.
Summary of storage place, Initial value, scope and life of variables.
1. what is the different unbuffered and buffered channel?
2. how to implement a job queue in golang?
3. how to stop the worker in a container?
4. Shutdown with Sigterm Handling
5. Canceling Workers without Context
6. Graceful shutdown with worker
7. How to auto-scaling build agent?
8. How to cancel the current Job?
I am Daniel N. I am a C++ Homework Expert at cpphomeworkhelp.com. I hold a Masters in Programming from the University of Leeds, UK. I have been helping students with their homework for the past 10 years. I solve homework related to C++.
Visit cpphomeworkhelp.com or email info@cpphomeworkhelp.com. You can also call on +1 678 648 4277 for any assistance with C++ Homework.
Water scarcity is the lack of fresh water resources to meet the standard water demand. There are two type of water scarcity. One is physical. The other is economic water scarcity.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Welcome to WIPAC Monthly the magazine brought to you by the LinkedIn Group Water Industry Process Automation & Control.
In this month's edition, along with this month's industry news to celebrate the 13 years since the group was created we have articles including
A case study of the used of Advanced Process Control at the Wastewater Treatment works at Lleida in Spain
A look back on an article on smart wastewater networks in order to see how the industry has measured up in the interim around the adoption of Digital Transformation in the Water Industry.
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Dr.Costas Sachpazis
Terzaghi's soil bearing capacity theory, developed by Karl Terzaghi, is a fundamental principle in geotechnical engineering used to determine the bearing capacity of shallow foundations. This theory provides a method to calculate the ultimate bearing capacity of soil, which is the maximum load per unit area that the soil can support without undergoing shear failure. The Calculation HTML Code included.
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
2. Introduction to mCRL2
LPS , LTS,PBES
Operators
Vending Machine
Odd counter
Login
Car park
Phone book
3. Micro Common representation language 2
Specification Language
Used for modeling , verification and
validation
Based on Algebra of communicating process
include data and time.
Process perform actions, can carry data as
parameter
Every process has LTS contain all states
4.
5.
6. Stored in binary Format
LTS constructed from LPS
LPS, symbolic representation of LTS to
describe behavior of system explicitly
LPS can be printed in Human Readable format
LPS is speedy than LTS
Statistical info Can be collected in LPSPP
7. Generated from LPS
It show the LPS as node link Diagram
(ltsgraph)
LTSVIEW to reduce the complexity of
image(3D)
DIAGRAPHICA reduce complexity to 2D
LTSCONVERT smaller than Original LTS
LTSCOMPARE check weather the two LTS are
behaviorally equal or not
8. Parameterized Boolean Equation system
Input needed for model checking, is a
formula expressing a desired property that
the system should not violate (or satisfy)
Pbes stored in Binary format
Pbespp stored in human readable format.
BES genrated from PBES
9. Sort
data type definition using keyword sort. Sorts are
non-empty, possibly infinite sets with data
elements.
sort D;
cons c, d : D;
declares sort D in which all elements can be
denoted by either c or d.
Now for Boolean
sort B
cons true, false : B;
10. The sum operator allows to formulate the choice
between a possibly infinite number of processes
in a very concise way.
The process sum n: Nat . p(n) can be seen as a
shorthand for p(0) + p(1) + p(2) + .... The use of
the sum operator is often to indicate that some
value must be read, i.e., the process wants to
read either a 0 or a 1 or a 2,
sort Val = struct c2 | c5 | c10;
act coin: Val;
init sum v: Val . coin(v);
act num: Nat;
init sum v: Nat . num(2 * v);
11. sort Val = struct c2 | c5 | c10;
act
coffee;
coin, rej: Val;
proc P = sum v: Val . coin(v) . (
(v != c10) -> rej(v) . P + (v == c10) ->
coffee . P ); init P;
12. We can let data influence the course of events
by adding conditions to the process
c -> p <> q implies if c then do process p
else do process q
act tick, reset;
proc
Clock(n: Nat) = (n < 99) -> tick . Clock(n + 1)
<> tick . Clock(0) + (n < 50) -> reset .
Clock(0);
init Clock(0);
13. comm({a|b -> c}, p) .. multi-actions are
renamed to a single action... actions a and b
must communicate to c in process p.
act a, b, c: Nat;
proc P = a(1) || b(1);
init comm({a|b->c}, P);
14. Allow (allow(A, P))
removes all multi-actions from the transition
system that do not occur in A. Any states that
have become unreachable will also be
removed by mCRL2, as the resulting system
is smaller and bisimilar.
allow({c}; p) only multi-actions consisting
of a single c are allowed in p.
allow({c},comm({send|read- > c}, send||read))
15. After inserting a coin of 10 cents, the user can
push the button for an apple. An apple will then
be put in the drawer of the machine.
act ins10, optA, acc10, putA, coin, ready ;
proc
User = ins10 . optA . User ;
Mach = acc10 . putA . Mach ;
init
allow(
{ coin, ready },
comm( { ins10|acc10 -> coin,
optA|putA -> ready }, User || Mach ) ) ;
16. sort
Value= struct even | odd;
act
r1,r2:Nat;
s1,s2,s3 : Value;
proc
P=sum n:Nat.(n<5)->r1(n).s1(if(n mod 2 == 0, even, odd)).P;
Q(n:Nat)=sum v:Value.s2(v).((v==even)->tau
+(v==odd)->r2(n)).Q(n=min(5,n+1));
init allow ({r1,r2},
comm ({s1|s2->s3},
P||Q(0)));
Filter
P
Counter
Q
r1 r2s1 s2
s3
18. User first check the system if the system
working the user enter password and
username, if it is already in the database the
user login to the system if not available then
the user first go for signup and insert all the
data.
19. [true*]<true>true
password needed (1): [loginpage] < true* .
enterpassword > true (that is: the first
‘loginpage’ can be followed by
‘enterpassword’)
password needed (2): [true* . loginpage] <
true* . enterpassword > true (that is: every
‘loginpage’ can be followed by
‘enterpassword’)
20. mCRL2 specication before linearisation:
act order, receive, keep, refund; return;
proc
Start = order .Ordered;
Ordered = receive. Received + refund .Start;
Received = return .Ordered + keep;
init Start;
21. sort State = struct start | ordered | received;
act order, receive, keep, refund, return;
proc P(s : State) =
(s =start) -> order . P(ordered)
+ (s =ordered) -> receive . P(received)
+ (s = ordered) ->refund . P(start)
+ (s =received) -> return . P(ordered)
+ (s = received) -> keep;
init P(start);