Skip to content

Array and map FFIs, lots of cleanups#14

Merged
JanBessai merged 26 commits into
mainfrom
progress_on_arrays
Jun 12, 2026
Merged

Array and map FFIs, lots of cleanups#14
JanBessai merged 26 commits into
mainfrom
progress_on_arrays

Conversation

@JanBessai

Copy link
Copy Markdown
Member

Adds proper Map<A, B> FFIs, fixes Array FFIs, cleans dynamic programming code, fixes various ffi bugs.

heineman and others added 26 commits March 18, 2026 14:30
…test cogen. Completed Scala upgrade of FFIs. Unable to generate bottom up since Arrays are not fully integrated into types.
works for bottomUp, topDown, topDownMemo in Glossary
Problem: we need a default value for the element type of the (nested) arrays.
Completed multi-dimen arrays in Scala/inbetween. Might be a bit sloppy.

Confirmed works for BellNumber output in both Java and Scala.

Still have a problem with init fields in methods in Scala (see hello World scala, which doesn't )
… make it easy to generate all Java or all Scala.

Note: Test cases in scala for MinPathSum do not properly generate and this is a scala/array problem since it works in java
…es and tests properly for Glossary in Java and Scala.
…means you can remove new operator for them all.

be careful not when using EqualExpression to compare two character types, since you need to pass in the third argument which is the non-integer type.
…means you can remove new operator for them all.

be careful not when using EqualExpression to compare two character types, since you need to pass in the third argument which is the non-integer type.

Added Maps as new FFI
…n, but as with the Maps extension, work remains.

Addressed WordBreak and NeedleMan which each need their own independent provide, since tests are not yet generic enough to be able to support extensions.
…th test cases. All of the chimeric LiteralXYZ classes are relegated to the archive.* subpackage for older implementations. Now use LiteraTuple() to combine multiple values in test cases.

Continued to work on Map (added ContainsKeyOp) though it still doesn't fully work in Scala.

Added GridWithObstacles DP problem and solution. Started NumberPathsWithKCoins but this needs work.
Confirmed able to generate both Scala and Java expression problem code, validating compilation and test cases.
Still need to fix exceptions.

Still has problems with topDownWithMemo in Java because we need new scheme to update properly
@JanBessai JanBessai merged commit e855379 into main Jun 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants