# This file was automatically generated by SWIG (https://www.swig.org).
# Version 4.3.0
#
# Do not make changes to this file unless you know what you are doing - modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _gen
else:
    import _gen

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

_swig_new_instance_method = _gen.SWIG_PyInstanceMethod_New
_swig_new_static_method = _gen.SWIG_PyStaticMethod_New

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "this":
            set(self, name, value)
        elif name == "thisown":
            self.this.own(value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


SHARED_PTR_DISOWN = _gen.SHARED_PTR_DISOWN
import spot.impl
AUT_BEGIN = _gen.AUT_BEGIN
AUT_KS_NCA = _gen.AUT_KS_NCA
r"""
    A family of co-Büchi automata.

    Builds a co-Büchi automaton of size 2n+1 that is
    good-for-games and that has no equivalent deterministic
    co-Büchi automaton with less than 2^n / (2n+1) states.
    'kuperberg.15.icalp'

    Only defined for n>0.
    """
AUT_L_NBA = _gen.AUT_L_NBA
r"""
    Hard-to-complement non-deterministic Büchi automata

    Build a non-deterministic Büchi automaton with 3n+1 states
    and whose complementary language requires an automaton with
    at least n! states if Streett acceptance is used.

    Only defined for n>0.  The automaton constructed corresponds
    to the right part of Fig.1 of 'loding.99.fstts' , except
    that only state q_1 is initial.  (The fact that states q_2,
    q_3, ..., and q_n are not initial as in the paper does not
    change the recognized language.)
    """
AUT_L_DSA = _gen.AUT_L_DSA
r"""
    DSA hard to convert to DRA.

    Build a deterministic Streett automaton with 4n states, and n
    acceptance pairs, such that an equivalent deterministic Rabin
    automaton would require at least n! states.

    Only defined for 1<n<=16 because Spot does not support more
    than 32 acceptance pairs.

    This automaton corresponds to the right part of Fig.2 of
    'loding.99.fstts' .
    """
AUT_M_NBA = _gen.AUT_M_NBA
r"""
    An NBA with (n+1) states whose complement needs ≥n! states

    This automaton is usually attributed to Max Michel (1988),
    who described it in some unpublished document.  Other
    descriptions of this automaton can be found in a number
    of papers 'thomas.97.chapter' .

    Our implementation uses ⌈log₂(n+1)⌉ atomic
    propositions to encode the $n+1$ letters used in the
    original alphabet.
    """
AUT_CYCLIST_TRACE_NBA = _gen.AUT_CYCLIST_TRACE_NBA
r"""
    An NBA with (n+2) states derived from a Cyclic test
    case.

    This family of automata is derived from a couple of
    examples supplied by Reuben Rowe.  The task is to
    check that the automaton generated with AUT_CYCLIST_TRACE_NBA
    for a given n contain the automaton generated with
    AUT_CYCLIST_PROOF_DBA for the same n.
    """
AUT_CYCLIST_PROOF_DBA = _gen.AUT_CYCLIST_PROOF_DBA
r"""
    A DBA with (n+2) states derived from a Cyclic test
    case.

    This family of automata is derived from a couple of
    examples supplied by Reuben Rowe.  The task is to
    check that the automaton generated with AUT_CYCLIST_TRACE_NBA
    for a given n contain the automaton generated with
    AUT_CYCLIST_PROOF_DBA for the same n.
    """
AUT_CYCLE_LOG_NBA = _gen.AUT_CYCLE_LOG_NBA
r"""
    cycles of n letters repeated n times

    This is a Büchi automaton with n^2 states, in which each
    state i has a true self-loop and a successor labeled by the
    (i%n)th letter.  Only the states that are multiple of n have
    no self-loop and are accepting.

    This version uses log(n) atomic propositions to
    encode the n letters as minterms.
    """
AUT_CYCLE_ONEHOT_NBA = _gen.AUT_CYCLE_ONEHOT_NBA
r"""
    cycles of n letters repeated n times

    This is a Büchi automaton with n^2 states, in which each
    state i has a true self-loop and a successor labeled by the
    (i%n)th letter.  Only the states that are multiple of n have
    no self-loop and are accepting.

    This version uses one-hot encoding of letters, i.e., n atomic
    propositions are used, but only one is positive (except on
    true self-loops).
    """
AUT_EL_EMPTY = _gen.AUT_EL_EMPTY
r"""
    One-state automaton used to benchmark emptiness checks.

    Generates _{k,N}:math:`: a single-state automaton with an empty alphabet, one unmarked self-loop, and \f$N`
    self-loops for each color in = ,,k-1:math:`. The acceptance condition is`_A^k = _A
    (k):math:`, where`_A:math:`is defined recursively as`_= :math:`and`_A = _{iA}((i)
    (_{A(i))):math:`.  Color \f$k` never appears on any edge, so the automaton is
    empty.

    Requires 1:math:`and \f$N \geq 1`.
    """
AUT_END = _gen.AUT_END
aut_pattern = _gen.aut_pattern
aut_pattern_name = _gen.aut_pattern_name
aut_pattern_argc = _gen.aut_pattern_argc
aut_pattern_max = _gen.aut_pattern_max
LTL_BEGIN = _gen.LTL_BEGIN
LTL_AND_F = _gen.LTL_AND_F
r"""
    `F(p1)&F(p2)&...&F(pn)`
    'geldenhuys.06.spin'
    """
LTL_AND_FG = _gen.LTL_AND_FG
r"""`FG(p1)&FG(p2)&...&FG(pn)`"""
LTL_AND_GF = _gen.LTL_AND_GF
r"""
    `GF(p1)&GF(p2)&...&GF(pn)`
    'cichon.09.depcos' ,
    'geldenhuys.06.spin' .
    """
LTL_CCJ_ALPHA = _gen.LTL_CCJ_ALPHA
r"""
    `F(p1&F(p2&F(p3&...F(pn)))) & F(q1&F(q2&F(q3&...F(qn))))`
    'cichon.09.depcos'
    """
LTL_CCJ_BETA = _gen.LTL_CCJ_BETA
r"""
    `F(p&X(p&X(p&...X(p)))) & F(q&X(q&X(q&...X(q))))`
    'cichon.09.depcos'
    """
LTL_CCJ_BETA_PRIME = _gen.LTL_CCJ_BETA_PRIME
r"""
    `F(p&(Xp)&(XXp)&...(X...X(p))) & F(q&(Xq)&(XXq)&...(X...X(q)))`
    'cichon.09.depcos'
    """
LTL_DAC_PATTERNS = _gen.LTL_DAC_PATTERNS
r"""
    55 specification patterns from Dwyer et al.
    'dwyer.98.fmsp'
    """
LTL_EH_PATTERNS = _gen.LTL_EH_PATTERNS
r"""
    12 formulas from Etessami and Holzmann.
    'etessami.00.concur'
    """
LTL_EIL_GSI = _gen.LTL_EIL_GSI
r"""Family sent by Edmond Irani Liu"""
LTL_FXG_OR = _gen.LTL_FXG_OR
r"""`F(p0 | XG(p1 | XG(p2 | ... XG(pn))))`"""
LTL_GF_EQUIV = _gen.LTL_GF_EQUIV
r"""`(GFa1 & GFa2 & ... & GFan) <-> GFz`"""
LTL_GF_EQUIV_XN = _gen.LTL_GF_EQUIV_XN
r"""`GF(a <-> X[n](a))`"""
LTL_GF_IMPLIES = _gen.LTL_GF_IMPLIES
r"""`(GFa1 & GFa2 & ... & GFan) -> GFz`"""
LTL_GF_IMPLIES_XN = _gen.LTL_GF_IMPLIES_XN
r"""`GF(a -> X[n](a))`"""
LTL_GH_Q = _gen.LTL_GH_Q
r"""
    `(F(p1)|G(p2))&(F(p2)|G(p3))&...&(F(pn)|G(p{n+1}))`
    'geldenhuys.06.spin'
    """
LTL_GH_R = _gen.LTL_GH_R
r"""
    `(GF(p1)|FG(p2))&(GF(p2)|FG(p3))&...  &(GF(pn)|FG(p{n+1}))`
    'geldenhuys.06.spin'
    """
LTL_GO_THETA = _gen.LTL_GO_THETA
r"""
    `!((GF(p1)&GF(p2)&...&GF(pn)) -> G(q->F(r)))`
    'gastin.01.cav'
    """
LTL_GXF_AND = _gen.LTL_GXF_AND
r"""`G(p0 & XF(p1 & XF(p2 & ... XF(pn))))`"""
LTL_HKRSS_PATTERNS = _gen.LTL_HKRSS_PATTERNS
r"""
    55 patterns from the Liberouter project.
    'holevek.04.tr'
    """
LTL_KR_N = _gen.LTL_KR_N
r"""
    Linear formula with doubly exponential DBA.
    'kupferman.10.mochart'
    Describes an obligation property, but is not a syntactic obligation.
    """
LTL_KR_N_DELTA1 = _gen.LTL_KR_N_DELTA1
r"""
    Quasilinear formula with doubly exponential DBA.
    This is a variation on the original formula from
    'kupferman.10.mochart'
    such that the formula is a syntactic obligation
    equivalent to the original formula.
    """
LTL_KR_NLOGN = _gen.LTL_KR_NLOGN
r"""
    Quasilinear formula with doubly exponential DBA.
    'kupferman.10.mochart'
    Describes an obligation property, but is not a syntactic obligation.
    """
LTL_KR_NLOGN_DELTA1 = _gen.LTL_KR_NLOGN_DELTA1
r"""
    Quasilinear formula with doubly exponential DBA.
    This is a variation on the original formula from
    'kupferman.10.mochart'
    such that the formula is a syntactic obligation
    equivalent to the original formula.
    """
LTL_KV_PSI = _gen.LTL_KV_PSI
r"""
    Quadratic formula with doubly exponential DBA.
    'kupferman.10.mochart' ,
    'kupferman.05.tcl' .
    Describes an obligation property, but is not a syntactic obligation.
    """
LTL_LILY_PATTERNS = _gen.LTL_LILY_PATTERNS
r"""
    LTL synthesis examples specification from the Lily 1.0.2
    distribution.  'jobsmann.06.fmcad'
    """
LTL_MS_EXAMPLE = _gen.LTL_MS_EXAMPLE
r"""
    `GF(a1&X(a2&X(a3&...Xan)))&F(b1&F(b2&F(b3&...&Xbm)))`
    'muller.17.gandalf'
    """
LTL_MS_PHI_H = _gen.LTL_MS_PHI_H
r"""
    `FG(a|b)|FG(!a|Xb)|FG(a|XXb)|FG(!a|XXXb)|...`
    'muller.17.gandalf'
    """
LTL_MS_PHI_R = _gen.LTL_MS_PHI_R
r"""
    `(FGa{n}&GFb{n})|((FGa{n-1}|GFb{n-1})&(...))`
    'muller.17.gandalf'
    """
LTL_MS_PHI_S = _gen.LTL_MS_PHI_S
r"""
    `(FGa{n}|GFb{n})&((FGa{n-1}&GFb{n-1})|(...))`
    'muller.17.gandalf'
    """
LTL_OR_FG = _gen.LTL_OR_FG
r"""
    `FG(p1)|FG(p2)|...|FG(pn)`
    'cichon.09.depcos'
    """
LTL_OR_G = _gen.LTL_OR_G
r"""
    `G(p1)|G(p2)|...|G(pn)`
    'geldenhuys.06.spin'
    """
LTL_OR_GF = _gen.LTL_OR_GF
r"""
    `GF(p1)|GF(p2)|...|GF(pn)`
    'geldenhuys.06.spin'
    """
LTL_P_PATTERNS = _gen.LTL_P_PATTERNS
r"""
    20 formulas from BEEM.
    'pelanek.07.spin'
    """
LTL_PPS_ARBITER_STANDARD = _gen.LTL_PPS_ARBITER_STANDARD
r"""
    Arbiter for n clients sending requests, and receiving
    grants. 'piterman.06.vmcai' using standard
    semantics from 'jacobs.16.synt' .
    """
LTL_PPS_ARBITER_STRICT = _gen.LTL_PPS_ARBITER_STRICT
r"""
    Arbiter for n clients sending requests, and receiving
    grants. 'piterman.06.vmcai' using strict
    semantics from 'jacobs.16.synt' .
    """
LTL_R_LEFT = _gen.LTL_R_LEFT
r"""`(((p1 R p2) R p3) ... R pn)`"""
LTL_R_RIGHT = _gen.LTL_R_RIGHT
r"""`(p1 R (p2 R (... R pn)))`"""
LTL_RV_COUNTER = _gen.LTL_RV_COUNTER
r"""
    n-bit counter
    'rozier.07.spin'
    """
LTL_RV_COUNTER_CARRY = _gen.LTL_RV_COUNTER_CARRY
r"""
    n-bit counter with carry
    'rozier.07.spin'
    """
LTL_RV_COUNTER_CARRY_LINEAR = _gen.LTL_RV_COUNTER_CARRY_LINEAR
r"""
    linear-size formula for an n-bit counter with carry
    'rozier.07.spin'
    """
LTL_RV_COUNTER_LINEAR = _gen.LTL_RV_COUNTER_LINEAR
r"""
    linear-size formula for an n-bit counter
    'rozier.07.spin'
    """
LTL_SB_PATTERNS = _gen.LTL_SB_PATTERNS
r"""
    27 formulas from Somenzi and Bloem
    'somenzi.00.cav'
    """
LTL_SEJK_F = _gen.LTL_SEJK_F
r"""
    `f(0,j)=(GFa0 U X^j(b))`, `f(i,j)=(GFai U G(f(i-1,j)))`
    'sickert.16.cav'
    """
LTL_SEJK_J = _gen.LTL_SEJK_J
r"""
    `(GFa1&...&GFan) -> (GFb1&...&GFbn)`
    'sickert.16.cav'
    """
LTL_SEJK_K = _gen.LTL_SEJK_K
r"""
    `(GFa1|FGb1)&...&(GFan|FGbn)`
    'sickert.16.cav'
    """
LTL_SEJK_PATTERNS = _gen.LTL_SEJK_PATTERNS
r"""
    3 formulas from Sickert et al.
    'sickert.16.cav'
    """
LTL_TV_F1 = _gen.LTL_TV_F1
r"""
    `G(p -> (q | Xq | ... | XX...Xq)`
    'tabakov.10.rv'
    """
LTL_TV_F2 = _gen.LTL_TV_F2
r"""
    `G(p -> (q | X(q | X(... | Xq)))`
    'tabakov.10.rv'
    """
LTL_TV_G1 = _gen.LTL_TV_G1
r"""
    `G(p -> (q & Xq & ... & XX...Xq)`
    'tabakov.10.rv'
    """
LTL_TV_G2 = _gen.LTL_TV_G2
r"""
    `G(p -> (q & X(q & X(... & Xq)))`
    'tabakov.10.rv'
    """
LTL_TV_UU = _gen.LTL_TV_UU
r"""
    `G(p1 -> (p1 U (p2 & (p2 U (p3 & (p3 U ...))))))`
    'tabakov.10.rv'
    """
LTL_U_LEFT = _gen.LTL_U_LEFT
r"""
    `(((p1 U p2) U p3) ... U pn)`
    'geldenhuys.06.spin'
    """
LTL_U_RIGHT = _gen.LTL_U_RIGHT
r"""
    `(p1 U (p2 U (... U pn)))`
    'geldenhuys.06.spin' ,
    'gastin.01.cav' .
    """
LTLF_CHOMP_MEALY = _gen.LTLF_CHOMP_MEALY
r"""Chomp game specified in LTLf with Mealy semantics"""
LTLF_TV_COUNTER_MEALY = _gen.LTLF_TV_COUNTER_MEALY
r"""
    Single Counter LTLf with Mealy semantics
    'tabajara.19.ijcai'
    """
LTLF_TV_DOUBLE_COUNTERS_MEALY = _gen.LTLF_TV_DOUBLE_COUNTERS_MEALY
r"""
    Double Counters LTLf with Mealy semantics
    'tabajara.19.ijcai'
    """
LTLF_TV_NIM_MEALY = _gen.LTLF_TV_NIM_MEALY
r"""
    Nim game specified in LTLf with Mealy semantics
    'tabajara.19.ijcai'
    """
LTL_END = _gen.LTL_END
ltl_pattern = _gen.ltl_pattern
ltl_pattern_name = _gen.ltl_pattern_name
ltl_pattern_max = _gen.ltl_pattern_max
ltl_pattern_argc = _gen.ltl_pattern_argc

def ltl_patterns(*args):
  """
  Generate LTL patterns.

  Each argument should specify a pattern with a
  range for its parameter(s).

  For single-parameter patterns, arguments of
  ltl_patterns() should be have one of these three forms:
    - (id, n)
    - (id, min, max)
    - id
  In the first case, the pattern id=n is generated.  In the second
  case, all pattern id=n for min<=n<=max are generated.  The
  third case is a shorthand for (id, 1, 10), except when
  id denotes one of the hard-coded list of LTL formulas (like,
  DAC_PATTERNS, EH_PATTERNS, etc.) where all formulas from that
  list are output.

  For two-parameter patterns, arguments of
  ltl_patterns() should be have one of these four forms:
    - (id, n1)
    - (id, n1, n2)
    - (id, min1, max1, min2, max2)
    - id
  In the first case, n2 is assumed to be equal to n1.  In
  the third case, all combination of n1 and n2 such that
  min1<=n1<=max1 and min2<=n2<=max2 are generated.  The
  last case is a shorthand for (id, 1, 3, 1, 3).
  """
  for spec in args:
    min2 = -1
    max2 = -1
    if type(spec) is int:
      pat = spec
      min = 1
      argc = ltl_pattern_argc(spec)
      if argc == 1:
        max = ltl_pattern_max(spec) or 10
      else:
        min2 = 1
        max = max2 = 3
    else:
      argc = ltl_pattern_argc(spec[0])
      ls = len(spec)
      if argc == 1:
        if ls == 2:
          pat, min, max = spec[0], spec[1], spec[1]
        elif ls == 3:
          pat, min, max = spec
        else:
          raise RuntimeError("invalid pattern specification " + str(spec))
      else:
        if ls == 2:
          pat, min, max, min2, max2 = \
            spec[0], spec[1], spec[1], spec[1], spec[1]
        elif ls == 3:
          pat, min, max, min2, max2 = \
            spec[0], spec[1], spec[1], spec[2], spec[2]
        elif ls == 5:
          pat, min, max, min2, max2 = spec
        else:
          raise RuntimeError("invalid pattern specification " + str(spec))
    for n in range(min, max + 1):
      for m in range(min2, max2 + 1):
        yield ltl_pattern(pat, n, m)


# Override aut_pattern now(), because %feature("shadow") does not
# seem to work correctly.  See https://github.com/swig/swig/issues/980
def aut_pattern(pattern: 'spot::gen::aut_pattern_id', n: 'int',
                m: 'int' = -1,
                dict: 'spot::bdd_dict_ptr' = None) -> "spot::twa_graph_ptr":
  if m < 0:
    return _gen.aut_pattern(pattern, n, dict or spot._bdd_dict)
  else:
    return _gen.aut_pattern(pattern, n, m, dict or spot._bdd_dict)


def aut_patterns(*args):
  """
  Generate automata patterns.

  For single-parameter patterns, arguments of
  aut_patterns() should have one of these three forms:
    - (id, n)
    - (id, min, max)
    - id
  In the first case, the pattern id=n is generated.  In the second
  case, all pattern id=n for min<=n<=max are generated.  The
  third case is a shorthand for (id, 1, 10).

  For two-parameter patterns, arguments of
  aut_patterns() should have one of these four forms:
    - (id, n1)
    - (id, n1, n2)
    - (id, min1, max1, min2, max2)
    - id
  In the first case, n2 is assumed to be equal to n1.  In the third
  case, n2 is the second argument (not the max of a range).  In the
  fourth case, all combinations are generated.  The last case is a
  shorthand for (id, 1, 3, 1, 3).
  """
  for spec in args:
    min2 = -1
    max2 = -1
    if type(spec) is int:
      pat = spec
      min = 1
      argc = aut_pattern_argc(spec)
      if argc == 1:
        max = 10
      else:
        min2 = 1
        max = max2 = 3
    else:
      argc = aut_pattern_argc(spec[0])
      ls = len(spec)
      if argc == 1:
        if ls == 2:
          pat, min, max = spec[0], spec[1], spec[1]
        elif ls == 3:
          pat, min, max = spec
        else:
          raise RuntimeError("invalid pattern specification " + str(spec))
      else:
        if ls == 2:
          pat, min, max, min2, max2 = \
            spec[0], spec[1], spec[1], spec[1], spec[1]
        elif ls == 3:
          pat, min, max, min2, max2 = \
            spec[0], spec[1], spec[1], spec[2], spec[2]
        elif ls == 5:
          pat, min, max, min2, max2 = spec
        else:
          raise RuntimeError("invalid pattern specification " + str(spec))
    for n in range(min, max + 1):
      for m in range(min2, max2 + 1):
        yield aut_pattern(pat, n, m)


