Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Adrien Champion
    @AdrienChampion

    https://github.com/dddejan/chctranslate
    Right?

    According to the readme, it seems to be more than a translation as it produces a version that's not equivalent (although equi-satisfiable). Are we fine with this?

    Arie Gurfinkel
    @agurfinkel
    Well, according to the code it's a tiny example that uses Z3 to parse the input and then executes horn-simplify tactic on the input.
    Equi-satisfiable is ok. More important is that we can guarantee the format
    In the worst case, we will include the benchmark not as it was intended. This is better than including a malformed benchmark.
    Note that we will not (now) try to normalize all the benchmarks. But we will only include normalized benchmarks in the competition
    In other words, benchmarks that are hard to normalize simply will not make it into the competition in this round
    Adrien Champion
    @AdrienChampion

    I modified the code from @dddejan (thanks!) so that it formats the benchmarks. I think the options I use currently produce equivalent benchmarks.

    Further testing is needed, but for now I'd like to put it on a repo somewhere. Should I submit a PR to @dddejan 's repo or create one on chc-comp? Or something else?

    Arie Gurfinkel
    @agurfinkel
    create repo on chc-comp

    Can someone take a look at the code checking the clauses or play with it a bit to find stupid mistakes (if any)?

    I ran it on all the benchmarks from https://github.com/chc-comp/hopv and it looks fine so far. I'll run on other bench repos later.

    Arie Gurfinkel
    @agurfinkel
    @AdrienChampion , I've left some comments in the commit on ghub. Unfortunately, ghub does not make it easy to comment on non-pull-requests. The basic structure looks good. I'll look at it some more
    Adrien Champion
    @AdrienChampion
    I (think I) addressed all your comments. Look in test/check_err and test/check_ok which are system the checker should reject and accept respectively.
    Adrien Champion
    @AdrienChampion
    There's one problem left though, z3 prints the tail of the clause as a let binding when it's above a certain length.
    (let ((a!1 (and <tail>))) (=> a!1 <head>))
    I could not find a way to tell it not to do that. @/all Anyone knows whether there's a solution? Or should I just print the clauses "manually"?
    Arie Gurfinkel
    @agurfinkel
    there is a parameter, but it is global for the whole formula, so it will suppress let binders everywhere in the formula
    printing conjuncts separately is more stable
    Adrien Champion
    @AdrienChampion
    Okay, I'll do that then, thanks
    Arie Gurfinkel
    @agurfinkel
    @/all first draft of the format. Please comment: https://chc-comp.github.io/2018/format.html
    Adrien Champion
    @AdrienChampion

    Since we're formatting everything anyway, wouldn't it be simpler to have

    ```

    (Sorry)
    chc_tail    ::=
      | (and (u_predicate var+)* i_formula*)
    (Also note that (u_predicate var*) needs to be changed to (u_predicate var+) everywhere.)
    Adrien Champion
    @AdrienChampion
    It makes rules (and formatting) easier IMHO.
    Sorry to go back to this but looking at the rules I think u_predicate should either always or never be required to be over distinct variables. (I'm fine either way.) I think it would make the rules simpler and less confusing thanks to uniformity.
    Adrien Champion
    @AdrienChampion
    Sorry, for chc_tail I meant
    chc_tail    ::=
      | (and (u_predicate var+)* i_formula)
    Adrien Champion
    @AdrienChampion
    As Arie said a while ago it's not very convenient to discuss this here, I updated the google doc
    https://docs.google.com/document/d/1JL1_3Rnfaa1qyhV-ZiSX1HCPqECtijnEZ8DsCBY_f0M/edit#
    Arie Gurfinkel
    @agurfinkel
    The only significant chance I can spot is that multiple i_formula must be allowed in chc_tail. I've extended the format with that.
    For nullary predicates, there is no agreement right now
    For distinct variables -- the current agreement is that there is no restriction on what the predicates are applied to in the chc_tail, but the head must be applied to distinct variables
    The rationale is that if the head is not applied to distinct variables, this is adds an implicit equality constraint in chc_tail. It is simpler to not have implicit constraints in the tail.
    The same does not apply to the tail because the implicit constraints are entailed by constraints that are already in the tail
    Dejan Jovanović
    @dddejan
    Was that a typo, or does Adrien really want multiple i_formulas in rules? (considering the "Sorry" comment")
    Adrien Champion
    @AdrienChampion

    I actually don't want anything, neither as a participant for my tool or an organizer for the formatting script. Whatever the rules end up being my tool will support them (modulo bug) and I'll modify the script in consequence. I was trying to make the rules simpler.

    Regarding chc_tail my point was simply that we can remove the first two variants and only keep the and one.

    The formatting script produces systems in a fragment a bit more restrictive than the one from the rules, I'll update the google doc shortly if you want to take a look.

    Adrien Champion
    @AdrienChampion
    Done, see the last page of the google doc. I argue these rules are simpler, but again, I have no reason to champion (!) them. They just happen to be how the script works atm.
    Arie Gurfinkel
    @agurfinkel
    @dddejan , I don't think it is a type. I'd like the tail to have things of the form (and (Inv x y) (> x 0) (> y 0)) instead of (and (Inv x y) (and (> x 0) (> y 0)))
    I don't think it makes a difference to any of the tools
    Adrien Champion
    @AdrienChampion
    Is the formatting script expected to support non-SMT-LIB benchmarks such as the following one?
    https://github.com/chc-comp/hcai-bench/blob/master/svcomp/O3/id_i15_o15_false-unreach-call_true-termination.smt2
    z3 does not like it at all...
    Arie Gurfinkel
    @agurfinkel
    yes. that's z3 specific format :)
    Adrien Champion
    @AdrienChampion
    Meaning z3 can parse it?
    Adrien Champion
    @AdrienChampion
    Recent z3 seems to parse it, but I can't get the python api to work on it
    Adrien Champion
    @AdrienChampion
    So upgrading z3py to the most recent version works, but I could not find a simple way to translate the datalog rules to normal chc assertions.
    Anyone knows of a simple way to do that? Or should we just forget about datalog benchmarks?
    Dejan Jovanović
    @dddejan
    @agurfinkel you might as well not have any restrictions on the order of literals too. seems like the running assumption is that everyone is going to use z3 for parsing, which most likely is the case. this means that yes, it makes no difference. i would prefer more structure as it makes it easier to anticipate things when writing a parser (i.e. there is one constraint that constrains the rule), but it's irrelevant because i am not planning on writing one.
    It would be nice to hear from non-SMT people with tools that don't support horn clauses...
    Alberto Griggio
    @agriggio
    I wasn't planning to use Z3, FWIW...
    that would be more work than anticipated
    Adrien Champion
    @AdrienChampion
    By everyone you mean participants? In this case, I'm not using z3 either.
    Arie Gurfinkel
    @agurfinkel
    @AdrienChampion : I've added support for fixedpoint format to one version of your scripts. But ran out of time to submit a PR. You can see the code here: https://github.com/chc-comp/scripts/blob/matteo/format/translate.py
    parse_fp_file()
    as expected, I don't think @agriggio and @AdrienChampion use Z3. This means they have more voice in the format restrictions. I want the format to be as easy as possible to be parsed by all current participants.
    so far, no non-smt folks have expressed interest. We have broadcasted CFC to various conferences, but no response so far. If anyone knows of people I should contact personally, please let me know.
    @jpgallagher, will your tool(s) participate? Are you happy with the current format?