SlideShare a Scribd company logo
1 of 22
Download to read offline
Designing a Development Environment for Logic and
                Multi-Paradigm Programming

                                Giulio Piancastelli   Enrico Denti
                     {giulio.piancastelli,enrico.denti}@unibo.it

                            Alma Mater Studiorum—Universit` di Bologna
                                                          a

              3rd Italian Workshop on Eclipse Technologies (EIT 2008)
                            Bari, November 17-18, 2008




G. Piancastelli and E. Denti (UniBO)                                     EIT 2008   1 / 22
Eclipse for programming languages


Eclipse is well-known as an open and extensible Integrated Development
Environment supporting many languages and systems
        Java, C, C++ (with official packaging and download)
        scripting languages such as Python (see PyDev)
        Web programming languages such as PHP (see PHPEclipse)
        niche languages such as Fortran (see the incubating Photran project)
Support for declarative and logic programming is lagging behind, or it is
completely lacking
        Prolog?




G. Piancastelli and E. Denti (UniBO)                             EIT 2008   2 / 22
An opportunity for logic programming

The interaction with the logic interpreter in major Prolog implementations
suffers a number of shortcomings and limitations:
        typically reduced to a command-line prompt in a text-based console
        editors and other support tools are built from scratch every time and
        each follows its own conventions
        useful and innovative instruments are provided only in a few rare cases
The Eclipse platform is an opportunity for logic programming
environments to
        exploit a high quality set of tools supporting a huge number of
        activities
        achieve uniformity by following a series of user interface standards
        and usage workflow guidelines


G. Piancastelli and E. Denti (UniBO)                                EIT 2008   3 / 22
tuProlog: the core for a logic and multi-paradigm IDE

tuProlog is an open source light-weight Prolog engine featuring some
interesting properties:
        entirely written in Java
        composed by a minimal core engine
        configurable by means of libraries
The choice of tuProlog as a means to analyse and evaluate the integration
of a logic-based language and support within Eclipse may lead to:
        easier platform integration
        innovative forms of interaction with the interpreter
In addition to logic programming, tuProlog also supports multi-paradigm
Java/Prolog programming, allowing a wider exploration towards a
multi-paradigm integrated development environment.


G. Piancastelli and E. Denti (UniBO)                           EIT 2008   4 / 22
Multi-paradigm programming
A programming paradigm is a style to represent/organise computations
        In logic programming, computations are deductions over a knowledge
        base formed by relations on which queries can be issued
        Object-oriented programming organises computations into hierarchies
        of entities encapsulating state and methods to manipulate it
Multi-paradigm programming is the integration of two or more paradigms
in a unique model that can be realised
        within a single language by following a multi-style approach
        within a system by following a multi-language approach
tuProlog integrates logic and object-oriented paradigms
        at the system level, where Java and Prolog can be combined to build
        tuProlog libraries
        at the application level, by means of bidirectional Java/Prolog
        integration
G. Piancastelli and E. Denti (UniBO)                               EIT 2008   5 / 22
Support for Java/Prolog multi-paradigm programming


Multi-paradigm programming in multi-language fashion needs to be
directly supported in its own right by a development environment, next to
tools provided for the combined languages on their own
        environments dedicated to each language
        tools to support the combination of the languages at the system level
In the case of tuProlog, a multi-paradigm Java/Prolog IDE needs to
supply for
   1    Java development
   2    Prolog development
   3    integration of the two languages by exploiting the library mechanism



G. Piancastelli and E. Denti (UniBO)                              EIT 2008   6 / 22
Java development




Use the JDT (Java Development Tools)




G. Piancastelli and E. Denti (UniBO)   EIT 2008   7 / 22
Prolog development (1/2)



Provide a JDT-comparable set of tools for tasks related to logic
programming
        wizards for the creation of projects, theories/modules, predicates with
        visibility indicator
        outline view to navigate logic theories and modules
               directives
               predicates subdivided in facts and rules
        cross-reference view to reach the clauses of a predicate used in a
        theory but possibly defined in a different module




G. Piancastelli and E. Denti (UniBO)                               EIT 2008   8 / 22
Prolog development (2/2)

Editing Prolog programs should be supported by
        syntax highlighting
        code completion for predicate invocation plus templates for parameter
        insertion
        visibility checks (unreachable predicates)
        availability checks (undefined predicates)
        correction suggestions for syntax errors
        logic programming specific syntax warnings
               e.g. the use of singleton variables within a clause
More advanced features should also be included
        refactoring
        debugging

G. Piancastelli and E. Denti (UniBO)                                 EIT 2008   9 / 22
Java/Prolog integration (1/2)



The integration between the Java side and the Prolog side of the
environment needs to be first performed at the nature level
Natures in Eclipse
A nature is used to configure the capabilities of a project, typically to
associate behaviour and functionalities in the form of builders that process
modified files at specific times

The Eclipse concept of natures is the straightforward counterpart of the
multiple traits of a programming system involving more than one paradigm




G. Piancastelli and E. Denti (UniBO)                            EIT 2008   10 / 22
Java/Prolog integration (2/2)

Next to the Java and Prolog nature, we need to provide an additional
nature that is able to carry out tasks belonging to the hybrid quality of
multi-paradigm programming projects
tuProlog projects
In the case of tuProlog projects, such tasks are
        make Java libraries under development immediately available on the
        Prolog programming side, without forcing the user to explicitly deal
        with classpath settings
        supply wizards for the creation of Java/Prolog libraries and new
        predicates/functors/directives/operators within a library
        instruct the outline view to show the contents of a library as a list of
        logic programming elements rather than Java fields and methods


G. Piancastelli and E. Denti (UniBO)                                EIT 2008   11 / 22
Deployment

The software should be delivered in two different but integrated sets of
Eclipse plug-ins
Prolog Development Tools
Form an environment for Prolog programming on their own, and should be
made available both as an Eclipse plug-in and a Rich Client Platform
application, in order to deploy only the minimal set of Eclipse features to
users interested only in Prolog programming

tuProlog plug-in
Comprises the Prolog tools and the multi-paradigm Java/Prolog
functionalities based on tuProlog, and has to be deployed only as a
platform extension, so as to exploit the JDT already bundled with the
standard Eclipse download

G. Piancastelli and E. Denti (UniBO)                           EIT 2008   13 / 22
Components of the tuProlog plug-in for Eclipse


The current prototype of the tuProlog plug-in for Eclipse is composed of a
single feature comprising three different components
   1    alice.tuprolog makes tuProlog available as a software library
        within the platform
   2    alice.tuprologx.eclipse contains everything related to the
        interaction between tuProlog and Eclipse, including the user interface
   3    alice.tuprologx.eclipse.doc integrates the documentation (a
        getting started guide for the plug-in and relevant parts of the
        tuProlog manual) with the Eclipse help system




G. Piancastelli and E. Denti (UniBO)                              EIT 2008   14 / 22
Elements in alice.tuprologx.eclipse


The alice.tuprologx.eclipse component provides
        a perspective
        two wizards to help create projects and logic theories, also invocable
        from buttons in a toolbar
        a nature and a builder associated to Prolog projects
        an editor with syntax highlight and a basic form of syntax checking
        for the Prolog language
        property pages to change editor options (such as font and colours)
        and manage the possibly many tuProlog engines associated with a
        single project



G. Piancastelli and E. Denti (UniBO)                               EIT 2008   15 / 22
Views in alice.tuprologx.eclipse

The alice.tuprologx.eclipse component also provides four views to
display information related to Prolog development and the execution of
Prolog programs
        the Clause view accesses the AST of the Prolog program in the
        selected editor buffer to show its outline in terms of clauses, each
        identified by its head
        the Theory view displays at a glance the content of all the tuProlog
        engines associated with the current project in terms of logic theories
        the Query view provides the history of the logic queries asked within
        the context of the current project
        the tuProlog Console view allows to select one of the possibly many
        tuProlog engines that have been asked a query and see the solution,
        output text, and tracing information derived by standard predicates
        such as spy/0

G. Piancastelli and E. Denti (UniBO)                               EIT 2008   16 / 22
The first engine configuration occurs in the Prolog project wizard




Any Prolog project comes with an associated tuProlog engine that the
wizard offers an interface to configure in terms of libraries and theories
After creating a Prolog project and logic theories, developers may add
other tuProlog engines to the project and modify their configurations




In particular, it is possible to finely set the default scope of an engine in
terms of the logic theories contained in the project
Queries are entered through the launch configuration dialog provided by
Eclipse, that the tuProlog plug-in extends to introduce its own launch
configuration type




The scope of the query for each available engine and the query itself are
separately set in their own dialog window
A minimal example in a teaching setting

Show the effect of different implementations for the member/2 predicate
File list-1.pl
member(E, [E | _]).
member(E, [_ | L]) :- member(E, L).

File list-2.pl
member(E, [H | _]) :- E == H, !.
member(E, [_ | T]) :- member(E, T).

Given engine-1 with theory list-1.pl and engine-2 with theory
list-2.pl, executing the query

?- member(1, [1, 0, 0, 1, 0, 1]).

will yield three solutions for engine-1 but just one solution for engine-2
G. Piancastelli and E. Denti (UniBO)                          EIT 2008   21 / 22
Conclusions and future work


We have used Eclipse and tuProlog to start promoting innovation in the
field of logic programming development environments
        introduced interface standards and workflow guidelines
        allowed for a flexible and effective interaction with a multiplicity of
        independently configured Prolog interpreters
In the immediate future we will pursue
     a deeper integration of the existing tuProlog plug-in tools
               better mechanisms to configure tuProlog engines and browsing their
               knowledge bases
               platform-wide access to the Prolog AST
        extension towards the multi-paradigm side of the environment



G. Piancastelli and E. Denti (UniBO)                                  EIT 2008   22 / 22

More Related Content

Similar to Designing a Development Environment for Logic and Multi-Paradigm Programming

NeOn Tool Support for Building Ontologies By Reuse - ICBO 09
NeOn Tool Support for Building Ontologies By Reuse - ICBO 09NeOn Tool Support for Building Ontologies By Reuse - ICBO 09
NeOn Tool Support for Building Ontologies By Reuse - ICBO 09Mathieu d'Aquin
 
A Comparative Study of Ontology building Tools in Semantic Web Applications
A Comparative Study of Ontology building Tools in Semantic Web Applications A Comparative Study of Ontology building Tools in Semantic Web Applications
A Comparative Study of Ontology building Tools in Semantic Web Applications dannyijwest
 
A Comparative Study Ontology Building Tools for Semantic Web Applications
A Comparative Study Ontology Building Tools for Semantic Web Applications A Comparative Study Ontology Building Tools for Semantic Web Applications
A Comparative Study Ontology Building Tools for Semantic Web Applications IJwest
 
A Comparative Study Ontology Building Tools for Semantic Web Applications
A Comparative Study Ontology Building Tools for Semantic Web Applications A Comparative Study Ontology Building Tools for Semantic Web Applications
A Comparative Study Ontology Building Tools for Semantic Web Applications dannyijwest
 
MLGrafViz: multilingual ontology visualization plug-in for Protégé
MLGrafViz: multilingual ontology visualization plug-in for ProtégéMLGrafViz: multilingual ontology visualization plug-in for Protégé
MLGrafViz: multilingual ontology visualization plug-in for ProtégéCSITiaesprime
 
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEWONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEWijait
 
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW ijait
 
Ontologies in Ubiquitous Computing
Ontologies in Ubiquitous ComputingOntologies in Ubiquitous Computing
Ontologies in Ubiquitous ComputingJose R. Hilera
 
KOS Management - The case of the Organic.Edunet Ontology
KOS Management - The case of the Organic.Edunet OntologyKOS Management - The case of the Organic.Edunet Ontology
KOS Management - The case of the Organic.Edunet OntologyVassilis Protonotarios
 
QSOUL/Aop
QSOUL/AopQSOUL/Aop
QSOUL/AopESUG
 
Java-centered Translator-based Multi-paradigm Software Development Environment
Java-centered Translator-based Multi-paradigm Software Development EnvironmentJava-centered Translator-based Multi-paradigm Software Development Environment
Java-centered Translator-based Multi-paradigm Software Development EnvironmentWaqas Tariq
 
Eclipse Training - Introduction
Eclipse Training - IntroductionEclipse Training - Introduction
Eclipse Training - IntroductionLuca D'Onofrio
 
report_barc
report_barcreport_barc
report_barcsiontani
 
A Program Transformation Technique To Support AOP Within C Template
A Program Transformation Technique To Support AOP Within C   TemplateA Program Transformation Technique To Support AOP Within C   Template
A Program Transformation Technique To Support AOP Within C TemplateCrystal Sanchez
 
Proposal of an Ontology Applied to Technical Debt on PL/SQL Development
Proposal of an Ontology Applied to Technical Debt on PL/SQL DevelopmentProposal of an Ontology Applied to Technical Debt on PL/SQL Development
Proposal of an Ontology Applied to Technical Debt on PL/SQL DevelopmentJorge Barreto
 
Introduction to Python Basics Programming
Introduction to Python Basics ProgrammingIntroduction to Python Basics Programming
Introduction to Python Basics ProgrammingRaveendra R
 
Benchmarking open source deep learning frameworks
Benchmarking open source deep learning frameworksBenchmarking open source deep learning frameworks
Benchmarking open source deep learning frameworksIJECEIAES
 
Basic Programming Concept
Basic Programming ConceptBasic Programming Concept
Basic Programming ConceptCma Mohd
 

Similar to Designing a Development Environment for Logic and Multi-Paradigm Programming (20)

NeOn Tool Support for Building Ontologies By Reuse - ICBO 09
NeOn Tool Support for Building Ontologies By Reuse - ICBO 09NeOn Tool Support for Building Ontologies By Reuse - ICBO 09
NeOn Tool Support for Building Ontologies By Reuse - ICBO 09
 
A Comparative Study of Ontology building Tools in Semantic Web Applications
A Comparative Study of Ontology building Tools in Semantic Web Applications A Comparative Study of Ontology building Tools in Semantic Web Applications
A Comparative Study of Ontology building Tools in Semantic Web Applications
 
A Comparative Study Ontology Building Tools for Semantic Web Applications
A Comparative Study Ontology Building Tools for Semantic Web Applications A Comparative Study Ontology Building Tools for Semantic Web Applications
A Comparative Study Ontology Building Tools for Semantic Web Applications
 
A Comparative Study Ontology Building Tools for Semantic Web Applications
A Comparative Study Ontology Building Tools for Semantic Web Applications A Comparative Study Ontology Building Tools for Semantic Web Applications
A Comparative Study Ontology Building Tools for Semantic Web Applications
 
MLGrafViz: multilingual ontology visualization plug-in for Protégé
MLGrafViz: multilingual ontology visualization plug-in for ProtégéMLGrafViz: multilingual ontology visualization plug-in for Protégé
MLGrafViz: multilingual ontology visualization plug-in for Protégé
 
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEWONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
 
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
 
Ontologies in Ubiquitous Computing
Ontologies in Ubiquitous ComputingOntologies in Ubiquitous Computing
Ontologies in Ubiquitous Computing
 
KOS Management - The case of the Organic.Edunet Ontology
KOS Management - The case of the Organic.Edunet OntologyKOS Management - The case of the Organic.Edunet Ontology
KOS Management - The case of the Organic.Edunet Ontology
 
QSOUL/Aop
QSOUL/AopQSOUL/Aop
QSOUL/Aop
 
Knowledge Organization Systems (KOS): Management of Classification Systems in...
Knowledge Organization Systems (KOS): Management of Classification Systems in...Knowledge Organization Systems (KOS): Management of Classification Systems in...
Knowledge Organization Systems (KOS): Management of Classification Systems in...
 
Java-centered Translator-based Multi-paradigm Software Development Environment
Java-centered Translator-based Multi-paradigm Software Development EnvironmentJava-centered Translator-based Multi-paradigm Software Development Environment
Java-centered Translator-based Multi-paradigm Software Development Environment
 
Eclipse Training - Introduction
Eclipse Training - IntroductionEclipse Training - Introduction
Eclipse Training - Introduction
 
report_barc
report_barcreport_barc
report_barc
 
F461
F461F461
F461
 
A Program Transformation Technique To Support AOP Within C Template
A Program Transformation Technique To Support AOP Within C   TemplateA Program Transformation Technique To Support AOP Within C   Template
A Program Transformation Technique To Support AOP Within C Template
 
Proposal of an Ontology Applied to Technical Debt on PL/SQL Development
Proposal of an Ontology Applied to Technical Debt on PL/SQL DevelopmentProposal of an Ontology Applied to Technical Debt on PL/SQL Development
Proposal of an Ontology Applied to Technical Debt on PL/SQL Development
 
Introduction to Python Basics Programming
Introduction to Python Basics ProgrammingIntroduction to Python Basics Programming
Introduction to Python Basics Programming
 
Benchmarking open source deep learning frameworks
Benchmarking open source deep learning frameworksBenchmarking open source deep learning frameworks
Benchmarking open source deep learning frameworks
 
Basic Programming Concept
Basic Programming ConceptBasic Programming Concept
Basic Programming Concept
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 

Designing a Development Environment for Logic and Multi-Paradigm Programming

  • 1. Designing a Development Environment for Logic and Multi-Paradigm Programming Giulio Piancastelli Enrico Denti {giulio.piancastelli,enrico.denti}@unibo.it Alma Mater Studiorum—Universit` di Bologna a 3rd Italian Workshop on Eclipse Technologies (EIT 2008) Bari, November 17-18, 2008 G. Piancastelli and E. Denti (UniBO) EIT 2008 1 / 22
  • 2. Eclipse for programming languages Eclipse is well-known as an open and extensible Integrated Development Environment supporting many languages and systems Java, C, C++ (with official packaging and download) scripting languages such as Python (see PyDev) Web programming languages such as PHP (see PHPEclipse) niche languages such as Fortran (see the incubating Photran project) Support for declarative and logic programming is lagging behind, or it is completely lacking Prolog? G. Piancastelli and E. Denti (UniBO) EIT 2008 2 / 22
  • 3. An opportunity for logic programming The interaction with the logic interpreter in major Prolog implementations suffers a number of shortcomings and limitations: typically reduced to a command-line prompt in a text-based console editors and other support tools are built from scratch every time and each follows its own conventions useful and innovative instruments are provided only in a few rare cases The Eclipse platform is an opportunity for logic programming environments to exploit a high quality set of tools supporting a huge number of activities achieve uniformity by following a series of user interface standards and usage workflow guidelines G. Piancastelli and E. Denti (UniBO) EIT 2008 3 / 22
  • 4. tuProlog: the core for a logic and multi-paradigm IDE tuProlog is an open source light-weight Prolog engine featuring some interesting properties: entirely written in Java composed by a minimal core engine configurable by means of libraries The choice of tuProlog as a means to analyse and evaluate the integration of a logic-based language and support within Eclipse may lead to: easier platform integration innovative forms of interaction with the interpreter In addition to logic programming, tuProlog also supports multi-paradigm Java/Prolog programming, allowing a wider exploration towards a multi-paradigm integrated development environment. G. Piancastelli and E. Denti (UniBO) EIT 2008 4 / 22
  • 5. Multi-paradigm programming A programming paradigm is a style to represent/organise computations In logic programming, computations are deductions over a knowledge base formed by relations on which queries can be issued Object-oriented programming organises computations into hierarchies of entities encapsulating state and methods to manipulate it Multi-paradigm programming is the integration of two or more paradigms in a unique model that can be realised within a single language by following a multi-style approach within a system by following a multi-language approach tuProlog integrates logic and object-oriented paradigms at the system level, where Java and Prolog can be combined to build tuProlog libraries at the application level, by means of bidirectional Java/Prolog integration G. Piancastelli and E. Denti (UniBO) EIT 2008 5 / 22
  • 6. Support for Java/Prolog multi-paradigm programming Multi-paradigm programming in multi-language fashion needs to be directly supported in its own right by a development environment, next to tools provided for the combined languages on their own environments dedicated to each language tools to support the combination of the languages at the system level In the case of tuProlog, a multi-paradigm Java/Prolog IDE needs to supply for 1 Java development 2 Prolog development 3 integration of the two languages by exploiting the library mechanism G. Piancastelli and E. Denti (UniBO) EIT 2008 6 / 22
  • 7. Java development Use the JDT (Java Development Tools) G. Piancastelli and E. Denti (UniBO) EIT 2008 7 / 22
  • 8. Prolog development (1/2) Provide a JDT-comparable set of tools for tasks related to logic programming wizards for the creation of projects, theories/modules, predicates with visibility indicator outline view to navigate logic theories and modules directives predicates subdivided in facts and rules cross-reference view to reach the clauses of a predicate used in a theory but possibly defined in a different module G. Piancastelli and E. Denti (UniBO) EIT 2008 8 / 22
  • 9. Prolog development (2/2) Editing Prolog programs should be supported by syntax highlighting code completion for predicate invocation plus templates for parameter insertion visibility checks (unreachable predicates) availability checks (undefined predicates) correction suggestions for syntax errors logic programming specific syntax warnings e.g. the use of singleton variables within a clause More advanced features should also be included refactoring debugging G. Piancastelli and E. Denti (UniBO) EIT 2008 9 / 22
  • 10. Java/Prolog integration (1/2) The integration between the Java side and the Prolog side of the environment needs to be first performed at the nature level Natures in Eclipse A nature is used to configure the capabilities of a project, typically to associate behaviour and functionalities in the form of builders that process modified files at specific times The Eclipse concept of natures is the straightforward counterpart of the multiple traits of a programming system involving more than one paradigm G. Piancastelli and E. Denti (UniBO) EIT 2008 10 / 22
  • 11. Java/Prolog integration (2/2) Next to the Java and Prolog nature, we need to provide an additional nature that is able to carry out tasks belonging to the hybrid quality of multi-paradigm programming projects tuProlog projects In the case of tuProlog projects, such tasks are make Java libraries under development immediately available on the Prolog programming side, without forcing the user to explicitly deal with classpath settings supply wizards for the creation of Java/Prolog libraries and new predicates/functors/directives/operators within a library instruct the outline view to show the contents of a library as a list of logic programming elements rather than Java fields and methods G. Piancastelli and E. Denti (UniBO) EIT 2008 11 / 22
  • 12.
  • 13. Deployment The software should be delivered in two different but integrated sets of Eclipse plug-ins Prolog Development Tools Form an environment for Prolog programming on their own, and should be made available both as an Eclipse plug-in and a Rich Client Platform application, in order to deploy only the minimal set of Eclipse features to users interested only in Prolog programming tuProlog plug-in Comprises the Prolog tools and the multi-paradigm Java/Prolog functionalities based on tuProlog, and has to be deployed only as a platform extension, so as to exploit the JDT already bundled with the standard Eclipse download G. Piancastelli and E. Denti (UniBO) EIT 2008 13 / 22
  • 14. Components of the tuProlog plug-in for Eclipse The current prototype of the tuProlog plug-in for Eclipse is composed of a single feature comprising three different components 1 alice.tuprolog makes tuProlog available as a software library within the platform 2 alice.tuprologx.eclipse contains everything related to the interaction between tuProlog and Eclipse, including the user interface 3 alice.tuprologx.eclipse.doc integrates the documentation (a getting started guide for the plug-in and relevant parts of the tuProlog manual) with the Eclipse help system G. Piancastelli and E. Denti (UniBO) EIT 2008 14 / 22
  • 15. Elements in alice.tuprologx.eclipse The alice.tuprologx.eclipse component provides a perspective two wizards to help create projects and logic theories, also invocable from buttons in a toolbar a nature and a builder associated to Prolog projects an editor with syntax highlight and a basic form of syntax checking for the Prolog language property pages to change editor options (such as font and colours) and manage the possibly many tuProlog engines associated with a single project G. Piancastelli and E. Denti (UniBO) EIT 2008 15 / 22
  • 16. Views in alice.tuprologx.eclipse The alice.tuprologx.eclipse component also provides four views to display information related to Prolog development and the execution of Prolog programs the Clause view accesses the AST of the Prolog program in the selected editor buffer to show its outline in terms of clauses, each identified by its head the Theory view displays at a glance the content of all the tuProlog engines associated with the current project in terms of logic theories the Query view provides the history of the logic queries asked within the context of the current project the tuProlog Console view allows to select one of the possibly many tuProlog engines that have been asked a query and see the solution, output text, and tracing information derived by standard predicates such as spy/0 G. Piancastelli and E. Denti (UniBO) EIT 2008 16 / 22
  • 17. The first engine configuration occurs in the Prolog project wizard Any Prolog project comes with an associated tuProlog engine that the wizard offers an interface to configure in terms of libraries and theories
  • 18. After creating a Prolog project and logic theories, developers may add other tuProlog engines to the project and modify their configurations In particular, it is possible to finely set the default scope of an engine in terms of the logic theories contained in the project
  • 19. Queries are entered through the launch configuration dialog provided by Eclipse, that the tuProlog plug-in extends to introduce its own launch configuration type The scope of the query for each available engine and the query itself are separately set in their own dialog window
  • 20.
  • 21. A minimal example in a teaching setting Show the effect of different implementations for the member/2 predicate File list-1.pl member(E, [E | _]). member(E, [_ | L]) :- member(E, L). File list-2.pl member(E, [H | _]) :- E == H, !. member(E, [_ | T]) :- member(E, T). Given engine-1 with theory list-1.pl and engine-2 with theory list-2.pl, executing the query ?- member(1, [1, 0, 0, 1, 0, 1]). will yield three solutions for engine-1 but just one solution for engine-2 G. Piancastelli and E. Denti (UniBO) EIT 2008 21 / 22
  • 22. Conclusions and future work We have used Eclipse and tuProlog to start promoting innovation in the field of logic programming development environments introduced interface standards and workflow guidelines allowed for a flexible and effective interaction with a multiplicity of independently configured Prolog interpreters In the immediate future we will pursue a deeper integration of the existing tuProlog plug-in tools better mechanisms to configure tuProlog engines and browsing their knowledge bases platform-wide access to the Prolog AST extension towards the multi-paradigm side of the environment G. Piancastelli and E. Denti (UniBO) EIT 2008 22 / 22