Good question; documentation about this as of yet scarce. The best by-example code is here: http://tutor.rascal-mpl.org/Recipes/Recipes.html#/Recipes/Metrics/MeasuringJava/MeasuringJava.html
The source code of the M3 model can explain a lot here:
E.g. the latter contains these definitions:
anno rel[loc from, loc to] M3@extends; // classes extending classes and interfaces extending interfaces
anno rel[loc from, loc to] M3@implements; // classes implementing interfaces
anno rel[loc from, loc to] M3@methodInvocation; // methods calling each other (including constructors)
anno rel[loc from, loc to] M3@fieldAccess; // code using data (like fields)
anno rel[loc from, loc to] M3@typeDependency; // using a type literal in some code (types of variables, annotations)
anno rel[loc from, loc to] M3@methodOverrides; // which method override which other methods
anno rel[loc declaration, loc annotation] M3@annotations;
and the former contains these:
anno rel[loc name, loc src] M3@declarations; // maps declarations to where they are declared. contains any kind of data or type or code declaration (classes, fields, methods, variables, etc. etc.)
anno rel[loc name, TypeSymbol typ] M3@types; // assigns types to declared source code artifacts
anno rel[loc src, loc name] M3@uses; // maps source locations of usages to the respective declarations
anno rel[loc from, loc to] M3@containment; // what is logically contained in what else (not necessarily physically, but usually also)
anno list[Message] M3@messages; // error messages and warnings produced while constructing a single m3 model
anno rel[str simpleName, loc qualifiedName] M3@names; // convenience mapping from logical names to end-user readable (GUI) names, and vice versa
anno rel[loc definition, loc comments] M3@documentation; // comments and javadoc attached to declared things
anno rel[loc definition, Modifier modifier] M3@modifiers; // modifiers associated with declared things
These definitions exactly document the model for Java M3 together. I don't know how much of this information is present if you generate the M3 model from a jar file directly. From an Eclipse source project, all of these tables are filled.
To implement your query you can:
[ m@types | m <- models]
; generates a list[rel[loc name, TypeSymbol typ]]
{ *m@types | m <- models}
; a rel[loc name, TypeSymbol typ] union of all types tables in all models
{ t | m <- models, t <- m@types}
; different definition of the previous