gnatprove_13.2.1_28fc3583/share/examples/spark/spark_book/Chapter-07/density_altitude-temperature_unit.adb

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
with System.Storage_Elements;
package body Density_Altitude.Temperature_Unit
   with Spark_Mode    => On,
        Refined_State => (Temp_State => Temp_Sensor)
is
   Temp_Sensor : Degrees
     with Volatile        => True,
          Async_Writers   => True,
          Address         => System.Storage_Elements.To_Address (16#A1CAF4#);


   procedure Read (Value : out Degrees)
      with Refined_Global  => (Input => Temp_Sensor),
           Refined_Depends => (Value => Temp_Sensor)
   is
   begin
      Value := Temp_Sensor;
   end Read;

end Density_Altitude.Temperature_Unit;