You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
3.1 KiB

6 months ago
  1. We start by translating $\varphi$ to $\hat{\varphi} = \skel$ and assign the following variables to the theory literals:
  2. \begin{itemize}
  3. \item $e_{0}\Leftrightarrow(f(a)=b)$
  4. \item $e_{1}\Leftrightarrow(f(a)=c)$
  5. \item $e_{2}\Leftrightarrow(b=c)$
  6. \item $e_{3}\Leftrightarrow(a=b)$
  7. \end{itemize}
  8. $\hat{\varphi} = (\clause{e_{0}; e_{1}; \lnot e_{2}}) \land (\clause{e_{2}; e_{3}; e_{0}}) \land (\clause{\lnot e_{0}; e_{3}}) \land (\clause{e_{2}; \lnot e_{3}; \lnot e_{0}}) \land (\clause{\lnot e_{1}; e_{2}}) \land (\clause{\lnot e_{1}; e_{2}; \lnot e_{3}}) \land (\clause{e_{0}; e_{1}}) $
  9. \hspace{-0.09cm}\scalebox{0.85}{
  10. \begin{dplltabular}{4}
  11. \dpllStep{1|2|3|4}
  12. \dpllDecL{0|1|1|1}
  13. \dpllAssi{ - |$\lnot e_{0}$|$\lnot e_{0}, e_{1}$|$\lnot e_{0}, e_{1}, e_{2}$}
  14. \dpllClause{1}{$e_{0}, e_{1}, \lnot e_{2}$}{$e_{0}, e_{1}, \lnot e_{2}$|$e_{1}, \lnot e_{2}$|\done|\done}
  15. \dpllClause{2}{$e_{2}, e_{3}, e_{0}$}{$e_{2}, e_{3}, e_{0}$|$e_{2}, e_{3}$|$e_{2}, e_{3}$|\done}
  16. \dpllClause{3}{$\lnot e_{0}, e_{3}$}{$\lnot e_{0}, e_{3}$|\done|\done|\done}
  17. \dpllClause{4}{$e_{2}, \lnot e_{3}, \lnot e_{0}$}{$e_{2}, \lnot e_{3}, \lnot e_{0}$|\done|\done|\done}
  18. \dpllClause{5}{$\lnot e_{1}, e_{2}$}{$\lnot e_{1}, e_{2}$|$\lnot e_{1}, e_{2}$|$e_{2}$|\done}
  19. \dpllClause{6}{$\lnot e_{1}, e_{2}, \lnot e_{3}$}{$\lnot e_{1}, e_{2}, \lnot e_{3}$|$\lnot e_{1}, e_{2}, \lnot e_{3}$|$e_{2}, \lnot e_{3}$|\done}
  20. \dpllClause{7}{$e_{0}, e_{1}$}{$e_{0}, e_{1}$|$e_{1}$|\done|\done}
  21. \dpllBCP{ - |$e_{1}$|$e_{2}$| - }
  22. \dpllPL{ - | - | - | - }
  23. \dpllDeci{$\lnot e_{0}$| - | - | - }
  24. \end{dplltabular}
  25. }
  26. $\Model_{\EUF} := \{(f(a) \neq b), (f(a) = c), (b = c)\} $ \\
  27. Check if the assignment is consistent with the theory:
  28. \begin{align*}
  29. &\{f(a), c\}, \{b, c\}\\
  30. &\{b, c, f(a)\}
  31. \end{align*}
  32. $\Model_{\EUF}$ is not consistent with the theory, because of: $(f(a) \neq b) $\\
  33. $\Rightarrow$ We need to add a blocking clause from $\Model_{\EUF}$:
  34. $BC_8 := e_0 \lor \neg e_1 \lor \neg e_2 $ \\
  35. \hspace{-0.09cm}\scalebox{0.85}{
  36. \begin{dplltabular}{4}
  37. \dpllStep{5|6|7|8}
  38. \dpllDecL{0|1|1|1}
  39. \dpllAssi{ - |$\lnot e_{0}$|$\lnot e_{0}, e_{1}$|$\lnot e_{0}, e_{1}, \lnot e_{2}$}
  40. \dpllClause{1}{$e_{0}, e_{1}, \lnot e_{2}$}{$e_{0}, e_{1}, \lnot e_{2}$|$e_{1}, \lnot e_{2}$|\done|\done}
  41. \dpllClause{2}{$e_{2}, e_{3}, e_{0}$}{$e_{2}, e_{3}, e_{0}$|$e_{2}, e_{3}$|$e_{2}, e_{3}$|$e_{3}$}
  42. \dpllClause{3}{$\lnot e_{0}, e_{3}$}{$\lnot e_{0}, e_{3}$|\done|\done|\done}
  43. \dpllClause{4}{$e_{2}, \lnot e_{3}, \lnot e_{0}$}{$e_{2}, \lnot e_{3}, \lnot e_{0}$|\done|\done|\done}
  44. \dpllClause{5}{$\lnot e_{1}, e_{2}$}{$\lnot e_{1}, e_{2}$|$\lnot e_{1}, e_{2}$|$e_{2}$|\conflict}
  45. \dpllClause{6}{$\lnot e_{1}, e_{2}, \lnot e_{3}$}{$\lnot e_{1}, e_{2}, \lnot e_{3}$|$\lnot e_{1}, e_{2}, \lnot e_{3}$|$e_{2}, \lnot e_{3}$|$\lnot e_{3}$}
  46. \dpllClause{7}{$e_{0}, e_{1}$}{$e_{0}, e_{1}$|$e_{1}$|\done|\done}
  47. \blockingClause{8}{$e_{0}, \lnot e_{1}, \lnot e_{2}$}{$e_{0}, \lnot e_{1}, \lnot e_{2}$|$\lnot e_{1}, \lnot e_{2}$|$\lnot e_{2}$|\done}
  48. \dpllBCP{ - |$e_{1}$|$\lnot e_{2}$| - }
  49. \dpllPL{ - | - | - | - }
  50. \dpllDeci{$\lnot e_{0}$| - | - | - }
  51. \end{dplltabular}
  52. }