Biomedical Engineering Reference
In-Depth Information
A set of guards can be represented through logical operators, which are simply
in the form of propositions calculus. In the account of code generation, we want
to explore the possibility of logical operators in the translation process. An impor-
tant goal is to handle the various kinds of logical operators in terms of providing
a large class of a set of symbols supported for the code generation and to support
various kinds of modelling structures. A key part of a structuralist approach is to
define the various logical operators as special functions defined on implication
structures. It will be helpful in what follows to use Conjunction, Negation, and
Disjunction as examples of the way these characterisations work. Universal and
existential quantifications are also part of the guards but these are not defined or
discussed here due to restricted in the current version of translation tools.
Conjunction (
) in a guard predicate is a func-
tion of two arguments, such that for any two predicates connected with a conjunc-
tion operator (
): The conjunction operator (
) is translated as follows:
/
/
In the ' C ' Language
BOOL Sum () {
...
if ((a < b) && (P _ State
EVENT Sum
...
WHEN
...
grd3
==
FA L S E )) {
.
/
In the Java language
/
:
a<b
P _ State
=
FA L S E
private boolean Sum ()
{
.
...
if ((a < b) && (P _ State
==
FA L S E ))
{
.
) in a guard predicate is a function
of two arguments. Any two predicates connected with a disjunction operator (
Disjunction (
): The disjunction operator (
)
is translated as follows:
/
In the ' C ' Language
/
BOOL Sum ()
{
...
if ((a < b) || (P _ State == FA L S E )) {
.
EVENT Sum
...
WHEN
...
grd3 : a<b P _ State = FA L S E
.
/
/
In the Java language
private boolean Sum () {
...
if ((a < b) || (P _ State
==
FA L S E )) {
.
Search WWH ::




Custom Search