caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Kenneth Adam Miller <kennethadammiller@gmail.com>
To: Ivan Gotovchits <ivg@ieee.org>
Cc: Ashish Agarwal <agarwal1975@gmail.com>, caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Mathematical Expression Library
Date: Thu, 2 Apr 2015 16:21:59 -0400	[thread overview]
Message-ID: <CAK7rcp9cv_thzhXx0ExtFtee44Rxb-eUvnOi2aM4LYaTV-XAhw@mail.gmail.com> (raw)
In-Reply-To: <40B65243-21FC-4F23-ABE7-711F20CC7370@ieee.org>

[-- Attachment #1: Type: text/plain, Size: 3319 bytes --]

Excellent guess! Thank you once again!

On Thu, Apr 2, 2015 at 4:19 PM, Ivan Gotovchits <ivg@ieee.org> wrote:

> Hi Kenneth,
>
> If the expression, that you’re trying to simplify is actually a BAP’s BIL,
> then there’re some optimizations in the `Bil` module. The most interesting
> is constant folding and purging unused variables. You can also use fixpoint
> function to drive the optimization passes.
>
> In any case, even if it is not a BIL, you can look at BAP’s constant
> folder class.
>
> Best wishes
> Ivan
>
> On Apr 2, 2015, at 4:14 PM, Ashish Agarwal <agarwal1975@gmail.com> wrote:
>
> I don't know much about SMT solvers either, but my guess is that
> "simplification" would be a negligible part of the overall time since
> usually what people mean by "simplification" doesn't require any sort of
> search. This might be a premature optimization, especially since I doubt
> you'll find a ready to use library.
>
> On Thu, Apr 2, 2015 at 4:05 PM, Kenneth Adam Miller <
> kennethadammiller@gmail.com> wrote:
>
>> Well, the concern is that equivalent expressions that might arise in our
>> scenario be more difficult than they need to be. In expression
>> simplification, we keep the equivalent expression that is produced,
>> replacing the original. In this way then next time we feed that expression
>> input, or try to solve on it, we can get results for much less work.
>>
>> Am I right? I'm not too too familiar with SMT solvers-it's a different,
>> highly specialized field, so I just need to use them for my purposes.
>>
>> On Thu, Apr 2, 2015 at 3:57 PM, Ashish Agarwal <agarwal1975@gmail.com>
>> wrote:
>>
>>> > need to simplify expressions before I submit them to SMT solvers
>>>
>>> Why? Is the input language of the solver you're using not rich enough
>>> for your needs. The notion of "simplify" can be not so simple depending on
>>> the language and your needs.
>>>
>>> On Thu, Apr 2, 2015 at 3:47 PM, Kenneth Adam Miller <
>>> kennethadammiller@gmail.com> wrote:
>>>
>>>> I predominantly need to simplify expressions before I submit them to
>>>> SMT solvers. I'm quite concerned about not reimplementing a difficult and
>>>> already solved problem, and I'm pretty sure that this is part of work of
>>>> the solvers. I'm pretty sure that Z3 provides a simplify function. Would it
>>>> be better to cache the result of the simplify function?
>>>>
>>>> On Thu, Apr 2, 2015 at 3:36 PM, Ashish Agarwal <agarwal1975@gmail.com>
>>>> wrote:
>>>>
>>>>> If you don't find anything else, maybe some of our old code from PADL
>>>>> 2010 can help as a starting point [1]. Probably it'll be easier to put
>>>>> something together from scratch, assuming you don't care about performance
>>>>> or need variables.
>>>>>
>>>>> [1] http://ashishagarwal.org/2010/01/18/automating-mp-transformations/
>>>>>
>>>>>
>>>>> On Thu, Apr 2, 2015 at 1:16 PM, Kenneth Adam Miller <
>>>>> kennethadammiller@gmail.com> wrote:
>>>>>
>>>>>> Is there a library somewhere where I can represent and simplify
>>>>>> simple bit operation expressions? Add, subtract, exclusive or, or, and,
>>>>>> divide, multiply, modulus, composed recursively, and operations on the
>>>>>> expression type, such as simplify?
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
>

[-- Attachment #2: Type: text/html, Size: 5612 bytes --]

  reply	other threads:[~2015-04-02 20:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02 17:16 Kenneth Adam Miller
2015-04-02 19:36 ` Ashish Agarwal
2015-04-02 19:47   ` Kenneth Adam Miller
2015-04-02 19:57     ` Ashish Agarwal
2015-04-02 20:05       ` Kenneth Adam Miller
2015-04-02 20:14         ` Ashish Agarwal
2015-04-02 20:19           ` Ivan Gotovchits
2015-04-02 20:21             ` Kenneth Adam Miller [this message]
2015-04-02 21:41     ` Drup
     [not found]       ` <CAK7rcp_yb_gb4uziNkDHMBZFSCt_om85JWZ8p_bi94eDpB1AgA@mail.gmail.com>
     [not found]         ` <CAK7rcp_CT-meuKnqmgeNE-Gj6t4iR+_N829TZibHm7DbX6sh_A@mail.gmail.com>
2015-04-02 22:18           ` Drup
2015-04-07  6:37 ` Markus Weißmann
2015-04-07 14:16   ` Kenneth Adam Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK7rcp9cv_thzhXx0ExtFtee44Rxb-eUvnOi2aM4LYaTV-XAhw@mail.gmail.com \
    --to=kennethadammiller@gmail.com \
    --cc=agarwal1975@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=ivg@ieee.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).