Skip to content

Question about Multilingual Support #458

@Y-LONG28

Description

@Y-LONG28

Hello,

I would like to inquire about the current support for other languages in dg. I am trying to convert Rust code to .bc using rustc and then perform program slicing with dg, but I am encountering issues with the slicing criteria. Below is a simple Rust program I am using:

fn main()
{	
	let a = 1; 
	let b = a + 1;
	let c = val();
	assert!(a==1);
	assert!(b==2,"Value of b should be 2");

}

fn val() ->i32{
	return 42;
}

Compilation command:
rustc --emit=llvm-bc -C debuginfo=2 main.rs

Command to invoke dg:
./llvm-slicer -c __assert_fail /home/firepunch/slice-ex/main.bc

I have tried various slicing criteria such as -c val, -c 3:a, -c __assert_fail, and -c ret, but all return similar error messages:

  • No reachable slicing criteria: '' 'val'
  • No reachable slicing criteria: '' '3:a'
  • No reachable slicing criteria: '' '__assert_fail'
  • No reachable slicing criteria: '' 'ret'

I would like to know if the issue lies with my slicing criteria, differences between rustc and clang, or something else? Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions