Commit Graph

338 Commits

Author SHA1 Message Date
Fedor Isakov 75287824ec BL Types: construct raw type for erasedType's bound; avoid recursion. MPSCR-129 2023-03-03 17:08:59 +01:00
Fedor Isakov 03161ea3eb Fix recursive call when gathering classifiers hierrarchy 2023-02-23 16:32:23 +01:00
Fedor Isakov d531c6a5ad Run Migration Assistant 2023-02-22 13:52:02 +01:00
Fedor Isakov 13da45a973 Fix subtle issues with type inference, introduce more
As type variables are made to be resolved later, some errors may "escape"
their respective scope, such as classifier type definition. This needs to be
addressed separately.
2022-11-23 14:03:19 +01:00
Fedor Isakov e5c56fbb40 Ensure nothing() is contained in any type 2022-11-23 14:03:18 +01:00
Fedor Isakov ad3ea9d63d Apply all migrations from 2022.2 2022-11-21 11:25:13 +01:00
Fedor Isakov b5de53e27f Fix type inference for untyped parameters; minor refactorings
Ensure nothing() type can be converted to any type.
Use the value "site" in capture() term to ensure capture types
don't get matched with `==`.
Also, avoid eagerly dropping resolveVar cint.
2022-11-21 10:50:00 +01:00
Fedor Isakov 497691e9af Fix type inference of expressions in BL, plus few minor issues 2022-11-21 10:50:00 +01:00
Fedor Isakov 0cdad6687c Introduce nothing() term, ensure it is assigned by default instead of type() 2022-09-08 14:07:06 +02:00
Fedor Isakov 4aaf66d4cb Support for LocalPropertyReference 2022-09-08 14:07:06 +02:00
Fedor Isakov 29c9a50fa9 Use built-in BL's intersection type instead of meet type 2022-08-16 18:11:49 +02:00
Fedor Isakov ab2a1b6499 BL Types: Disable overriding methods check, MPSCR-115
This check doesn't belong to the type system, is
currently implemented on top of it as a "check" rule.
2022-08-01 14:11:38 +02:00
Fedor Isakov 7fe773dcc2 Switch all type aspects in mpscore sample to typechecking terms
This includes dropping of Recover rule table and relying on
the automatic types recovery.
2022-07-28 10:30:38 +02:00
Fedor Isakov ed58f59794 Ensure all memo usages have unique keys 2022-05-26 09:55:21 +02:00
Fedor Isakov 85b0156c00 Remove erroneously added debug message 2022-04-27 11:42:02 +02:00
Fedor Isakov 04048470c5 Fix processing of recursive types
Avoid failing to process composite types because
of visiting the same classifier.
2022-02-10 23:40:20 +01:00
Fedor Isakov 041090d634 Fix module imports (new for 2021.3) 2022-02-08 10:44:48 +01:00
Fedor Isakov 475944192b Fix processing recursive types (BL) 2022-02-08 10:09:40 +01:00
Fedor Isakov 509944c138 Fix typechecking of anonymous class with default ctor 2021-10-27 12:03:49 +02:00
Fedor Isakov fedd56dd55 Extract correct classifier from anonymous class 2021-10-26 17:46:40 +02:00
Fedor Isakov ec6e56c1c3 Fix expandMacro calls to explicitly pass 'subs' parameter recursively
The hack on which expandMacro parameters used to rely on, resulted in a side-
effect, namely that once passed expandMacro parameter is available
recursively, until overridden.
With new contract all parameters need to be passed on when an expandMacro
is called recursively.
2021-09-21 17:54:51 +02:00
Fedor Isakov 6b0526ba31 Introduce language j.m.l.types to contain aspect-related generator mappings 2021-08-17 09:29:21 +02:00
Fedor Isakov 78c9b16f13 Auto-fix: change reference to default constructor 2021-07-22 15:46:21 +02:00
Fedor Isakov 73d50ef39c Add typing rules for string operations in BL 2021-07-22 13:59:19 +02:00
Fedor Isakov 9527a097b8 Migrate to the latest MPS release, apply migrations 2021-06-18 18:41:01 +02:00
Fedor Isakov 1e3c67949d Fix BL types: conditional op, raw types, capture conversion 2021-05-18 13:07:03 +02:00
Fedor Isakov 0cea4073cc Fix BL types: ensure proper type inference and incremental typechecking 2021-05-18 12:32:03 +02:00
Fedor Isakov 65ec6d9d35 Fix BL types: reimplement raw type, many small fixes
Fix type inference from containment, change priority for var-ground containment.
Fix variable reference type, property, plus operation, binary ops.
Fix type variables and bounds.
Fix checking overridden methods.
Introduce stripBounds for cleaning up wildcards.
Introduce containment string ≤ String.
2021-05-13 15:54:44 +02:00
Fedor Isakov a08c730ece Migrate to NodeRefItem 2021-05-13 15:54:43 +02:00
Fedor Isakov 637da7d966 Apply migration and rebuild project 2021-05-04 18:24:30 +02:00
Fedor Isakov ea6e930954 Apply migration and rebuild project 2021-05-04 18:24:29 +02:00
Fedor Isakov 47e6e07039 Refactor processing of inference variables
Introduce hasTarget and resolveVar constraints for delayed resolving
of inference variables. In invocation context variables are not
inferred eagerly, but wait for the end of all conversions, and then
resolved via resolveVar.
2021-05-03 13:14:11 +02:00
Fedor Isakov 998fa3b925 Fix BL types: make capture processing generic, couple of minor fixes 2021-05-03 13:14:11 +02:00
Fedor Isakov ae63863299 Minor code fix to ensure typechecking 2021-04-29 14:53:19 +02:00
Fedor Isakov d45ef7815a Fix BL types: avoid failing on incomplete source data 2021-04-29 14:53:19 +02:00
Fedor Isakov cf386d848c Fix smodel types: make gendecl processed correctly, generify dpromote 2021-04-28 08:55:00 +02:00
Fedor Isakov c6c9a6e281 BL types: drop boxing/unboxing for strong converts/coerce queries 2021-04-28 08:54:25 +02:00
Fedor Isakov 118602b2fd Fix BL types: classifier type with other types as parameters
Also fix code constructs that caused typechecking errors.
2021-04-28 08:54:25 +02:00
Fedor Isakov a204df222a Optimize BL types and queries
Make expectType optional (auxiliary).
Drop checkDecls from typeof query (unnecessary).
2021-04-28 08:54:25 +02:00
Fedor Isakov d918fa5c12 Optimize BL types
Switch to pull style boundOf instead of typeVarBound.
Drop importDecls.
2021-04-21 10:45:09 +02:00
Fedor Isakov ff6b5ec6ae Apply migrations and rebuild project 2021-04-14 13:19:50 +02:00
Fedor Isakov 6ed5c3329d Fix typing errors: specify correct type annotations 2021-04-14 11:59:09 +02:00
Fedor Isakov c0601cb099 Optimizing types for more efficient evaluation
Replace "push" style genDecl constraint with "pull" schemeOf.
Mark rules as "auxiliary" to avoid these being included in
processing as dependencies.
2021-04-12 12:47:44 +02:00
Fedor Isakov 65b32a4f48 Fix lub processing in BL types 2021-04-08 08:54:46 +02:00
Fedor Isakov 5fc019caca Mark an exhastive check rule as "auxiliary" to avoid including it as dependency. 2021-03-08 12:34:40 +01:00
Fedor Isakov 81831db86a Move experimental controlflow aspect to a separate language 2021-02-06 15:28:03 +01:00
Fedor Isakov dee5db0e96 Drop instances of TermFeature.final property 2021-02-04 18:01:10 +01:00
Fedor Isakov ed55370a01 Fix model imports (hamcrest lib has been moved to another solution) 2021-02-04 12:27:55 +01:00
Fedor Isakov 2f0f2e5b13 BL types: support coerce to target type query kind 2021-02-04 08:51:00 +01:00
Fedor Isakov 4d1cdacfe2 BL types: avoid failure on typechecking BaseMethodCall
BaseMethodCall doesn't always have an enclosing classifier.
2021-02-04 08:51:00 +01:00