Commit Graph

2959 Commits

Author SHA1 Message Date
Fedor Isakov ab87c8a129 Support strong convert/coerce queries 2021-04-28 08:54:25 +02:00
Fedor Isakov 870966bd70 Types for j.m.lang.script language 2021-04-28 08:54:25 +02:00
Fedor Isakov cce261ec8c Fix cleaning up the caches on modules reload 2021-04-28 08:54:25 +02:00
Fedor Isakov a9db172297 Smodel types: conversion for concept and conceptNode types 2021-04-28 08:54:25 +02:00
Fedor Isakov fceef17a64 Fix typechecking errors 2021-04-28 08:54:25 +02:00
Fedor Isakov 7d0e765381 Fix coderules types
Require statement accepts node-ptr
Fix coderules types: fix logical type in LateParameter
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 5dd55a4dae Ignore error messages in test 2021-04-28 08:54:25 +02:00
Fedor Isakov 450f2e5989 Fix coerce to pattern with antiquotations.
A node from a pattern with antiquotations is treated as a "hollow"
type with only the form defined, and all parameters being capturing
variables.
This is a workaround for certain kinds of coerce queries that define
unsound pattern nodes.
2021-04-28 08:54:25 +02:00
Fedor Isakov c0154026ef WIP Fix smodel types: reflective conversion 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 dbbb37384f Fix and optimizate ClassicTermTrie
Implement cleanup on removing value.
2021-04-28 08:54:25 +02:00
Fedor Isakov 6088ac0085 Fix displaying of logical value variables in activation trace
Unassigned variables to be displayed as X?,
assigned to print their contents..
2021-04-28 08:54:24 +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 cff18e7ca5 Optimize RulePlanHandler
Avoid iterating over LinkedHashMap (ineffective).
Do topo-sort only once on creating the object.
2021-04-21 10:40:51 +02:00
Fedor Isakov bf7939b350 Fix logic types: check for null reference 2021-04-19 22:55:09 +02:00
Fedor Isakov fb27a6aa14 Drop unused model import 2021-04-19 22:55:09 +02:00
Fedor Isakov 394cb720c1 Optimize program producing: drop checking of constraints
Constraints arity is no longer checked.
Checking for null arguments to constraints is done
in AbstractConstraint's constructor.
2021-04-19 22:55:09 +02:00
Fedor Isakov a812e2a9bb Make InvalidConstraintException a RuntimeException 2021-04-19 22:55:09 +02:00
Fedor Isakov 7722327958 Reactor: fix session token not being used 2021-04-19 22:46:45 +02:00
Fedor Isakov 19da8e26eb Reactor: optimize Dispatcher
Switch to lazy initialization of RuleMatcher and RuleMatchingProbe.
2021-04-19 22:41:56 +02:00
Fedor Isakov 205c01ae45 Reactor: optimize and cleanup ClassicTermTrie
Also drop obsolete implementation of TermTrie.
2021-04-19 22:37:23 +02:00
Fedor Isakov 96ac2b3160 Reactor: optimize and fix RuleIndex
Implement missing method ArgumentRuleIndex.clear().
General code cleanup and optimization.
2021-04-19 10:27:24 +02:00
Fedor Isakov 09149fd688 Types for j.m.l.smodel.query lang 2021-04-15 18:06:07 +02:00
Fedor Isakov 2f4f3dae6f Minor optimization in smodel types: pull-style constraint
Instead of reactively create push-style constraint conceptHierarchy,
make it available on request, pull-style.
2021-04-15 16:56:11 +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 700a7f56b4 Fix generator types 2021-04-14 10:55:29 +02:00
Fedor Isakov 8dbe0c212d Fix smodel types 2021-04-14 10:54:10 +02:00
Fedor Isakov 3a70382202 Fix typesystem types: support for meet/join 2021-04-14 10:53:41 +02:00
Fedor Isakov e76dab0d84 Fix logic and coderules types 2021-04-14 10:53:17 +02:00
Fedor Isakov 93fd42365a Fix NodeWalker ignoring annotations 2021-04-13 22:57:06 +02:00
Fedor Isakov 4d1511d794 Reactor: drop most of incrementality- and preamble-related stuff
Neither incremental evaluation of program or "preamble" features
are useful, but they complicate things and cause major bugs.
2021-04-13 22:57:06 +02:00
Fedor Isakov 49357ab87a Drop all usages of "principal store" and "preamble" feature 2021-04-13 22:57:06 +02:00
Fedor Isakov 54b8d42e52 Drop obsolete RuleMatcher implementation 2021-04-13 12:23:17 +02:00
Fedor Isakov 7f55407c7a Rebuild project 2021-04-12 17:12:34 +02:00
Fedor Isakov db7fbfc748 Minor optimization: precompute hash value 2021-04-12 12:50:31 +02:00
Fedor Isakov 8a00024658 Turn back on incremental rebuilding of RuleIndex 2021-04-12 12:49:58 +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 6970635bfe Drop "withoutIncremental" option for tests, disable one test
Test DemoTypeClasses fails every once in a while.
2021-04-12 12:47:44 +02:00
Fedor Isakov 008887944d Refactor "incremental" tests launcher to not rely on incrementality
The incremental algorithm using history and replay/revalidate of
matches is deprecated and will be removed soon. The incremental tests
are now relying on the UpdataRecorder and RulePlanHandler to
implement incrementality.
2021-04-12 12:47:44 +02:00
Fedor Isakov 1769998f7f Implement Rule.isBasis contract, fix feedback basis processing
Invalidated rules set invalidates feedback that has any of them it in its basis.
Validated rules invalidates feedback that has all of validated
rules in its basis set.
2021-04-12 12:47:44 +02:00
Fedor Isakov 0cef5ad298 Introduce method isBasis to Rule class, use that for feedback
Feedback basis are calculated for rules in history that
are marked as "basis" instead of "principal".
2021-04-12 12:47:44 +02:00
Fedor Isakov 87a843088c Cosmetics: report ERR on a query finished with !success status 2021-04-12 12:47:44 +02:00
Fedor Isakov 077e1564b4 Refactor and optimize RulePlanHandler, drop obsolete contracts
RulePlanHandler does not rely anymore on fixed total order of
input nodes in a given rule template. An update constitutes a list
of rules/reqs generated for a pair template+input node.
All hacks that use sets of rule IDs removed.
Also, support for "new" and "dropped" rules removed, incremental algorithm
no longer supported.
2021-04-12 12:47:44 +02:00
Fedor Isakov 1d1db7cba5 Disable all preamble-related stuff 2021-04-12 12:47:44 +02:00
Fedor Isakov e8f54c74f4 Update MPS build number 2021-04-12 12:47:43 +02:00
Fedor Isakov c37f8f82eb Minor optimization: rely on variable count when mapping terms 2021-04-12 12:47:43 +02:00
Fedor Isakov 384fc5dce8 Adapt all predicates to try-tell protocol 2021-04-08 12:41:17 +02:00
Fedor Isakov 207be07df9 Introduce try-tell protocol for invoking predicates
The default tell protocol assumes an exception is to be thrown
in case predicate is not satisfied. This may lead to unnecessary
exceptions being thrown in a situation where a simple failure
status would have been sufficient.
2021-04-08 11:31:29 +02:00