|
|
||||||
|
Tutorial, verification of properties of natural projections. More... #include <stdio.h> #include <iostream> #include "libfaudes.h" #include "op_include.h" Go to the source code of this file.
Detailed DescriptionTutorial, verification of properties of natural projections. This tutorial explains the routines for verifying if the Lm-observer condition, output control consistency (OCC) or local control consistency (LCC) are fulfilled for a given natural projection. The computations are carried out with a given generator and a given high-level alphabet. /** @file op_ex_verification.cpp
Tutorial, verification of properties of natural projections.
This tutorial explains the routines for verifying if the Lm-observer condition, output control consistency (OCC)
or local control consistency (LCC) are fulfilled for a given natural projection. The computations are carried out
with a given generator and a given high-level alphabet.
@ingroup Tutorials
@include op_ex_verification.cpp
*/
#include <stdio.h>
#include <iostream>
#include "libfaudes.h"
#include "op_include.h"
// make libFAUDES namespace available
using namespace faudes;
//////////////////////////////////////////
//Verification of the Lm-observer property
//////////////////////////////////////////
// construct original Generator from file
// construct abstraction alphabet from file
// verify if the natural projection on highAlph is an Lm-observer and output the result.
// In this example, the Lm-observer property is violated.
bool observer = IsObs(genOrig, highAlph);
std::cout << "##################################\n";
std::cout << "# Observer verification result: " << observer << std::endl;
std::cout << "##################################\n";
// read a new generator and a new high-level alphabet
genOrig.Read("data/ex_verification/ex_is_observer.gen");
highAlph.Read("data/ex_verification/ex_is_observer.alph", "Alphabet");
// verify if the natural projection on the current highAlph is an Lm-observer and output the result.
// In this example, the Lm-observer property is fulfilled.
observer = IsObs(genOrig, highAlph);
std::cout << "##################################\n";
std::cout << "Observer verification result: " << observer << std::endl;
std::cout << "##################################\n";
///////////////////////////////////////////////////////////////
//Verification of the output control consistency (OCC) property
///////////////////////////////////////////////////////////////
//verify if the natural projection on highAlph fulfills OCC for the previously read generator and alphabet.
// In this example, OCC is violated.
bool occ = IsOCC(genOrig, highAlph);
std::cout << "###########################\n";
std::cout << "OCC verification result: " << occ << std::endl;
std::cout << "###########################\n";
// read a new generator that fulfills OCC together with the previous highAlph
genOrig.Read("data/ex_verification/ex_is_occ.gen");
//Verification of the output control consistency (OCC) property. In this case, OCC is fulfilled.
occ = IsOCC(genOrig, highAlph);
std::cout << "###########################\n";
std::cout << "OCC verification result: " << occ << std::endl;
std::cout << "###########################\n";
//////////////////////////////////////////////////////////////
//Verification of the local control consistency (LCC) property
//////////////////////////////////////////////////////////////
//verify if the natural projection on highAlph fulfills LCC. In this case, LCC is fulfilled (OCC implies LCC).
bool lcc = IsLCC(genOrig, highAlph);
std::cout << "###########################\n";
std::cout << "lcc verification result: " << lcc << std::endl;
std::cout << "###########################\n";
// read a new generator that does not fulfill LCC with highAlph.
genOrig.Read("data/ex_verification/ex_is_observer.gen");
//verify if the natural projection on highAlph fulfills LCC. In this case, LCC is violated.
lcc = IsLCC(genOrig, highAlph);
std::cout << "###########################\n";
std::cout << "lcc verification result: " << lcc << std::endl;
std::cout << "###########################\n";
// read a new generator that fulfills LCC together with highAlph
genOrig.Read("data/ex_verification/ex_is_lcc.gen");
//Verification of the local control consistency (LCC) property. In this case, LCC is fulfilled.
lcc = IsLCC(genOrig, highAlph);
std::cout << "###########################\n";
std::cout << "lcc verification result: " << lcc << std::endl;
std::cout << "###########################\n";
return 0;
}
vGenerator Generator Plain generator, api typedef for generator with no attributes. Definition: cfl_generator.h:3240 TcGenerator< AttributeVoid, AttributeVoid, AttributeCFlags, AttributeVoid > System Convenience typedef for std System. Definition: cfl_cgenerator.h:921 bool IsOCC(const System &rLowGen, const EventSet &rHighAlph) Verification of output control consistency (OCC). Definition: op_obserververification.cpp:86 bool IsLCC(const System &rLowGen, const EventSet &rHighAlph) Verification of local control consistency (LCC). Definition: op_obserververification.cpp:157 bool IsObs(const Generator &rLowGen, const EventSet &rHighAlph) Verification of the natural observer property. Definition: op_obserververification.cpp:38 Includes all libFAUDES headers, incl plugings Includes all observer plugin headers. Definition in file op_ex_verification.cpp. Function Documentation◆ main()
Definition at line 23 of file op_ex_verification.cpp. libFAUDES 2.32f --- 2024.12.22 --- c++ api documentaion by doxygen |