Skip to content

chore: uptake mereology across the project#50

Merged
deer merged 3 commits intomainfrom
mereology
May 6, 2026
Merged

chore: uptake mereology across the project#50
deer merged 3 commits intomainfrom
mereology

Conversation

@deer
Copy link
Copy Markdown
Collaborator

@deer deer commented May 6, 2026

uptake Workday/base.build#58

Wire the mereology Composite contract (parts() / composition()) onto descriptors, type usages, expressions, and statements throughout the codemodel. This makes the entire AST uniformly navigable — callers can transitively walk any subtree by type without writing custom visitors.

Scope

  • codemodel-foundation: TypeDescriptor, all TypeUsage subclasses, AbstractTraitable, CallableDescriptor, ThrowableDescriptor
  • hierarchical-codemodel, objectoriented-codemodel: ParentTypeDescriptor, FieldDescriptor, MethodDescriptor, ConstructorDescriptor, ParameterizedTypeDescriptor
  • expression-codemodel: binary/unary arithmetic and logical, comparison, Cast, FunctionUsage
  • imperative-codemodel: Assignment, Block, If, Return, While
  • jdk-codemodel: all statement nodes (Assert, CatchClause, DoWhile, EnhancedFor, For, LocalVariableDeclaration, Switch, Synchronized, Throw, Try), MethodBodyDescriptor

Tests: MereologyTests in expression-codemodel, imperative-codemodel, and jdk-codemodel; integration tests in JdkInitializerTests confirming end-to-end traversal over a live JDKCodeModel, including var-type
inference and NewObject discovery via PersonFactory.

@deer deer merged commit ef1bab2 into main May 6, 2026
1 check passed
@deer deer deleted the mereology branch May 6, 2026 13:13
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.

1 participant