Commit Graph

56 Commits

Author SHA1 Message Date
Émilie Feral
a5ca0f93bf [poincare] Throw a bison error when functions have wrong number of
arguments

Change-Id: I33f0a9b7cad3b1fde2df25ecfdc568187b79f248
2017-09-22 14:23:15 +02:00
Romain Goyet
2e0caf5374 [poincare] Add IntegerAdditionTransform 2017-09-22 12:17:11 +02:00
Romain Goyet
0c140cc4c7 [poincare] Hiearchy modification 2017-09-22 11:42:14 +02:00
Émilie Feral
8aa0e40d46 [poincare] First version simplify
Change-Id: I7ff4396f42bb980df2780dfc59bfb8b22205abc8
2017-09-21 13:56:38 +02:00
Émilie Feral
23629b0939 [poincare] Restructuration of poincare (no duplication of children
storage)

Change-Id: Ia10c3cc83e10d238750c6954b7c093d26b762c94
2017-09-21 13:49:06 +02:00
Émilie Feral
d3a2109b5f [poincare] Change binary_operation -> n_ary_operation and add an order
on expressions

Change-Id: Ia881728ef965eb1f7ff9449d14253ea347fdeed7
2017-09-21 11:18:03 +02:00
Émilie Feral
cdee87527e [poincare] Cheat on evaluation of power, cosine and sine
Change-Id: Iebe4433b6bde35b92df78986f3360aa3a936024a
2017-08-17 09:31:59 +02:00
Émilie Feral
82e212e771 [poincare] Template for double
Change-Id: I7404bd5cefc9ef78a5dbd572c3874a557cded28e
2017-08-16 09:55:29 +02:00
Émilie Feral
1964d61fdc [libaxx] add cmath and use cmath instead of math.h when required
Change-Id: Id839b17d33c69e2e002f370e553ff35246a1bc90
2017-08-16 09:55:29 +02:00
Émilie Feral
f73ddcd08f [poincare] Evaluation return numerical matrix
Change-Id: I58dbc93ad22a086580a77318b2524db9c70e47d2
2017-08-03 13:47:11 +02:00
Émilie Feral
962e047f54 [poincare] Rule of 5 in Poincare
Change-Id: I2980927d19781b969dabd22731680190a59e4334
2017-05-09 16:23:29 +02:00
Émilie Feral
bea3a97786 [poincare] Interrupt too long event when back key is down
Change-Id: I668efec0aefdd5d3baf7973942d4f44165a05f07
2017-05-03 14:22:50 +02:00
Émilie Feral
784c27b8c8 [apps] Memory leak
Change-Id: Iffc90ef26a7e5aa500d47c77140b91e62cf6dbdc
2017-04-25 13:52:29 +02:00
Émilie Feral
91385765d8 [poincare] Parse "3->A" (sto)
Change-Id: Idd8545cfcb91cebc7f95e2425db795e8105da14b
2017-03-16 15:12:10 +01:00
Émilie Feral
a019289a6a [poincare] Implement complex format
Change-Id: I98731b356cce0ae3107fd0a660697241210692ae
2017-03-07 15:53:05 +01:00
Émilie Feral
e5e9f7cc41 [poincare][apps] Make preferences a const object accessible from
anywhere (poincare and apps)

Change-Id: I49cc6bf940d1efeb6b153daac949ffcb23999a8d
2017-02-20 09:39:24 +01:00
Émilie Feral
69e46f4958 [poincare] Namespace Poincare
Change-Id: I51a84fa7978ba16f128cfe1d32c390970f2037e8
2017-02-13 17:15:06 +01:00
Romain Goyet
dd4a3e618f [poincare] Better error handling
We were ignoring yyparse's return value...

Change-Id: I09c44d13440aa578b4748a8119a0d557eec4ef00
2016-12-20 17:25:45 +01:00
Émilie Feral
69e381d736 [poincare] Redesign the text method of expression to avoid keeping a
buffer in all expressions

Change-Id: I2ca33be09a525adf429854e651beaa75e5605d7a
2016-12-09 11:01:43 +01:00
Émilie Feral
e31f2c5188 [poincare] Create a matrix data and list data classes for a cleaner
parsing

Change-Id: I38dc9cbc49d1b16c032aeb3118d5df911d3e7d6d
2016-12-08 17:10:30 +01:00
Émilie Feral
713a41cffe [poincare] Method to find text from a terminal expression (float or
matrice)

Change-Id: Id80e63f0e5596c4a6b98513e783ac1918ae55344
2016-12-08 15:21:52 +01:00
Émilie Feral
e652366bea [poincare] Parse matrix
Change-Id: Id5a2fe87632809c92985ddc8f800d52fb8512711
2016-12-05 12:00:20 +01:00
Émilie Feral
e5ff8f65c3 [apps/graph] Handle undefined function
Change-Id: Id26e0f81ba5c1446655f33b2c63f97ab5b684e41
2016-10-24 15:24:01 +02:00
Romain Goyet
4ab77b0ca8 [poincare] Clean sin/cos/tan
Change-Id: Ie1d9d6318058546d8b0393bcb085a47bd0733532
2016-10-07 17:11:52 +02:00
Felix Raimundo
0732de0cd4 Remove former simplification rules system.
Change-Id: Ib8e673ceacc6b2ac4fb1bb2fcdaed7312753666a
2016-04-22 16:52:45 +02:00
Felix Raimundo
77f057de82 Add the const qualifier to Expression methods
Change-Id: Ic05828a91c89cb391e6d7c1d4a5220fad4aea5e7
2016-04-18 18:48:56 +02:00
Felix Raimundo
563fcf3b73 Makes the parser and lexer non reentrant.
Change-Id: I8ad5d0a67058daaaec710546271e432c374ed646
2016-04-18 18:48:56 +02:00
Felix Raimundo
b13fb99653 Add the equivalentTo to expression.
Change-Id: I773542d7434bb357976774f3cb746d41fdf74911
2016-04-18 18:48:56 +02:00
Felix Raimundo
4e7f8d81bf Fix the recursiveness of simplification.
Change-Id: I090f8bd14a85ff46d6cb9807e5a1204894a5c152
2016-04-11 16:50:08 +02:00
Felix Raimundo
39d6f9b1d5 make isIdenticalTo aware of commutativity.
Change-Id: I43c333d9aef9fe10ad042c56996a157c04c0830a
2016-04-11 12:57:49 +02:00
Felix Raimundo
782abe876f Make the simplification recursive
Change-Id: Ic4f99508358e158982901a7a3c7568d8502277c3
2016-04-11 12:26:05 +02:00
Felix Raimundo
ac29d1e9aa Add the isCommutative method to expression.
Change-Id: I657df96c5e24168ecd04470252549ed84eb2cfe3
2016-04-05 15:53:29 +02:00
Romain Goyet
de2f83e8bd Poincare: Put the AST printing in its own file
Change-Id: I1793fa2057098f31a549faf6bf39e64c333b5b06
2016-04-01 15:02:31 +02:00
Felix Raimundo
ed2c4cfb59 First version of the simplifications.
Change-Id: Idbddb92b6bd098d6b862f5fc4abd741948e15194
2016-04-01 11:32:11 +02:00
Felix Raimundo
7ddd1fc112 WIP - Remove dead code / files.
Change-Id: I13a1a871b6ab746377c6b0e79ee887fb6c0e0e6d
2016-03-30 11:26:15 +02:00
Romain Goyet
60b648a1cc Poincare: Conditional use of the new simplification architecture
Change-Id: I2d6c71eb919758e02547326795ee280c8551cf17
2016-03-27 12:51:29 +02:00
Romain Goyet
c3b1089964 Transform SimplifyAdditionMerge into SimplifyCommutativeMerge
Change-Id: Iec477f6de5d51479370916336699a4ac91680ab4
2016-03-25 11:53:42 +01:00
Romain Goyet
b79e7483f4 Poincare: Adding SimplifyAdditionMerge
Change-Id: I6f922cce8178d5313a46d611e7ab166c52282127
2016-03-24 17:47:04 +01:00
Romain Goyet
ed95a3c564 Poincare: Test the SimplifyAdditionInteger
Change-Id: Ic8146a509c0c6b3ace72900cbb9854d181783de7
2016-03-24 15:51:41 +01:00
Romain Goyet
c43211cb45 Poincare: Expression::isIdenticalTo
Change-Id: I4a28b5b771efc5a00f49aeaa725c264e87e96c88
2016-03-24 15:51:22 +01:00
Romain Goyet
6edb36cef3 Poincare: Expression parsing shouldn't modify the string
Change-Id: I29bd1a81fa0b88b7151e3a79a47d287e9775b357
2016-03-24 13:09:54 +01:00
Romain Goyet
7f0a3f94bb Poincare: Simplifier -> Simplify
Change-Id: I1dfdf9e9d99ffd0ce604547b54c88263e621b97b
2016-03-24 10:39:00 +01:00
Romain Goyet
d3b0841af6 Poincare: Add a simplifier
Change-Id: Iac53c9b7dda5cb284fe750bb84c92ce5d1fba497
2016-03-23 17:24:11 +01:00
Romain Goyet
737d878c1e Build on Bison 3.0.4.
This will be the reference version from now on. Note that the error was
about a missing declaration of yyscan_t, which we really don't need to
care about, and that we can simply replace by "void *".

Change-Id: I2294a8cc8bcb4a426019a5ebc6cf83b28d4bae1a
2016-03-20 19:16:06 +01:00
Felix Raimundo
4eb2553b35 Removed some dead code.
Change-Id: I1dec8aa22ee9f429335b3402c900b7bf19356e57
2016-03-18 14:33:22 +01:00
Romain Goyet
b6aded4d8f [poincare] Expression deletion 2015-09-29 21:59:58 +02:00
Romain Goyet
fc08a651cc [poincare] Separate the layout logic 2015-09-21 10:37:22 +02:00
Romain Goyet
a26ef6194f [Poincare] Expression::parse 2015-09-07 18:24:44 +02:00
Romain Goyet
871111d4b4 Cleanups 2015-05-31 21:39:04 +02:00
Romain Goyet
803ffda5bc Liba 2015-05-31 13:24:35 +02:00