{"id":15107390,"url":"https://github.com/pharo-project/aleph","last_synced_at":"2025-10-19T14:32:28.847Z","repository":{"id":40353039,"uuid":"243281275","full_name":"pharo-project/aleph","owner":"pharo-project","description":"an index system for the pharo system","archived":false,"fork":false,"pushed_at":"2022-09-02T13:19:06.000Z","size":95,"stargazers_count":5,"open_issues_count":2,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-01-29T18:45:42.271Z","etag":null,"topics":["pharo"],"latest_commit_sha":null,"homepage":null,"language":"Smalltalk","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pharo-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-26T14:22:47.000Z","updated_at":"2022-06-15T07:56:21.000Z","dependencies_parsed_at":"2022-08-09T18:01:10.359Z","dependency_job_id":null,"html_url":"https://github.com/pharo-project/aleph","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-project%2Faleph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-project%2Faleph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-project%2Faleph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-project%2Faleph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pharo-project","download_url":"https://codeload.github.com/pharo-project/aleph/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237152845,"owners_count":19263793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pharo"],"created_at":"2024-09-25T21:24:11.806Z","updated_at":"2025-10-19T14:32:28.429Z","avatar_url":"https://github.com/pharo-project.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI matrix](https://github.com/pharo-project/Aleph/actions/workflows/build.yml/badge.svg)](https://github.com//pharo-project/Aleph/actions/workflows/build.yml)\n\n# Aleph\nAleph is an index system for Pharo.\nIt implements an interface for all the users of system navigation including Calypso.\n\n## Install\n\n```\nMetacello new \n\trepository: 'github://pharo-project/Aleph/src';\n\tbaseline: 'Aleph';\n\tload.\n ```\n\n## The Index Manager\n\nIt has an index manager, charged with the task of concentrate all system indexes and accessors to it. \nThe find* methods provide access to the contained indexes.\nThe manager subscribes to SystemAnnouncer to listen system changes (method addition, modification and removals), \nin order to keep the indexes up-to date.\n\nAleph uses [TaskIt](https://github.com/sbragagnolo/taskit) to handle the run of indexing tasks.\nWe use a special task it runner in low priority to update the indexes in background, when the system is idle.\n\nThe method rebuildAll will discard all previously existing indexes and re-build all from scratch. \n\nThere is only one instance of the index manager (well, that is the idea) and it can be activated or not. \nIf it is activated it is used by Spotter and all the users of SystemNavigation. \nEven if it is deactivated I still listen to the events in the system to keep update.\nTo uninstall it, send the message reset to its class side.\n\n## The indexes\n\nAll the indexes are subclasses of AlpIndex.\nThey are stored in an AlpIndexManager and the indexes should be used through it.\n\nThere are two different behaviors: \n\n - During the build of the index, the manager will call #beginRebuild, \n and then classAdded: and methodAdded: for each class and method in the system. \n Finally the indexes will receive #endRebuild. \n\n - During normal image modification the indexes will be notified by the manager by #methodAdded:, \n #methodRemoved: and #methodModifiedFrom:to: and #classAdded: , #classRemoved: and #class:renamedFrom:to:\n\nAlso the indexes have an statistics Dictionary with some information passed by the manager so the \nindexes can improve the process of generation of the index. \n\n## Types of Indexes\n\n### Basic Indexes\n\nThese are the subclasses of AlpBasicIndex. \nThe subclasses should implement the response to the different system events that an index is interested in. \n\nBasically, AlpBasicIndex implements a Dictionary with all the index entries. \nInside each entry there is an array to store the elements that correspond to the entry.\n\nThe subclasses should provide also the initialTableSize to customize how the table is initialized\nduring the building of the index.\n\nThere are two concrete implementations of Basic Indexes:\n\n- AlpReferencesIndex: it is the index to store the references to a given class.\nIt indexes the name of the global accessible variables and store them in a table with the class that they refer to.\n\n- AlpSendersIndex: it is an index to improve the lookup of senders of a given selector.\nIt goes over all the methods and store which messages are sent. \nIt handles the implicit literals encoded in the bytecode by using #AlpEncodedSpecialLiteralMapProvider\n\n### Trie Indexes\n\nThe Trie indexes are all the subclasses of AlpTrieIndex\nThe trie indexes use two CTOptimizedTrie as the storage of the index.\nOne trie is used to store the beginnings of the keys and the other the suffixes.\nThe subclasses provide fulltext search on top of the index. \nThis indexes are heavily used by the implementation of Spotter.\n\nThe creation goes in two stages:\n\n1) During the building of the index, all the collection of the information is done \nusing two Dictionaries to store the intermediate data. \n\n2) Aftr all the data is calculated, the Optimized Tries are built to enhance the access to the index.\n\nOnce the index is created the update is done directly on the tries.\n\nThere are two implementations:\n\n- AlpClassesIndex: This index takes all the classes in the system and indexes them. \n- AlpImplementorsIndex: This index takes all the methods in the system and index them using the selector of the method.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpharo-project%2Faleph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpharo-project%2Faleph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpharo-project%2Faleph/lists"}