# 0.6 Using temporal logic to specify properties: homework exercises

Give an English translation of the following LTL formulae. Try to give a natural wording for each, not just a transliterationof the logical operators.

• $\left(◇r\left(pUr\right)\right)$
• $\square \left(q\square p\right)$
•  $p$ is true before $r$ .''
•  $p$ is false after $q$ .''

In the following, give an LTL formula that formalizes the given English wording.If the English is subject to any ambiguity, as it frequently is, describe how you are disambiguating it, and why.

•  $p$ is true.''
•  $p$ becomes true before $r$ .''
•  $p$ will happen at most once.''
•  $p$ will happen at most twice.''
• The light always blinks.''Use the following proposition: $p$ = the light is on.
• The lights of a traffic signal always light in thefollowing sequence: green, yellow, red, and back to green, etc. , with exactly one light on at any time.''Use the following propositions: $g$ = the green light is on, $y$ = the yellow light is on, and $r$ = the red light is on.
• This looks so simple and obvious, right?Unfortunately, it is ambiguous. The simple answer, $p$ , says it's true right now . But, the likelier intended meaning is that it's always true, $\square p$ .
• This can be reworded as $p$ becomes true while $r$ is still false.'' $\left(rW\left(pr\right)\right)$
• The version of LTL we use cannot capture the notion ofsomething being true for exactly one state. Instead, we must instead think in terms of somethingbeing true for a while''. Using that idea, we'll reword the original English intomore explicit, long-winded forms. $p$ will happen at most once'' becomes $p$ is false for a while, then it may become true for a while, thenit may become false forever.'' It LTL, that can be written as $\left(pW\left(pW\square p\right)\right)$ .Repeating that pattern, $p$ will happen at most twice'' becomes $\left(pW\left(pW\left(pW\left(pW\square p\right)\right)\right)\right)$ .
• Here are three progressively simpler solutions which areequivalent.
• $\square \left(\left(p◇p\right)\left(p◇p\right)\right)$
• $\left(\square \left(pUp\right)\square \left(pUp\right)\right)$
• $\left(\square ◇p\square ◇p\right)$
• There are many ways to write this, but here's one.It states that whenever the green light is on, no other light is on, and it will stay on until theyellow one is on. Note that this implies the red light won't come onbefore the yellow one. What happens when the other lights are on is entirely parallel.Finally, at least one light is on. $\square \left(\left(g\left(\left(yr\right)\left(gUy\right)\right)\right)\left(y\left(\left(rg\right)\left(yUr\right)\right)\right)\left(r\left(\left(gy\right)\left(rUy\right)\right)\right)\left(gyr\right)\right)$

Recall the Dining Philosophers Problem from the previous homework . Using temporal logic, formally specify the following desiredproperties of solutions to the D.P. Problem. Use the following logic variables, where $0i :

• ${l}_{i}$ : Philosopher $i$ has his/her left fork.
• ${r}_{i}$ : Philosopher $i$ has his/her left fork.

For each question, your answer should cover exactly the given condition -- nothing more or less.You may assume $N=3$ .

• No fork is ever claimed to be held bytwo philosophers simultaneously.
• Philosopher $i$ gets to eat (at least once).
• Each philosopher gets to eat infinitely often.
• The philosophers don't deadlock.(The main difficulty is to conceptualize and restate deadlock''within this specific model in terms of the available logic variables.)You may assume philosophers pick uptwo forks in some order, eat, and drop both forks.
• The philosophers don't deadlock.(The main difficulty is to conceptualize and restate deadlock''within this specific model in terms of the available logic variables.)You may not assume philosophers pick uptwo forks in some order, eat, and drop both forks. For example, one might pick up a single fork and then drop it.Or, the philosophers might be lazy and never pick up a fork.
• Describe a D.P. Problem run in which philosophers don'tdeadlock, but it is not the case that each philosopher gets to eat infinitely often.
• $\square \left(\left({l}_{0}{r}_{2}\right)\left({l}_{1}{r}_{0}\right)\left({l}_{2}{r}_{1}\right)\right)$
• $◇\left({l}_{i}{r}_{i}\right)$
• $\left(\square ◇\left({l}_{0}{r}_{0}\right)\square ◇\left({l}_{1}{r}_{1}\right)\square ◇\left({l}_{2}{r}_{2}\right)\right)$
• Here are two solutions.
• $\square \left(\left({l}_{0}{l}_{1}{l}_{2}\right)\left({r}_{0}{r}_{1}{r}_{2}\right)\right)$
• $\square ◇\left(\left({l}_{0}{r}_{0}\right)\left({l}_{1}{r}_{1}\right)\left({l}_{2}{r}_{2}\right)\right)$
• This simply says that it never gets stuck in oneparticular fork configuration. There would be many if statements, one per configuration, and this is abbreviated. $\square \left(\left(\left({l}_{0}{l}_{1}{l}_{2}\right)◇\left({l}_{0}{l}_{1}{l}_{2}\right)\right)\left(\left({l}_{0}{l}_{1}{l}_{2}{r}_{2}\right)◇\left({l}_{0}{l}_{1}{l}_{2}{r}_{2}\right)\right)\text{}\right)$
• There are many possibilities. One is wherephilosopher 0 repeatedly eats, grabbing the forks so quickly that neither other philosopher has a chance tograb one that is shared with him.

#### Questions & Answers

Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
Adin
why?
Adin
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
Damian Reply
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
Praveena Reply
what does nano mean?
Anassong Reply
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
Damian Reply
absolutely yes
Daniel
how to know photocatalytic properties of tio2 nanoparticles...what to do now
Akash Reply
it is a goid question and i want to know the answer as well
Maciej
characteristics of micro business
Abigail
for teaching engĺish at school how nano technology help us
Anassong
Do somebody tell me a best nano engineering book for beginners?
s. Reply
there is no specific books for beginners but there is book called principle of nanotechnology
NANO
what is fullerene does it is used to make bukky balls
Devang Reply
are you nano engineer ?
s.
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
Tarell
what is the actual application of fullerenes nowadays?
Damian
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
Tarell
what is the Synthesis, properties,and applications of carbon nano chemistry
Abhijith Reply
Mostly, they use nano carbon for electronics and for materials to be strengthened.
Virgil
is Bucky paper clear?
CYNTHIA
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
NANO
so some one know about replacing silicon atom with phosphorous in semiconductors device?
s. Reply
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Harper
Do you know which machine is used to that process?
s.
how to fabricate graphene ink ?
SUYASH Reply
for screen printed electrodes ?
SUYASH
What is lattice structure?
s. Reply
of graphene you mean?
Ebrahim
or in general
Ebrahim
in general
s.
Graphene has a hexagonal structure
tahir
On having this app for quite a bit time, Haven't realised there's a chat room in it.
Cied
what is biological synthesis of nanoparticles
Sanket Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

### Read also:

#### Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Model checking concurrent programs. OpenStax CNX. Oct 27, 2005 Download for free at http://cnx.org/content/col10294/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Model checking concurrent programs' conversation and receive update notifications?   By  By    By 