Commit Graph

14000 Commits

Author SHA1 Message Date
Felix Raimundo
43b90c104c Add the multip[lictaion by zero rule.
Also fix the writting of Wildcard.

Change-Id: I0b5de34d6528b8eb0cb73b77c65396b28e63c2dc
2016-04-05 15:53:29 +02:00
Felix Raimundo
8366cf71ec Add coment to move operator in expression match.
Change-Id: I2b67ac892a69d5b711adff5623259fce811ec31f
2016-04-05 15:53:29 +02:00
Felix Raimundo
ac29d1e9aa Add the isCommutative method to expression.
Change-Id: I657df96c5e24168ecd04470252549ed84eb2cfe3
2016-04-05 15:53:29 +02:00
Felix Raimundo
b7a1bb9cdb Fix untreated case in rule generation.
Add an assert showing that a case is not implemented.

Change-Id: I9a2ed44d52cb7b1df1fab1b2765f966a67c95586
2016-04-05 15:53:29 +02:00
Felix Raimundo
c94b209729 Fix the precedence of the operations.
Change-Id: I682fed318aaefdcc64489e922ba0e91c0cb4979d
2016-04-05 15:53:29 +02:00
Felix Raimundo
50c5a3b08e Fix unitialized variables in HorizontalLayout.
Change-Id: I37beaae4e0e1bd6931c420d72b145ba42d5fb452
2016-04-05 15:53:20 +02:00
Romain Goyet
195e8932af Merge "Poincare: Make the rulegen step silent" 2016-04-05 12:56:35 +02:00
Romain Goyet
792b89dc07 Poincare: Make the rulegen step silent
Change-Id: Ic2fd2b603ed6d0a84e5a738c17fb179403844c72
2016-04-04 14:40:04 +02:00
Felix Raimundo
ff83c8c4da Draw rectangles with lines.
Change-Id: I257ea485e67d2cc1c2ad5f9405fe507f3f4d00f1
2016-04-04 11:05:49 +02:00
Felix Raimundo
10c383d102 Writes the simplified version of an expression.
Change-Id: If0e89735a85a684ad4c044ae4b8d6f8a9ae81dac
2016-04-04 11:05:49 +02:00
Félix Raimundo
89647c995d Merge "Poincare: Silent build" 2016-04-04 11:05:32 +02:00
Félix Raimundo
586a850610 Merge "Add a delete button to the keyboard." 2016-04-04 10:50:03 +02:00
Felix Raimundo
f9b7836e1e Add a delete button to the keyboard.
Change-Id: I10e57f19a7edfb4a59fb3c2f48bc0f8a8a58643f
2016-04-01 15:13:47 +02:00
Romain Goyet
6cd646cc98 Poincare: Silent build
Change-Id: I49afd7f71c211dbaa8453608570d3972ecb08517
2016-04-01 15:12:12 +02:00
Romain Goyet
b9722aa0d8 Merge branch 'master' of ssh://git.numworks.com:29418/CalcOS
Change-Id: I3a0f53c58707de1100412dc6572abe6b852e9cb2
2016-04-01 15:09:34 +02:00
Felix Raimundo
a9a522f29c Remove bad debug.
Change-Id: Id8a0780aa9782ebbbf4118ed210de3acaa9ae9ff
2016-04-01 15:05:20 +02:00
Felix Raimundo
6238b5a110 Add the ability to match on values.
Change-Id: Id38aad5b64913c948966c980fb4415749b2c435d
2016-04-01 15:05:20 +02:00
Felix Raimundo
b0c44dc39e wip
Change-Id: I7ac1cea7dc59ca2fa9c25cc8244c26a95a650448
2016-04-01 15:04:41 +02:00
Romain Goyet
5a36ec48d9 Poincare: Make it easier to dump the AST in tests
Change-Id: I038ec19bd6f12a7efcb1840ba16217e5ee4b22be
2016-04-01 15:04:03 +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
Romain Goyet
a218fcfe9a Poincare: Remove a warning
Change-Id: I744af914384adc2c75f7773dd06a17e7c30d5816
2016-04-01 14:30:24 +02:00
Romain Goyet
8da423e306 Poincare: Fix the rulegen
Change-Id: Ib672071daa3b4ca4575845fd11ec455c442acd8d
2016-04-01 14:29:59 +02:00
Romain Goyet
af04b2b799 WildCard is spelled Wildcard
Change-Id: I88b3b7daac80f84548d013fbebb74f8f617833cd
2016-04-01 14:29:38 +02:00
Romain Goyet
edb6737057 Poincare: Formal ruleset
Change-Id: Id5a52345f198c6e52a7fba307b510810bba4304d
2016-04-01 14:29:08 +02:00
Romain Goyet
9993ba1d77 Poincare: Build and use the rulegen
Change-Id: I4971102cc2267b2c9c010c20f18f70be5fb85c52
2016-04-01 14:28:45 +02:00
Romain Goyet
f54403ae21 Poincare: Add a README for the simplification
Change-Id: Ife72d5914a6968bdc7c52ad93a329b37fe2c01a6
2016-04-01 14:22:39 +02:00
Romain Goyet
7f116ace21 Poincare: Build the RuleGen
Change-Id: I0a45f175fbfbd52d43e1e756b526123fe0609f06
2016-04-01 13:36:03 +02:00
Romain Goyet
c8e850ba7f Poincare: Add a sample list of rules
Change-Id: I893c2267abe082d6304f7013c0c571e35cb21427
CAUTION: They are completely idiotic!
2016-04-01 13:36:03 +02:00
Romain Goyet
9125033d90 Poincare: The rules compiler checks for wildcard consistency
Change-Id: I9de57987b10fced3f1e63358b9d0158f97c3db15
2016-04-01 13:36:03 +02:00
Felix Raimundo
ed2c4cfb59 First version of the simplifications.
Change-Id: Idbddb92b6bd098d6b862f5fc4abd741948e15194
2016-04-01 11:32:11 +02:00
Romain Goyet
6232079f02 Poincare: Add a Simplification rule generator
Change-Id: I4a0971405164c40c5ca3f7e1a0406f01d83d67d8
2016-03-31 18:47:18 +02:00
Felix Raimundo
7ddd1fc112 WIP - Remove dead code / files.
Change-Id: I13a1a871b6ab746377c6b0e79ee887fb6c0e0e6d
2016-03-30 11:26:15 +02:00
Felix Raimundo
5e01cfe421 Add baseline for pretty printing.
Change-Id: I77e76cb4b6191992137dd83f366006115ae65661
2016-03-29 13:41:37 +02:00
Felix Raimundo
1742146812 Fix typo in the functions printing.
Change-Id: Ifb7fa712c034fc24e73a4b2e4062c1864b1c7d25
2016-03-29 13:41:36 +02:00
Felix Raimundo
418d081f6e Add the trig menu.
Change-Id: Ifbe2518cb3a089dace82d56031987fbc7a2e6181
2016-03-29 13:41:36 +02:00
Felix Raimundo
e0184ba975 Add a flag for inversing the intensity in char drawings.
Change-Id: Ibc22dd8aeaf95ef0aa49d2f9aa8867c47324ce80
2016-03-29 13:41:36 +02:00
Romain Goyet
c56c506b19 Poincare: Handle unknown symbols in ugly debug hack
Change-Id: I7faddb8f6898987f37cfe632a55b698303868ab7
2016-03-29 12:53:29 +02:00
Romain Goyet
ab531f357b Poincare: Collect some simplification functions
Change-Id: I5d0378ef7887317059114c6cf749a136607d30ad
2016-03-29 12:50:12 +02:00
Romain Goyet
e534b659c1 Poincare: Add hand-generated Simplifications
This will be generated by a compiler

Change-Id: I5ae606417ecd4e86a61c38be65fc6a4f44e9c3d5
2016-03-29 12:49:30 +02:00
Romain Goyet
307f94b50b Merge branch 'master' of ssh://git.numworks.com:29418/CalcOS
Change-Id: I3e9fb6c960d26eebbfa4a28a4e0dfa0a2153e9f4
2016-03-28 15:53:43 +02:00
Romain Goyet
ad807282a3 Poincare: Nicer naming
Change-Id: Ic0677c10980b2e883586047718db9998608a2576
2016-03-27 21:44:40 +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
eae34b3221 Poincare: ExpressionBuilder can now take a function pointer
Change-Id: Ie7a704c7d0b0dd9e7117bfbcc539b5d093843669
2016-03-27 12:50:06 +02:00
Romain Goyet
ef3b8c6f24 Poincare: Fix the ExpressionBuilder and ExpressionSelector child method
Change-Id: I07de75272968b2d26341074837bfb769a875608d
2016-03-26 23:59:27 +01:00
Romain Goyet
a8feaefe82 Poincare: Add a Simplification class
Change-Id: Ide99e912262111722e11ae82dbc7eedb591ba14c
2016-03-26 21:04:04 +01:00
Romain Goyet
e8b7a9bd83 Poincare: Add an ExpressionBuilder class
Change-Id: I5865b712cfe1f8e1cd2e29d0d2b50be8182985b8
2016-03-26 18:47:08 +01:00
Romain Goyet
f81239fdb8 Poincare: Add an ExpressionSelector
Change-Id: I1ed0e2f3042f948d81d79b7b8ada00a3e838322b
2016-03-26 18:46:27 +01:00
Felix Raimundo
ebf03464fa Fix warnings.
compareing an int to an unsigned value.

Change-Id: I718d83b594a0c7e05aacfde35251df0be66de687
2016-03-25 14:35:00 +01:00
Felix Raimundo
3710103f40 Change the layout creation.
The father now sets itself as teh father of its children.
ExpressionLayout do not know anything about expressions now.

Change-Id: I28954c78f3102eec056ebbc3c52ccd862a5ab8fd
2016-03-25 14:35:00 +01:00
Romain Goyet
bdb4aaace3 Merge branch 'master' of ssh://git.numworks.com:29418/CalcOS
Change-Id: Ic13da71a80ab823ee0b11f550ee359c4032edc36
2016-03-25 11:55:09 +01:00