Skip to content

Conversation

cemcebeci
Copy link
Contributor

No description provided.

DeducedConstraints deduceConstraints(int argIndex);

private:
llvm::SmallVector<llvm::SmallVector<mlir::Value>> expandToDNF(mlir::Value constraint);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think that DNF will be something that will come up a lot, you can wrap the vectors into a class like and put this in a header of their own

class DisjunctiveNormalFormExpression {
public:
<getters>

private:
llvm::SmallVector<llvm::SmallVector<mlir::Value>> Content;
};

to be honest i would not be even opposed to have a operation called DNFExpression and have this analysis as a pass that mutates the ir and turns every precondition into a DNF

}


void helper(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename with a meaningful name, furthemore this function can be made static

*/
llvm::SmallVector<llvm::SmallVector<mlir::Value>> DynamicArgumentAnalysis::expandToDNF(mlir::Value constraint) {
llvm::SmallVector<llvm::SmallVector<mlir::Value>> conjunctions;
helper(conjunctions, {constraint}, precondition);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need the helper out of line here?

}

//TODO
const int64_t min_int = -800;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess you were looking for std::numeric_limits<int64_t>::min()

return KNOWN_VALUE;
}

mlir::Value DynamicArgumentAnalysis::compute(mlir::Value expression) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you provide a more informative name? compute is not very specific

@drblallo
Copy link
Contributor

the part of the code that emits the code that computes min and max is complex, can't it be somehow simplified by placing as much code as possible in the fuzzer standard library and calling it?

@rl-language rl-language force-pushed the master branch 2 times, most recently from 9eb7c9a to 73de6fa Compare July 1, 2024 11:47
@rl-language rl-language force-pushed the master branch 2 times, most recently from 2bd2642 to af28449 Compare April 22, 2025 10:53
@rl-language rl-language force-pushed the master branch 3 times, most recently from 77b6963 to 04d7031 Compare May 1, 2025 17:56
@rl-language rl-language force-pushed the master branch 2 times, most recently from e6cc154 to 703ecc4 Compare May 15, 2025 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants