From 16c7a57eebfba4bcc00ff8f494be71bdb664ed9b Mon Sep 17 00:00:00 2001 From: Blinningjr <nicke.l@telia.com> Date: Mon, 14 Dec 2020 23:35:06 +0100 Subject: [PATCH] finished examples/get_sign.rs --- cargo_klee_examples/examples/get_sign.rs | 34 +++++++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/cargo_klee_examples/examples/get_sign.rs b/cargo_klee_examples/examples/get_sign.rs index 4fd6e4d..56fe57c 100644 --- a/cargo_klee_examples/examples/get_sign.rs +++ b/cargo_klee_examples/examples/get_sign.rs @@ -79,12 +79,13 @@ fn main() { // How does `klee-sys` and `cargo-klee` score on a 0..5 scale? // // [your answer here] -// TODO: 5? +// 4 // // If below 5, what could be done to improve the UX/IX? // // [your answer here] -// TODO +// There are a lot of flags in the command which makes it a bit long to write. Maybe add a new +// command for emitting llvm-ir files or maybe combine some of the flags into one. // // C) Inner workings. // @@ -96,7 +97,16 @@ fn main() { // What modules in `klee-sys` does this feature enable? // // [your answer here] -// TODO +// ll and lib_klee_analysis +// +// // re-exports for klee-analysis +// #[cfg(feature = "klee-analysis")] +// mod lib_klee_analysis; +// #[cfg(feature = "klee-analysis")] +// pub mod ll; // low level bindings +// #[cfg(feature = "klee-analysis")] +// pub use lib_klee_analysis::*; // re-export functions and macros +// // // Have a look at the source code of `cargo klee`. // (The actual sub-command is in the folder `cargo-klee`.) @@ -105,7 +115,23 @@ fn main() { // Which one will it pick, and why? // // [your answer here] -// TODO +// It does a lookup from the parent file ".." +// +// The Related code: +// let mut path: PathBuf = if is_example { +// project.path(Artifact::Example(file), profile, None, &host)? +// } else { +// project.path(Artifact::Bin(file), profile, None, &host)? +// }; +// +// +// ... +// +// path = path.parent().expect("unreachable").to_path_buf(); +// +// if is_binary { +// path = path.join("deps"); // the .ll file is placed in ../deps +// } // // Actually this is one of the "bad seeds" in the internal design. // Seems there is no "stable" way of controlling/retrieving the "metadata" -- GitLab