Sha256: b00ef7257113a766c0ef482a7a278f72b79cf560600f9287e654c4c0329ee831

Contents?: true

Size: 1.49 KB

Versions: 7

Compression:

Stored size: 1.49 KB

Contents

module Stamina
  module Dsl
    module RegLang

      EMPTY_LANG = ::Stamina::RegLang::EMPTY

      #
      # Coerces `arg` to a regular language.
      #
      def regular(arg)
        Stamina::RegLang.coerce(arg)
      end

      #
      # Returns the universal language on a given alphabet.
      #
      def sigma_star(alphabet)
        Stamina::RegLang.sigma_star(alphabet)
      end

      #
      # Coerces `arg` to a prefix-closed regular language.
      #
      def prefix_closed(arg)
        regular(arg).prefix_closed
      end

      #
      # Extracts the short prefixes of a regular language (coerced from `arg`)
      # as a Sample instance.
      #
      def short_prefixes(arg)
        regular(arg).short_prefixes
      end

      #
      # Extracts the kernel of a regular language (coerced from `arg`) as
      # a Sample instance.
      #
      def kernel(arg)
        regular(arg).kernel
      end

      #
      # Extracts a characteristic sample for a regular language (coerced from
      # `arg`) as a Sample instance.
      #
      def characteristic_sample(arg)
        regular(arg).characteristic_sample
      end

      #
      # Hides allbut `alph` symbols in the regular language `arg`
      #
      def project(arg, alph)
        regular(arg).project(alph)
      end

      #
      # Hides `alph` symbols in the regular language `arg`
      #
      def hide(arg, alph)
        regular(arg).hide(alph)
      end

    end # module RegLang
    include RegLang
  end # module Dsl
end # module Stamina

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
stamina-induction-0.6.1 lib/stamina-induction/stamina/dsl/reg_lang.rb
stamina-induction-0.6.0 lib/stamina-induction/stamina/dsl/reg_lang.rb
stamina-induction-0.5.4 lib/stamina-induction/stamina/dsl/reg_lang.rb
stamina-induction-0.5.3 lib/stamina-induction/stamina/dsl/reg_lang.rb
stamina-induction-0.5.2 lib/stamina-induction/stamina/dsl/reg_lang.rb
stamina-induction-0.5.1 lib/stamina-induction/stamina/dsl/reg_lang.rb
stamina-induction-0.5.0 lib/stamina-induction/stamina/dsl/reg_lang.rb