-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
22286: Amlg lang improvements: removes query_weighted_sample, weighte…
…d_rand, updates rand, query_sample, sort, reduce, MAJOR (#327) Removes query_weighted_sample and weighted_rand, updates query_sample and rand to handle functionality. Removes access to (target) from reduce and sort opcodes for performance and consistency reasons. Improves documentation and clarifies some opcode use.
- Loading branch information
1 parent
e837c79
commit f797e18
Showing
15 changed files
with
486 additions
and
909 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,80 @@ | ||
(seq | ||
(create_entities "persist_transactions" (list 1 2 3 4)) | ||
(create_entities (list "persist_transactions" "child") (list 5 6 7)) | ||
(create_entities (list "persist_transactions" "child" "doublechild1") (lambda (list ##eight 8 ##nine 9))) | ||
(create_entities (list "persist_transactions" "child" "doublechild3") (list 12 13)) | ||
(store_entity "amlg_code/test_output/persist_transactions.caml" "persist_transactions" (null) (true) {flatten (true) transactional (true)}) | ||
(create_entities (list "persist_transactions" "child" "doublechild2") (list 10 11)) | ||
(destroy_entities (list "persist_transactions" "child" "doublechild3")) | ||
(assign_to_entities (list "persist_transactions" "child" "doublechild1") {eight 88}) | ||
|
||
(load_entity "amlg_code/test_output/persist_transactions.caml" "persist_transactions_copy" (null) (false) {execute_on_load (true) transactional (true) require_version_compatibility (true)}) | ||
(print (difference_entities "persist_transactions_copy" "persist_transactions") "\n") | ||
(destroy_entities "persist_transactions_copy" "persist_transactions") | ||
) | ||
|
||
|
||
(create_entities "TestContainerExec" | ||
(lambda (parallel | ||
##^a 3 | ||
##b (contained_entities) | ||
##c (+ x 1) | ||
##d (call_entity "Child5" "q" (assoc x x)) | ||
##!e 12 | ||
##x 4 | ||
##y 5 | ||
)) | ||
) | ||
(create_entities (list "TestContainerExec" "Child1") | ||
(lambda (parallel | ||
##x 3 | ||
##y 4 | ||
##!e 7 | ||
##weight 0.45 | ||
##weight_eq 1 | ||
)) | ||
) | ||
(create_entities (list "TestContainerExec" "Child2") | ||
(lambda (parallel | ||
##x -1 | ||
##y -1 | ||
##weight 0.45 | ||
##weight_eq 1 | ||
)) | ||
) | ||
(create_entities (list "TestContainerExec" "Child3") | ||
(lambda (parallel | ||
##x 100 | ||
##y 100 | ||
##weight 0.02 | ||
##weight_eq 1 | ||
)) | ||
) | ||
(create_entities (list "TestContainerExec" "Child4") | ||
(lambda (parallel | ||
##x 100 | ||
##y 100 | ||
##radius 400 | ||
##weight 0.02 | ||
##weight_eq 1 | ||
)) | ||
) | ||
(create_entities (list "TestContainerExec" "Child5") | ||
(lambda (parallel | ||
##p 3 | ||
##q (+ x (call_container "^a")) | ||
##bar "crunchy" | ||
##weight 0.02 | ||
##weight_eq 1 | ||
)) | ||
) | ||
(create_entities (list "TestContainerExec" "Child6") | ||
(lambda (parallel | ||
##x 1 | ||
##y 2 | ||
##bar "not crunchy" | ||
##weight 0.02 | ||
##weight_eq 1 | ||
)) | ||
) | ||
(create_entities (list "TestContainerExec" "Child7") | ||
(lambda (parallel | ||
##x 0 | ||
##y 10 | ||
##weight 0.02 | ||
##weight_eq 1 | ||
)) | ||
) | ||
|
||
(print (contained_entities "TestContainerExec" (list | ||
(query_sample 1 "weight") | ||
))) | ||
|
||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.