//////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2018, 2026 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
//
// This program and the accompanying materials are made available
// under the terms of the MIT License which is available at
// https://opensource.org/licenses/MIT
//
// SPDX-License-Identifier: MIT
//////////////////////////////////////////////////////////////////////////////

include::../_part_attributes.asciidoc[]

:leveloffset: -2

[[tools-cif2cif-chapter-convert-cntrl-events-to-uncntrl]]
== Convert controllable events to uncontrollable

indexterm:[CIF to CIF transformer,convert controllable events to uncontrollable]
indexterm:[convert controllable events to uncontrollable]
indexterm:[events,convert controllable events to uncontrollable]
This CIF to CIF transformation converts controllable events to uncontrollable.

As `tau` is neither controllable nor uncontrollable, it is not touched by this transformation.

indexterm:[convert controllable events to uncontrollable,supported specifications]

=== Supported specifications

This transformation supports a subset of CIF specifications.
The following restrictions apply:

* Component definitions and component instantiations are not supported.

indexterm:[convert controllable events to uncontrollable,preprocessing]

=== Preprocessing

No preprocessing is currently performed by this CIF to CIF transformation.
To increase the subset of specifications that can be transformed, apply the following <<tools-cif2cif-chapter-index,CIF to CIF transformations>> (in the given order):

* <<tools-cif2cif-chapter-elim-comp-def-inst>>

indexterm:[convert controllable events to uncontrollable,implementation]

=== Implementation details

Each controllable event in the CIF specification is converted to uncontrollable.
For instance, the following specification:

[source, cif]
----
uncontrollable a;
controllable b;

automaton aut:
  location l1:
    initial;
    marked;
    edge a goto l2;
  location l2:
    edge b goto l1;
end
----

is transformed to the following specification:

[source, cif]
----
uncontrollable a;
uncontrollable b;

automaton aut:
  location l1:
    initial;
    marked;
    edge a goto l2;
  location l2:
    edge b goto l1;
end
----

=== Renaming

Event names with the special prefix `c_` are renamed to preserve the event naming convention, see <<lang-tut-synthesis-evtctrl>>.
The prefix `c_` is replaced by `u_`.
In case the new global name is already in use in the specification, a suffix is also added.

=== Size considerations

Controllable events are modified, the size of the specification neither grows nor shrinks.

=== Optimality

n/a

=== Annotations

This transformation does not process or add any annotations.
If the specification has a <<lang-tut-annotations-controller,controller properties annotation>>, it is removed.
