Skip to content

Commit

Permalink
Remove unused relations
Browse files Browse the repository at this point in the history
  • Loading branch information
ktrianta committed Nov 3, 2021
1 parent 9542c93 commit e683694
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 79 deletions.
17 changes: 3 additions & 14 deletions src/logic/context/1-call-site-sens+heap/constructors.dl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
// Context Constructors
//-----------------------------------------------------

.decl alloc_context_new(?item:ContextItem, ?aCtx:AllocationContext)

.decl context_request(?callerCtx: Context, ?aCtx: AllocationContext, ?invoc: Instruction, ?tofunction: FunctionDecl)
.decl context_response(?callerCtx: Context, ?aCtx: AllocationContext, ?invoc: Instruction, ?ctx: Context)

Expand All @@ -28,16 +26,13 @@ context_response(?callerCtx, ?aCtx, ?invoc, ?ctx) :-
context_request(?callerCtx, ?aCtx, ?invoc, _),
?ctx = [?invoc].

.decl alloc_context_request(?invoc: ContextItem)
.decl alloc_context_response(?invoc: ContextItem, ?ctx: AllocationContext)
.decl alloc_context_new(?item:ContextItem, ?aCtx:AllocationContext)

alloc_context(?aCtx),
alloc_context_new(?invoc, ?aCtx),
alloc_context_response(?invoc, ?aCtx) :-
alloc_context_request(?invoc),
alloc_context_new(?invoc, ?aCtx) :-
context_item(?invoc),
?aCtx = [?invoc].


//-----------------------------------------------------
// Context Item Constructors
//-----------------------------------------------------
Expand Down Expand Up @@ -121,9 +116,3 @@ context_getinvoc(?ctx, ?invoc):-
alloc_context_getinvoc(?ctx, ?invoc) :-
alloc_context_getitem(?ctx, ?item),
context_item_invoc(?item, ?invoc).

// Already generated output relations of 2-call-sensitivity
.decl context_getinvoc0(?dummy : number)
.decl context_getitem0(?dummy : number)
.decl context_getinvoc1(?dummy : number)
.decl context_getitem1(?dummy : number)
33 changes: 3 additions & 30 deletions src/logic/context/2-call-site-sens+heap/constructors.dl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
// Context Constructors
//-----------------------------------------------------

.decl alloc_context_new(?item: ContextItem, ?aCtx:AllocationContext)

.decl context_request(?callerCtx: Context, ?aCtx: AllocationContext, ?invoc: Instruction, ?tofunction: FunctionDecl)
.decl context_response(?callerCtx: Context, ?aCtx: AllocationContext, ?invoc: Instruction, ?ctx: Context)

Expand All @@ -32,16 +30,13 @@ context_response(?callerCtx, ?aCtx, ?invoc, ?ctx) :-
?callerCtx = [?item0, ?newItem0],
?ctx = [?newItem0, ?invoc].

.decl alloc_context_request(?invoc: ContextItem)
.decl alloc_context_response(?invoc: ContextItem, ?ctx: AllocationContext)
.decl alloc_context_new(?item: ContextItem, ?aCtx:AllocationContext)

alloc_context(?aCtx),
alloc_context_new(?invoc, ?aCtx),
alloc_context_response(?invoc, ?aCtx) :-
alloc_context_request(?invoc),
alloc_context_new(?invoc, ?aCtx) :-
context_item(?invoc),
?aCtx = [?invoc].


//-----------------------------------------------------
// Context Item Constructors
//-----------------------------------------------------
Expand Down Expand Up @@ -99,28 +94,6 @@ dummy_context_item_by_str(?str, ?ctxItem) :-
// Unpacking context items
//-----------------------------------------------------

.decl context_getitem0(?ctx:Context, ?item:ContextItem)
context_getitem0(?ctx, ?item):-
context_item(?item),
context_response(?a,?b,?c,[_,?item]),
context_response(?a,?b,?c,?ctx).

.decl context_getitem1(?ctx:Context, ?item:ContextItem)
context_getitem1(?ctx, ?item):-
context_item(?item),
context_response(?a,?b,?c,[?item,_]),
context_response(?a,?b,?c,?ctx).

.decl context_getinvoc0(?ctx:Context, ?invoc:Instruction)
context_getinvoc0(?ctx, ?invoc):-
context_getitem0(?ctx, ?item),
context_item_invoc(?item, ?invoc).

.decl context_getinvoc1(?ctx:Context, ?invoc:Instruction)
context_getinvoc1(?ctx, ?invoc):-
context_getitem1(?ctx, ?item),
context_item_invoc(?item, ?invoc).

.decl alloc_context_getitem(?aCtx:AllocationContext, ?item:ContextItem)
alloc_context_getitem(?aCtx, ?item):-
alloc_context_new(?item, ?aCtx).
Expand Down
15 changes: 2 additions & 13 deletions src/logic/context/insensitive/constructors.dl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
// Context Constructors
//-----------------------------------------------------

.decl alloc_context_new(?item:ContextItem, ?actx:AllocationContext)

.decl context_request(?callerCtx: Context, ?aCtx: AllocationContext, ?invoc: Instruction, ?tofunction: FunctionDecl)
.decl context_response(?callerCtx: Context, ?aCtx: AllocationContext, ?invoc: Instruction, ?ctx: Context)

Expand All @@ -27,6 +25,8 @@ context_response(?callerCtx, ?actx, ?invoc, ?ctx) :-
context_request(?callerCtx, ?actx, ?invoc, _),
?ctx = ["<<empty-context>>"].

.decl alloc_context_new(?item:ContextItem, ?actx:AllocationContext)

alloc_context(?actx),
alloc_context_new(?ctxItem, ?actx) :-
context_item(?ctxItem),
Expand Down Expand Up @@ -83,14 +83,3 @@ context_getinvoc(?ctx, ?invoc):-
alloc_context_getinvoc(?ctx, ?invoc) :-
alloc_context_getitem(?ctx, ?item),
context_item_invoc(?item, ?invoc).


//Already generated output relations of 2-call-sensitivity
.decl context_getinvoc0(?dummy : number)
.decl context_getitem0(?dummy : number)
.decl context_getinvoc1(?dummy : number)
.decl context_getitem1(?dummy : number)

.decl reachable_context1(?ctx: Context, ?func: FunctionDecl)
.decl reachable_context2(?ctx: Context, ?func: FunctionDecl)
.decl reachable_context3(?ctx: Context, ?func: FunctionDecl)
26 changes: 4 additions & 22 deletions src/logic/export/generate-output.dl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.output acq_rel_ordering
.output acquire_ordering
.output actual_arg
.output aggregate_points_to
.output aggregate_type
.output aliased_constants
.output alloc_aliases
Expand Down Expand Up @@ -99,12 +100,6 @@
.output constant_references_variable
.output constructor_class_type
.output context
.output context_getinvoc
.output context_getinvoc0
.output context_getinvoc1
.output context_getitem
.output context_getitem0
.output context_getitem1
.output context_item
.output context_item_by_invoc
.output context_item_invoc
Expand Down Expand Up @@ -276,21 +271,6 @@
.output gep_interm_points_to
.output gep_is_vector_based
.output gep_points_to
.output gep_points_to1
.output gep_points_to10
.output gep_points_to11
.output gep_points_to12
.output gep_points_to13
.output gep_points_to14
.output gep_points_to15
.output gep_points_to2
.output gep_points_to3
.output gep_points_to4
.output gep_points_to5
.output gep_points_to6
.output gep_points_to7
.output gep_points_to8
.output gep_points_to9
.output getelementptr_instruction_base_type
.output getelementptr_instruction_index_type
.output getelementptr_instruction_interm_type
Expand All @@ -309,6 +289,7 @@
.output heap_allocation_by_malloc
.output heap_allocation_by_new
.output heap_allocation_by_realloc
.output heap_allocation_by_rust_alloc
.output heap_allocation_by_type_instruction
.output heap_allocation_types
.output hidden_visibility
Expand Down Expand Up @@ -373,6 +354,7 @@
.output memcpy_call
.output memcpy_pass_by_value
.output metadata_type
.output var_points_to
.output minimal_suffix
.output minimal_suffix_len
.output monotonic_ordering
Expand Down Expand Up @@ -423,7 +405,6 @@
.output ptrtoint_instruction_from_type
.output ptx_device_calling_convention
.output ptx_kernel_calling_convention
.output reachable_context4
.output reachable_function
.output reachable_instruction
.output reachable_load
Expand All @@ -435,6 +416,7 @@
.output registers_dtor_atexit
.output release_ordering
.output relevant_suffix_position
.output rust_main_function
.output schema_invalid_alias
.output schema_invalid_constant
.output schema_invalid_function
Expand Down

0 comments on commit e683694

Please sign in to comment.