Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intial Implementation for SymbolicExpression ttype #1846

Merged
merged 40 commits into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
43bec5e
Added SymbolicSymbol as Intrinsic Function
anutosh491 May 22, 2023
6bdbdef
Supporting sympy imports for CPython
anutosh491 May 22, 2023
be0f715
Added some utilities and removed instantiate function
anutosh491 May 27, 2023
efdfed8
Initial code for supporting assignment and print statements
anutosh491 May 29, 2023
5d152b2
Merge branch 'main' into GSoC_PR1
anutosh491 May 29, 2023
3d19dbf
added verify_args for symbolicsymbol
anutosh491 May 29, 2023
5858009
Added verify_args function for symbolic symbol
anutosh491 May 31, 2023
d680912
Merge branch 'main' into GSoC_PR1
anutosh491 Jun 12, 2023
ab626c6
Add support in C backend for assignment, printing and addition operat…
anutosh491 Jun 13, 2023
53aaa99
Introduced symbolic constant pi
anutosh491 Jun 14, 2023
9010eba
Added support for symengine through the C backend
anutosh491 Jun 14, 2023
06d2087
Merge branch 'main' into GSoC_PR1
anutosh491 Jun 15, 2023
645fa7d
Removed changes related to the LLVM backend and removed warnings
anutosh491 Jun 15, 2023
fccbdde
Updated references
anutosh491 Jun 15, 2023
81c4dba
fixed failing test
anutosh491 Jun 15, 2023
2fc618b
Added a test file for testing basic assignment , addition and printin…
anutosh491 Jun 15, 2023
03bf3b7
Added compiler option for enabling symengine
anutosh491 Jun 15, 2023
9d06c76
Added support for import S from lpython
anutosh491 Jun 15, 2023
6ebe306
Added symengine to the environment
anutosh491 Jun 15, 2023
fd6811b
added sympy and symengine in environment
anutosh491 Jun 15, 2023
f1883c6
added sympy and symengine for supporting imports
anutosh491 Jun 15, 2023
fe749a2
Merge branch 'main' into GSoC_PR1
Thirumalai-Shaktivel Jun 16, 2023
25dda82
Add CI for SymPy tests
Thirumalai-Shaktivel Jun 16, 2023
bd7e0d4
Install sympy in the CI
Thirumalai-Shaktivel Jun 16, 2023
5ca07dd
Merge branch 'main' into GSoC_PR1
certik Jun 16, 2023
3771cb1
Merge branch 'main' into GSoC_PR1
anutosh491 Jun 18, 2023
dab1ef8
Made minor changes in intrinsic_function_registry.h
anutosh491 Jun 18, 2023
c9aea0b
Merge branch 'main' into GSoC_PR1
anutosh491 Jun 18, 2023
c505610
Removed unneccessary additions
anutosh491 Jun 18, 2023
12ae807
Trying to fix failing tests
anutosh491 Jun 18, 2023
2f4fb86
Reverted back the change
anutosh491 Jun 18, 2023
f9324c6
added -Wl after -rpath
anutosh491 Jun 18, 2023
213ade0
remove sympy from Fast
anutosh491 Jun 18, 2023
4e99898
Introduced c_sym and cpython_sym backends
anutosh491 Jun 18, 2023
e232e5d
Replaced sympy with cpython_sym
anutosh491 Jun 18, 2023
6ae14ac
Merge branch 'main' into GSoC_PR1
certik Jun 18, 2023
07e01e4
Fix typo and remove a task in CI
Thirumalai-Shaktivel Jun 19, 2023
5976ec5
minor changes to optimize code
anutosh491 Jun 19, 2023
19f8075
edited verify_args function for SymbolicPi
anutosh491 Jun 19, 2023
9b763f9
Merge branch 'main' into GSoC_PR1
certik Jun 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added verify_args for symbolicsymbol
  • Loading branch information
anutosh491 committed May 29, 2023
commit 3d19dbfb13d8fdd87d9d744b161e883cfed3fc3c
10 changes: 8 additions & 2 deletions src/libasr/pass/intrinsic_function_registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -1911,6 +1911,10 @@ namespace Partition {

namespace SymbolicSymbol {

static inline void verify_args(const ASR::IntrinsicFunction_t& x, diag::Diagnostics& diagnostics) {
// TODO
}

static inline ASR::expr_t *eval_SymbolicSymbol(Allocator &al, const Location &loc,
Vec<ASR::expr_t*> &args) {
// TODO
Expand Down Expand Up @@ -1981,6 +1985,8 @@ namespace IntrinsicFunctionRegistry {
{nullptr, &ListIndex::verify_args}},
{static_cast<int64_t>(ASRUtils::IntrinsicFunctions::ListReverse),
{nullptr, &ListReverse::verify_args}},
{static_cast<int64_t>(ASRUtils::IntrinsicFunctions::SymbolicSymbol),
{nullptr, &SymbolicSymbol::verify_args}},
};

static const std::map<int64_t, std::string>& intrinsic_function_id_to_name = {
Expand Down Expand Up @@ -2018,11 +2024,11 @@ namespace IntrinsicFunctionRegistry {
{static_cast<int64_t>(ASRUtils::IntrinsicFunctions::ListReverse),
"list.reverse"},
{static_cast<int64_t>(ASRUtils::IntrinsicFunctions::SymbolicSymbol),
"Symbol"}
"Symbol"},
{static_cast<int64_t>(ASRUtils::IntrinsicFunctions::Any),
"any"},
{static_cast<int64_t>(ASRUtils::IntrinsicFunctions::Sum),
"sum"},
"sum"}
};


Expand Down
2 changes: 1 addition & 1 deletion src/lpython/semantics/python_ast_to_asr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6992,7 +6992,7 @@ class BodyVisitor : public CommonVisitor<BodyVisitor> {

if (!s) {
std::set<std::string> not_cpython_builtin = {
"sin", "cos", "gamma", "tan", "asin", "acos", "atan", "sinh", "cosh", "tanh", "exp", "exp2", "expm1", "symbol"
"sin", "cos", "gamma", "tan", "asin", "acos", "atan", "sinh", "cosh", "tanh", "exp", "exp2", "expm1", "Symbol",
"sum" // For sum called over lists
};
if (ASRUtils::IntrinsicFunctionRegistry::is_intrinsic_function(call_name) &&
Expand Down