Commit 7a83dfb7 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Clean up code

parent ff289649
with Text_IO; use Text_IO;
with simulator_interface;
with Simulator_Interface;
with Properties; -- user-defined properties
-- To Encode and MD5 the state:
with Gnat.MD5,
Ada.Unchecked_Conversion,
Ada.Streams,
Ada.Strings.Hash,
adaasn1rtl,
adaasn1rtl.encoding;
use Ada.Streams;
with My_Observer;
procedure MC is
use Properties;
......@@ -27,9 +16,6 @@ procedure MC is
Run_Observers => Properties.My_Properties'Access);
use Simulator_Pkg;
-- My_Properties_Access : Check_Properties_Access :=
-- Properties.My_Properties'Access;
-- procedure Encode_And_md5 (State: asn1SccSystem_State) is
-- uPER_Encoded : asn1SccSystem_State_uPER_Stream;
-- uPER_Result : adaasn1rtl.ASN1_RESULT;
......@@ -43,9 +29,6 @@ procedure MC is
begin
Simulator_Pkg.Simulation_Startup;
-- Encode_And_md5 (Simulator.State);
Put_Line ("Now exhausting all interfaces...");
Simulator_Pkg.Run_Exhaustive_Simulation;
end MC;
......@@ -9,8 +9,6 @@ use My_Observer_Datamodel;
with GSER;
-- For the test of the stop condition...
package body Properties is
procedure Update_State (Full_State : in out State_With_Observers;
......
......@@ -2,13 +2,15 @@
with My_Observer;
with My_Observer_Datamodel;
with simulation_dataview; use simulation_dataview;
with Simulation_Dataview; use Simulation_Dataview;
with adaasn1rtl; use adaasn1rtl;
with GSER;
package Properties is
-- The state stored in the graph is defined here, putting together the
-- state of the TASTE system and the state of the observers
type State_With_Observers is tagged
record
User_State : asn1sccSystem_State;
......@@ -24,7 +26,7 @@ package Properties is
procedure Update_State (Full_State : in out State_With_Observers;
Application_State : asn1SccSystem_State);
-- Return a GSER string of the state, useful to print or to compute hash
function State_To_String (Full_State : State_With_Observers) return String is
(GSER.Image (Full_State.User_State) & GSER.Image (Full_State.My_Observer_State));
......@@ -36,9 +38,9 @@ package Properties is
(User_State => asn1sccSystem_State_Init,
My_Observer_State => My_Observer.Ctxt);
procedure My_Properties (Full_State : in out State_With_Observers;
Event : in out asn1sccObservable_Event;
Id : out Natural;
Success : out Boolean);
procedure My_Properties (Full_State : in out State_With_Observers;
Event : in out asn1sccObservable_Event;
Id : out Natural;
Success : out Boolean);
end Properties;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment