Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rolando Grave De Peralta Gonzalez
semantique_2019
Commits
53529268
Commit
53529268
authored
Apr 09, 2019
by
Damien.Morard
Browse files
Add TP3
parent
61795f8b
Changes
9
Hide whitespace changes
Inline
Side-by-side
TPs/TP3/TP3_logickit/.gitignore
0 → 100644
View file @
53529268
.DS_Store
/.build
/Packages
/*.xcodeproj
TPs/TP3/TP3_logickit/Package.resolved
0 → 100644
View file @
53529268
{
"object": {
"pins": [
{
"package": "LogicKit",
"repositoryURL": "https://github.com/kyouko-taiga/LogicKit",
"state": {
"branch": "master",
"revision": "3ee0c761609ef85f76604d9308a24841cca972c4",
"version": null
}
}
]
},
"version": 1
}
TPs/TP3/TP3_logickit/Package.swift
0 → 100644
View file @
53529268
// swift-tools-version:5.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import
PackageDescription
let
package
=
Package
(
name
:
"TP3_logickit"
,
dependencies
:
[
// Dependencies declare other packages that this package depends on.
.
package
(
url
:
"https://github.com/kyouko-taiga/LogicKit"
,
.
branch
(
"master"
)),
],
targets
:
[
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.
target
(
name
:
"TP3_logickit"
,
dependencies
:
[
"LogicKit"
]),
.
testTarget
(
name
:
"TP3_logickitTests"
,
dependencies
:
[
"TP3_logickit"
]),
]
)
TPs/TP3/TP3_logickit/README.md
0 → 100644
View file @
53529268
# TP3_logickit
A description of this package.
TPs/TP3/TP3_logickit/Sources/TP3_logickit/main.swift
0 → 100644
View file @
53529268
import
LogicKit
import
LogicKitBuiltins
// Initial Term
// You can add other terms if needed
//let x: Term = .var("x")
// KnowledgeBase is a collection which contains all the things we know
var
kb
:
KnowledgeBase
=
[
// Complete the facts and rules in this knowledge base
// HERE
]
// We merge your knowledge base with builtins types in LogicKit
// Also, you can use all operation on Nat and List
kb
=
kb
+
KnowledgeBase
(
knowledge
:
(
List
.
axioms
+
Nat
.
axioms
))
// Write your examples to test your rules below !
TPs/TP3/TP3_logickit/Tests/LinuxMain.swift
0 → 100644
View file @
53529268
import
XCTest
import
TP3_logickitTests
var
tests
=
[
XCTestCaseEntry
]()
tests
+=
TP3_logickitTests
.
allTests
()
XCTMain
(
tests
)
TPs/TP3/TP3_logickit/Tests/TP3_logickitTests/TP3_logickitTests.swift
0 → 100644
View file @
53529268
import
XCTest
import
class
Foundation
.
Bundle
final
class
TP3_logickitTests
:
XCTestCase
{
func
testExample
()
throws
{
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct
// results.
// Some of the APIs that we use below are available in macOS 10.13 and above.
guard
#available(macOS 10.13, *)
else
{
return
}
let
fooBinary
=
productsDirectory
.
appendingPathComponent
(
"TP3_logickit"
)
let
process
=
Process
()
process
.
executableURL
=
fooBinary
let
pipe
=
Pipe
()
process
.
standardOutput
=
pipe
try
process
.
run
()
process
.
waitUntilExit
()
let
data
=
pipe
.
fileHandleForReading
.
readDataToEndOfFile
()
let
output
=
String
(
data
:
data
,
encoding
:
.
utf8
)
XCTAssertEqual
(
output
,
"Hello, world!
\n
"
)
}
/// Returns path to the built products directory.
var
productsDirectory
:
URL
{
#if os(macOS)
for
bundle
in
Bundle
.
allBundles
where
bundle
.
bundlePath
.
hasSuffix
(
".xctest"
)
{
return
bundle
.
bundleURL
.
deletingLastPathComponent
()
}
fatalError
(
"couldn't find the products directory"
)
#else
return
Bundle
.
main
.
bundleURL
#endif
}
static
var
allTests
=
[
(
"testExample"
,
testExample
),
]
}
TPs/TP3/TP3_logickit/Tests/TP3_logickitTests/XCTestManifests.swift
0 → 100644
View file @
53529268
import
XCTest
#if !canImport(ObjectiveC)
public
func
allTests
()
->
[
XCTestCaseEntry
]
{
return
[
testCase
(
TP3_logickitTests
.
allTests
),
]
}
#endif
TPs/TP3/TP3_semantique.pdf
0 → 100644
View file @
53529268
File added
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment