MAJ terminée. Nous sommes passés en version 14.6.2 . Pour consulter les "releases notes" associées c'est ici :

https://about.gitlab.com/releases/2022/01/11/security-release-gitlab-14-6-2-released/
https://about.gitlab.com/releases/2022/01/04/gitlab-14-6-1-released/

Commit eb6efcb2 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

C++ API in __forward_code() (no more used in __forward_init_dynamic())

parent 7f05e596
......@@ -343,17 +343,27 @@ class CLUnfolder(object):
@param clause: a Clause object
@return: the DIMACS coding of the forward shifted clause
"""
num_clause = []
for lit in clause.list_of_literals:
name = lit.name
if name[-1] == '`': # t+1 variable
lit_cod = self.__var_code_table[name[:-1]] + self.__shift_step
else:
lit_cod = self.__var_code_table[name] # t variable
if not lit.sign:
lit_cod = - lit_cod
num_clause.append(lit_cod)
return num_clause
# Old API
# num_clause = []
# for lit in clause.list_of_literals:
# if lit.name[-1] == '`': # t+1 variable
# num_clause.append(
# -(self.__var_code_table[lit.name[:-1]] + self.__shift_step) \
# if not lit.sign \
# else (self.__var_code_table[lit.name[:-1]] + self.__shift_step)
# )
# else: # t variable
# num_clause.append(
# -self.__var_code_table[lit.name] \
# if not lit.sign else self.__var_code_table[lit.name]
# )
# return num_clause
# New API via C++ module
#print(forward_code(clause, self.__var_code_table, self.__shift_step))
return forward_code(clause, self.__var_code_table, self.__shift_step)
def __backward_code(self, clause):
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment