• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

4.21 Analysing and Constructing Terms
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Analysing and Constructing Terms
          • functor/3
          • functor/4
          • arg/3
          • =../2
          • compound_name_arity/3
          • compound_name_arguments/3
          • numbervars/3
          • numbervars/4
          • var_number/2
          • term_variables/2
          • nonground/2
          • term_variables/3
          • term_singletons/2
          • is_most_general_term/1
          • copy_term/2
          • copy_term/4
          • copy_term_nat/4
          • term_factorized/3
          • term_factorized/4
          • term_minimal/2
          • term_automaton/2
          • automaton_minimal/2
          • automaton_minimal/3
          • Non-logical operations on terms
    • Packages
Availability:built-in
[det]automaton_minimal(+Automaton, -Minimal)
True when Minimal denotes the same tree as Automaton using the least possible number of states. States that are bisimilar are collapsed, and states the start state cannot reach are dropped:
?- automaton_minimal(automaton(f(2,3), g(1), g(1), a, h(4)), M).
M = automaton(f(2, 2), g(1)).

State 1 of Minimal is still the start state, and the states are numbered depth first from it, so the answer does not depend on the order Automaton happened to be written in. Two automata therefore denote the same tree exactly when their minimal forms are =@=/2, and automaton_minimal/2 is idempotent.

Together with term_automaton/2 this is term_minimal/2:

term_minimal(T, M) :-
    term_automaton(T, A),
    automaton_minimal(A, A1),
    term_automaton(M, A1).

The transition relation is a function: a state has exactly one successor per argument position. Nondeterministic transition systems are not supported.

ClioPatria (version V3.1.1-59-g7b9a7a3)