charon
charon copied to clipboard
Name things consistently and idiomatically
Naming could be improved across the project. Among other things:
- [x] "assumed" should be renamed to "built-in";
- [x]
Idis a confusing suffix for a rust user: it normally designates integer identifiers only; - [x] Similarly,
Rawis used in places where a rust user would naturally use aKindsuffix, e.g.TerminatorKind; - [ ] Traits and clauses and predicates are subtle things, I think better names would help follow what's happening.
- [x] Names don't always match between the rust and ocaml sides. Once we're happy with the rust side we should propagate the changes.
My current list:
- [x]
Var->Local: https://github.com/AeneasVerif/charon/pull/645 - [x]
RawStatement->StatementKindhttps://github.com/AeneasVerif/charon/pull/805 - [x]
RawTerminator->TerminatorKindhttps://github.com/AeneasVerif/charon/pull/805 - [x]
RawConstantExpr->ConstantExprKindhttps://github.com/AeneasVerif/charon/pull/805 - [x]
Statement.content->Statement.kind,Terminator.content -> Terminator.kind,ConstantExpr.value->ConstantExpr.kind - [x]
FunIdOrTraitMethodRef->FnPtrKind,FnPtr.func->FnPtr.kind - [x]
RawSpan->SpanData,Span.span->Span.data - [x]
TypeVar/RegionVar/ConstGenericVar->TypeParam/RegionParam/ConstGenericParam - [x]
TraitClause->TraitParam - [x]
AnyTransId->ItemId,AnyTransItem->ItemRef,AnyTransItemMut->ItemRefMut - [ ]
DeBruijnVar->Var? (this one is likely to cause clashes in aeneas) - [x]
ItemKind->ItemSource,FunDecl.kind->FunDecl.src,GlobalDecl.kind->GlobalDecl.src - [x]
TraitDecl.parent_clauses->TraitDecl.implied_clauses,TraitImpl.parent_trait_refs->TraitImpl.implied_trait_refs - [ ]
TraitRef->TraitExpr? - [ ]
FnPtr->FnRef?