Skip to content

Commit 995efe6

Browse files
committed
Fix readme
1 parent cd764a7 commit 995efe6

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,22 @@ minimal object-oriented language with integrated semantic state
55
access. The interpreter can be used to examine the state with SPARQL,
66
SHACL and OWL queries.
77

8+
The language is in development, for a general description, examples and tutorial to SMOL, we refer to [its webpage](https://www.smolang.org).
89

9-
This branch in particular contains the case study for modeling geological processes.
1010

11-
To run the experiment contained in the article _"Semantically Triggered Qualitative Simulation of a Geological Process"_, run the following commands (tested on a Linux machine)
11+
To compile and run the SMOL REPL, run
1212
```
13-
chmod +x ./execute_case.sh
14-
./execute_case.sh
13+
./gradlew build
14+
java -jar build/libs/smol.jar --help
1515
```
1616

17-
For a general description and tutorial to SMOL, we refer to [its webpage](www.smolang.org).
17+
To run the SMOL REPL pre-compiled using docker, run the following command:
18+
```
19+
docker run -it --rm -v "$PWD":/root/smol ghcr.io/smolang/smol:latest
20+
```
21+
22+
To compile and run the SMOL REPL inside docker, run the following commands:
23+
```
24+
docker build -t smol .
25+
docker run -it --rm -v "$PWD":/root/smol smol
26+
```

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77
}
88

99
group = 'org.smolang'
10-
version = '0.3'
10+
version = '0.4'
1111

1212
java {
1313
toolchain {

src/main/kotlin/no/uio/microobject/type/TypeChecker.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package no.uio.microobject.type
22

33
import no.uio.microobject.antlr.WhileParser
4-
import no.uio.microobject.ast.expr.Conversion
54
import no.uio.microobject.data.TripleManager
65
import no.uio.microobject.main.Settings
76
import no.uio.microobject.runtime.FieldInfo
@@ -30,7 +29,7 @@ class TypeChecker(private val ctx: WhileParser.ProgramContext, private val setti
3029
Handling type data structures
3130
***********************************************************************/
3231
//translates a string text to a type, even accessed within class createClass (needed to determine generics)
33-
private fun stringToType(text: String, createClass: String, generics : MutableMap<String, List<String>>) : Type {
32+
private fun stringToType(text: String, generics : MutableMap<String, List<String>>) : Type {
3433
return when {
3534
//generics.getOrDefault(createClass, listOf()).contains(text) -> GenericType(text)
3635
generics.values.flatten().contains(text) -> GenericType(text)
@@ -46,9 +45,9 @@ class TypeChecker(private val ctx: WhileParser.ProgramContext, private val setti
4645
//translates a type AST text to a type, even accessed within class createClass (needed to determine generics)
4746
fun translateType(ctx : WhileParser.TypeContext, className : String, generics : MutableMap<String, List<String>>) : Type {
4847
return when(ctx){
49-
is WhileParser.Simple_typeContext -> stringToType(ctx.text, className, generics)
48+
is WhileParser.Simple_typeContext -> stringToType(ctx.text, generics)
5049
is WhileParser.Nested_typeContext -> {
51-
val lead = stringToType(ctx.NAME().text, className, generics)
50+
val lead = stringToType(ctx.NAME().text, generics)
5251
ComposedType(lead, ctx.typelist().type().map { translateType(it, className, generics) })
5352
}
5453
is WhileParser.Fmu_typeContext -> {

0 commit comments

Comments
 (0)