README-work

Raku DSL::FiniteStateMachines

In brief

This repository is for a Raku package with class definitions and functions for creation of Finite State Machines (FSMs) and their execution.

Usage example (Address book)

Here we load the definition of the class AddressBookCaller (provided by this package) and related entities package, "DSL::Entity::AddressBook":

use DSL::FiniteStateMachines::AddressBookCaller;

use DSL::Entity::AddressBook;
use DSL::Entity::AddressBook::ResourceAccess;

Here we obtain a resource object to access a (particular) address book:

my $resourceObj = DSL::Entity::AddressBook::resource-access-object();

Here we create the FSM:

my DSL::FiniteStateMachines::AddressBookCaller $abcFSM .= new;

$abcFSM.make-machine(($resourceObj,));

Here is how the dataset of the create FSM looks like:

.say for $abcFSM.dataset.pick(3);

For an interactive execution of the FSM we use the command:

#$abcFSM.run('WaitForCallCommand');

Here we run the FSM with a sequence of commands:

$abcFSM.run('WaitForCallCommand',
        ["call an actor from LOTR", "",
         "take last three", "",
         "take the second", "", "",
         "2", "5", "",
         "quit"]);

Object Oriented Design

Here is the Unified Modeling Language (UML) diagram corresponding to the classes in this package:

image izef_dsl_finitestatemachines_raku_dsl_finitestatemachines_docs_uml_class_diagram_png not found

(The UML spec was automatically generated with "UML::Translators", [AAp5].)

References

Packages

[AAp1] Anton Antonov, DSL::Shared Raku package, (2020), GitHub/antononcube.

[AAp2] Anton Antonov, DSL::Entity::Metadata Raku package, (2021), GitHub/antononcube.

[AAp3] Anton Antonov, DSL::English::DataAcquisitionWorkflows Raku package, (2021), GitHub/antononcube.

[AAp4] Anton Antonov, [DSL::Entity::AddressBook Raku package](https://github.com/antononcube/Raku-DSL-Entity-AddressBook, (2023), GitHub/antononcube.

[AAp5] Anton Antonov, [UML::Translators Raku package](https://github.com/antononcube/Raku-UML-Translators, (2021), GitHub/antononcube.

Videos

[AAv1] Anton Antonov, "Multi-language Data Wrangling and Acquisition Conversational Agents (in Raku)", (2021), YouTube.com.

DSL::FiniteStateMachines v0.1.0

Finite State Machines (FSMs) roles and classes for making conversational agents based on Domain Specific Languages (DSLs).

Authors

  • Anton Antonov

License

Artistic-2.0

Dependencies

DSL::English::DataAcquisitionWorkflows:ver<0.1.1+>DSL::English::DataQueryWorkflows:ver<0.6.1+>DSL::Entity::Metadata::ver<0.1.0+>DSL::Shared:ver<0.1.8+>Data::ExampleDatasets:ver<0.2.3+>Data::Generators:ver<0.1.6+>Data::Reshapers:ver<0.3.0+>Data::Summarizers:ver<0.2.3+>

Test Dependencies

Provides

  • DSL::FiniteStateMachines
  • DSL::FiniteStateMachines::AddressBookCaller
  • DSL::FiniteStateMachines::AddressBookCaller::AddressBookActions
  • DSL::FiniteStateMachines::AddressBookCaller::AddressBookGrammar
  • DSL::FiniteStateMachines::AddressBookCaller::FSMGlobalCommand
  • DSL::FiniteStateMachines::AddressBookCaller::Utilities
  • DSL::FiniteStateMachines::DataObtainer
  • DSL::FiniteStateMachines::DataObtainer::FSMGlobalCommand
  • DSL::FiniteStateMachines::FSMish
  • DSL::FiniteStateMachines::QueryRetrieveActFSMRole

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.