Commit Graph

179 Commits

Author SHA1 Message Date
Umur Ozkul
b65aeaf0d2 spell check 2022-07-16 17:09:39 +02:00
Umur Ozkul
4522b46900 basic type compiler 2022-07-16 16:13:39 +02:00
Umur Ozkul
532a878911 define function returning result 2022-07-11 17:46:50 +02:00
Umur Ozkul
d25e052b61 rename to Reducer_Module_test 2022-07-11 17:04:21 +02:00
Umur Ozkul
b3ac8848d2 comment 2022-07-05 15:27:56 +02:00
Umur Ozkul
e0b2632028 format 2022-07-05 06:20:57 +02:00
Umur Ozkul
746ca695af fix test 2022-07-05 06:17:26 +02:00
Umur Ozkul
742fc10e0d comment 2022-07-05 05:54:56 +02:00
Umur Ozkul
6edacc78e4 foo test 2022-07-05 05:16:00 +02:00
Umur Ozkul
38cc93bdec Module.defineFFI 2022-07-02 14:53:33 +02:00
Umur Ozkul
e192fe5790 PR comments 2022-06-24 12:15:38 +02:00
Umur Ozkul
07d5c6d8b3 Iev -> IEv Just more readable prefix 2022-06-23 20:38:07 +02:00
Umur Ozkul
ac9a468aa6 Reducer InternalExpressionValue created
this will allow complicated changes to execution without changing the typescript interface
2022-06-23 02:25:54 +02:00
Umur Ozkul
e661665385 Merge branch 'develop' into reducer-modules 2022-06-13 18:56:37 +02:00
Umur Ozkul
28938adf53 always merge stdlib 2022-06-13 18:54:48 +02:00
Ozzie Gooen
a690cd15fd
Merge pull request #638 from quantified-uncertainty/Documentation-auto-generation
First attempt at a complete API definition
2022-06-11 13:37:27 -07:00
Ozzie Gooen
79b71c39a0 Ran formatter and fixed tests 2022-06-11 08:47:52 -07:00
Ozzie Gooen
6dc8b711bb Lots of simple cleanup to api docs 2022-06-10 17:35:48 -07:00
Umur Ozkul
69bab17331 Math module tests defined (failing)
rename modules

define module

Math module

test helper fixed for defaults and test defined
2022-06-10 16:35:39 +02:00
Umur Ozkul
02c06b638e module access to expression 2022-06-09 14:57:25 +02:00
Umur Ozkul
5f6feb26ba Module parse tested 2022-06-09 14:39:06 +02:00
Ozzie Gooen
b675b33dfe Refactored reducerInterface files 2022-06-06 14:42:49 -07:00
Umur Ozkul
6b25e82f58 typeExpression
type statements

type paranthesis

type paranthesis

comments

TODO

typeExpression

type statements

type paranthesis

type paranthesis

comments

TODO

peggy construct functions

typeExpression

type statements

type paranthesis

type paranthesis

comments

TODO

peggy construct functions

apply

typeExpression

type statements

type paranthesis

type paranthesis

comments

TODO

peggy construct functions

apply

all types are expressions

typeExpression

type statements

type paranthesis

type paranthesis

comments

TODO

peggy construct functions

apply

all types are expressions

modifiers

typeExpression

type statements

type paranthesis

type paranthesis

comments

TODO

peggy construct functions

apply

all types are expressions

modifiers

0 arg constructors and $ (low priority type modifier)

remove GeneratedParser.js

peggy test helpers

test type parsing

type of test defined

act of binding refactored

recognize all binding functions | "$_setBindings_$" | "$_setTypeOfBindings_$" | "$_setTypeAliasBindings_$"

doBindStatement

bindings default statemetn

doBindExpression

clone type references and type aliases

doSetBindingsInNamespace

member_of, min, max

typeOr

type function

type with expression
2022-06-02 14:20:55 +02:00
Umur Ozkul
00d7304b4b format 2022-05-29 17:56:37 +02:00
Umur Ozkul
ac3fa859c0 Replace $$_block__$$ with {}
More redable language tests
2022-05-29 17:55:01 +02:00
Umur Ozkul
ce5f12360a fixed #597 2022-05-28 15:52:35 +02:00
Umur Ozkul
a386eee570 remove unit evaluation test
We provide no implementation
2022-05-23 18:18:30 +02:00
Umur Ozkul
08c73ac22f Merge branch 'Umur-reducer-dev' into reducer-dev
packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_test.res
packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.js
packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.peggy
2022-05-23 18:07:50 +02:00
Umur Ozkul
107bce506f generic unit support 2022-05-23 17:51:38 +02:00
Umur Ozkul
4628140069 numbers with units (tested) 2022-05-23 08:13:51 +02:00
Umur Ozkul
949b57c426 Error reporting if function arguments are defined
map(arr, toSample) now correctly reports

toSample not found

instead of

macro(Array,Symbol) not defined
2022-05-21 19:18:39 +02:00
Umur Ozkul
2265254531 Filter arguments passed to mathjs calls by type so that error messages are not too weird 2022-05-21 18:05:55 +02:00
Umur Ozkul
feb0284a89 format 2022-05-20 18:20:00 +02:00
Umur Ozkul
1557c197a0 renamed internal variables starting with $ so that they are not overriden by $ variables in Squigle 2022-05-20 17:11:32 +02:00
Umur Ozkul
870b0c9d4e hidden macros 2022-05-20 17:05:53 +02:00
Umur Ozkul
b165ccac9f floats in scientific notation and optional leading zero 2022-05-20 15:18:27 +02:00
Umur Ozkul
c1f269e9a4 fixed logical operator priority 2022-05-20 00:29:04 +02:00
Umur Ozkul
6b2e509aea pipes, binary, unary and post operators test 2022-05-19 23:35:15 +02:00
Umur Ozkul
75c913fac3 fixes #522 2022-05-19 20:45:15 +02:00
Umur Ozkul
ffedc5dbb3 multi-line tests 2022-05-19 20:38:10 +02:00
Umur Ozkul
a51e4be528 format 2022-05-19 20:25:18 +02:00
Umur Ozkul
c496ae5cdd multi-line tests 2022-05-19 18:19:09 +02:00
Umur Ozkul
638548c37b multi-line comment 2022-05-19 18:04:51 +02:00
Umur Ozkul
7ccb1d8108 multi-line tests 2022-05-19 17:59:25 +02:00
Umur Ozkul
3371c51e94 post operators test 2022-05-19 17:47:26 +02:00
Umur Ozkul
56f0c9c290 lambda tests 2022-05-19 17:40:30 +02:00
Umur Ozkul
7bfe286f42 multiplicative tests 2022-05-19 17:32:14 +02:00
Umur Ozkul
0753311b93 logical tests 2022-05-19 17:14:16 +02:00
Umur Ozkul
470a6add42 update ternary 2022-05-19 16:45:50 +02:00
Umur Ozkul
4ce1ab1172 added subtract test 2022-05-19 15:21:49 +02:00
Umur Ozkul
7b5fd2b101 Merge branch 'develop' into reducer-dev 2022-05-19 01:28:37 +02:00
Umur Ozkul
db050668d1 parser
toFunction

additive multiplicative

compact

whitespace

pow

relational equality

boolean

whitespace separator

left associative operators

expression

not

identifier

function call

array constructor

string

indexed values

ident

priority

block

outerBlock

optional final expression

statement separator

outerBlock

innerBlock

better errors

note xor

white space and record

unary minus

inner/outer block

statement

lambda

sort

lambda is a value constructor

lambdaCall

ternary

ternary

basicValue

cleanup

quotes

chained Functions

dot operators

unify unary operators

unify unary operatos

notes

notes

notes

notes

parser

priorities set

white space or newline defined

allow newlines

notes

function call has become a post operator

recordElement

recursive index

postOperatorToFunction

better integer

comments

notes

record priority

comment

atom

finalComment

generated parser

type cast

format

initiate test file

test initiated; todo nodeCall; nodeExpression

callIdentifier

recover extra

initiate testing

initial tests pass

tests pass

remove function node

ternary

test parse passed

to

tests pass

notes

sort

toExpression

format

notes

remove unused modules

remove unnecessary nodeLambdaCall

notes

note

fix construct array

comment test

todo

elixir pipe

fix toString

notes

initial to expression test

value test

parsing records

records

comments

ternary

ifthenelse

inner block passed

inner block

lambda

lambda

new parser tested

now test tricks

ternary in expression

to test lambda as argument

to test lambda in structures

Use peggy Parser

expectEvalError

macros tested

remove mathjs parse

reducer test

comparison operator
2022-05-19 01:23:43 +02:00
Ozzie Gooen
606f24ff24 Cleanup and addition of toInternalSampleArray 2022-05-15 21:34:36 -04:00
Umur Ozkul
99f54f596c ternary operator (tested) 2022-05-04 22:36:34 +02:00
Umur Ozkul
888b615445 Merge branch 'reducer-dev-F-ifthenelse' into ternary
packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltInMacros.res
packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res
packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Builder.res
packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_ToExpression.res
2022-05-04 21:51:15 +02:00
Umur Ozkul
8aa4248996 spelling 2022-05-04 21:23:40 +02:00
Umur Ozkul
ad220ed2b4 foreign function interface 2022-05-04 20:44:46 +02:00
Umur Ozkul
5de6aa8e0d map reduce reduceReverse reverse keep 2022-05-04 17:32:25 +02:00
Umur Ozkul
33ee0b27d5 remove inspect performance completely
Redesign required on the function interface
2022-05-04 15:14:34 +02:00
Umur Ozkul
88428c74af cases to handle with new parser. lambdas in arrays and records 2022-05-03 00:44:38 +02:00
Umur Ozkul
c5ae846df4 Note duplicate parameters 2022-05-03 00:30:41 +02:00
Umur Ozkul
78f46daed8 Note infinite recursion 2022-05-03 00:18:23 +02:00
Umur Ozkul
d26eaa2523 Note infinite recursion 2022-05-03 00:16:29 +02:00
Umur Ozkul
11d4a3bc8b do not export private modules from Reducer module 2022-05-02 23:42:11 +02:00
Umur Ozkul
490e4908e1 sam's monkeying 2022-05-02 23:18:36 +02:00
Umur Ozkul
6a3b35eb4a fixed function f not bound 2022-05-02 23:12:57 +02:00
Umur Ozkul
5a0b436932 No 666 2022-05-02 18:00:47 +02:00
Umur Ozkul
f5d3da4c73 tests 2022-05-02 15:55:02 +02:00
Umur Ozkul
9e41f0399f RENotAFunction 2022-05-02 15:55:02 +02:00
Umur Ozkul
ba104e4dfe Catching unreduced values. This is not a lazy language 2022-05-02 15:55:02 +02:00
Umur Ozkul
c68138e5f6 arity error 2022-05-02 14:19:04 +02:00
Umur Ozkul
1e673e54c3 function tricks test defined (Sam's trials) 2022-05-02 12:27:07 +02:00
Umur Ozkul
087596ec43 function trics 2022-05-02 11:44:09 +02:00
Umur Ozkul
e262f76d98 spelling 2022-05-02 11:20:08 +02:00
Umur Ozkul
76b3adddc4 rename to exampleStatementY 2022-05-02 11:12:12 +02:00
Umur Ozkul
351381339c bug fixed
logs removed
2022-04-29 18:19:52 +02:00
Umur Ozkul
8e318a8aa9 refactor reducer
removed some extra array references

rename Builder to ExpressionBuilder

Expression Builder

Trash Warning

remove parsePartial/Outer, add context to lambda

format

module Bindings

simplify types

module Macro

reduceValueList

do macro call

result map

bindings stop replacing on macro calls

Macro Test

doBindStatement

bind a statement

bindings tested. TODO bind shadowing in lambda

block tests defined

block tests defined

blocks tested

macro lambda test defined
2022-04-29 16:40:32 +02:00
Umur Ozkul
7b052ee3c3 format 2022-04-27 22:24:06 +02:00
Umur Ozkul
54f8b10a95 Reducer: Environment (Give environement to all function dispatches) - closes #169 2022-04-27 22:00:42 +02:00
Umur Ozkul
d00834bbe0 fix spelling - PR#366 2022-04-25 17:42:21 +02:00
Umur Ozkul
ac8827da28 ternary with bindings (failed) 2022-04-25 17:15:28 +02:00
Umur Ozkul
cbc2b73b20 Evaluate ternary operator (tested) 2022-04-25 16:19:56 +02:00
Umur Ozkul
c810c4576d reducer semantics ternary (tested) 2022-04-25 15:30:27 +02:00
Umur Ozkul
4d801c0b10 ternary operator mathjs parse (tested) 2022-04-25 15:11:50 +02:00
Umur Ozkul
c7be293466 remove duplicate debug test case 2022-04-25 09:57:14 +02:00
Umur Ozkul
e3ef08839f Function definition evaluated 2022-04-25 02:48:49 +02:00
Umur Ozkul
fe4e355fbe format 2022-04-24 18:42:54 +02:00
Umur Ozkul
88b6d49ad3 function definition parse (tested) 2022-04-23 21:13:43 +02:00
Umur Ozkul
a915e68049 MathJs functionAssingmentNode parsed, comments passed (tested)
Just found out that comments were already done
2022-04-23 18:07:47 +02:00
Umur Ozkul
e456726e53 Merge branch 'reducer-dev-F-debugging' into Umur-reducer-dev 2022-04-23 15:21:11 +02:00
Umur Ozkul
875f0519ac fixed - PR#333 kill W in evaluatePartialWBindings
renamed to evaluatePartialUsingExternalBindings
2022-04-22 22:19:59 +02:00
Umur Ozkul
2c7e6c750b fix PR#333 - kill W in evalaluateWBindings
renamed to evaluateUsingExternalBindings
2022-04-22 22:15:06 +02:00
Umur Ozkul
b683e720f1 PR#333 2022-04-22 21:16:27 +02:00
Umur Ozkul
0ccbf607a2 ternary operator tests defined and skipped 2022-04-22 20:57:07 +02:00
Umur Ozkul
9ce5ed53d2 inspectPerformance (tested) 2022-04-22 16:18:00 +02:00
Umur Ozkul
417f0060b6 inspect and inspect with label (tested) 2022-04-22 15:43:37 +02:00
Umur Ozkul
b903863fe7 eval partial all tested 2022-04-22 00:07:34 +02:00
Umur Ozkul
2aa3a5ac48 format 2022-04-22 00:02:27 +02:00
Umur Ozkul
5038e2c691 eval partial tested 2022-04-21 23:55:23 +02:00
Umur Ozkul
a02bc27852 eval partial tested 2022-04-21 21:33:12 +02:00