Recent posts

#1
Tau Language / Re: Tau Language demos
Last post by pk - Jan 01, 2025, 10:14 PM
I added gt and lt functions to my previous demo (note that a predecessor relation is also required for these, added as well - it's called "pred" here).

cmp(int[x](1),int[x](1)):=T
cmp(int[x](1),int[y](1)):=F
pred(int[t](1)):=int[t-1](1)
gt(int[0](1),int[x](1)):=F
gt(int[x](1),int[x](1)):=F
gt(x,y):=cmp(pred(x),y) || gt(pred(x),y)
lt(int[x](1),int[x](1)):=F
lt(int[x](1),int[y](1)):=gt(int[y](1),int[x](1))

So now we can also check whether a shape has more/less sides than the other:

sides(sqr()):=int[4](1)
sides(tri()):=int[3](1)
sides(rect()):=int[4](1)
greater(x,y):=gt(sides(x),sides(y))
less(x,y):=lt(sides(x),sides(y))

n greater(tri(),sqr())
n greater(sqr(),tri())
n greater(tri(),tri())
n greater(sqr(),sqr())
n greater(tri(),rect())
n greater(rect(),tri())
n greater(rect(),sqr())

n less(tri(),sqr())
n less(sqr(),tri())
n less(tri(),tri())
n less(sqr(),sqr())
n less(tri(),rect())
n less(rect(),tri())
n less(rect(),sqr())
#2
Tau Language / Re: Tau Language demos
Last post by pk - Jan 01, 2025, 08:21 AM
Thanks to S1r_4zdr3w for pointing out an unhandled edge case in the multiplication recurrence relation (while multiplying by zero). Please see the fixed code below.

# This is an example implementation of addition and multiplication arithmetic in Tau (defined here between 0 and 20).
# Range can be easily extended by adding more entries to the input successor relation.
version

# input

succ(int[0](1)) := int[1](1)
succ(int[1](1)) := int[2](1)
succ(int[2](1)) := int[3](1)
succ(int[3](1)) := int[4](1)
succ(int[4](1)) := int[5](1)
succ(int[5](1)) := int[6](1)
succ(int[6](1)) := int[7](1)
succ(int[7](1)) := int[8](1)
succ(int[8](1)) := int[9](1)
succ(int[9](1)) := int[10](1)
succ(int[10](1)) := int[11](1)
succ(int[11](1)) := int[12](1)
succ(int[12](1)) := int[13](1)
succ(int[13](1)) := int[14](1)
succ(int[14](1)) := int[15](1)
succ(int[15](1)) := int[16](1)
succ(int[16](1)) := int[17](1)
succ(int[17](1)) := int[18](1)
succ(int[18](1)) := int[19](1)
succ(int[19](1)) := int[20](1)
pred(int[t](1)) := int[t-1](1)
add(x, int[0](1)) := x
add(int[0](1), x) := x
add(x, y) := add(pred(x), succ(y))
mul(x, int[0](1)) := int[0](1)
mul(int[0](1), x) := int[0](1)
mul(x, int[1](1)) := x
mul(int[1](1), x) := x
mul(x, y) := add(y, mul(pred(x), y))

# addition and multiplication examples

n add(int[7](1),int[10](1))

n mul(int[5](1),int[3](1))

# overflow examples

n add(int[22](1),int[3](1))

n mul(int[3](1),int[8](1))


# done
quit
#3
Tau Language / Re: Tau Language demos
Last post by pk - Dec 29, 2024, 11:28 AM
One more example:

cmp(int[x](1),int[x](1)):=T
cmp(int[x](1),int[y](1)):=F
sides(sqr()):=int[4](1)
sides(tri()):=int[3](1)
sides(rect()):=int[4](1)
same(x,y):=cmp(sides(x),sides(y))
n same(tri(),sqr())
n same(sqr(),tri())
n same(tri(),tri())
n same(sqr(),sqr())

n same(tri(),rect())
n same(rect(),sqr())

quit
 

#4
Tau Language / Tau Language demos
Last post by pk - Dec 26, 2024, 06:47 PM
Please feel free to add your Tau demos to this post.
I'll start with a simple implementation of integer arithmetic with addition and multiplication.
I'm attaching the .tau demo file and screenshots of its output.

https://pastebin.com/raw/vYW7dEwt


#5
Governance and Consensus Mechanisms / AI REVOLUTION
Last post by Captainfeci - Dec 21, 2024, 02:51 PM
Tau Net is a user-driven layer 1 logical AI blockchain, evolving alongside the collective intelligence of all of its users.

Ready to join this adventurous journey with Tau to revolutionize the AI world.
#6
Educational Resources / Zero Coding with Tau: Specifyi...
Last post by S1r_4zdr3w - Dec 21, 2024, 02:03 PM
https://youtu.be/DW0Fm-YfBzs

This video demonstrates how to use the Tau Language REPL to create correct-by-construction software through AI program synthesis.

The video will showcase the Tau language's ability to automatically generate a program that meets given specifications.


o1[t]=0 states that the output o1 at all time points (t) has to be 0.

The video will highlight:
● The simplicity of specifying software behavior in the Tau language.
● Tau's use of logical AI for program synthesis.
● The guarantee of correctness provided by Tau's approach.

In my next video, I will go deeper into the topic. Thank you!

Questions, How big do you think is the effect of being able to do zero coding to just write our specifications and a very powerful logical AI will automatically generate a program that 100% meets our specifications?  8) 
#7
Meme Factory / First!
Last post by Iroh - Dec 19, 2024, 08:46 AM
First!
#8
Educational Resources / Re: How to write in Tau Langua...
Last post by S1r_4zdr3w - Dec 18, 2024, 01:42 AM
Basic Tutorial Series - Tau Lang REPL : Practice using Logical Connectives Complementation and Exclusive OR and its possible real life applications

https://www.youtube.com/watch?v=dvmy6LT3Idw

In this video, I will show you how to

1. Opening the demo for Tau Language Syntax
2. Practice: Logical Connective (Complementation:  ' )
3. Practice: Logical Connective (Exclusive OR:  +  )
4. Real World Possible Application: Two Layer Safety Mechanism

#9
Tau Language / Re: Tau Language REPL Syntax
Last post by S1r_4zdr3w - Dec 15, 2024, 05:32 AM
Thanks pk!

I tried to compare windows OS Tau executable and Ubuntu Linux OS Tau build-Release.

Without declaring my input,

1. In the Tau executable, it ask me how many steps do I want to perform the program. Then it will run depending on the number of steps I gave.
 
2. In the Tau build-Release, it will run the program step by step. And it will only stop when I type q for quit.

What I think I learned:

1. In Tau executable, it will ask how many times I want to run the program. It's like more into execution. It will run the program in one go from start to finish.

2. In build-Release, it will not ask how many times I want to run the program. So I may test it by providing different scenarios to see the program's reaction. The program will run step-by-step and that's why I can just write "q" to quit the program.

I also tried your code recommendation of storing the results. Since I was running the code on the folder build-Release, that's where the .txt was saved. And yes, I can find all the results there. Thanks for the great info!

Here is my comparison of the two. In the build-Release, we need to save the output at .txt to see the result


http://youtube.com/post/UgkxkSJ6fL25NdUUwTqJOzJkRpDz-fCjReTf?si=mKQl5Qv0AWMpa-G3
#10
Tau Language / Re: Tau Language REPL Syntax
Last post by pk - Dec 14, 2024, 06:42 AM
Quote from: S1r_4zdr3w on Dec 13, 2024, 10:17 AMQ1: is it possible to stop Tau from running? just curious.

For example I did the example o1[t] = 0, I run it and then Tau ask me, "no inputs vars defined, how many steps do you want to perform?" I put a large number for testing (10,000) and its not stopping till it reach that number, it's actually amazing to see it run.  Is there a key I can type to stop it?

Q2: Also, does the result stored in my computer or if I entered cleared, it will remove everything?

Thanks!


A1: If you compile an up to date version from Github, there is a new mechanism of execution that goes through steps one by one. One can stop the execution by pressing q followed by enter, otherwise pressing the enter key on its own continues to the next step.

A2: If you declared your output variable, say o1, to the standard output i.e. 'sbf o1 = console' then it won't store the results.
But results can easily be stored in a text file by changing that output variable declaration into 'sbf o1 = ofile("my_output1.txt")' for instance.
One can also store the output in a different location by providing a full path like: 'sbf o1=("/tmp/tmp_tau1.out")' so the output from o1 goes to /tmp in this example, instead of the tau executable location.