Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation #33

Open
ambs opened this issue May 26, 2020 · 13 comments
Open

Documentation #33

ambs opened this issue May 26, 2020 · 13 comments

Comments

@ambs
Copy link

ambs commented May 26, 2020

Hi.
Is there any documentation or examples on how to tie prolog with C#? For instance, how to create a predicate that is, in fact a C# function reference?
Thank you

@jsakamoto
Copy link
Owner

jsakamoto commented May 31, 2020

Unfortunately, there are not good documents. 😢

I just fork the @JohnPool 's work from SourceForge, and I could not get any documentation at that time.

The existing sample codes I know are:

@ambs
Copy link
Author

ambs commented May 31, 2020

Thank you. Will dig a little the code.

@JohnPool
Copy link

JohnPool commented May 31, 2020 via email

@ambs
Copy link
Author

ambs commented May 31, 2020 via email

@JohnPool
Copy link

JohnPool commented May 31, 2020 via email

@ambs
Copy link
Author

ambs commented Jun 1, 2020

Dear @JohnPool , you forgot the attach, or github dropped it... Thank you

@jsakamoto
Copy link
Owner

@ambs

I found "README" as a Microsoft Word document file.

I also attach the PDF version that is converted from the .doc file.

@JohnPool
Copy link

JohnPool commented Jun 1, 2020 via email

@ambs
Copy link
Author

ambs commented Jun 1, 2020

I think it is the file @jsakamoto added in the previous post. Thanks.
I'll poke again if needed.
Best,

@ambs
Copy link
Author

ambs commented Jun 3, 2020

It will not be easy. My idea was to allow that in runtime. Extending an enum is not possible.
A solution would be to allow the :== syntax to have possible parameters in the RHS of the rule.

Having time, I will try to do that during my vacations. But not possible for my class this Saturday :-)

@JohnPool
Copy link

JohnPool commented Jun 3, 2020 via email

@ambs
Copy link
Author

ambs commented Jun 3, 2020 via email

@Thriliriel
Copy link

Hello.

I liked this idea a lot! I am facing a problem where i cannot add the same root fact twice. For example, if we use the readme example:

prolog.ConsultFromString("human(socrates).");

I am not able to add another human, like, for example:

prolog.ConsultFromString("human(socrates).");
prolog.ConsultFromString("human(aristoteles).");

It raises the error: Predicate 'human/1' is already defined in...

Is there a way to avoid that?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants