parameters: (self, init: PropagateInit)
docstring: Initialize the solvers for the check programs.
docstring_summary: Initialize the solvers for the check programs.
docstring_tokens: Initialize the solvers for the check programs .
function: def init(self, init: PropagateInit):
          """
          Initialize the solvers for the check programs.
          """
          # we need a checker for each thread (to be able to solve in parallel)
          for _ in range(init.number_of_threads):
              checker = Checker()
              self._checkers.append(checker)
  
              with checker.backend() as backend:
                  for atom in init.symbolic_atoms:
                      guess_lit = init.solver_literal(atom.literal)
                      guess_truth = init.assignment.value(guess_lit)
  
                      # ignore false atoms
                      if guess_truth is False:
                          continue
  
                      check_lit = backend.add_atom(atom.symbol)
  
                      # fix true atoms
                      if guess_truth is True:
                          backend.add_rule([check_lit], [])
  
                      # add a choice rule for unknow atoms and add them to the
                      # mapping table of the checker
                      else:
                          backend.add_rule([check_lit], [], True)
                          checker.add(guess_lit, check_lit)
  
              checker.ground(self._check)
function_tokens: def init ( self , init : PropagateInit ) : # we need a checker for each thread (to be able to solve in parallel) for _ in range ( init . number_of_threads ) : checker = Checker ( ) self . _checkers . append ( checker ) with checker . backend ( ) as backend : for atom in init . symbolic_atoms : guess_lit = init . solver_literal ( atom . literal ) guess_truth = init . assignment . value ( guess_lit ) # ignore false atoms if guess_truth is False : continue check_lit = backend . add_atom ( atom . symbol ) # fix true atoms if guess_truth is True : backend . add_rule ( [ check_lit ] , [ ] ) # add a choice rule for unknow atoms and add them to the # mapping table of the checker else : backend . add_rule ( [ check_lit ] , [ ] , True ) checker . add ( guess_lit , check_lit ) checker . ground ( self . _check )