-
Data: 2012-02-04 18:16:42
Temat: Styla: Interpreter Prologu w Scali
Od: A.L. <l...@a...com> szukaj wiadomości tego autora
[ pokaż wszystkie nagłówki ]Gdyby ktos sie chcial dowiedziec jak pisac wieksze programy w jezyku
Scala i tak dalej - post na comp.lang.prolog.
Cytuje ponizej.
A.L.
Styla is a fairly complete Prolog interpreter written in Scala,
derived from Kernel Prolog (see Fluents: A Refactoring of Prolog for
Uniform Reflection and Interoperation with External Objects in
CL'2000).
The genuinely open sourced (Apache license) code is hosted at:
http://code.google.com/p/styla/
and it is designed with simplicity and extensibility in mind - hoping
it would be useful to people experimenting with new Prolog extensions
or alternative logic programming languages.
Among the features not found in most Prologs, first class Logic
Engines - and a generic view of everything as Fluents (TermSinks and
TermSources) that abstract away iteration over various data types,
including answers produced by Logic Engines.
Here are some limitations, most things not on this list and expected
from a Prolog system should work.
- toplevel goals that a not conjunctions should be parenthesized
- operators are all fixed and xfx, but they match the default
priorities of
most Prologs' operators - see examples in progs/
- no gui or networking - Scala can do all that better
Take a look at prolog.Main for the start-up sequence - that gives a
glimpse of how to embed it into a Scala or Java program.
To add a new built-ins, just clone the closest match in
prolog.builtins and drop it in the same directory - the runtime system
will instantly recognize it.
Use the script "compile" to recompile the system with scalac "run" to
run it with scala and jrun to run it with java (possibly edit for path
info in this case).
The file prolog/fluents/Lib.scala embeds Prolog code that is present
at start-up. New Prolog code that you want part of the default
libraries can be added there.
Enjoy,
Paul Tarau
Najnowsze wątki z tej grupy
- "Wuj dobra rada" z KDAB rozważa: Choosing the Right Programming Language for Your Embedded Linux Device
- Nowa ustawa o ochronie praw autorskich - opis problemu i szkic ustawy
- Alg. kompresji LZW
- Popr. 14. Nauka i Praca Programisty C++ w III Rzeczy (pospolitej)
- Arch. Prog. Nieuprzywilejowanych w pełnej wer. na nowej s. WWW energokod.pl
- 7. Raport Totaliztyczny: Sprawa Qt Group wer. 424
- TCL - problem z escape ostatniego \ w nawiasach {}
- Nauka i Praca Programisty C++ w III Rzeczy (pospolitej)
- testy-wyd-sort - Podsumowanie
- Tworzenie Programów Nieuprzywilejowanych Opartych Na Wtyczkach
- Do czego nadaje się QDockWidget z bibl. Qt?
- Bibl. Qt jest sztucznie ograniczona - jest nieprzydatna do celów komercyjnych
- Co sciaga kretynow
- AEiC 2024 - Ada-Europe conference - Deadlines Approaching
- Jakie są dobre zasady programowania programów opartych na wtyczkach?
Najnowsze wątki
- 2025-04-05 Dziwny wymiar wyroku
- 2025-04-05 Prunt z dachu
- 2025-04-05 Taśma LED
- 2025-04-05 Kraków => MS Dynamics 365BC/NAV Developer <=
- 2025-04-05 Warszawa => Strategic Account Manager <=
- 2025-04-05 co w Anglii dziś w Polsce za 30 lat
- 2025-04-05 Wrocław => SOC Tech Lead <=
- 2025-04-05 Gdynia => Przedstawiciel handlowy / KAM (branża TSL) <=
- 2025-04-05 Wyrok dożywocia dla Polki
- 2025-04-04 Prezydium Sejmu Tuskiego orzekło: Poseł KO mecenas Roman Giertych NIE jest mordercą (w żadnym sensie tego słowa?)
- 2025-04-04 Reset komóry
- 2025-04-04 Lublin => JavaScript / Node / Fullstack Developer <=
- 2025-04-04 Zielonka => Key Account Manager IT <=
- 2025-04-04 Warszawa => Ekspert IT (obszar systemów sieciowych) <=
- 2025-04-04 Warszawa => Mid/Senior IT Recruiter <=