Commit fc24c955 authored by Paff's avatar Paff
Browse files

running exmaple

parents b3f49dfc 2584b953
......@@ -11,7 +11,7 @@ import secarc.seccds.fe.Store;
component CashDeskSystem {
trustlevel -1;
trustlevel +0 "interne Angreifer";
autoconnect encrypted port;
autoinstantiate on;
......@@ -20,18 +20,14 @@ component CashDeskSystem {
port
in Event newSale,
in Image barcode,
in String identifier,
in Event endSale,
out ProductData;
out ProductData outProductData;
port
in Event cardPay,
in CardData,
in Integer pin,
out Boolean validation;
port
out Bill;
component CashDesk cashDesk
[encrypted bdOut -> bank.bankData;
......@@ -46,10 +42,8 @@ component CashDeskSystem {
connect cashDesk -> store;
connect cashDesk.outProductData -> productData;
connect store.productData -> cashDesk.inProductData;
connect cashDesk.outProductData -> outProductData;
connect identifier -> cashDesk.inIdentifier;
connect store.outProductData -> cashDesk.inProductData;
}
\ No newline at end of file
......@@ -7,27 +7,26 @@ import java.awt.Image;
component CashDesk {
trustlevel +1;
access cashier;
port
in Event newSale,
in Image barcode,
in String inIdentifier,
out String outIdentifier,
in Event endSale,
in ProductData inProductData,
in PaymentAck paymentAck,
out ProductData outProductData;
port
in Event cardPay,
critical in CardData,
critical in Integer pin,
critical out BankData bdOut,
in CardData,
in Integer pin,
out BankData bdOut,
in PaymentAck paIn,
out Boolean validation;
port
out SaleInformation,
out Bill;
out SaleInformation;
}
\ No newline at end of file
......@@ -16,9 +16,8 @@ component Store {
identity weak cashDesk -> store;
port
in String identifier,
out ProductData,
out PaymentAck;
in String intIdentifier,
out ProductData outProductData;
port
in SaleInformation;
......@@ -29,7 +28,7 @@ component Store {
cpe "cpeName";
port
in String identifier,
in String inIdentifier,
out Identifier;
}
......
......@@ -16,9 +16,8 @@ component CashDeskSystem {
port
in Event newSale,
in Image barcode,
in String identifier,
in Event endSale,
out ProductData;
out ProductData outProductData;
port
in Event cardPay,
......@@ -26,17 +25,11 @@ component CashDeskSystem {
in Integer pin,
out Boolean validation;
port
out Bill;
component Store {
port
in String inIdentifier,
out ProductData outProductData,
out PaymentAck;
port
in SaleInformation;
}
......@@ -50,10 +43,8 @@ component CashDeskSystem {
connect cashDesk -> store;
connect cashDesk.outProductData -> productData;
connect cashDesk.outProductData -> outProductData;
connect store.outProductData -> cashDesk.inProductData;
connect identifier -> cashDesk.inIdentifier;
}
\ No newline at end of file
......@@ -6,14 +6,14 @@ import java.awt.Image;
component CashDesk {
trustlevel +1;
port
in Event newSale,
in Image barcode,
in String inIdentifier,
out String outIdentifier,
in Event endSale,
in ProductData inProductData,
in PaymentAck paymentAck,
out ProductData outProductData;
port
......@@ -25,7 +25,6 @@ component CashDesk {
out Boolean validation;
port
out SaleInformation,
out Bill;
out SaleInformation;
}
\ No newline at end of file
......@@ -11,27 +11,23 @@ import secarc.seccds.fe.Store;
component CashDeskSystem {
trustlevel -1;
trustlevel +0 "interne Angreifer";
autoconnect port;
autoconnect encrypted port;
autoinstantiate on;
accesscontrol on;
port
in Event newSale,
in Image barcode,
in String identifier,
in Event endSale,
out ProductData;
out ProductData outProductData;
port
in Event cardPay,
in CardData,
in Integer pin,
out Boolean validation;
port
out Bill;
component CashDesk cashDesk
[encrypted bdOut -> bank.bankData;
......@@ -46,10 +42,8 @@ component CashDeskSystem {
connect cashDesk -> store;
connect cashDesk.outProductData -> productData;
connect cashDesk.outProductData -> outProductData;
connect store.outProductData -> cashDesk.inProductData;
connect identifier -> cashDesk.inIdentifier;
}
\ No newline at end of file
......@@ -13,11 +13,9 @@ component CashDesk {
port
in Event newSale,
in Image barcode,
in String inIdentifier,
out String outIdentifier,
in Event endSale,
in ProductData inProductData,
in PaymentAck paymentAck,
out ProductData outProductData;
port
......@@ -29,7 +27,6 @@ component CashDesk {
out Boolean validation;
port
out SaleInformation,
out Bill;
out SaleInformation;
}
\ No newline at end of file
......@@ -17,8 +17,7 @@ component Store {
port
in String intIdentifier,
out ProductData outProductData,
out PaymentAck;
out ProductData outProductData;
port
in SaleInformation;
......
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>secarc-example</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
encoding/<project>=UTF-8
<#if op.callCalculator("demo.Constants")></#if>
<#if op.callCalculator("demo.TransformAssociations")></#if>
<#list ast.getCDClasses() as class>
create table ${class.getName()} (
<#if op.callCalculator("demo.Association", class) >
autoID INT NOT NULL PRIMARY KEY,
</#if>
<#list class.getCDAttributes() as attr>
${attr.printName()} ${op.getValue("constants").getType(attr.printType())}<#if attr_has_next>,</#if>
</#list>
);
<#if op.callCalculator("demo.N2NAssociation", class)>
create table ${class.getName()}_${op.getValue("otherClass")} (
${class.getName()} INT NOT NULL,
${op.getValue("otherClass")} INT NOT NULL,
PRIMARY KEY (${class.getName()}, ${op.getValue("otherClass")})
);
</#if>
</#list>
\ No newline at end of file
<#list ast.getCDClasses() as class>
drop table ${class.getName()};
<#if op.callCalculator("demo.N2NAssociation", class)>
drop table ${class.getName()}_${op.getValue("otherClass")};
</#if>
</#list>
\ No newline at end of file
<#-- Disable Java Comments-->
${op.setTracing(false)}
${op.callTemplates(
"cd.SQLCreate",
ast.printPackage() +".create",
"sql",
ast)}
${op.callTemplates(
"cd.SQLDelete",
ast.printPackage() +".delete",
"sql",
ast)}
\ No newline at end of file
#Generated by Maven
#Tue Oct 28 16:40:43 CET 2014
version=0.0.1-SNAPSHOT
groupId=de.se_rwth.montisecarc
artifactId=generator
demo/TransformAssociations.class
demo/N2NAssociation.class
demo/Constants.class
demo/Association.class
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment