File: ccl_unit_simplify.h

package info (click to toggle)
eprover 2.6%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 21,288 kB
  • sloc: ansic: 331,111; csh: 12,026; python: 10,178; awk: 5,825; makefile: 461; sh: 389
file content (87 lines) | stat: -rw-r--r-- 2,396 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*-----------------------------------------------------------------------

File  : ccl_unit_simplify.h

Author: Stephan Schulz

Contents

  Functions and datatypes for performing unit-cuts and
  unit-simplifications with a mixed clause set where units are
  indexed.

Copyright 1998-2011 by the author.
  This code is released under the GNU General Public Licence and
  the GNU Lesser General Public License.
  See the file COPYING in the main E directory for details..
  Run "eprover -h" for contact information.

Changes

<1> Sun Jun 23 01:34:49 CEST 2002
    New

-----------------------------------------------------------------------*/

#ifndef CCL_UNIT_SIMPLIFY

#define CCL_UNIT_SIMPLIFY

#include <ccl_clausefunc.h>
#include <ccl_clausepos.h>


/*---------------------------------------------------------------------*/
/*                    Data type declarations                           */
/*---------------------------------------------------------------------*/


typedef enum
{
   NoUnitSimplify,       /* No unit simplification */
   TopLevelUnitSimplify, /* Only on top level */
   FullUnitSimplify      /* Go down (with positive units only) */
}UnitSimplifyType;

typedef MatchResCell SimplifyRes;

extern const SimplifyRes SIMPLIFY_FAILED; 

#define SimplifyFailed(res) ((res).pos == NULL)

/*---------------------------------------------------------------------*/
/*                Exported Functions and Variables                     */
/*---------------------------------------------------------------------*/

extern char* UnitSimplifyNames[];

#define TransUnitSimplifyString(str) StringIndex((str), UnitSimplifyNames);

bool RemainingArgsSame(Term_p t1, Term_p t2, SimplifyRes *res);
SimplifyRes FindTopSimplifyingUnit(ClauseSet_p units, Term_p t1,
               Term_p t2);
SimplifyRes FindSignedTopSimplifyingUnit(ClauseSet_p units, Term_p t1,
                Term_p t2, bool sign);
SimplifyRes FindSimplifyingUnit(ClauseSet_p set, Term_p t1,
            Term_p t2, bool positive_only);

bool        ClauseSimplifyWithUnitSet(Clause_p clause, ClauseSet_p
                                      unit_set, UnitSimplifyType how);

#endif

/*---------------------------------------------------------------------*/
/*                        End of File                                  */
/*---------------------------------------------------------------------*/