Skip to content

Solver failed when two comparision constraints has same random variable #43

@LeeKaiXuan

Description

@LeeKaiXuan

Description

When the solver try to reduce domain by given constraints (e.g., a < b and b < c), there might be failed by a random value within a variable which volatile the constraints.

Scenario Code

action wrapper {
    activity {
        do example with { val_a in [1]; };
    }
}
action example {
    rand bit [2] val_a;
    rand bit [2] val_b;
    rand bit [2] val_c;
    constraint {
        val_a < val_b;
        val_b < val_c;
    }
    exec body ASM =
"""
val_a = {{val_a}}
val_b = {{val_b}}
val_c = {{val_c}}
""";
}

Expected Output or Behaviour

val_a = 1
val_b = 2
val_c = 3

Error Message from PSSGen or JAVA (Optional)

PSS-ERROR: [OVERCONSTRAINT] ' pss_top.root_a.example.val_b' is over-constrained

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions