-
Notifications
You must be signed in to change notification settings - Fork 0
/
inst_pre.h
executable file
·144 lines (97 loc) · 4.43 KB
/
inst_pre.h
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/*********************************************************************
* (C) Copyright 2001 Albert Ludwigs University Freiburg
* Institute of Computer Science
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*********************************************************************/
/*
* THIS SOURCE CODE IS SUPPLIED ``AS IS'' WITHOUT WARRANTY OF ANY KIND,
* AND ITS AUTHOR AND THE JOURNAL OF ARTIFICIAL INTELLIGENCE RESEARCH
* (JAIR) AND JAIR'S PUBLISHERS AND DISTRIBUTORS, DISCLAIM ANY AND ALL
* WARRANTIES, INCLUDING BUT NOT LIMITED TO ANY IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND
* ANY WARRANTIES OR NON INFRINGEMENT. THE USER ASSUMES ALL LIABILITY AND
* RESPONSIBILITY FOR USE OF THIS SOURCE CODE, AND NEITHER THE AUTHOR NOR
* JAIR, NOR JAIR'S PUBLISHERS AND DISTRIBUTORS, WILL BE LIABLE FOR
* DAMAGES OF ANY KIND RESULTING FROM ITS USE. Without limiting the
* generality of the foregoing, neither the author, nor JAIR, nor JAIR's
* publishers and distributors, warrant that the Source Code will be
* error-free, will operate without interruption, or will meet the needs
* of the user.
*/
/*********************************************************************
* File: inst_pre.h
* Description: headers for instantiating operators, preprocessing part.
* - transform domain into integers
* - inertia preprocessing:
* - collect inertia info
* - split initial state in special arrays
* - Wff normalization:
* - simplification
* - quantifier expansion
* - NOT s down
* - negative preconditions translation
* - split operators into easy and hard to instantiate ones
*
* - full DNF functions, only feasible for fully instantiated
* formulae
*
* Author: Joerg Hoffmann 2000
*
*********************************************************************/
#ifndef _INST_PRE_H
#define _INST_PRE_H
void encode_domain_in_integers( void );
void collect_all_strings( void );
void create_member_nrs( void );
int position_in_types_table( char *str );
int position_in_constants_table( char *str );
int position_in_predicates_table( char *str );
void create_integer_representation( void );
void make_Fact( Fact *f, PlNode *n, int num_vars );
Bool is_subtype( int t1, int t2 );
WffNode *make_Wff( PlNode *p, int num_vars );
Effect *make_effect( PlNode *p, int num_vars );
void do_inertia_preprocessing_step_1( void );
void collect_inertia_information( void );
void split_initial_state( void );
void normalize_all_wffs( void );
void remove_unused_vars_in_wff( WffNode **w );
void decrement_inferior_vars( int var, WffNode *w );
Bool var_used_in_wff( int code_var, WffNode *w );
void simplify_wff( WffNode **w );
void expand_quantifiers_in_wff( WffNode **w, int var, int constant );
WffNode *copy_Wff( WffNode *w );
Bool possibly_positive( Fact *f );
Bool possibly_negative( Fact *f );
Bool matches( Fact *f1, Fact *f2 );
void cleanup_wff( WffNode **w );
void detect_tautologies_in_wff( WffNode **w );
Bool are_identical_ATOMs( WffNode *w1, WffNode *w2 );
void merge_ANDs_and_ORs_in_wff( WffNode **w );
void NOTs_down_in_wff( WffNode **w );
void translate_negative_preconds( void );
Bool translate_one_negative_cond( WffNode *w );
void replace_not_p_with_n_in_wff( int p, int n, WffNode **w );
void add_to_initial_state( int p, int n, int index );
void split_domain( void );
int is_dnf( WffNode *w );
void make_normal_effects( NormOperator **nop, Operator *op );
void dnf( WffNode **w );
void ANDs_below_ORs_in_wff( WffNode **w );
void collect_hitting_sets( WffNode *ORlist, int index );
void merge_next_step_ANDs_and_ORs_in_wff( WffNode **w );
#endif /* _INST_PRE_H */