Skip to content

[Question][Hw4] What's cmp and filter for numerical domains? #36

@yusungsim

Description

@yusungsim

In my understanding, cmp and filter are for compare and filter functions in the abstract semantics, which are used for partitioning abstract memories when encountering branches.

According to the hw4 document, abstract filter is defined as a function from abstract memory to abstract memory.
And although it is not specified in the same document, I think abstract compare should be a part of eval function that takes two expressions and one abstract memory that returns an abstract memory.

However, in domain.ml in hw4, cmp and filter functions should be defined for numerical domains, which types are as follows.

val cmp : Llvm.Icmp.t -> t -> t -> t
val filter : Llvm.Icmp.t -> t -> t -> t

I think these cmp and filter functions are not really neccesary, instead one can use filter function in semantics.ml file in abstract semantics to partition the given state.

Is my understanding correct? What are the purpose (ie. informal semantic meaning) of cmp and filter functions in numerical domains?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions