The source code and dockerfile for the GSW2024 AI Lab.
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

61 lines
1.3 KiB

4 weeks ago
  1. #! /bin/sh
  2. #
  3. # Check CNF (short check - only NodeByNode method involved):
  4. # Load BDDs
  5. # Store corresponding CNF
  6. # Read CNF
  7. # Store corresponding BDD
  8. # Compare original and final BDDs
  9. #
  10. EXE=@EXEEXT@
  11. srcdir=@top_srcdir@
  12. where=${srcdir}/dddmp/exp
  13. dest=.
  14. exitval=0
  15. echo "---------------------------------------------------------------------------"
  16. echo "--------------------- TESTING Load BDD and Store CNF ----------------------"
  17. echo "---------------------------------------------------------------------------"
  18. ../testdddmp$EXE << END1
  19. mi
  20. 150
  21. hlc
  22. ${where}/4.cnf.bis
  23. bl
  24. ${where}/4.bdd
  25. 0
  26. cs
  27. ${dest}/4.cnf.tmp
  28. 0
  29. N
  30. 100
  31. mq
  32. quit
  33. END1
  34. test $? != 1 && exitval=1
  35. echo "--------------------- TESTING Load CNF and Store BDD ----------------------"
  36. ../testdddmp$EXE << END2
  37. mi
  38. 150
  39. hlc
  40. ${where}/4.cnf.bis
  41. cl
  42. ${dest}/4.cnf.tmp
  43. 0
  44. hw
  45. bs
  46. ${dest}/4.bdd.tmp
  47. 0
  48. mq
  49. quit
  50. END2
  51. test $? != 1 && exitval=1
  52. echo "----------------------------- ... RESULTS ... -----------------------------"
  53. diff --strip-trailing-cr --brief ${where}/4.cnf.bis ${dest}/4.cnf.tmp
  54. test $? != 0 && exitval=1
  55. diff --strip-trailing-cr --brief ${where}/4.bdd.bis1 ${dest}/4.bdd.tmp
  56. test $? != 0 && exitval=1
  57. echo "-------------------------------- ... END ----------------------------------"
  58. rm -f ${dest}/4.cnf.tmp ${dest}/4.bdd.tmp
  59. exit $exitval