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

Deepen Prolog engine, parser and lexer components #6

Closed
maldins46 opened this issue Dec 23, 2020 · 3 comments · Fixed by #28
Closed

Deepen Prolog engine, parser and lexer components #6

maldins46 opened this issue Dec 23, 2020 · 3 comments · Fixed by #28
Assignees
Labels
base structure Build/edit a base feature of the project

Comments

@maldins46
Copy link
Contributor

In order to implement the pipeline, the first part (the engine) must be deepened and firstly prototyped.

@maldins46 maldins46 created this issue from a note in ScalaQuest Project (Backlog (current Sprint)) Dec 23, 2020
@maldins46 maldins46 moved this from Backlog (current Sprint) to In progress (current Sprint) in ScalaQuest Project Dec 23, 2020
@maldins46 maldins46 changed the title Deepening parser and lexer components Deepen parser and lexer components Dec 23, 2020
@maldins46 maldins46 added enhancement New feature or request base structure Build/edit a base feature of the project and removed enhancement New feature or request labels Dec 28, 2020
@maldins46 maldins46 changed the title Deepen parser and lexer components Deepen Prolog engine, parser and lexer components Jan 1, 2021
@lippo97
Copy link
Contributor

lippo97 commented Jan 13, 2021

Up to now, January the 13th, @francescogorini and I have a working solution of the lexer and the parser.

I will list a summary of what we've done:

In 072fdc8 we used an algebraic data type in order to create a model of the Prolog clauses, using a TDD approach. Then we experimented with some of the scala features and we came up with a DSL that allows the creation of some Prolog clauses, using a Prolog-like syntax.

In 73d38fb we decided we no longer needed a Lexer that could fail as that should never happen in our application. We then wrote the tests that we used as a specification in order to implement a SimpleLexer.

In dbf7a13 we imported tuProlog 3.3.0. After messing around with it, we decided it was better for us to wrap its Java API in a Scala layer, focusing on preventing side-effects.
We came up with an Engine trait. It represents a generic Prolog engine and we wrote an implementation using tuProlog, called TuPrologEngine.

In 5641e7b, using a TDD approach, we wrote a Parser implementation, called PrologParser, that uses an Engine in order to parse its input.

As of ca2d7fb, almost all the code we wrote is documented.

@maldins46
Copy link
Contributor Author

maldins46 commented Jan 13, 2021

Amazing! Submit the pull request if you think the basic structure for your part is ready. We can evaluate it together at the end of the Sprint, or earlier.

@lippo97 lippo97 mentioned this issue Jan 15, 2021
@lippo97
Copy link
Contributor

lippo97 commented Jan 15, 2021

As of 6092804 all code we wrote is fully documented.

We completed the implementation of our library for the manipulation of Prolog programs. It includes only functions for our needs. For simplicity purposes and to refer to it we called it Scalog. We then moved it in a dedicated package.

We refactored the Engine structure: now everything concerning tuProlog lives in a dedicated package.

If you all agree, @francescogorini and I think this task can be considered as done.

ScalaQuest Project automation moved this from In progress (current Sprint) to Done tasks (current sprint) Jan 20, 2021
@maldins46 maldins46 moved this from Done tasks (current sprint) to Done tasks (post Sprint) in ScalaQuest Project Jan 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
base structure Build/edit a base feature of the project
Projects
ScalaQuest Project
Done tasks (post Sprint)
Development

Successfully merging a pull request may close this issue.

3 participants