Skip to content

v0.10.0-Rebuild

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 21 Jan 10:44
· 22 commits to main since this release
4ead422

Breaking changes

  • Python dependencies are set up locally in .venv environment. Therefore, you should make the following changes:

    • fix docker-compose.yml file to run healthcheck.py for sc-server in .venv or use scripts/healthcheck.sh that encapsulates this logic;
    • and use .venv to launch your python scripts if they use sc-machine python dependencies.
  • Build system of the sc-machine was upgraded:

    • The way to manage build dependencies was changed to Conan. You can install sc-machine and its dependencies with Conan. You don't have to worry about installing sc-machine dependencies on your OS anymore. See how to do it -- Build System.
    • CMake presets should be used to build the sc-machine. They are located in CMakePresets.json.
    • Location of the sc-machine build was changed. The following new locations are:
      • build tree -- build/<Debug|Release>,
      • binaries -- build/<Debug|Release>/bin,
      • libraries -- build/<Debug|Release>/lib,
      • extensions -- build/<Debug|Release>/lib/extensions.
    • Using sc-machine as a library is much more optimized: adding it to the CMake tree is no longer necessary. You can install sc-machine packages and import sc-machine targets into your cmake using find_package(sc-machine REQUIRED). See how to do it -- Build System
    • Each release sc-machine binaries are being compiled for supported OS and formed as an archives on Github. Minimum required version of macOS is macOS-14 (arm), of ubuntu is ubuntu-22.04. The sc-machine doesn't support ubuntu-20.04 anymore. You can use sc-machine binaries to work with sc-memory or you can use RunMachine method from sc-machine-runner.so to create your own entry point to initialize sc-memory instead of using compiled sc-machine binary.
    • Script for the project build (build_sc_machine.sh), scripts for running binaries (run_sc_server.sh, build_kb.sh) were removed from the sc-machine repository scripts. You should use sc-machine binaries directly.
    • sc-server is no longer entry point of the sc-machine, it is an extension (sc-server-lib.so), that is loaded dynamically when the machine is started. So, sc-server binary was removed, sc-machine binary was added instead. To specify host and port for sc-server without using config, use environment variables SC_SERVER_HOST and SC_SERVER_PORT accordingly.
  • Config was changed:

    • repo_path option in [sc-memory] group was deprecated, storage option was added instead;
    • extensions_path option in [sc-memory] group was deprecated, extensions option was added instead.
  • Sources of the sc-machine were separated into public and private ones. Public sources of targets are located in include directory, private ones - in src directory, tests for code - in tests directory. Private sources can't be included into project's code directly. Besides that there are changes of location of some API classes of the sc-machine:

    • ScTest class was made a part of sc-memory target. Use #include <sc-memory/test/sc_test.hpp> to include it into code.
    • To include ScsLoader class into code, use #include <sc-builder/sc_loader.hpp>.
  • Configuration of sc-machine tests was changed:

    • Paths to test sources of the knowledge base, test configs, etc. are being configured at the pre-run stage, not at the stage of compiling tests.
    • Working directory for tests was changed to a directory where tests are located. To run the tests, please use ctest rather than the test binaries themselves.
    • Scripts for running tests (run_tests.sh) was removed. Go to build/<Debug|Release> and use ctest instead.
  • All questions was renamed to actions.

  • ScAddrHashFunc with template argument was removed. Use non-template ScAddrHashFunc without arguments. It is more safe in use.

  • Constructors for ScMemoryContext with string and int parameters were removed. Use the one without parameters instead.

  • HelperSearchTemplateInStruct was removed from ScMemoryContext API. Use SearchByTemplate with callbacks.

  • Deprecated sc-utils in 0.9.0 were removed from sc-kpm.

  • Questions were renamed to actions, answers were renamed to results.

  • m_memoryCtx in ScAgent renamed to m_context.

  • Сode generation is no longer used as metaprogramming. The API for agents has been completely redesigned. See the documentation section on how to implement an agent with the new API -- C++ Agent Guide. We have

    • completely moved from code generation to template programming;
    • improved the API and aligned with our description of how it should be;
    • simplified the API. Now it will be much easier to create agents, go right now and see how to work with the new API -- C++ Agents API.
  • All ScMemoryContext methods were redesigned to a common style. All methods with not correct names were deprecated, and new ones were added. See the table below to see which methods have been replaced.

    Deprecated method Substitution method
    CreateNode GenerateNode
    CreateLink GenerateLink
    CreateEdge GenerateConnector
    GetElementOutputArcsCount GetElementEdgesAndOutgoingArcsCount
    GetElementInputArcsCount GetElementEdgesAndIncomingArcsCount
    GetEdgeSource GetArcSourceElement
    GetEdgeTarget GetArcTargetElement
    GetEdgeInfo GetConnectorIncidentElements
    Iterator3 CreateIterator3
    Iterator5 CreateIterator5
    ForEachIter3 ForEach
    ForEachIter5 ForEach
    HelperCheckEdge CheckConnector
    FindLinksByContent SearchLinksByContent
    FindLinksByContentSubstring SearchLinksByContentSubstring
    FindLinksContentsByContentSubstring SearchLinksContentsByContentSubstring
    HelperSetSystemIdtf SetElementSystemIdentifier
    HelperGetSystemIdtf GetElementSystemIdentifier
    HelperResolveSystemIdtf ResolveElementSystemIdentifier
    HelperFindBySystemIdtf SearchElementBySystemIdentifier
    HelperGenTemplate GenerateByTemplate
    HelperSearchTemplate SearchByTemplate
    HelperSmartSearchTemplate SearchByTemplateInterruptibly
    HelperBuildTemplate BuildTemplate
    CalculateStat CalculateStatistics
    Removed method Substitution method
    BeingEventsPending BeginEventsPending
  • All C++ sc-types were also redesigned to a common style. They were deprecated, new ones were added. See changes in the table below.

    Deprecated Substitution
    ScType::EdgeUCommon ScType::CommonEdge
    ScType::EdgeDCommon ScType::CommonArc
    ScType::EdgeUCommonConst ScType::ConstCommonEdge
    ScType::EdgeDCommonConst ScType::ConstCommonArc
    ScType::EdgeAccess ScType::MembershipArc
    ScType::EdgeAccessConstPosPerm ScType::ConstPermPosArc
    ScType::EdgeAccessConstNegPerm ScType::ConstPermNegArc
    ScType::EdgeAccessConstFuzPerm ScType::ConstFuzArc
    ScType::EdgeAccessConstPosTemp ScType::ConstTempPosArc
    ScType::EdgeAccessConstNegTemp ScType::ConstTempNegArc
    ScType::EdgeAccessConstFuzTemp ScType::ConstFuzArc
    ScType::EdgeUCommonVar ScType::VarCommonEdge
    ScType::EdgeDCommonVar ScType::VarCommonArc
    ScType::EdgeAccessVarPosPerm ScType::VarPermPosArc
    ScType::EdgeAccessVarNegPerm ScType::VarPermNegArc
    ScType::EdgeAccessVarFuzPerm ScType::VarFuzArc
    ScType::EdgeAccessVarPosTemp ScType::VarTempPosArc
    ScType::EdgeAccessVarNegTemp ScType::VarTempNegArc
    ScType::EdgeAccessVarFuzTemp ScType::VarFuzArc
    ScType::NodeConst ScType::ConstNode
    ScType::NodeVar ScType::VarNode
    ScType::Link ScType::NodeLink
    ScType::LinkClass ScType::NodeLinkClass
    ScType::NodeStruct ScType::NodeStructure
    ScType::LinkConst ScType::ConstNodeLink
    ScType::LinkConstClass ScType::ConstNodeLinkClass
    ScType::NodeConstTuple ScType::ConstNodeTuple
    ScType::NodeConstStruct ScType::ConstNodeStructure
    ScType::NodeConstRole ScType::ConstNodeRole
    ScType::NodeConstNoRole ScType::ConstNodeNonRole
    ScType::NodeConstClass ScType::ConstNodeClass
    ScType::NodeConstMaterial ScType::ConstNodeMaterial
    ScType::LinkVar ScType::VarNodeLink
    ScType::LinkVarClass ScType::VarNodeLinkClass
    ScType::NodeVarStruct ScType::VarNodeStructure
    ScType::NodeVarTuple ScType::VarNodeTuple
    ScType::NodeVarRole ScType::VarNodeRole
    ScType::NodeVarNoRole ScType::VarNodeNonRole
    ScType::NodeVarClass ScType::VarNodeClass
    ScType::NodeVarMaterial ScType::VarNodeMaterial

    From now on, all sc-links are sc-nodes. Types of actual and inactual temporal membership sc-arc were added.
    Also, all possible combinations of subtypes in sc-types have been added to the API of ScMemoryContext and to the SCs-code.

  • Incorrect sc.s-connectors were replaced by correct ones.

    Deprecated Substitution
    > ?=>
    < <=?
    <> ?<=>
    _<= <=_
    _<- <-_
    ```_< -```
    _<~ <~_
    ```_< ~```
  • It is no longer possible to specify permanency for fuzzy arcs, because it may lead to misunderstanding of the non-factor denoted by this sc-arc. So, designations -/>, </-, _-/>, _</-, </-_, ~/>, </~, _~/>, _</~, </~_ were removed. Use />, </, _/>, </_ instead.

  • Incorrect system identifiers of sc.s-keynodes were also replaced by correct ones.

    Deprecated Substitution
    sc_edge sc_common_edge
    sc_edge_ucommon sc_common_edge
    sc_arc_common sc_common_arc
    sc_edge_dcommon sc_common_arc
    sc_arc_access sc_membership_arc
    sc_edge_access sc_membership_arc
    sc_arc_main sc_main_arc
    sc_edge_main sc_main_arc
    sc_node_struct sc_node_structure
    sc_node_norole_relation sc_node_non_role_relation
  • Type ScType::NodeAbstract and sc.s-keynode sc_node_abstract were removed.

See documentation, to learn more about using new API.

Added

  • Environment variables SC_SERVER_HOST and SC_SERVER_PORT for sc-server
  • SearchLinksByContentSubstring method with ScLinkFilter parameter
  • ScLinkFilter class to specify search criteria for sc-links
  • Intro for documentation
  • Quick start section for developers in docs
  • Quick start section for users in docs
  • Documentation for user permissions
  • Allow multiple extension directories for sc-memory
  • CD for publishing sc-machine binaries as archive on Github
  • CI for checking sc-machine tests build with Conan dependencies
  • Install target to prepare consuming sc-machine targets
  • Conan support for managing sc-machine dependencies
  • Handling required options for sc-machine and sc-builder
  • Display versions for sc-machine and sc-builder
  • Doc strings for sc-config classes
  • Implement gwf2scs-translator in cpp
  • GetSCsElementKeynode method for sc-types to get their sc.s-keynode system identifiers
  • GetDirectSCsConnector and GetReverseSCsConnector for sc-types to get their designations in SCs-code
  • std::string operator for ScType
  • All possible semantic combinations of subtypes in sc-types into the SCs-code
  • All possible combinations of subtypes in sc-types into ScMemoryContext API
  • Type ScType::NodeSuperclass and sc.s-keynode sc_node_superclass
  • Types: ScType::Connector, ScType::Arc
  • Types of actual and inactual temporal sc-arcs into ScMemoryContext API and the SCs-code
  • Methods in ScMemoryContext: GenerateNode, GenerateLink, GenerateConnector, GetElementEdgesAndOutgoingArcsCount, GetElementEdgesAndIncomingArcsCount, GetArcSourceElement, GetArcTargetElement, GetConnectorIncidentElements, CreateIterator3, CreateIterator5, ForEach, CheckConnector, SearchLinksByContent, SearchLinksByContentSubstring, SearchLinksContentsByContentSubstring, SetElementSystemIdentifier, GetElementSystemIdentifier, ResolveElementSystemIdentifier, SearchElementBySystemIdentifier, GenerateByTemplate, SearchByTemplate, SearchByTemplateInterruptibly, BuildTemplate, CalculateStatistics, BeginEventsPending
  • Simple guide for implementing agent in C++
  • Documentation for agents, keynodes, modules, events, subscriptions, waiters, actions and agent context
  • Full tests for C++ Agents API
  • Opportunity to implement agents with static, dynamic and semi-dynamic specifications
  • Implement ScAgentContext class to work with sc-event, subscriptions and waiters
  • Implement ScAction class to work with sc-actions in sc-memory
  • Implement ScAgentBuilder to handle dynamic specifications for agents
  • Implement ScModule to register agents
  • New implementation of ScKeynodes class to enumerate sc-keynodes
  • Implement ScTemplateKeynode class to represent static object of sc-template
  • Implement ScKeynode class to represent static object of key sc-element used in agents
  • New implementation of ScAgent class for any types of agents
  • Implement ScActionInitiatedAgent class to implement agents interpreting initiated actions
  • Implement sc-event classes hierarchy
  • Implement new C++ Agents API based on template programming
  • Add unordered_map type with ScAddr as key
  • Implement protected method in ScMemoryContext to translate object of ScTemplate to sc-template in sc-memory
  • Doc strings for public template classes
  • Usings ScAddrStack, ScAddrQueue, ScAddrSet and ScAddrHashSet
  • Doc strings for iterator classes
  • Clean monitor tables by size threshold
  • Compile option to optimize checking local user permissions
  • Check incidence between sc-connectors and sc-elements substituted into sc-template from sc-template params
  • Generate and search by sc-templates with constant sc-connectors
  • Build sc-templates with constant sc-connectors
  • Opportunity to substitute sc-connectors as params in sc-templates
  • Script healthcheck.sh for healthcheck.py
  • Check build and tests on runner-image ubuntu-24.04
  • Support for ubuntu-24.04 and macOS 14.4.1
  • Block events mode for sc-memory context; methods BeginEventsBlocking and EndEventsBlocking in ScMemoryContext
  • Opportunity to set permissions for set of users
  • Guests identification
  • Create guest users during creating sc-memory context
  • Get user address for sc-server session and sc-memory context
  • Docker entrypoint run to launch binary sc-machine in docker
  • Binary sc-machine instead of binary sc-server that loads extension sc-server
  • Collect user permissions during sc-memory initialize
  • Throw exceptions in get values methods of iterators if sc-element is not accessed
  • Callback to get and collect sc-links by its contents from fs-memory
  • Local user permissions for actions within sc-structures
  • List in sc-element for input arcs from sc-structures
  • Provide sc-arc types for sc-event callbacks
  • User permissions for handling permissions for actions in sc-memory
  • Global user permissions for actions in sc-memory
  • ScType::ConstNodeLinkClass and ScType::VarNodeLinkClass
  • User authentication checks
  • Denote sc-machine with sc-element myself
  • Provide users for sc-memory, sc-events and sc-agents

Changed

  • Improve docs usability: add search, edit links, coping code blocks, logo, text justifying, move sections to header and other
  • SCsParser no longer generates sc-arcs from types of sc-elements to sc-elements
  • Allow multiple instances of ScLogger class
  • Rename ScLog to ScLogger
  • Description of project in Readme
  • Working directory for each test has been changed to the test's source dir
  • gtest and benchmark are installed via Conan or OS package managers instead of using them as git submodules
  • Location of the sc-machine build tree, binaries, libraries and extensions
  • Bumped minimum required cmake version to 3.24.0
  • Help messages for sc-machine and sc-builder
  • Clarify sc-machine and sc-builder options
  • Specify dependencies near targets, not in overall file
  • Make glib dependencies private
  • Replace public sc-base defines with methods
  • Separate public and private sources
  • Rename action answer to action result
  • Rename ScWait to ScWaiter
  • Rename ScEvent to ScEventSubscription
  • Make template build methods to throw exceptions instead of return errors
  • Rename questions to actions
  • Use queues in monitors statically
  • Implement array-based sc-queue
  • Clarify error message for building sc-template, generating and searching by sc-template: provide sc-template item features in error message
  • Reformat code style according to clang-format-18
  • Use runner-image macos-14 instead of runner-image macos-latest in CI
  • Don't check extensions when loading dynamic modules (g_open_module does it automatically)
  • Use venv for python dependencies in scripts and docker
  • Don't emit events after kb build
  • Allows assigns sc-link to its system identifier

Fixed

  • Validate parameters in handle link content sc-json-command in sc-server
  • Iterating sc-connectors with sc-edge loop
  • Checking of all syntactic and semantic subtypes for types in ScMemoryContext::SetElementSubtype and ScType::CanExtendTo methods.
  • Now sc-link is sc-node
  • sc-arcs and sc-elements are removed after agents have worked with them
  • fs-memory uses monitor to resolve string offset
  • fs-memory searches for new strings in all channels instead of only in last channel
  • Separate implementation from declarations in templates
  • Separate specializations from declarations in iterators
  • Fix duplication of iterator specializations
  • Make sc_addr_hash equal to sc_uint32
  • Make core literal types platform-independent
  • Erasing sc-connectors during iterating
  • Clear result of generating by sc-template if error is occurred
  • Check that template params sc-type can be extended to template item sc-type
  • No discard return types for sc-template API
  • C++ warnings for ubuntu-24.04 and macOS-14.4.1 when building project
  • Use snprintf(3) instead of sprintf(2)
  • Private and public dependencies between cmake targets
  • Use reenterable strtok
  • Resolve sc.g-links with the same system identifier

Deprecated

  • Config option repo_path in [sc-memory], add option storage instead
  • Config option extensions_path in [sc-memory], add option extensions instead
  • Incorrect designations of sc.s-connectors: >, <, <>, _<=, _<-, _<|-, _<~, _<|~
  • Incorrect sc.s-keynodes: sc_edge, sc_edge_ucommon, sc_arc_common, sc_edge_dcommon, sc_arc_access, sc_edge_access, sc_arc_main, sc_edge_main, sc_node_struct, sc_node_norole_relation
  • C++ sc-types: ScType::EdgeUCommon, ScType::EdgeDCommon, ScType::EdgeUCommonConst, ScType::EdgeDCommonConst, ScType::EdgeAccess, ScType::EdgeAccessConstPosPerm, ScType::EdgeAccessConstNegPerm, ScType::EdgeAccessConstFuzPerm, ScType::EdgeAccessConstPosTemp, ScType::EdgeAccessConstNegTemp, ScType::EdgeAccessConstFuzTemp, ScType::EdgeUCommonVar, ScType::EdgeDCommonVar, ScType::EdgeAccessVarPosPerm, ScType::EdgeAccessVarNegPerm, ScType::EdgeAccessVarFuzPerm, ScType::EdgeAccessVarPosTemp, ScType::EdgeAccessVarNegTemp, ScType::EdgeAccessVarFuzTemp, ScType::NodeConst, ScType::NodeVar, ScType::Link, ScType::LinkClass, ScType::NodeStruct, ScType::LinkConst, ScType::LinkConstClass, ScType::NodeConstTuple, ScType::NodeConstStruct, ScType::NodeConstRole, ScType::NodeConstNoRole, ScType::NodeConstClass, ScType::NodeConstMaterial, ScType::LinkVar, ScType::LinkVarClass, ScType::NodeVarStruct, ScType::NodeVarTuple, ScType::NodeVarRole, ScType::NodeVarNoRole, ScType::NodeVarClass, ScType::NodeVarMaterial
  • Methods of ScMemoryContext: CreateNode, CreateLink, CreateEdge,GetElementOutputArcsCount, GetElementInputArcsCount, GetEdgeSource, GetEdgeTarget, GetEdgeInfo, Iterator3, Iterator5, ForEachIter3, ForEachIter5, HelperCheckEdge, FindLinksByContent, FindLinksByContentSubstring, FindLinksContentsByContentSubstring, HelperSetSystemIdtf, HelperGetSystemIdtf, HelperResolveSystemIdtf, HelperFindBySystemIdtf, HelperGenTemplate, HelperSearchTemplate, HelperSmartSearchTemplate, HelperBuildTemplate, CalculateStat

Removed

  • Support for ubuntu-20.04
  • Config options update_period and save_period in [sc-memory] deprecated in 0.9.0
  • Config option sync_actions in [sc-server] deprecated in 0.9.0
  • Scripts: build_sc_machine.sh, build_kb.sh, run_sc_server.sh, set_vars.sh and run_tests.sh
  • sc-server binary and docker entrypoint command serve
  • gwf2scs-translator in python
  • Designations of fuzzy sc.s-arcs: -/>, </-, _-/>, _</-, </-_, ~/>, </~, _~/>, _</~, </~_
  • Type ScType::NodeAbstract and sc.s-keynode sc_node_abstract
  • Methods of BeingEventsPending: BeingEventsPending
  • Codegen and C++ Agents API based on code generation
  • Deprecated sc-utils in 0.9.0
  • Constructors for ScMemoryContext with string and int parameters
  • HelperSearchTemplateInStruct from ScMemoryContext
  • Template argument for ScAddrHashFunc
  • Throw utils::ExceptionInvalidParams if template params have sc-connectors substitution for generating by sc-template
  • GetDecompositionAgent
  • Sc-links lists translation from C API to C++ API