All Downloads are FREE. Search and download functionalities are using the official Maven repository.

aiddl-test.automata.dfa-01.aiddl Maven / Gradle / Ivy

Go to download

Provides common types and algorithm implementations for the fast prototyping integrative AI systems with the AIDDL framework.

The newest version!
(#mod self org.aiddl.test.automata.dfa)

(#req eval org.aiddl.eval.namespace)
(#nms nms-type type-ops@eval)

(#req A org.aiddl.common.execution.automata.discrete-finite-state-machine)
(#req R org.aiddl.core.util.request)

(^DFSM@A dfa
          (
            {s1 s2}
            {a b}
            {
              (s1 a) : s1
              (s1 b) : s2
              (s2 b) : s2
            }
            s1
            {s2}
          )
        )

(^State@A   s s1)
(^Event@A   e b)
(boolean is-final-state false)

(^ServiceCfgs@R service-configs
  [
    (name    : DFSM
     service : org.aiddl.common.java.automata.DeterministicFiniteStateMachine
     config : [ ignoreEvent : none, defaultBehavior : panic ])

  ])

(^Request@R main
  [
    (init DFSM $dfa)
    (call DFSM (step a) s)
;;    (print DFSM $s)
    (call DFSM (multi-step [a a a a a a]) s)
;;    (print DFSM $s)
    (call DFSM (step b s) s)
    (call DFSM is-final-state is-final-state)
;;    (print DFSM ($s $is-final-state))        
  ])




© 2015 - 2025 Weber Informatics LLC | Privacy Policy