Python Module faudes: Functions

libFAUDES is organised in functins that operate on data of specific types, both registered with a run time interface and docuented by the User Reference. In this section, we provide further information of how those functions can be accessed from within Python.

Calling libFAUDES Functions

Most algorithms implemented in libFAUDES are also available in the Python module. To get a list of the available algorithms from the libFAUDES core, type faudes.Help("Functions"):

libFAUDES help topic: "Functions" [extract]

                 *** Regular expressions ***
                bool LanguageEquality(gen1_arg, gen2_arg)
                bool LanguageIncludion(gen1_arg, gen2_arg)
                bool LanguageDisjoint(gen1_arg, gen2_arg)
                     LanguageComplement(gen)
                     LanguageConcatenate(gen1_arg, gen2_arg, gen_res)
                     LanguageConcatenateNonDet(gen1_arg, gen2_arg, gen_res)
                     LanguageUnion(gen1_arg, gen2_arg, gen_res)
                     LanguageIntersection(gen1_arg, gen2_arg, gen_res)
                     FullLanguage(alph_arg, gen_res)
                     AlphabetLanguage(alph_arg, gen_res)
                     KleeneClosure(gen)
                     KleeneClosureNonDet(gen)

                 *** Reachability ***
                     Accessible(gen)
                bool IsAccessible(gen_arg)
                     CoAccessible(gen)
                bool IsCoAccessible(gen_arg)
                     Trim(gen)
                bool IsTrim(gen_arg)
		     
                 *** Misc ***
                bool IsDeterministic(gen_arg)
                     Deterministic(gen_arg, gen_res)
                     StateMin(gen_arg, gen_res
                     Project(gen, alph)
                     InvProject(gen, alph)
                     PrefixClosure(gen)

For full list of provided functions, see the user reference.

As an exmple, lets consider the function LanguageUnion. This function is advertised in the user reference as follows with the following two signatures

LanguageUnion(+In+ Generator G1, +In+ Generator G2, +Out+ Generator GRes)
LanguageUnion(+In+ GeneratorVector GVec, +Out+ Generator GRes)

Referring to the first variant, we may invoke the function on two generator arguments as input data to compute a third generator as a result. Python example:

>>> from faudes import *
>>> g1=Generator('./file1.gen')  
>>> g2=Generator('./file2.gen')
>>> gunion=Generator()
>>> LanguageUnion(g1,g2,gunion)
>>> gunion.Write()
i.e., read two generators from file and compute a generator to realise the union of both associated languages. If there is only one argument in the role of a result (indicated by +OUT+), the libFAUDES build system will generate a convenience wrapper to instantiate the result. Our example then becomes more concise:
>>> from faudes import *
>>> g1=Generator('./file1.gen')  
>>> g2=Generator('./file2.gen')
>>> gunion=LanguageUnion(g1,g2)
>>> gunion.Write()

The tutorial section of the PyBindings plug-in provides a tutorial on regular expressions, to demonstrate access to libFAUDES functions. Other plug-ins provide additional tutorials.

libFAUDES 2.34g --- 2026.03.30 --- with "omegaaut-synthesis-observer-observability-diagnosis-hiosys-iosystem-multitasking-coordinationcontrol-timed-simulator-iodevice-priorities-luabindings-hybrid-example-pybindings"