2
$\begingroup$

I'm trying to get myself more familiar with Timed Automata theory. At some point I came across the expression "side-effect free" like in the following:

A guard is a side-effect free expression that evaluates to a boolean.

But except for the following definition¹ I couldn't find any good source that explains what it actually means or gives examples with respect to Timed Automata:

We call an expression side effect free if ([![e]!]) is the identity function.

EDIT:

babou pointed me to the global meaning of side-effect which is:

Wikipedia on Side effect (computer science)

In computer science, a function or expression is said to have a side effect if, in addition to returning a value, it also modifies some state or has an observable interaction with calling functions or the outside world.

However, the trouble I've still got is how to interpret has no effect on states for side-effect free guards. After a guard has been evaluated it will have an effect on states if a transition is taken. In other words, the result of the guard does matter in respect to changing the state or not. But as it seems, the guard itself is called by a higher (side-effect having) instance which makes the state transition (or not).


¹ i.e. searching for the terms side-effect free Timed Automata

$\endgroup$
6
  • $\begingroup$ Welcome to Computer Science Stack Exchange. Please read cs.stackexchange.com/tour, if you have not yet done so. When posting a question, make sure to give enough context, and show how you tried to answer it on your own, so as to be very precise regarding your problem. This helps better answers. --- In this case it could be useful to have more references to the documents you have been using and more details on what answres you may have found so far to your question. $\endgroup$
    – babou
    Commented Aug 11, 2015 at 23:54
  • $\begingroup$ One reason for your problem in finding relevant references may be that timed automata per se only use simple comparisons between clocks, or a clock and a constant, as guards. It sounds like you are dealing with extended timed automata, involving additional data - are you perhaps using UPPAAL? $\endgroup$ Commented Aug 12, 2015 at 14:52
  • $\begingroup$ @Klaus Draeger Yes, I'm using UPPAAL. I was only reading some tutorials on their website up until now - so maybe that's where my confusion is originated from. $\endgroup$ Commented Aug 12, 2015 at 15:27
  • $\begingroup$ In that case, "side-effect free" means that the expressions which may occur in guards are restricted to not change any variable values (i.e. no assignments, no ++ operator, etc.). In other words, the mere evaluation of the guard has no effect on the state (but may of course enable a transition between locations). $\endgroup$ Commented Aug 12, 2015 at 17:03
  • $\begingroup$ how about cite where you found the term? it can be used in somewhat different ways $\endgroup$
    – vzn
    Commented Aug 12, 2015 at 17:34

1 Answer 1

2
$\begingroup$

Well, I typed side-effect in Google, then I chose anser number 4: Side effect (computer science)

The first sentence states:

In computer science, a function or expression is said to have a side effect if, in addition to returning a value, it also modifies some state or has an observable interaction with calling functions or the outside world.

From this definition, using elementary logic, I deduce that a "side-effect free expression" is an expression that modifies no state, and has no observable interaction with calling functions or the outside world.

In other words, its evaluation is not supposed to have any observable effect on the program. Then what the program does with the result of the evaluation is another matter and the rest of the program may have an observable behavior that depends on that result. But the effect is the same as if you had been given directly the result rather than evaluating the expression to get it.

$\endgroup$
1
  • $\begingroup$ Hi, when I enter only side-effect into Google, I get a list of drugs, films, and general side-effect meanings. Funny world, huh. ;) I get your point, though. What I was searching for, was side-effect free Timed Automata. If you do that then the answers are not really compelling. My mistake was just assuming the term side-effect is dedicated to the Timed Automata theory. $\endgroup$ Commented Aug 12, 2015 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.