Skip to content

Commit

Permalink
Remove remaining leading underscores in relation names
Browse files Browse the repository at this point in the history
Now, none of the relations produced by the FactGenerator have leading
underscores.
  • Loading branch information
langston-barrett committed Oct 7, 2022
1 parent dc004a4 commit ee54ba4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions FactGenerator/include/predicates.inc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ GROUP_BEGIN(instr)
PREDICATE(instr, to, instr_assigns_to)
PREDICATE(instr, flag, instr_flag)
PREDICATE(instr, next, next_instr)
PREDICATE(instr, bb_entry, _instr_bb_entry)
PREDICATE(instr, bb_entry, instr_bb_entry)
PREDICATE(instr, func, instr_func)
PREDICATE(instr, pos, instr_pos)
PREDICATE(instr, unreachable, unreachable_instr)
Expand Down Expand Up @@ -543,15 +543,15 @@ PREDICATE(variable, id, variable)
PREDICATE(variable, type, variable_has_type)
PREDICATE(variable, source_name, variable_has_debug_source_name)
PREDICATE(variable, pos, variable_has_debug_decl_pos)
PREDICATE(variable, in_func, _variable_in_func)
PREDICATE(variable, in_func, variable_in_func_name)
PREDICATE(variable, name, variable_has_name)
GROUP_END(variable)

GROUP_BEGIN(constant)
PREDICATE(constant, id, constant)
PREDICATE(constant, type, constant_has_type)
PREDICATE(constant, value, constant_has_value)
PREDICATE(constant, in_func, _constant_in_func)
PREDICATE(constant, in_func, constant_in_func_name)
PREDICATE(constant, expr, constant_expression)
PREDICATE(constant, hash, constant_hashes_to)
PREDICATE(constant, to_integer, constant_to_int)
Expand Down
12 changes: 6 additions & 6 deletions datalog/import/todo.dl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// TODO(lb): Move these elsewhere! These were erroneously included in the
// import*.dl files before these were derived from predicates.inc.

.decl _instr_bb_entry(v0:symbol, v1:symbol)
.decl instr_bb_entry(v0:symbol, v1:symbol)
instr_block(e0, bb) :-
_instr_bb_entry(e0, e1),
instr_bb_entry(e0, e1),
instr(e0),
variable_is_label(e1),
block_of_label(bb, e1).
Expand Down Expand Up @@ -35,13 +35,13 @@ catch_clause(v2), landingpad_instr_clause(v0, v1, v2) :-
filter_clause(v2), landingpad_instr_clause(v0, v1, v2) :-
landingpad_instr_filter_clause(v0, v1, v2).

.decl _constant_in_func(v0:Constant, v1:FunctionName)
.decl _variable_in_func(v0:Variable, v1:FunctionName)
.decl constant_in_func_name(v0:Constant, v1:FunctionName)
.decl variable_in_func_name(v0:Variable, v1:FunctionName)

constant_in_func(Constant, Function) :-
_constant_in_func(Constant, FuncName),
constant_in_func_name(Constant, FuncName),
func_name(Function, FuncName).

variable_in_func(Variable, Function) :-
_variable_in_func(Variable, FuncName),
variable_in_func_name(Variable, FuncName),
func_name(Function, FuncName).

0 comments on commit ee54ba4

Please sign in to comment.