Skip to content

Commit

Permalink
movement of files
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSPoon committed Nov 1, 2023
1 parent 9089eef commit 6cf3c4f
Show file tree
Hide file tree
Showing 246 changed files with 53,913 additions and 3,448 deletions.
2,021 changes: 462 additions & 1,559 deletions 5-Learn-Flybase.metta

Large diffs are not rendered by default.

1,471 changes: 971 additions & 500 deletions 6-Learn-Flybase-Full.metta

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
81 changes: 0 additions & 81 deletions 8-VSpaceTest.metta

This file was deleted.

41 changes: 41 additions & 0 deletions MeTTa
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ python_flag=enable
LIST_OF_FILE_ARGS=()
PYSWIP_VERSION="pyswip"



remove_quotes() {
local value="$1"
echo "${value//\"/}"
Expand Down Expand Up @@ -275,6 +277,45 @@ fi

export RUST_BACKTRACE=full


# Reference file
reference_file="MeTTaLog"

# Directory containing the .pl files
pl_directory="metta_vspace/pyswip"

# Initialize a flag to check if any file is newer or if reference file is missing
should_compile=0

# Check if MeTTaLog exists
if [[ ! -e "$reference_file" ]]; then
echo "Reference file $reference_file does not exist. Compiler will be called."
should_compile=1
else
# Iterate over each .pl file to check if it's newer
for pl_file in "$pl_directory"/metta_*.pl; do
if [[ ! -e "$pl_file" ]]; then
echo "No matching .pl files found in $pl_directory."
#exit 1
fi

# Check if this .pl file is newer than the reference file
if [[ "$pl_file" -nt "$reference_file" ]]; then
echo "$pl_file is newer than $reference_file."
should_compile=1
break # No need to check further, exit loop
fi
done
fi

# If any newer file found or reference file missing, call the compiler
if [[ $should_compile -eq 1 ]]; then
echo "Calling compiler..."
# Call your compiler command here
swipl -l metta_vspace/pyswip/metta_interp.pl -g qcompile_mettalog
fi


if [[ -f "$METTALOG_DIR/MeTTaLog" ]]; then
MLOG="$METTALOG_DIR/MeTTaLog"
else
Expand Down
78 changes: 78 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Examples README

The `examples` directory houses a variety of sub-directories, each focusing on specific functionalities, tests, or demonstrations. These sub-directories serve as a comprehensive resource for understanding the system.

---

## Main Directory Structure

- **[`flybase`](./flybase)**: Focused on the Flybase module, the examples here are designed to provide insights into how this specific component works and can be used.
- [flybase-vspace.metta](./flybase/flybase-vspace.metta): Manages the versioned space (vspace) within Flybase.
- [flybase-loader-size-estimates.metta](./flybase/flybase-loader-size-estimates.metta): Estimates the size the loader will require.
- [flybase-mined-flat.metta](./flybase/flybase-mined-flat.metta): Contains flattened mined data.
- [flybase-deduced-queries.metta](./flybase/flybase-deduced-queries.metta): Houses deduced queries.
- [flybase-deduced.metta](./flybase/flybase-deduced.metta): Stores deduced facts and data.
- [flybase-mined.metta](./flybase/flybase-mined.metta): Contains mined data.
- [flybase-loader.metta](./flybase/flybase-loader.metta): Responsible for loading data.
- [flybase-deduced-connections.metta](./flybase/flybase-deduced-connections.metta): Manages deduced connections.
- [flybase-deduced-types.metta](./flybase/flybase-deduced-types.metta): Holds information about deduced types.

- **[`python`](./python)**: Contains Python-specific examples and sandboxes.
- [`./python/sandbox`](./python/sandbox): A space for Python-based experimental code.
- [`./python/sandbox/resolve`](./python/sandbox/resolve): Features resolution-based logic.
- [`./python/sandbox/sql_space`](./python/sandbox/sql_space): SQL-based experiments.
- [`./python/sandbox/neurospace`](./python/sandbox/neurospace): Neural network simulations.
- [`./python/sandbox/numpy`](./python/sandbox/numpy): NumPy-based numerical operations.
- [`./python/sandbox/repl`](./python/sandbox/repl): A Python REPL sandbox.
- [`./python/sandbox/das_gate`](./python/sandbox/das_gate): Focused on gate-level simulations.

- **[`nars`](./nars)**: Dedicated to NARS (Non-Axiomatic Reasoning System) examples.
- [`./nars/nars_v0`](./nars/nars_v0): Original version tests.
- [`./nars/current`](./nars/current): Houses the current iteration tests.
- [`./nars/prev`](./nars/prev): Includes tests from previous versions.
- [`./nars/extra_tests`](./nars/extra_tests): Additional, perhaps experimental, tests.
- [`./nars/new`](./nars/new): Houses the newest set of examples.

- **[`performance`](./performance)**: Focuses on performance metrics and benchmarks.
- **[`features`](./features)**: Contains examples demonstrating various features.

### [`./compat`](./compat)

This directory focuses on compatibility and explores different methodologies to port PLN to MeTTa.

#### **Synthesis and Logic Group**

This group of directories explores various representational methods for porting PLN to MeTTa.

- **[`match`](./compat/match)**: Focuses on representing rules using MeTTa's `match` operator.
- **[`entail`](./compat/entail)**: Here, rules are expressed with the symbol `?`.
- **[`equal`](./compat/equal)**: Uses MeTTa equality `=` to represent rules.
- **[`dependent-types`](./compat/dependent-types)**: Concentrates on representing rules as type constructors.
- **[`common`](./compat/common)**: Contains common definitions.
- [`./compat/common/formula`](./compat/common/formula): Manages formulaic representations.
- [`./compat/common/truthvalue`](./compat/common/truthvalue): Handles truth values.
- **[`synthesis`](./compat/synthesis)**: Houses program synthesis experiments.
- [`./compat/synthesis/experiments`](./compat/synthesis/experiments): Contains specific experiment scripts.

#### **Additional Sub-Directories**

These focus on specific aspects of compatibility like compiler features, types, and logic schemes.

- **[`compiler`](./compat/compiler)**: Addresses compiler-related examples and tests.
- **[`forward-chainer`](./compat/forward-chainer)**: Focuses on forward-chaining logic.
- **[`subtyping`](./compat/subtyping)**: Showcases subtyping operations.
- **[`recursion-schemes`](./compat/recursion-schemes)**: Explores recursion schemes.
- [`./compat/recursion-schemes/src`](./compat/recursion-schemes/src): Contains source files.
- **[`prob-dep-types`](./compat/prob-dep-types)**: Provides examples on probabilistic dependent types.
- **[`sumo`](./compat/sumo)**: Houses SUMO (Suggested Upper Merged Ontology) examples.
- [`./compat/sumo/orientation`](./compat/sumo/orientation): Related to spatial orientation.
- [`./compat/sumo/located`](./compat/sumo/located): Pertains to location-based logic.
- [`./compat/sumo/john-carry-flower`](./compat/sumo/john-carry-flower): Narrative logic examples.
- [`./compat/sumo/route-between`](./compat/sumo/route-between): Deals with routing logic.

- **[`test_scripts`](./compat/test_scripts) & [`test_scripts_extras`](./compat/test_scripts_extras)**: Contains script files for compatibility tests.
- **[`interp`](./compat/interp)**: Concerned with interpretation, how the system processes and runs code.
- **[`minecraft`](./compat/minecraft)**: Focuses on Minecraft integration.
- **[`miner`](./compat/miner)**: Focuses on data mining tasks.


File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
14 changes: 14 additions & 0 deletions examples/compat/common/formula/DeductionFormulaTest.answers
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[]
[]
[]
[]
[]
[]
[1]
[0.5555555555555556]
[True]
[0.575]
[(PrCnt 1 1)]
[True]
[True]
[(STV 0.9 0.1)]
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
4 changes: 4 additions & 0 deletions examples/compat/dependent-types/DeductionDTL.metta.answers
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[]
[]
0.14user 0.01system 0:00.15elapsed 100%CPU (0avgtext+0avgdata 30148maxresident)k
0inputs+0outputs (0major+3639minor)pagefaults 0swaps
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[]
[]
0.14user 0.00system 0:00.16elapsed 96%CPU (0avgtext+0avgdata 30532maxresident)k
288inputs+0outputs (13major+3681minor)pagefaults 0swaps
4 changes: 4 additions & 0 deletions examples/compat/dependent-types/ModusPonensDTL.metta.answers
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[]
[]
0.12user 0.01system 0:00.14elapsed 99%CPU (0avgtext+0avgdata 30032maxresident)k
0inputs+0outputs (0major+3577minor)pagefaults 0swaps
Empty file.
Empty file.
Empty file.
Empty file.
Loading

0 comments on commit 6cf3c4f

Please sign in to comment.