GSoC 2019 Initial Project Proposal - Assumptions

122 views
Skip to first unread message

skjh...@gmail.com

unread,
Mar 11, 2019, 2:07:43 AM3/11/19
to sympy
Hello everyone,

I am Shubham Kumar Jha, a pre-final year Undergraduate student in C.S.E. from NIT Agartala (India). I am participating in GSoC 2019 under SymPy. I went through the ideas page of GSoC 2019 and found the Assumptions project to be both appealing and exciting to me. I want to work on it. I have gone through much of the literature on Assumptions and still reading them. The project is huge and I still need to make a clear note of the amount of work done and not done. But following are some tasks I would want to work on:
  • Add support for Relational expressions: Currently, Assumptions doesn't support relational expressions. I would extend the capabilities of Assumptions. It would also help in other parts of the project.
  • Convert handlers to their relational equivalents: While working on some handlers I found handlers in particular are not very powerful or expandable. With added support for Relational expressions, we can convert handlers to their relational equivalents. In this way, we can save much of the predicates since inferences on Relationals would be enough for most of them. Also, it would make them easily expandable.
  • Increase the capabilities of SAT solver: Aaron Meurer(@asmeurer) has already done so much work in it (which I still need to go through). I would try to extend its capabilities and speed it up. Currently, I am having Logical Inference as one of my subjects this semester which heavily utilizes CLIPS. I would look into CLIPS or other better alternatives if I can mimic their functionalities.
  • Work on global assumptions: As suggested by Sudhanshu Mishra(@debugger22) we can add assumptions into the global scope with their scope numbers and purge them during garbage collection. I support the approach with context manager but I think the addition of this capability will also be good.
I am still going through the works done in Assumptions and would draft a refined proposal over this and the suggestions I receive. Also, I would create the timeline accordingly. I know the project is very huge therefore I would like if some mentors can guide me into specifics that heavily require work now.

I have no commitments for this summer and I am able to devote my full time to SymPy. I have been a part of the community for the past 3-4 months and I understand SymPy's codebase pretty well. Hence, I don't need time to get familiarize with it. Also, before the beginning of the coding period, I would have gone through Assumptions mechanism. I would start working on my project from the very beginning. Since the project is huge my main target would be to bring the assumptions upfront so more work would be done in this field. Also, I won't stop working after GSoC. I will complete whatever I would start.

Thank You,
Shubham Kumar Jha

skjh...@gmail.com

unread,
Mar 14, 2019, 11:57:30 PM3/14/19
to sympy

I would like if mentors give suggestions about the course of action I should take and the improvements I should make in the proposal. The project is huge and for the past few days, I have been going to and from between core modules and assumptions module. I have some questions :
  • Why do we need to have two different sets of assumptions?
This is ambiguous. Just Consider
 
 
>>> oo.is_real
True
>>> ask(Q.real(oo))
False
>>>
  • Also since the new assumptions are sometimes calling the old assumptions, the above can create more difficulties. Isn't the idea for new assumptions has been to scrape off the old assumptions? 
My present plan for my course of actions is:
  • Improve SAT solvers speed:- I am currently researching for SAT solving algorithms and since SymPy is a closed system (i.e. the Inference rules would be fixed) we can have a pre-compiled Inference Network ( or such a Data structure) which would provide speed to SymPy's SAT solvers.
  • Old assumptions would call the new assumptions.
But old and new assumptions differ. Should they be left as they are? Please suggest.

Thanks.

skjh...@gmail.com

unread,
Apr 1, 2019, 12:17:47 PM4/1/19
to sympy
Hi everyone,


Please give suggestions.

Thanks.

Aaron Meurer

unread,
Apr 1, 2019, 3:44:59 PM4/1/19
to sympy
On Thu, Mar 14, 2019 at 9:57 PM <skjh...@gmail.com> wrote:
>
>
> I would like if mentors give suggestions about the course of action I should take and the improvements I should make in the proposal. The project is huge and for the past few days, I have been going to and from between core modules and assumptions module. I have some questions :
>
> Why do we need to have two different sets of assumptions?
>
> This is ambiguous. Just Consider
>
>
>
>
>
> >>> oo.is_real
> True
> >>> ask(Q.real(oo))
> False
> >>>
>
> Also since the new assumptions are sometimes calling the old assumptions, the above can create more difficulties. Isn't the idea for new assumptions has been to scrape off the old assumptions?

Yes, the consistency is an issue. I think main problem is whether
real/positive/etc. include oo or not. There has been a lot of
discussion about this (see https://github.com/sympy/sympy/pull/2538).
It will need to be cleaned up before we can truly merge the two.

I think the old assumptions syntax should be kept, because it is
convenient, and has been around for a long time. But some things are
only expressible with the new assumptions. There are also things like
the matrix expressions which exclusively use the new assumptions, and
they should be kept like that.

>
> My present plan for my course of actions is:
>
> Improve SAT solvers speed:- I am currently researching for SAT solving algorithms and since SymPy is a closed system (i.e. the Inference rules would be fixed) we can have a pre-compiled Inference Network ( or such a Data structure) which would provide speed to SymPy's SAT solvers.
> Old assumptions would call the new assumptions.

I think we need to significantly improve the performance of the new
assumptions before this can happen. Right now old assumptions are
called all over the place in SymPy, and if they got slower it would
affect the performance of virtually every SymPy operation.

Regarding your application, I would add more details about how SMT
would work, as well as about the relational assumptions, particularly
how you would be able to do useful inferences with relational
assumptions.

Aaron Meurer

>
> But old and new assumptions differ. Should they be left as they are? Please suggest.
>
> Thanks.
>
> On Monday, March 11, 2019 at 11:37:43 AM UTC+5:30, skjh...@gmail.com wrote:
>>
>> Hello everyone,
>>
>> I am Shubham Kumar Jha, a pre-final year Undergraduate student in C.S.E. from NIT Agartala (India). I am participating in GSoC 2019 under SymPy. I went through the ideas page of GSoC 2019 and found the Assumptions project to be both appealing and exciting to me. I want to work on it. I have gone through much of the literature on Assumptions and still reading them. The project is huge and I still need to make a clear note of the amount of work done and not done. But following are some tasks I would want to work on:
>>
>> Add support for Relational expressions: Currently, Assumptions doesn't support relational expressions. I would extend the capabilities of Assumptions. It would also help in other parts of the project.
>> Convert handlers to their relational equivalents: While working on some handlers I found handlers in particular are not very powerful or expandable. With added support for Relational expressions, we can convert handlers to their relational equivalents. In this way, we can save much of the predicates since inferences on Relationals would be enough for most of them. Also, it would make them easily expandable.
>> Increase the capabilities of SAT solver: Aaron Meurer(@asmeurer) has already done so much work in it (which I still need to go through). I would try to extend its capabilities and speed it up. Currently, I am having Logical Inference as one of my subjects this semester which heavily utilizes CLIPS. I would look into CLIPS or other better alternatives if I can mimic their functionalities.
>> Work on global assumptions: As suggested by Sudhanshu Mishra(@debugger22) we can add assumptions into the global scope with their scope numbers and purge them during garbage collection. I support the approach with context manager but I think the addition of this capability will also be good.
>>
>> I am still going through the works done in Assumptions and would draft a refined proposal over this and the suggestions I receive. Also, I would create the timeline accordingly. I know the project is very huge therefore I would like if some mentors can guide me into specifics that heavily require work now.
>>
>> I have no commitments for this summer and I am able to devote my full time to SymPy. I have been a part of the community for the past 3-4 months and I understand SymPy's codebase pretty well. Hence, I don't need time to get familiarize with it. Also, before the beginning of the coding period, I would have gone through Assumptions mechanism. I would start working on my project from the very beginning. Since the project is huge my main target would be to bring the assumptions upfront so more work would be done in this field. Also, I won't stop working after GSoC. I will complete whatever I would start.
>>
>> Thank You,
>> Shubham Kumar Jha
>> @ShubhamKJha
>
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/176c7a47-b700-480d-b0a5-cf316af7edf7%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

skjh...@gmail.com

unread,
Apr 1, 2019, 8:43:52 PM4/1/19
to sympy
Hi Aaron,

Thanks for replying. I am still researching on SMT solvers and possible approaches of implementing one such solver. I will update my proposal very soon.

Shubham
> To unsubscribe from this group and stop receiving emails from it, send an email to sy...@googlegroups.com.

skjh...@gmail.com

unread,
Apr 5, 2019, 5:40:14 AM4/5/19
to sympy
Hi Aaron,

I have made updates to the initial draft as suggested. Kindly take a look at it.

Thanks,
Shubham
Message has been deleted

SHUBHAM JHA

unread,
Apr 6, 2019, 6:44:46 AM4/6/19
to sympy
Hi everyone,

Since the deadline is approaching, I have submitted the current version of my proposal at GSoC's website.

Please take a look at my proposal at wiki. I would be happy to get further suggestions from you so that I can iterate over it.

Thanks,
Shubham

On Sat, Apr 6, 2019 at 4:06 PM SHUBHAM JHA <skjh...@gmail.com> wrote:
Hi everyone,

Since the deadline is approaching, I have submitted the current version of my proposal at GSoC's website.

Please take a look at my proposal at wiki. I would be happy to get further suggestions from you so that I can iterate over it.

Thanks,
Shubham

To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.

To post to this group, send email to sy...@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
Reply all
Reply to author
Forward
0 new messages