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

feat: add builtin methods #62

Draft
wants to merge 263 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
263 commits
Select commit Hold shift + click to select a range
3b161aa
aggregate should only have one data instead of a list of data
robmeth May 6, 2024
0d3e2a2
utility function for creating a constants class
robmeth May 7, 2024
b73226d
generating constants with utilityFunction, changed constructure of co…
robmeth May 8, 2024
e70d787
feat: add gesetzliche Rente
alex-senger May 12, 2024
054eab6
tests for functions, data and constants
robmeth May 13, 2024
2c0bcee
update TimespanStatement generation
robmeth May 14, 2024
3df119b
generate Data
robmeth May 14, 2024
07f80e2
feat: add GrundsicherungImAlter
alex-senger May 14, 2024
c231ac7
fix build
robmeth May 14, 2024
28879ca
fix build
robmeth May 14, 2024
d847caf
change comment in test files form `//` to `#`
robmeth May 15, 2024
859c115
reverse former commit (comments back to //
robmeth May 15, 2024
4f6429d
change definition of comments to //
robmeth May 15, 2024
bc7b003
fix function and conditional statement grammar tests
robmeth May 15, 2024
26ecbe7
refactor: split parameters.ttsl into multiple packages
alex-senger May 16, 2024
386f805
feat: add kindergeld parameters
alex-senger May 16, 2024
b6cca3a
feat: add kinderzuschlag
alex-senger May 18, 2024
bafb1b0
remove yaml from kinderzuschlag.ttsl
alex-senger May 20, 2024
4dc29a5
feat: add lohnsteuer.ttsl
alex-senger May 20, 2024
39f15e7
feat: add solizuschlag
alex-senger May 20, 2024
938e6bb
generation tests for constants, data, empty function, aggregation and…
robmeth May 21, 2024
b6bc6f6
data extends tsldeclaration, DATE has the time as optional addition, …
robmeth May 21, 2024
da34a83
feat: add sozialversicherungsbeitrag.ttsl
alex-senger May 21, 2024
0116342
chore: remove yaml from sozialversicherungsbeitrag.ttsl
alex-senger May 21, 2024
bf3045a
feat: add unterhalt.ttsl
alex-senger May 21, 2024
b44f1ad
feat: unterhaltvorschuss
alex-senger May 21, 2024
e30e893
feat: implement 2024 changes
alex-senger May 21, 2024
a3fa77c
chore: cleanup
alex-senger May 21, 2024
d4ed9c3
fix generate function parameter, fix generate constant, update consta…
robmeth May 22, 2024
f6094c4
feat: add wohngeld.ttsl
May 22, 2024
1134b31
Merge branch 'main' into 25-add-builtin-parameters
alex-senger May 22, 2024
7c0efd1
refactor: put parameters in own dir
May 22, 2024
c9aec33
fix aggregation parameter types
robmeth May 22, 2024
bbcf2cf
make constant extend TslDeclaration to be referenced
robmeth May 22, 2024
a0da799
purity of function doesn't have to be specified
robmeth May 22, 2024
0be6b3d
purity of function doesn't have to be specified
robmeth May 22, 2024
94f2ba9
fix: typo
alex-senger May 22, 2024
66ad1da
fix new line appention in Module generation
robmeth May 31, 2024
091789f
add our types to the primary types,
robmeth May 31, 2024
78b3cac
Merge remote-tracking branch 'origin/main'
robmeth Jun 1, 2024
d0fbe72
Merge branch 'main' into 26-generate-code
robmeth Jun 1, 2024
ae5923d
add utility functions for timeunits for functions
robmeth Jun 6, 2024
069e1cb
update syntax for function parameters
robmeth Jun 7, 2024
ac5b07a
call the timeunit utility functions when needed in the functionbody
robmeth Jun 7, 2024
1fb2097
right syntax for result type in function
robmeth Jun 7, 2024
8eae743
add timeunit agrument to the functioncall generation
robmeth Jun 7, 2024
9c03b83
Fix aggregation Test errors
robmeth Jun 7, 2024
3d9715c
add id checks for aggregation and checks for grouped functions
robmeth Jun 12, 2024
cb33995
started adding evaluations for aggregation and modifier
robmeth Jun 12, 2024
9ca99ab
function with timeunit test
robmeth Jun 17, 2024
6811b87
fix bugs in function and constant generation
robmeth Jun 17, 2024
8d389f9
fix parameter bugs in function and constant generation
robmeth Jun 18, 2024
814d31e
fix timeunit test
robmeth Jun 18, 2024
5dae488
add function scope
robmeth Jun 18, 2024
9e9ff63
fix build errors
robmeth Jun 18, 2024
c0ed8de
add keywords to textMate file
robmeth Jun 19, 2024
eb18cc2
Merge branch 'main' into 26-generate-code
robmeth Jun 20, 2024
a4b2203
change file extension to '.ttsl'
robmeth Jun 20, 2024
0afd3ab
add NodeDescription to ttsl.json file
robmeth Jun 20, 2024
147ffd0
scoping test in same file
robmeth Jun 20, 2024
682881e
update timestamp NodeDescription
robmeth Jun 21, 2024
a352b46
remove unnecessary grammar
robmeth Jun 24, 2024
0a27eb7
remove the generation of removed grammar
robmeth Jun 24, 2024
0993c3c
remove unnecessary Validators
robmeth Jun 24, 2024
d3926a5
remove unnecessary Validation tests
robmeth Jun 24, 2024
2371369
remove unnecessary validation tests
robmeth Jun 24, 2024
dcd6d72
remove unnecessary scoping functions
robmeth Jun 24, 2024
e4b5739
remove unnecessary code from package manager
robmeth Jun 24, 2024
f754026
remove unnecessary functions from nodeProperties
robmeth Jun 24, 2024
003c2c7
fix typo in node Properties
robmeth Jun 24, 2024
dd9642e
fix use of node property functions
robmeth Jun 24, 2024
bb82883
fix visibility
robmeth Jun 25, 2024
87e1a7f
remove unnecessary types
robmeth Jun 25, 2024
7f02abb
clean up lsp
robmeth Jun 25, 2024
e7d34b9
fix build error
robmeth Jun 25, 2024
e7f29b5
remove unnecessary code
robmeth Jun 25, 2024
3381938
fix build errors in python generator
robmeth Jun 25, 2024
53ff930
remove unneccesarry purity computer
robmeth Jun 25, 2024
8838880
remove unnecessary functions in call graph computer
robmeth Jun 25, 2024
a5c6c8c
remove unnecessary documentation provider
robmeth Jun 26, 2024
fc44b0d
remove unnecessary buildins
robmeth Jun 26, 2024
542b0e3
remove use of unnecessary builtins and add fuiltins for functions
robmeth Jun 28, 2024
c12da33
remove unnecessary node mapper functions
robmeth Jun 28, 2024
7c992cb
remove use of purity functions
robmeth Jun 29, 2024
1e86af4
remove statementMustDoSomething call in validator
robmeth Jun 29, 2024
45cf2c1
Merge branch 'main' into 25-add-builtin-parameters
alex-senger Jun 29, 2024
47b2e1f
fix: single line comment syntax
alex-senger Jun 29, 2024
43359fc
fix: add public visibility to each constant
alex-senger Jun 29, 2024
e1326f0
fix: replace '|' with 'or'
alex-senger Jun 29, 2024
fa252f9
feat: add arbeitslosenversicherung methods
alex-senger Jun 29, 2024
40d009d
feat: add beitragsbemessungsgrenzen
alex-senger Jun 29, 2024
7a87562
feat: add einkommensgrenzen methods
alex-senger Jun 29, 2024
83d0893
fix: replace 'const' with 'constant'
alex-senger Jul 1, 2024
6658b4b
add List and Dictionary Types
robmeth Jul 1, 2024
a4ef7c6
remove unnecessary Code in type computer
robmeth Jul 1, 2024
7750e2e
remove unnecessary code from type-checker
robmeth Jul 1, 2024
c8c1609
remove unnecessary code in partial evaluator
robmeth Jul 1, 2024
db9d4da
remove class hierachy
robmeth Jul 1, 2024
e6b39c0
remove unnecessary functions in model.ts
robmeth Jul 1, 2024
5f7c4b7
update syntax description
robmeth Jul 1, 2024
e59d5d4
rename fileExtensions
robmeth Jul 1, 2024
106113d
update file names and test file extensions
robmeth Jul 1, 2024
f12b3f3
fix file generation
robmeth Jul 2, 2024
8c4c582
fix grammar tests
robmeth Jul 11, 2024
e7d615b
add types in grammar definition
robmeth Jul 16, 2024
02392c3
update typechecker to new types
robmeth Jul 16, 2024
762ad34
update types in type validator
robmeth Jul 16, 2024
f29ae3d
remove callable type in chainedExpression validation
robmeth Jul 16, 2024
d8e52c1
update Types in indexedAccess validation
robmeth Jul 16, 2024
8d4e548
remove CallableType and add TypeParameter function
robmeth Jul 16, 2024
cf7fd6f
feat: add min and max methods
alex-senger Jul 17, 2024
634ac21
fix: umlaute
alex-senger Jul 17, 2024
cef0beb
feat: add gesetzliche Krankenversicherung
alex-senger Jul 17, 2024
2a90a61
umlaute and ß
alex-senger Jul 17, 2024
457b957
fix: imports
alex-senger Jul 18, 2024
7a77d30
feat: add gesetzliche Pflegeversicherung
alex-senger Jul 18, 2024
bdf81ba
add TypeParameters
robmeth Jul 22, 2024
c781ddd
remove coreTypes and add new Types
robmeth Jul 22, 2024
544c739
add len and key/value functions for list and dictionary
robmeth Jul 22, 2024
dc80bbf
add new types to formatter
robmeth Jul 22, 2024
3b0301d
update handling of calls/allables
robmeth Jul 22, 2024
37542cf
feat: add gesetzliche Rentenversicherung
alex-senger Jul 23, 2024
d19d74d
remove purity tests
robmeth Jul 23, 2024
9ab9d89
remove partial evaluation tests
robmeth Jul 23, 2024
b1eb3eb
remove old Types in tests
robmeth Jul 23, 2024
3163d26
feat: add einkommenssteuer
alex-senger Jul 23, 2024
f1fc165
feat: add abgeltungssteuer
alex-senger Jul 23, 2024
8437452
Merge branch 'main' into 26-generate-code
robmeth Jul 29, 2024
f665388
remove anything related to member Accesses
robmeth Jul 30, 2024
59530ad
remove unneccessary imports
robmeth Jul 30, 2024
acc0f6f
remove uneccessary validations
robmeth Aug 1, 2024
adba984
add type compution for literals
robmeth Aug 1, 2024
ba9da65
fix grammar bugs
robmeth Aug 1, 2024
dddde33
fix inlay hint for placeholder
robmeth Aug 1, 2024
e6023d4
fix autocompletion
robmeth Aug 1, 2024
8b9ef12
feat: lohnsteuer
alex-senger Aug 19, 2024
a8a667a
feat: solisteuer
alex-senger Aug 19, 2024
2b4d505
Merge remote-tracking branch 'origin/main' into 35-add-builtin-methods
alex-senger Aug 19, 2024
ab7fb7d
grammar und generation tests klappen soweit abgesehen von paar scopin…
robmeth Aug 20, 2024
ed1b7b8
update old links (code documentation doesn't have a new one yet)
robmeth Aug 20, 2024
0cc4d6f
make MegaLinter happy
robmeth Aug 20, 2024
f360959
Merge branch 'main' into 25-add-builtin-parameters
alex-senger Aug 20, 2024
40be2b5
Merge branch '26-generate-code' into 25-add-builtin-parameters
alex-senger Aug 20, 2024
118ffae
make MegaLinter happy
robmeth Aug 20, 2024
50c5d4e
make MegaLinter happy
robmeth Aug 20, 2024
2b90ff2
Merge branch '26-generate-code' into 25-add-builtin-parameters
alex-senger Aug 20, 2024
98f2cb1
add Timespan tests and semicolon after value
robmeth Aug 20, 2024
4669607
Merge branch '26-generate-code' into 25-add-builtin-parameters
alex-senger Aug 20, 2024
aa1c6d5
adding Timeunit grammar tests
robmeth Aug 20, 2024
5b46db3
adding id grammar tests
robmeth Aug 20, 2024
206fe81
add grouping grammar tests
robmeth Aug 20, 2024
f059ef1
scoping tests for loop and conditional Statement
robmeth Aug 21, 2024
871ec92
fix import generation test
robmeth Aug 21, 2024
d60f91f
fix scoping for conditionalStatements and Loops
robmeth Aug 21, 2024
123e6f9
fix indexed Access and dictionary test
robmeth Aug 21, 2024
0ba804d
fix default value generation in parameters
robmeth Aug 23, 2024
a3fded1
update tests with parameter types and fix errors
robmeth Aug 23, 2024
c59ac7e
fix ability to reassign local variables
robmeth Aug 24, 2024
75b2807
fix foreach element type computation
robmeth Aug 24, 2024
75aab3f
Update existing partial evaluation tests file extention
robmeth Aug 29, 2024
83c6916
arbeitslosengeld syntax fix
alex-senger Aug 29, 2024
38fb597
einkommenssteuer syntax fix
alex-senger Aug 29, 2024
62e8a28
elterngeld syntax fix
alex-senger Aug 29, 2024
1c691c1
erwerbsminderungsrente syntax fix
alex-senger Aug 29, 2024
fef2f51
erziehungsgeld syntax fix
alex-senger Aug 29, 2024
b7cef31
grundsicherungImAlter syntax fix
alex-senger Aug 29, 2024
0156a50
fix bug in type generation
robmeth Aug 30, 2024
f8903fe
fix syntax errors
alex-senger Sep 1, 2024
cb81d56
fix syntax errors
alex-senger Sep 1, 2024
c826b1a
remove experimental Language validation check and add Umlaute to grammar
robmeth Sep 2, 2024
3d5b13e
add nothing type and nullability computation
robmeth Sep 2, 2024
13f0192
wohngeld wip
alex-senger Sep 3, 2024
0d56fff
add extension
robmeth Sep 3, 2024
25ac98f
fix code generation ".contents" problem
robmeth Sep 4, 2024
25d3457
update some tests to ttsl grammar
robmeth Sep 5, 2024
2f67e20
add type computation of Data
robmeth Sep 8, 2024
6ad0173
fix typehints
alex-senger Sep 9, 2024
2349478
fix typehints
alex-senger Sep 9, 2024
882fe1a
split vertrauensschutz constants
alex-senger Sep 9, 2024
5758457
Merge remote-tracking branch 'origin/26-generate-code' into 25-add-bu…
alex-senger Sep 14, 2024
147d8f9
fix type hints
alex-senger Sep 14, 2024
a875a44
Merge remote-tracking branch 'origin/26-generate-code' into 35-add-bu…
alex-senger Sep 14, 2024
f40c312
Merge remote-tracking branch 'origin/25-add-builtin-parameters' into …
alex-senger Sep 14, 2024
6f6ed7f
umlaute
alex-senger Sep 14, 2024
d5b1313
umlaute
alex-senger Sep 14, 2024
3440a1a
add method linking in arbeitslosenversicherung
alex-senger Sep 20, 2024
af1ebf9
param linking
alex-senger Sep 20, 2024
1f2455e
wohnort_ost brackets
alex-senger Sep 20, 2024
f9fe0ca
method linking
alex-senger Sep 20, 2024
c5be6b5
fix methods gesetzliche Krankenversicherung
alex-senger Sep 23, 2024
9c562c1
fix methods gesetzliche Pflegeversicherung
alex-senger Sep 23, 2024
8484b7b
remove unused import
alex-senger Sep 23, 2024
8341703
fix methods gesetzliche Rentenversicherung
alex-senger Sep 24, 2024
1db183b
fix methods abgeltungssteuer
alex-senger Sep 24, 2024
1628ed4
add type computation for different timespans in function and constants
robmeth Sep 27, 2024
51d9e25
fix validation check ´indexedAccessIndexMustBeValid´
robmeth Sep 28, 2024
c819842
test type computation for local variables
robmeth Sep 28, 2024
f636139
test grammar options for timespans in constants
robmeth Sep 28, 2024
bec3743
fix generation tests
robmeth Sep 28, 2024
4ee3b48
add zu versteuerndes einkommen: einkommen
alex-senger Sep 28, 2024
bdd2590
add option for multiple ids a function can be grouped by and matching…
robmeth Sep 29, 2024
1461a8c
adjust einkommenssteuer
alex-senger Sep 30, 2024
fb34e65
add freibeträge mockup
alex-senger Sep 30, 2024
9098ab3
Merge branch '25-add-builtin-parameters' into 35-add-builtin-methods
alex-senger Sep 30, 2024
1cdd1fb
Merge branch '26-generate-code' into 35-add-builtin-methods
alex-senger Sep 30, 2024
0065f43
add arm64 dependency
alex-senger Sep 30, 2024
a07de21
umlaute in declarationsnamen erlauben
robmeth Sep 30, 2024
ed68a25
add option of timespan type definition in constants
robmeth Sep 30, 2024
0eba31c
fix mockup
alex-senger Sep 30, 2024
5eab9a3
Merge branch '26-generate-code' into 35-add-builtin-methods
alex-senger Sep 30, 2024
ee2a28f
remove inf
alex-senger Sep 30, 2024
601a931
fix einkommenssteuerabzüge
alex-senger Sep 30, 2024
adc6f4a
add feature to use different timespan options in one declaration
robmeth Sep 30, 2024
5b29011
Merge branch '26-generate-code' into 35-add-builtin-methods
alex-senger Oct 1, 2024
18b56c8
fix syntax errors
alex-senger Oct 1, 2024
d69ad1f
fix most of linters problems
robmeth Oct 1, 2024
5dd9b82
remove type blocks in timespand and add typealias including tests and…
robmeth Oct 3, 2024
680747b
Merge branch '26-generate-code' into 35-add-builtin-methods
alex-senger Oct 7, 2024
686b23e
fix parameter typehints
alex-senger Oct 7, 2024
57c904e
add Runner
robmeth Oct 14, 2024
d64bb23
add runner test
robmeth Oct 14, 2024
a99fa1a
fix aggregation type test
robmeth Oct 14, 2024
127405e
tests skippen oder fixen
robmeth Oct 21, 2024
4188c1e
remove Runner
robmeth Oct 21, 2024
b6d7cc0
remove Runner 2.0
robmeth Oct 21, 2024
5919be4
fix typing of elvis operation test
robmeth Oct 26, 2024
427c262
adjust to syntax
alex-senger Oct 28, 2024
ef91795
add freibeträge mockup
alex-senger Oct 30, 2024
67c2516
Merge branch '26-generate-code' into 35-add-builtin-methods
alex-senger Oct 30, 2024
904355a
add code generation of simulation and matching test
robmeth Nov 12, 2024
4a4f488
add type computation of predefined functions
robmeth Nov 12, 2024
1aea443
update tests for aggregation
robmeth Nov 12, 2024
2705a85
test result for simulation code generation i forgot to commit
robmeth Nov 12, 2024
8d34d7e
once again add Runner
robmeth Oct 14, 2024
7901242
fix building error
robmeth Nov 12, 2024
eddf06f
update command name
robmeth Nov 12, 2024
c06fd49
make linter happy
robmeth Nov 12, 2024
bab4339
add sum function
alex-senger Nov 12, 2024
96bb98a
Merge branch '26-generate-code' into 35-add-builtin-methods
alex-senger Nov 12, 2024
e071e58
fix symbolKind error
robmeth Nov 14, 2024
53997d2
pd -> pd.Dataframe
robmeth Nov 14, 2024
2b20464
add simulation command
robmeth Nov 19, 2024
dfd8587
fix build errors
robmeth Nov 19, 2024
7f7bec0
fix build error 2.0
robmeth Nov 19, 2024
4b03369
add resources folder
alex-senger Nov 19, 2024
1a635ad
update timeunit grammar
robmeth Nov 19, 2024
dd78f46
Merge branch '26-generate-code' of https://github.com/SEEDS-Group/TTS…
robmeth Nov 19, 2024
ea5acd8
Merge branch '26-generate-code' into 35-add-builtin-methods
alex-senger Nov 25, 2024
69772fd
fix gesetzlichePflegeversicherung params
alex-senger Nov 25, 2024
ccf9d84
fix syntax errors
alex-senger Nov 25, 2024
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
2 changes: 1 addition & 1 deletion packages/ttsl-lang/src/language/grammar/ttsl.langium
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ fragment TslConstantFragment:
'constant'
name=ID
(':' ^type+=TslType ('{' (timespanValueEntries+=TslTimespanValueEntry)* '}' |
'=' value=TslExpression ';'?) | '{' ((timespanValueEntries+=TslTimespanValueEntry)* | (^type+=TslType '{' (timespanValueEntries+=TslTimespanValueEntry)* '}')*)'}')
'=' value=TslExpression ';'?) | '{' ((timespanValueEntries+=TslTimespanValueEntry) | (^type+=TslType '{' (timespanValueEntries+=TslTimespanValueEntry)* '}'))* '}')

;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Functions --------------------------------------------------------------------

def test():
true
false
True
False
1
1
None
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ constant myConstant2 {
}

constant myConstant3 {
Int {
from 1999-01-01 = 0;
}
from 1999-01-01: Int = 0;
String{
from 2001-01-01 = "a";
from 2003-01-01 = "b";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ constant test2 {
String{
from 2001-01-01 = "a";
}
Int{
from 2003-01-01 = 2;
}

from 2003-01-01: Int = 2;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ constant myConstant2 {
}

constant myConstant3 {
Int {
from 1999-01-01 = 0;
}
from 1999-01-01: Int = 0;

String{
from 2001-01-01 = "a";
from 2003-01-01 = "b";
}
Int{
from 2004-01-01 = 2;
}

from 2004-01-01: Int = 2;
}

function myFunction() {
Expand Down